mirror of
https://github.com/floci-io/floci.git
synced 2026-11-22 21:50:46 -05:00
7dc514b52f2c96bdd1ea32ae64a02703f85be2aa
3713
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
7dc514b52f |
feat(emr): ListReleaseLabels, DescribeReleaseLabel and ListSupportedInstanceTypes (#5748)
* feat(emr): ListReleaseLabels, DescribeReleaseLabel and ListSupportedInstanceTypes None was served, so Terraform's aws_emr_release_labels and aws_emr_supported_instance_types data sources failed against Floci. A curated catalogue of EMR releases (emr-7.5.0, Floci's default, and emr-7.4.0, emr-6.15.0, emr-6.14.0 and emr-5.36.2) carries each release's applications and versions from the EMR Release Guide and its recent Amazon Linux releases, with common instance types and their EC2 sizes. The three actions filter and page it as the API documents, and answer InvalidRequestException for an unknown release, a bad token or an out-of-range MaxResults. A configured default release outside the catalogue is still listed. Closes #5734 * fix(emr): report EMR architecture values and match application versions without regard to case ListSupportedInstanceTypes returned the EC2 spellings x86_64 and arm64; the EMR model gives X86_64 and AARCH64 for Architecture. The ListReleaseLabels application filter matched the name without regard to case but not the version, so phoenix@4.14.3-hbase-1.4 missed emr-5.36.2. * refactor(emr): page the release catalogue with the shared Pagination ListReleaseLabels and ListSupportedInstanceTypes now page through core.common.Pagination, with the filters in the token namespace so a token replayed with other filters, or altered, is refused. DescribeReleaseLabel answers every application, as AWS reserves its MaxResults and NextToken. The EMR integration tests share one request helper. |
||
|
|
e3e06a1122 |
feat(iot): add RegisterCertificateWithoutCA and the V2 principal lists (#5772)
* feat(iot): add RegisterCertificateWithoutCA and the V2 principal lists RegisterCertificateWithoutCA registers a certificate from any issuer in SNI_ONLY mode. ListThingPrincipalsV2 and ListPrincipalThingsV2 page the thing principal attachments and report each one as NON_EXCLUSIVE_THING, because Floci does not model exclusive attachment. * fix(iot): validate the principal and page size of the V2 principal lists ListPrincipalThingsV2 requires a principal, and both V2 lists accept 1 to 250 results per page, as on AWS. Tests cover these checks and the RegisterCertificateWithoutCA rejection of a missing PEM and an unknown status. * fix(iot): refuse a device certificate registered in more than one account AWS selects the account from the server name, which Floci does not do yet. The MQTT TLS listener therefore refuses a certificate that more than one account registers, instead of admitting it under the lowest account ID. RegisterCertificateWithoutCA drops the cached location, and the lookup runs under compute, so a connect cannot cache a stale account. * fix(iot): make the RegisterCertificateWithoutCA duplicate check atomic A lock holds the duplicate check and the store write together, as CreateAuthorizer does, so two identical registrations at the same moment store one certificate and the other caller gets the 409. The 409 carries resourceId and resourceArn, as AWS lists for this call. |
||
|
|
4204ee2ea5 |
fix(bedrock-runtime): return errors when upstream error bodies stall (#5527)
* fix(bedrock-runtime): cancel abandoned calls and bound stalled error bodies Close the upstream request when the caller disconnects, including a stream stalled between tokens, and read streaming error bodies under a one-second deadline so a backend that stalls mid-error still returns ModelErrorException. Warnings keep the upstream status but omit the response body. * fix(bedrock-runtime): bound stalled error bodies on non-streaming converse Non-streaming Converse read the upstream body with ofString, so an error status followed by a stalled body hung until the caller gave up: the request timeout stops at the headers. Both Converse paths now share one send step that reads error bodies under the collection deadline. The deadline is configurable (error-body-timeout-millis, default 1000) so the tests run against a short one, and the raw-socket upstream fixture is shared between the cancellation and logging tests. * fix(bedrock-runtime): declare the error-body timeout in application.yml * fix(bedrock-runtime): schedule the error-body cut instead of polling for it The cancellation poll checked the deadline every 100 ms, so a stalled error body was cut 100 to 200 ms after it started. A timer armed when the error status arrives cuts it exactly, and the poll goes back to watching only for a caller disconnect. The test deadline drops to 10 ms. * fix(bedrock-runtime): validate the error-body timeout and tighten its tests Refuse a non-positive error-body-timeout-millis at startup, list the setting in the configuration table, and restore the non-streaming "Proxy request interrupted." wording. The complete-error-body tests now send headers and body in one write through StallingUpstream, so the 10 ms test deadline cannot race them, and the 8 KiB test asserts that the read ended at the cap rather than at the deadline. A shared ConverseRequests helper replaces the three hand-built Converse requests. |
||
|
|
1f4a46804c |
fix(cloudformation): refuse a list property that a parameter or an intrinsic makes a string (#5949)
* fix(cloudformation): refuse a list property that a parameter or an intrinsic makes a string The follow-up asked on #5923. The engine kept parameter values but not their types, so the Lambda provisioner's list readers could not tell a Ref to a CommaDelimitedList parameter, which the engine resolves to the comma-joined text, from a Ref to a String parameter: both read as lists, where CloudFormation refuses the second. Measured on CloudFormation (eu-west-1, 2026-10-18), Layers and Architectures of AWS::Lambda::Function: - a Ref to a CommaDelimitedList, AWS::SSM::Parameter::Value<List<String>> or AWS::SSM::Parameter::Value<CommaDelimitedList> parameter, Fn::Split, an Fn::If choosing a Ref to a list, and Ref AWS::NotificationARNs are lists; - a Ref to a String or Number parameter, Ref AWS::Region, Fn::Select, Fn::Join, Fn::Sub and an Fn::If choosing a literal string fail the template's validation with "Property [Architectures] expected type: JSONArray, found: String"; - a resource's Ref and Fn::GetAtt fail only when the resource is provisioned, with "Properties validation failed for resource Fn with message: #/Architectures: expected type: JSONArray, found: String". CloudFormationTemplateEngine now takes the declared parameter types, which executeTemplate reads from the template (stacks, change sets, stack sets and nested stacks all deploy through it), and yieldsString tells the forms of the second group. The list readers refuse such an intrinsic with the validation message, as they refuse a literal of the wrong type. The third group is left as it was: the engine cannot tell a list-valued attribute from a string one before provisioning, and a resource's own message format is not modelled. parameterType gives a declaration's Type, String when it is left out, for the new reader and for GetTemplateSummary, which had its own copy. Tests: CloudFormationTemplateEngineTest for yieldsString over every measured form; CloudFormationLambdaObjectPropertyIntegrationTest for each refused form, an Fn::If choosing a list, and a nested stack whose own parameter types decide; CloudFormationLambdaObjectPropertyTest in sdk-test-java for a String parameter through the SDK. The integration and SDK tests fail on main. * fix(cloudformation): take Fn::Base64 as a string where a list is expected Review of #5949 (Qodo). Measured on CloudFormation (eu-west-1, 2026-10-18): Architectures: {"Fn::Base64": "x86_64"} fails validation with "Property [Architectures] expected type: JSONArray, found: String", like Fn::Sub. yieldsString left it out, so the Lambda reader split the encoded text into a list and the function got an invalid architecture instead. Tests: CloudFormationTemplateEngineTest and CloudFormationLambdaObjectPropertyIntegrationTest gain the case; both fail on the previous head. |
||
|
|
7ce4b6bd23 |
feat(autoscaling): describe suspended process reasons (#5941)
* feat(autoscaling): describe suspended process reasons * fix(autoscaling): record suspended process dates |
||
|
|
317074e303 |
fix: keep MSK configurations and RDS events in the request region (#5940)
* fix(msk): keep configurations in the region that created them MSK clusters became regional in #3353, but configurations did not: ListConfigurations returned every region's, DescribeConfiguration and the tag operations answered for another region's ARN, and a configuration name used in one region could not be reused in another. Each now considers only configurations whose ARN names the request region. The ARN has always carried that region, so no record needs migrating. Signed-off-by: Hector Ventura <hectorvent@gmail.com> * fix(rds): list only the request region's events in DescribeEvents DescribeEvents took no region and scanned the whole event store, so each region saw the events of instances and clusters in the others. The handler now passes the request region, and an event is listed in the region its source ARN names; an event recorded without a source ARN stays visible, as before. Signed-off-by: Hector Ventura <hectorvent@gmail.com> --------- Signed-off-by: Hector Ventura <hectorvent@gmail.com> |
||
|
|
dd832b45dc |
fix(apigatewayv2): apply an HTTP API's CORS configuration to its actual responses (#5935)
* fix(apigatewayv2): apply an HTTP API's CORS configuration to its actual responses
An HTTP API with a CorsConfiguration answered the preflight from it, but the
responses of its integrations went out with no Access-Control-Allow-Origin, so
a browser refused to hand the page any answer of the API. AWS documents both
halves ("Configuring CORS for an HTTP API"): for a CORS request API Gateway
adds the configured headers to the integration's response, and once an API
has a CORS configuration it ignores the CORS headers the integration returns.
Measured on HTTP APIs (eu-west-1, 2026-10-16 and 2026-10-18):
- API Gateway's own refusals on a matched route get the same headers: a JWT
authorizer's 401 and its 403 for a missing scope, an unsigned call to an
AWS_IAM route's 403, a Lambda authorizer's 401 (no identity) and 403
(isAuthorized false); so does a function that is gone, which answers 500
Internal Server Error (Floci answered 404 "Function not found" without
them).
- A preflight a route matches (an OPTIONS or ANY route, $default) goes
through that route, its authorizer and its integration, and gets the
preflight headers on whatever answers; only a preflight no route matches
is answered 204 by API Gateway. Floci answered every preflight itself, so
a route behind an authorizer looked open to a browser's preflight.
- A preflight gets the preflight headers only when its origin, its method
and every header it asks for are allowed, and never the exposed headers;
otherwise, or for an OPTIONS without Access-Control-Request-Method, no CORS
header at all. An actual request gets them whatever its method. Lists are
joined with a bare comma.
- A preflight that gets the headers always carries
Access-Control-Allow-Headers, empty when none are configured, and
Vary: origin unless AllowOrigins is a single exact origin or "*" (two
origins, the "https://*" prefix, and "*" beside an exact origin all
vary). No other response gets a Vary; an integration's own is kept.
Floci sent no Allow-Headers when none were configured, and Vary: Origin
on every preflight that echoed the origin.
- A route without a target answers 404 Not Found with no CORS header, as an
unmatched route does (Floci answered 500).
The configuration is now applied once, by withHttpApiCors, on whatever the
matched route answers, so no response path can miss it: it drops the six
headers the configuration owns from the response and, when the Origin is
allowed (exactly, by "*", or by a prefix wildcard such as https://*), adds
Access-Control-Allow-Origin, plus Credentials and Expose-Headers when
configured, or the preflight's set for a preflight. An API without a
configuration still leaves CORS to its integrations.
Tests: ApiGatewayExecuteControllerTest for the headers withHttpApiCors
sets and when a preflight varies, HttpApiCorsIntegrationTest for the
routing, the refusals and the custom domain;
HttpApiJwtAuthorizerScopesTest and HttpApiRequestAuthorizerTest for the
measured refusals of a JWT scope and of a Lambda authorizer, on their own
fixtures; ApiGatewayV2CorsTest in sdk-test-java for the refusals, an
unmatched preflight and a two-origin API's Vary through the SDK;
ApiGatewayV2UnsignedAccountRoutingTest now tells a route found in its
account by AWS's 500 instead of Floci's "Function not found".
* fix(apigatewayv2): answer a failed invocation with API Gateway's own status and CORS headers
Review of #5935 (Qodo). Measured on an HTTP API with a CORS configuration
(eu-west-1, 2026-10-18), with an allowed Origin:
- a Lambda integration API Gateway may not invoke, and a function that
raises, answer 500 {"message":"Internal Server Error"}; a function Lambda
throttles (reserved concurrency 0) answers 503 {"message":"Service
Unavailable"}; each carries Access-Control-Allow-Origin and
Access-Control-Expose-Headers;
- an OPTIONS request no route matches is answered 204 with no CORS header
whether or not it carries Origin or Access-Control-Request-Method, so the
unmatched OPTIONS answer stays as it is, now pinned by a test.
Any AwsException from the invocation now becomes API Gateway's answer
inside the matched route, so the CORS configuration reaches it: 503 for
Lambda's throttling, 500 otherwise. Only the function that is gone did
before; the others escaped to the exception mapper without the headers.
A configured list with a null entry no longer fails a preflight: the
entry matches nothing and is left out of the header.
Tests: HttpApiCorsIntegrationTest gains a throttled function's 503 and an
unmatched OPTIONS that is not a preflight, ApiGatewayExecuteControllerTest
a null entry, and ApiGatewayV2CorsTest in sdk-test-java both new cases
through the SDK; the throttled and null cases fail on the previous head.
* test(apigatewayv2): share the HTTP_PROXY API fixture and the Lambda zip helper
Review of #5935. HttpApiCorsIntegrationTest.createProxyApi repeated the
API, stage, HTTP_PROXY integration and route sequence of
HttpApiHttpProxyMultiValueIntegrationTest.createProxyApi: both now call
HttpProxyApiFixtures.createProxyApi, which takes the API's extra fields,
the stage, the backend port and the path. The stage is auto-deployed for
both, as an API needs to be served on AWS.
The throttled function is a Node.js one built with
WebSocketTestSupport.createLambdaZip; it never runs, so its runtime does
not matter.
|
||
|
|
fc1488d17a |
fix(core): read an ARN's resource after its fifth colon, not its last (#5939)
* fix(core): read an ARN's resource after its fifth colon, not its last Four places cut an ARN by hand and got the wrong resource for a legal name: - A VPC flow log's S3 destination took everything after the last ':' as the bucket, so a prefix with a colon (arn:aws:s3:::bkt/logs:2024/) named bucket 2024. It now takes the S3 resource through AwsArnUtils. - Glue's TagResource and UntagResource split the ARN on every ':', so a job, table or other name containing one was looked up by the text before it and answered EntityNotFoundException. The split stops at six parts. - KMS resolved an alias ARN at its last ':', so alias/team:payments resolved as payments. The alias name is now the ARN's resource. - A Kinesis event source mapping read the stream name after the last '/', so a stream-consumer ARN gave the consumer segment. It now reads the segment after stream/, as KinesisJsonHandler does. Signed-off-by: Hector Ventura <hectorvent@gmail.com> * fix(core): parse only KMS alias ARNs and drop only a consumer suffix Review follow-ups: - KMS read the alias name from any ARN containing ":alias/", so another service's ARN naming the same alias resolved a local KMS alias. Only a KMS ARN is now read that way; anything else keeps the old reading and finds no alias. - The Kinesis poller dropped everything after the stream segment, so a malformed suffix (stream/orders/not-a-consumer) still named stream orders. It now drops only a /consumer/ suffix, so a malformed ARN names no stream. Signed-off-by: Hector Ventura <hectorvent@gmail.com> --------- Signed-off-by: Hector Ventura <hectorvent@gmail.com> |
||
|
|
d951fd532c |
fix(docker): retry core and EKS archive uploads (#5916)
* fix(docker): retry core and EKS archive uploads * fix(docker): fail fast on local host archive errors * test(docker): skip backoff in archive retry regressions Allow package-private caller entry points to select the archive backoff while production retains the shared defaults. Remove the unused user-data tar builder requested in review. * test(resourceexplorer2): isolate empty-query count assertions The shared integration fixture can contain exactly 1000 resources, where a capped total does not imply incomplete results. Search a tracked single-resource view and cover 999, 1000 and 1001 matches with deterministic service tests. |
||
|
|
f5811c3a07 | fix(cloudwatch): publish SNS actions on alarm state transitions (#5918) | ||
|
|
3a44e19e36 |
fix(elasticache): preserve member security group metadata (#5937)
Keep CreateReplicationGroup SecurityGroupIds in persistent group metadata and report active memberships on every DescribeCacheClusters member. Cover both topologies and Query list spellings with SDK regressions, plus legacy JSON defaults. |
||
|
|
301ac79c6e |
feat(lambdaweb): write the platform events of Web Function environments (#5936)
* feat(lambdaweb): write the platform events of Web Function environments Each environment now writes the platform.* events AWS writes, filtered by the revision's systemLogLevel. CPU time and memory come from the container's cgroup. The output of an environment that fails before it listens reaches its stream too. Node runs under Docker's init, so a server without a SIGTERM handler stops at once, as on AWS where it is not PID 1. The server has 9 seconds to listen, as the AWS TimeoutListenError message says. * fix(lambdaweb): settle the platform events of an environment that ends early The last reports wait for the requests the exit failed, so they are counted. A periodic summary comes no more after the last report. An exit right after the app listens is handled as an exit. The CPU time counts on a host without memory.peak. The listen failure event is dropped at applicationLogLevel FATAL, as on AWS. |
||
|
|
356c79e78e |
fix(ssm): parse and bound command delivery timeouts (#5908)
* fix(ssm): limit public command delivery time * docs(ssm): describe command delivery timeouts * fix(ssm): deserialize delivery timeouts before checking bounds Handle numeric delivery timeouts consistently without bypassing limits. * fix(ssm): report member-specific deserialization errors Name the expected scalar type and explain malformed structures. * refactor(ssm): keep delivery timeout errors consistent |
||
|
|
1a80884f40 |
feat(servicequotas): configure applied EC2 vCPU quota (#5926)
* feat(servicequotas): configure applied EC2 vCPU quota Report configured EC2 vCPU quotas separately from AWS defaults. * fix(servicequotas): reject negative applied quota settings Reject invalid quota settings before serving local requests. * docs(servicequotas): clarify negative quota settings * fix(servicequotas): reject invalid settings at startup |
||
|
|
8298779ead |
fix(cloudformation): replace AWS::S3::Bucket when BucketName changes (#5762)
A change to BucketName is a replacement: CloudFormation creates the new bucket first and then deletes the old one, unless UpdateReplacePolicy is Retain. S3CfnProvisioner created the replacement but never removed the displaced bucket, so a successful rename left both buckets, and a rename that a later resource failed ended in UPDATE_ROLLBACK_FAILED, with DescribeStackResources still naming the new bucket. Record the displaced bucket with ReplacementCleanup and delegate the replacement lifecycle to it, so the committed update deletes the old bucket, honouring UpdateReplacePolicy: Retain, and a rollback points the resource back at the original bucket and deletes the replacement. Route the bucket delete through CfnDeletes.safeDelete so a bucket already gone is tolerated while a real failure such as BucketNotEmpty still propagates and reaches the stack as DELETE_FAILED. Fixes #5678 Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com> |
||
|
|
5dcddc9dfa |
feat(codeartifact): bridge CopyPackageVersions to every sidecar format (#5888)
CopyPackageVersions only covered the generic format; maven, npm, pypi, and nuget each publish straight to their own sidecar and keep no packageVersions record this action could read from or write to. Bridges all four, each confirmed live against a real container: maven reuses Reposilite's existing mvn-deploy write path, while npm/pypi/nuget each speak their own real wire protocol directly (Verdaccio's packument PUT, pypiserver's twine-shaped multipart upload, and BaGetter's NuGet push), the same protocol each format's own data-plane proxy already forwards unmodified for a native client. CopyPackageVersions now supports every format CodeArtifact does, matching real AWS, which places no format restriction on this action at all. An overwrite deletes a conflicting existing asset immediately before rewriting it for every format, since each sidecar rejects a plain overwrite of differing content; a best-effort compensating cleanup restores or removes whatever one version's write itself touched if a later step in that same version fails, preserving the original error. A copied Maven version is also merged into the destination's maven-metadata.xml so real clients can discover it, and copied bytes feed the same byte-accounting mechanism native publishes already use. A copied npm or pypi version's readme is propagated from this service's own captured-at-publish-time record, since neither sidecar can answer for one after the fact. The synthesized revision for every container-backed format is truncated to fit versionRevisions' own 50-character limit, so a revision obtained from DescribePackageVersion can be handed straight back into a revision-pinned copy. Also closes a cross-version batch-write gap: source assets are verified against the real sidecar before any destination write in the same batch, the same split the generic path already uses. Fixes two more real-sidecar quirks found on review: pypiserver's own delete call removes every file sharing a release's exact name and version, not just the one asset name it was asked to delete, so a release carrying both an sdist and a wheel lost one of them on overwrite when assets were deleted one at a time, interleaved with the writes. Every destination asset a version already holds is now deleted up front, in its own phase, before any new content is written, which changes nothing for Maven/npm/nuget since their own deletes are already scoped to exactly the asset (or, for npm/nuget, the single asset a version ever holds) being removed. An npm copy also used to rebuild a minimal version document from scratch, dropping dependencies and anything else npm's own protocol carries beyond dist; it now reuses the source's own version entry verbatim, with only dist itself rewritten to point at the copy. |
||
|
|
c17bd49096 |
fix(s3): check bucket policies for the actions IAM checks (#5913)
S3's own access check under floci.services.s3.enforce-auth, which evaluates bucket policies and ACLs, lagged behind IAM enforcement. It checked a version's tagging, ACL and annotation requests as the base actions, an object created with tags, an ACL or Object Lock settings as s3:PutObject alone, GetObjectAttributes without the read, and a write carrying If-Match without the read IAM checks for it. It offered a bucket policy none of the request's condition keys, and asked for s3:BypassGovernanceRetention on an annotation delete, which the user guide says the permission "does not apply to". The bucket-policy check now checks the actions IAM does: the version counterpart when a request names a versionId, the tagging, ACL, retention and legal-hold actions an object creation's settings need, a copy of a tagged source included, s3:GetObject beside s3:GetObjectAttributes and beside an If-Match write, and no bypass permission on an annotation delete. A signed request's bucket policy is offered the tag and Object Lock keys the request sets: an object creation's headers and the tagging, retention and legal-hold bodies, read by the same S3ObjectActions helpers IAM's condition resolver now uses. s3:BypassGovernanceRetention is asked for only by a request that overrides a governance lock, by IAM and by the bucket policy. The user guide's permissions table requires it "if you want to delete an object that's protected by governance mode" and to "bypass the governance mode of an Object Lock retention configuration", and DeleteObjects already asked for it only then. DeleteObject and PutObjectRetention asked for it whenever the header was sent; they now ask only for a delete that removes a version under a governance lock, not one that only adds a delete marker, and for a retention change that shortens or removes one. The IAM condition resolver now reads the object key from the path as it arrived, as S3Controller does, through the new S3ObjectKeys: the normalized path drops a key's leading slash, so the lock and the s3:ExistingObjectTag tags of "/doc" were looked up on "doc". A CopyObject replacing its source's tags reads x-amz-tagging from the query as well, as PutObject does, so it applies the tags both checks saw. An anonymous creation that a public bucket ACL's WRITE grant admits may still apply its ACL, tags and Object Lock settings, unless a public bucket policy decides their actions, since an ACL grant names no actions. The creation checks are told whether a request is a CopyObject rather than guessing it from x-amz-copy-source, which a CreateMultipartUpload ignores while it applies its own tags, so those tags are always checked, by IAM and by the bucket policy. With an access check on, a DeleteObject, a DeleteObjects entry and a PutObjectRetention hand S3Service the bypass only when they override a lock whose bypass permission the checks approved, IAM's decision travelling in RequestContext, so a lock set after the checks is refused rather than bypassed unchecked. Refs #5716 |
||
|
|
d6ffe3037e |
test: delete what the single-setting profile's classes create (#5915)
Follow-up to #5886, slice 11 of #4542. The review of #5886 noted that four classes on IndependentServiceSettingsProfile leave state behind: the AgentCore runtime, the Cognito user pool, the Kinesis stream and the Route 53 zones. CloudFrontCustomOriginServingTest does too, with its twenty distributions and the policies, public key and key group some of them use. That is harmless only while no other class on the profile calls those services. Each of the five now registers a delete with PartitionCleanup right after each create, so the delete runs after the test even when the test fails. The CloudFront class creates through small helpers that register the delete. A distribution goes through removeDistribution, which drops the same state as DeleteDistribution without the disable step, and the cleanup's reverse order deletes each distribution before the policies and keys it uses. The profile's javadoc now makes deleting what a class creates part of the rule for joining. |
||
|
|
2d94076d3e |
test: share the sidecar profile with five more container test classes (#5931)
Slice 12 of #4542. CodeArtifactPypiDockerIntegrationTest, EcsContainerManagerEphemeralVolumesDockerIntegrationTest and RedshiftSpectrumIntegrationTest each set their own floci.docker.resource-namespace, for the reason the slice 3 profiles did: keep a manager's remove-before-start away from a developer's running Floci. The Spectrum one also pinned port 17866 and floci.base-url so floci-duck could read Floci's S3. ServerlessTestProfile namespaced the ElastiCache serverless containers and mocked RDS and DocumentDB, which neither of its two classes calls. All five now use SidecarContainersProfile, which already gives a per-run namespace and a free port with a matching base URL, so CodeArtifactPypiSidecarProfile and ServerlessTestProfile go away. The PyPI class uses SidecarContainersProfile.requireDockerAndImage in place of its own copy of the image check, and counts its pypiserver containers by the shared namespace. The ECS class checks the owner label against the shared namespace and port. With a namespace per run, what a killed run leaves behind is in a namespace no later run shares, so neither a manager's remove-before-start nor the ECS volume sweep, which filters on the current owner, reaches it. The profile's sweep of abandoned namespaces now removes their volumes as well, after their containers, and a new requireDocker runs it for a class whose manager pulls its own image. The ECS, Spectrum and ElastiCache classes check for Docker through it, so the sweep runs even when one of them runs alone. Now that they share an application with the other sidecar classes, the PyPI class ends with a test that deletes the domains and repositories it created, and the Spectrum class deletes its IAM role after each test, but only when that test created it. The ECS and ElastiCache classes already removed what they made. Each class gains a javadoc paragraph saying what it gets from the profile, the ElastiCache ones also why the RDS and DocumentDB mocks are not needed, and the profile's javadoc names the new containers. |
||
|
|
a90482f030 |
fix(apigatewayv2): trust Floci's own CA when fetching a JWT issuer's keys (#5933)
With TLS on, an issuer Floci serves itself, a Floci Cognito user pool for one, presents a certificate of Floci's local CA. The JWT verifier fetched its discovery document and JWKS with the JVM's default trust store, which does not hold that CA, so every token of a Floci pool was refused with 401 by an HTTP API JWT authorizer (and by an AppSync OIDC provider), where the same authorizer on a Cognito pool verifies on AWS. FLOCI_SECURITY_ALLOW_PRIVATE_JWT_TARGETS only lets the fetch reach the private address; the handshake still failed. The verifier now trusts the CA bundle Floci already writes for the containers it launches: the JVM's roots followed by Floci's own trust anchor (the local CA, or the user's certificate file). ContainerCaBundle gains sslContext(), an SSL context over that bundle, empty when TLS is off or the bundle cannot be read, in which case the JVM's roots alone are trusted as before. A readable bundle with no certificate in it is refused the same way, since a trust store over it would trust nothing, public issuers included. The warning for a missing bundle now also says that JWT authorizers will refuse an issuer Floci serves. The TLS server context of a certificate this CA issues moves from the RDS proxy into FlociCertificateAuthority.serverSslContext, so the proxy and the test that serves an issuer over HTTPS build it one way. Tests: JwtSignatureVerifierTest serves an issuer over HTTPS with a certificate Floci's CA issues, the bundle written by ContainerCaBundle and the verifier built through its injected constructor, as in production: refused by the JVM's roots, verified with the bundle (it fails on main). ContainerCaBundleTest pins that the bundle's context still trusts every JVM root and the anchor, and that an empty bundle falls back. OidcAuthValidatorTest's mocked config now answers tls(). |
||
|
|
83bc2bd2bf |
refactor(ses): keep single-caller SesV2Json member helpers private (#5932)
parseSuppressedReasons moves into SesConfigurationSetController, its only caller. structureMemberOrAbsent and typedStringMemberOrAbsent are now used only by stringMapMemberOrAbsent, so they become private and their unit tests go through that method instead. The dropped unit test was the only check that an explicit null SuppressedReasons clears the override, so that case moves to an integration test. No behaviour change. |
||
|
|
8db159761c |
fix(cloudformation): refuse every Lambda property of the wrong type (#5923)
* fix(cloudformation): refuse every Lambda property of the wrong type The follow-up asked on #5912. Environment, ImageConfig, Layers, Architectures and FileSystemConfigs, and a layer's CompatibleRuntimes and CompatibleArchitectures, went through readers that took a value of the wrong JSON type as absent, so a malformed property reset the function's setting instead of failing; FileSystemConfigs alone refused one, with a message of Floci's own, and also refused an AWS::NoValue chosen by Fn::If, which AWS accepts. Measured on CloudFormation (eu-west-1, 2026-10-18): each fails the stack before the resource is touched, "Property [Layers] expected type: JSONArray, found: JSONObject", "Property [Environment] expected type: JSONObject, found: JSONArray", "Property [Variables] expected type: JSONObject, found: String" for Environment's Variables, a number or a boolean reading as a String; and Ref AWS::NoValue, directly or through Fn::If, leaves any of them out. Every reader of the provisioner now resolves through one resolveTyped, which omits AWS::NoValue and refuses another type with that message. Tests: every measured case on create, AWS::NoValue on the list properties and through Fn::If, and through the SDK a Layers object; the FileSystemConfigs test reads the measured message. They fail on main. * fix(cloudformation): read a list property from a CommaDelimitedList Ref as a list Review of #5923. Layers: !Ref LayerArns, with LayerArns a CommaDelimitedList, was refused with "Property [Layers] expected type: JSONArray, found: String", because the engine resolves that Ref to the comma-joined text; AWS reads it as a list. Measured on CloudFormation (eu-west-1, 2026-10-18), Layers and Architectures of AWS::Lambda::Function: - a Ref to a CommaDelimitedList parameter, and Fn::Split over a String parameter, create the stack with the list; - a Ref to a String parameter, and Fn::If choosing a literal string, fail validation with "expected type: JSONArray, found: String". The string-list readers (Layers, Architectures, and a layer's CompatibleRuntimes and CompatibleArchitectures) now go through one resolveStringList: a literal of another type is still refused, and an intrinsic is read through engine.resolveStringList, which splits the comma-joined text and expands Fn::Split, Fn::GetAZs and Fn::If. The engine keeps parameter values, not their types, so a Ref to a String parameter reads as a list too, where AWS refuses it. Tests: CloudFormationLambdaObjectPropertyIntegrationTest creates a function with Layers and Architectures from CommaDelimitedList Refs and with Layers from Fn::Split; CloudFormationLambdaObjectPropertyTest in sdk-test-java does the CommaDelimitedList case through the SDK. Both fail on the previous head. |
||
|
|
8067ecf1de |
feat(lambdaweb): send what a Web Function writes to its log groups as AWS does (#5919)
* feat(lambdaweb): send what a Web Function writes to its log groups as AWS does * chore(lambdaweb): write the Web Function runtime as an ES module * fix(lambdaweb): create a log group or stream only when an event finds it missing * fix(lambdaweb): cut a log line by its UTF-8 size after replacing bytes that are not UTF-8 * test(lambdaweb): wait for the last log line instead of a fixed sleep |
||
|
|
8972b21e1b |
fix(docker): let the daemon pick dynamic host ports (#5928)
A dynamic port binding sent a port Floci picked with ServerSocket(0), probed where Floci runs. On Docker Desktop the daemon binds it inside the VM, whose ephemeral range lies inside the Mac's, so a VM socket on that number failed the start with "address already in use" and CreateDBInstance returned 500. The binding now leaves the host port empty and the endpoint is read back from inspect, as before. |
||
|
|
e38dba5f11 |
feat(cognito): support Google identity provider federation (#5868)
* feat(cognito): support Google identity provider federation * fix(cognito): synchronize federated provisioning, support linked users and retain discovery endpoints * fix(cognito): preserve stored provider identity for standard OIDC federation * fix(cognito): refuse disabled users during federated sign-in |
||
|
|
0f5260417f |
refactor: build the remaining one-violation validation messages through SmithyValidationErrors (#5927)
The "1 validation error detected: ..." messages still written out by hand outside SES now go through the helper's single-violation overloads: validationException, validationError and badRequest for their codes, and exception(code, violation) for InvalidParameterException, InvalidParameterValueException and ClientException. No message changes. |
||
|
|
1ee87fc4e9 |
fix(stepfunctions): end an Express execution at its maximum execution time instead of letting it run on (#5864)
* fix(stepfunctions): end a synchronous execution at its maximum execution time instead of letting it run on * test(stepfunctions): build AslExecutor in tests through a shared fixture * fix(stepfunctions): keep the first outcome of a timed-out Express execution and limit asynchronous Express executions too * fix(stepfunctions): time out an execution a late runtime error reaches, and measure its deadlines on an injectable clock * test(stepfunctions): test the synchronous caller's timeout step directly instead of on the real clock |
||
|
|
450321a001 |
chore(dynamodb): cover a range-only sparse item in the index Scan test (#5924)
An item that has the index sort key but not the index partition key is not in the index on AWS. This was the shape reported in #2275. |
||
|
|
d425e2d884 |
fix(lambda): refuse a log level under Text as Lambda does (#5920)
Floci accepted ApplicationLogLevel and SystemLogLevel under Text and dropped them, which a test pinned and the docs described as Floci's own call rather than probed behaviour. Measured on Lambda (eu-west-1, 2026-10-18): CreateFunction and UpdateFunctionConfiguration refuse either level under Text, whether LogFormat names Text or is left to that default, with InvalidParameterValueException "LogLevel is not supported when LogFormat is set to "Text". Remove LogLevel from your request or change the LogFormat to "JSON" and try again." In a stack, a valid level under Text passes the template's validation and fails the resource with Lambda's message. Floci now refuses it in validateLoggingConfig, so the API and the CloudFormation update check, which validates through loggingSettings, both do; and its enum errors list the levels in Lambda's order: [FATAL, TRACE, WARN, ERROR, INFO, DEBUG] and [WARN, INFO, DEBUG]. The default format is worked out in one place, logFormat, for the validation and for loggingSettings. Tests: a level under Text refused on create and on update through the API (LambdaVpcSnapStartLoggingIntegrationTest, replacing the test that pinned the old behaviour) and through the SDK (LambdaFunctionConfigTest), by loggingSettings (LambdaServiceTest), and by a stack update (CloudFormationLambdaLoggingConfigIntegrationTest); the enum messages' order. They fail on main. |
||
|
|
5a4413d63a |
fix(ec2): detach Floci before deleting VPC networks (#5869)
* fix(ec2): detach Floci before deleting VPC networks * refactor(ec2): share VPC endpoint disconnection |
||
|
|
c68cc7694f |
fix(cloudformation): report a failed resource in the stack's rollback reason the way AWS does (#5904)
* fix(cloudformation): report a failed resource in the stack's rollback reason the way AWS does The stack's ROLLBACK_IN_PROGRESS / UPDATE_ROLLBACK_IN_PROGRESS reason and event now name the failed resource, "The following resource(s) failed to create: [X]. Rollback requested by user." on a create and "failed to update: [X]." on an update, and the resource's own message stays on its event. A nested stack's parent resource and a stack set instance still report that message, read from the stack's events. * fix(cloudformation): tell a stack's own events from a resource that shares its name failureCause matched the stack's own events by logical ID alone, so a resource whose logical ID equals the stack name ended the backward walk and the nested stack parent and stack set instance got the rollback summary instead of the resource's message. Match the stack ID as well. * fix(cloudformation): give a nested stack's parent the child's own reason AWS puts the child stack's reason on the parent's nested stack resource, "Embedded stack <arn> was not successfully created: The following resource(s) failed to create: [X].", so the parent reads the child's status reason again instead of the failed resource's message. A stack set instance keeps the resource's message. |
||
|
|
30d2bf03d9 |
fix(cloudformation): refuse a Lambda function property that is not an object (#5912)
* fix(cloudformation): refuse a Lambda function property that is not an object The AWS::Lambda::Function provisioner read an object property that resolved to a scalar or a list as absent, so a malformed VpcConfig, DeadLetterConfig, TracingConfig or EphemeralStorage reset the function's setting to its default instead of failing. Measured on CloudFormation (eu-west-1, 2026-10-18): such a value fails the stack before the function is touched, on create and on update, with "Property [VpcConfig] expected type: JSONObject, found: String"; a list reads "found: JSONArray", and a number or a boolean reads "found: String" too. resolveMapOrDefault, which reads every object property of the function, now refuses such a value with that message. AWS reports it from its pre-deployment validation, with the detail in DescribeEvents, which Floci does not model; the message is on the resource's failed event. Tests: CloudFormationLambdaObjectPropertyIntegrationTest (a number VpcConfig and a list DeadLetterConfig on create, a string TracingConfig on update that keeps the setting) and, through the SDK, CloudFormationLambdaObjectPropertyTest; both fail on main. The compatibility suite gains TestFixtures.awaitStackTerminal, the same helper #5902 adds. * fix(cloudformation): leave out a Lambda property that resolves to AWS::NoValue Floci's template engine resolves Ref AWS::NoValue to an empty text node, which the new type check refused as a String, so a valid template that leaves VpcConfig, TracingConfig, DeadLetterConfig or EphemeralStorage out through AWS::NoValue, directly or chosen by Fn::If, failed. Measured on CloudFormation (eu-west-1, 2026-10-18): both stacks are created. resolveMapOrDefault now resolves with resolveNodeOmittingNoValue, as other provisioners do for optional properties, and reads what it leaves out as the default. Test: a direct Ref AWS::NoValue on VpcConfig and TracingConfig, and an Fn::If choosing it for DeadLetterConfig, each create the stack; it fails on the previous head. |
||
|
|
61102a7c4e |
fix(dynamodb): match AWS for unprojected GSI attributes in Query, Scan and PartiQL (#5911)
* fix(dynamodb): use the AWS wording for unprojected GSI attributes in Query and Scan * refactor(dynamodb): share the unprojected GSI attribute error with PartiQL * fix(dynamodb): check PartiQL GSI columns after the WHERE clause AWS reports a key type mismatch, overlapping ranges, too many reads and an unprojected filter attribute before an unprojected column. It also lists each column root once. * fix(dynamodb): keep rejecting a projection path that starts with a list index |
||
|
|
b55014ddef |
refactor(core): build every Smithy validation error through SmithyValidationErrors (#5910)
SmithyValidationErrors gains named factories for the three common codes (validationException, validationError, badRequest) and a single-violation overload of each. The "N validation errors detected" builders outside SES (CloudFormation, Cognito, DynamoDB, EventBridge, Firehose, IAM, IoT, KMS, Lambda, Rekognition, SSM) and the remaining hand-written "1 validation error detected" messages in SES move onto it. No message changes. |
||
|
|
63af5cd299 |
fix(cloudformation): pass a function's LoggingConfig to Lambda (#5902)
* fix(cloudformation): pass a function's LoggingConfig to Lambda The AWS::Lambda::Function provisioner never read LoggingConfig, so every function a stack created logged in Text to /aws/lambda/<name>, whatever the template said, and an update to it was never applied. Measured on AWS (eu-west-1, 2026-10-16): the function reads back the LogGroup the template names; a change to JSON with an ApplicationLogLevel updates it in place, SystemLogLevel reading back INFO; and removing the property from the template puts the function back on Text and /aws/lambda/<name>, again in place. So the provisioner always sends a LoggingConfig, empty when the template has none, which Lambda resolves to the function's defaults (JSON for a durable function, which refuses Text). The update check compares what Lambda would store, through the same LambdaService.loggingSettings that UpdateFunctionConfiguration applies, so an unchanged LoggingConfig is still a no-op redeploy and the two cannot drift apart. Tests: the stack lifecycle in CloudFormationLambdaLoggingConfigIntegrationTest and, through the SDK clients, CloudFormationLambdaLoggingConfigTest, both failing on main; the normaliser in LambdaServiceTest. The compatibility suite gains TestFixtures.awaitStackTerminal for the new test rather than another private copy of the stack wait. * fix(cloudformation): refuse an invalid log level before comparing LoggingConfig The update check compared normalised logging settings, and the normaliser dropped both log levels under Text before anything validated them. An update whose only change was an invalid level, ApplicationLogLevel VERBOSE on a Text function, then looked unchanged, never reached UpdateFunctionConfiguration, and the stack went UPDATE_COMPLETE where AWS fails the update. LambdaService.loggingSettings now runs validateLoggingConfig before it normalises, so the comparison refuses what Lambda refuses, and applyLoggingConfig validates once, through it. The integration test registers its stacks' deletion with PartitionCleanup, and the compatibility test's cleanup no longer swallows a failed DeleteStack, which succeeds for a stack that is already gone. |
||
|
|
0dd443478c |
fix(appsync): answer a failed AWS_IAM request with AppSync's errors (#5901)
* fix(appsync): answer a bad AWS_IAM signature with AppSync's error and wording AppSync answers 403 IncompleteSignatureException when the Authorization header misses a part or the date, and 400 BadRequestException when the signing time, the signed headers, the scope or the signature are wrong. The checks run in AppSync's order, and the signature is checked before the session token. * fix(appsync): answer an AWS_IAM policy deny with Permission denied AppSync answers 401 UnauthorizedException "Permission denied" when the caller's policies do not allow appsync:GraphQL. * fix(appsync): check a missing signed header and the credential parts in AppSync's order AppSync checks that every signed header is in the request after the signing time, then that host is signed, then the credential parts. It names the header as the request signed it. * test(appsync): expect BadRequestException for a wrong secret on the GraphQL endpoint * test(appsync): pin the clock to check the whole signing time message * chore(appsync): read the Authorization parts with the shared parser |
||
|
|
ae285fc3a8 |
fix(docker): bound concurrent container teardown (#5860)
Signed-off-by: Andre Kurait <akurait@amazon.com> |
||
|
|
377c09733a |
fix(s3): check a presigned copy's source read against its credential (#5891)
Under IAM enforcement, CopyObject and UploadPartCopy also need s3:GetObject on the copy source, or s3:GetObjectVersion for a version, and S3Controller checks it itself, since the source appears only in the x-amz-copy-source header. It passed IAM the Authorization header, which a presigned request does not have, so IAM skipped the check. A user allowed to write one place could presign a copy of any object they cannot read into it. The check now uses the request's credential, the header's or a presigned URL's query credential, as the copied-tags check next to it already does. The S3 user guide says "The capabilities of a presigned URL are limited by the permissions of the user who created it." The test signer's presignedQuery also signs the parameters already in its URI's query, such as an UploadPartCopy's upload id, so a presigned part copy verifies, and refuses a URI that is already presigned. docs/services/iam.md lists the copy source check. |
||
|
|
63cf09a396 |
fix(s3): make versionId=null name only the null version (#5887)
A request naming versionId=null asks for the null version, the one an object written while versioning was off or suspended has. GetObject, HeadObject, GetObjectAttributes, a copy source and the annotation operations served the current version for it instead, even on a key with no null version, so a request authorized for the null version was served another. Retention, legal hold and the object ACL looked for a version stored under the id "null", which never exists, so they never found the null version even when there was one. Every lookup now resolves the id the way tagging and DeleteObject already did: the null version is the object at the plain key when it has no version id, and a key without one answers as for any missing version, NoSuchVersion, or NoSuchKey for the annotation operations as for their other missing versions. A read of the null version goes through the same optimistic snapshot as a read of the current version, so a write landing mid-read cannot pair one version's metadata with another's bytes. The s3:ExistingObjectTag lookup reads the null version's tags the same way, and under s3.enforce-auth an anonymous read naming the null version is checked against that version's ACL. Refs #5716 |
||
|
|
fb6a5da282 |
test: share one profile across eight single-setting test classes (#5886)
Slice 11 of #4542. Eight classes each declared a profile for one setting of one service: the AgentCore runtime check, the seeded IAM account alias, the Kinesis ListShards token lifetime, the Neptune db type, the Route53 VPC association delay, the CloudFront private origin allowance, the Cognito token validity limits and the Scheduler background dispatcher. They now share IndependentServiceSettingsProfile. Each setting is read by a single service, and each class is the only one in the group that calls its service, so no override reaches another class, and neither does anything a class leaves behind. A class that shares a service with one already there takes a profile of its own. The Route53 profile also set floci.storage.mode=memory, which the test application.yml already sets, so it is dropped. The profile's javadoc lists each override, the class that relies on it, and why it is inert for the others. Each class gains a javadoc paragraph saying what it gets from it. |
||
|
|
66fce77bdc |
feat(iam): generate, claim and answer delegation requests (#5797)
IAM temporary delegation lets an AWS Partner ask a customer for scoped, time-limited access to the customer's account: the partner files a request, the customer claims and answers it, and an accepted request releases an exchange token the partner trades for credentials. Floci dispatched none of it, so all seven lifecycle operations answered UnsupportedOperation 400. The family was filed as a non-goal on the strength of CreateDelegationRequest stating "This API is not available for general use. In order to use this API, a caller first need to go through an onboarding process described in the partner onboarding documentation". That sentence appears exactly once in the whole API reference, and the partner user guide describes a generally available feature with a published lifecycle. The gate is an AWS-side account allowlist for ISV Accelerate partners, "Enable API access for your specified accounts", not a protocol behaviour, and an emulator has no allowlist. Answering NoSuchEntity because nothing can exist would emulate the feature's absence rather than the feature. This is the lifecycle half: Create, Associate, Accept, Reject, Update, Get and List. SendDelegationToken and STS GetDelegatedAccessToken are the token exchange and come next, so no request reaches FINALIZED yet, and GetHumanReadableSummary stays undispatched because its summary is LLM- generated on AWS. A delegation request is the one IAM record two accounts share, which decides how it is stored: keyed by id under the creating account and resolved across accounts on read, because the reference makes the id globally resolvable and decides access from the request's own owner fields. A request nobody owns "can be called by any account"; one naming a target account is readable only from there, which is why a partner loses sight of its own filing once it is aimed. Floci decides that at account granularity, there being no per- identity permission on a request to consult. ListDelegationRequests leaves out a request with no owner even when it names the listing account, as the reference states, so a partner does not list its own filings at all, which matches the guide telling partners to track state from the notifications. Expiry is applied when a request is next read rather than swept by a worker. Each state carries the window AWS publishes, a day for UNASSIGNED and a week for every other state including the terminal ones, and a request past its window reads back as EXPIRED. That needs no scheduler to be correct and no clock to be mocked globally, so the service takes its own Clock and the unit test advances that rather than the shared test clock. Two answers had to be chosen rather than read off. An operation asked to move a request out of a state it no longer holds answers ConcurrentModification: no modeled error says "wrong state", and AcceptDelegationRequest models only NoSuchEntity, ServiceFailure and ConcurrentModification, so the conflict is the closest of the three and is used on all four writers rather than a different code each. PermissionCheckResult answers UNSURE when the check is asked for, which the enum models, because a delegation request carries no permission to evaluate. A member that breaks the format or constraints it declares answers ValidationError. The reference publishes that as a common error, "the input doesn't meet the required format or constraints", for every IAM operation while listing it on no operation at all, which is why it appears in no error table and in none of these; the rest of IAM answers it in the same shape and wording, so these operations do too. The InvalidInput they do model is kept for a value that cannot be read as the member's type, which is where the shared pagination already puts a MaxItems that is not a number. A lifecycle call reads a request, checks its state and writes it back, so all of them take one lock, as the sibling IAM services do with theirs. Without it two callers could both claim the same unassigned request and the later write would decide the owner, and two creates could both pass the workflow-id uniqueness check. Each call also takes a single clock reading, threaded from the lookup into the transition, so a request cannot be expired on the way in and moved on anyway. Two shape details come from the pinned botocore model rather than the reference PDF, which omits both: GetDelegationRequest also takes DelegationPermissionCheck and answers PermissionCheckStatus and PermissionCheckResult, and ListDelegationRequests spells its flag isTruncated in lower case where every other IAM list spells it IsTruncated. The model names the member, so the wire follows the model. SessionDuration's 300 to 43200 range, PolicyParameter's shape and the 100-default, 1000-maximum page size come from there too. The CLI reference supplies the constraints the PDF leaves hard to read: the redirect URL's whole pattern, which the PDF breaks across a line, the character class the free-text members carry, and the printable-ASCII class on a policy parameter's name and values. Each is enforced. It also settles that the Permissions structure is required while both of its members are optional, marking neither. Reading it is what caught an empty required member being treated as an omission: Description is required and its pattern permits an empty string, so Description= is a value and only an absent member is missing, which is a distinction that exists on the wire and is tested there. Notes and RejectionReason both exist on the shape and each gets exactly one writer: an update carries notes for an administrator and a rejection carries the explanation the reference describes for it. An indexed member is read from the keys the request carries rather than counted up from one, so Parameters.member.2 without a member.1 keeps its entry instead of being dropped at the gap, and a boolean member has to carry true or false rather than being read as false for anything else. delegation-request leaves ResourceArnBuilder.UNRESOLVED_TYPES, since that entry claimed the type belongs only to actions nothing dispatches. The four by-id actions mint arn:<partition>:iam::<account>:delegation-request/<id> from the request, the same way the ARN-carrying actions pass an ARN through, one step earlier. CreateDelegationRequest stays at the wildcard because IAM assigns the id, and UpdateDelegationRequest stays there because AWS publishes no authorizable action for it at all. UnresolvedResourceTypesIntegrationTest would have failed until this was done, which is that test working as intended. The console deep link follows the partition too. CreateDelegationRequest answers the URL the partner redirects the customer to, and a caller in China or GovCloud was handed a console their account cannot reach. The host now comes from the region's partition, the way the CodePipeline approval links already resolve theirs, keeping the commercial console's path because that is the only path any partition publishes. The account-root stand-in behind an owner ARN is minted through RegionResolver for the same reason rather than concatenated, which is also the shape IamEnforcementFilter synthesizes. Nothing is enforced that AWS does not publish. LimitExceeded is modeled with no quota behind it, so none is invented. NotificationChannel is validated and stored and nothing reads it, there being no notification to send yet. PolicyTemplateArn is kept as given and resolved against nothing, templates being registered by email with no API. All four new model types are registered for reflection, the state enum included: it is reachable from a stored request, and a native image that cannot read it back loses every delegation request on restart, which is what the persistence guard checks. Twenty-seven unit tests drive the state machine, both expiry windows, the two races and the deep link in each partition, with a clock the test owns, and fifteen integration tests drive the lifecycle over the wire across two accounts, the access key id being the account id as the rest of the suite does it. Routing needs nothing added: #5879 has the Query router read each service's actions from its botocore model, which names all seven already, so the matrix row in docs/services/index.md moving 167 to 174 is the only count this changes. |
||
|
|
f9bd725b51 |
fix(ses): check v2 metrics, import, export and account bodies against the service model (#5900)
* fix(ses): check v2 metrics, import, export and account bodies against the service model BatchGetMetricData, CreateImportJob, CreateExportJob, PutAccountSuppressionAttributes and PutAccountVdmAttributes now check their body against the vendored SES v2 shapes before their own validation, as the send and configuration set operations do. A member of the wrong JSON type, nested ones included, is a SerializationException with the deserializer's message. BatchGetMetricData keeps its Virtual Deliverability Manager gate ahead of the check. The type checks the walk makes unreachable are removed from the metrics, import and account handlers and from the export service; null list elements are still rejected where they were before. * docs(ses): describe what the export filter validation still checks * style(ses): drop the AwsException import the filter check no longer uses |
||
|
|
964756145e |
fix(cloudwatch): match FilterLogEvents with the filter pattern syntax (#5903)
FilterLogEvents kept an event when its message contained filterPattern as
a substring. A JSON pattern such as { $.template = "sign-in-code" } then
never matched, and terms matched where AWS does not: an unquoted
sign-in-code, which AWS reads with its own term rules, matched every
message containing those characters.
Measured on AWS (eu-west-1, 2026-10-16) on five events, JSON, plain and
mixed: JSON patterns over nested paths and numbers, case-sensitive terms,
quoted phrases, ?alternatives and -exclusions each matched exactly the
events the parser Floci already uses for metric and subscription filters
matches. So FilterLogEvents now parses its pattern with it, once, before
the scan, and an invalid one is refused with InvalidParameterException
whatever the group holds.
The error text is the parser's own, as for PutMetricFilter and
TestMetricFilter; AWS words these differently per action, which is left
for a change of its own.
Tests: the measured events and patterns in CloudWatchLogsServiceTest and,
through the SDK, CloudWatchLogsFilterPatternTest, which fails on main.
|
||
|
|
c229311f8f |
perf(logs): evict past the ceiling and retention without scanning the store (#5167)
* perf(logs): evict past the ceiling and retention without scanning the store Every PutLogEvents listed the account's whole event store twice: once to apply the group's retention policy, once to enforce the stored-event ceiling, which also loaded and sorted every event once the store was full. Each listing walks every key of every account. So once an account reached max-stored-events (20000 by default), each call cost a sort of the full store, however few events it carried. Sources that put one event per call pay that on every line: EKS control-plane audit logs forward each audit record as its own call. At the default ceiling with a retention policy set, a single-event call took about 4.3 ms; it now takes about 5 us. An account's event keys are now kept in an in-memory index ordered as the store is read (timestamp, ingestion sequence, event id), with one ordered set per log group. Retention removes a group's events older than the cutoff from the head of its set; the ceiling removes the oldest across the account. Which events are dropped, and when, is unchanged, except for names that hold "::". Keys join region, group and stream with "::" and are not escaped, so "r::/app::" is a prefix of "/app::logs"'s keys and of "/app"'s stream "logs", and "/app"'s stream "logs::s" and "/app::logs"'s stream "s" share one stream key. For retention and stream deletion the group now comes from the group, not the prefix: - each index entry carries the group it was written to, so retention for "/app" takes neither "/app::logs"'s events nor the reverse - deleting a stream removes only keys that are that stream's prefix followed by the timestamp and id, and drops them from the index by key, whatever group they are filed under - PutLogEvents and DeleteLogStream refuse, as a missing stream, a stream found by key whose recorded group is another; DescribeLogStreams lists only streams that record its group - DeleteLogGroup deletes only the streams, metric filters and subscription filters that record its group - a refill reads each key's group off the stream it names, one stream lookup per stored event; an event whose stream is gone is deleted, as DeleteLogStream would have, since nothing says which group it was in Every stream is created with its group recorded. A record without one can only be built by hand, and counts as the caller's. Reads (GetLogEvents, FilterLogEvents, Insights) still select events by prefix, as before; this change leaves them alone. Each account keeps one index for the life of the service, and every write to its events (PutLogEvents and deleting a stream or group) changes the store and the index while holding the index's lock, so the two change together and concurrent calls no longer overshoot the ceiling. The index starts stale and the first call holding it fills it from the store, so events stored before a restart count. A key leaves the index only after its store delete succeeds. A store write that throws part-way, exception or Error, marks the index stale. Emulator reset empties every index and marks it stale in beforeReset(), clear() and afterReset(), so an account that never writes again holds nothing for the wiped events; the next call refills from the store. The index is never replaced, so a call waiting on its lock never writes under a different one. A put racing DeleteLogStream could write events after the stream was gone, or write the deleted stream's metadata back. DeleteLogStream and DeleteLogGroup now remove the stream record and its events together under the lock. PutLogEvents checks the stream again under it, and writes the stream's metadata there too. So a put lands before the delete or finds no stream, and a stream recreated under the same name cannot write until the old one's events are gone. Calls for one account now take that lock in turn, store write included; different accounts do not wait on each other. * refactor(logs): read an event's group off its key AWS allows no colon in a log group or stream name, so the key layout needs no defending inside this change. The index takes each event's group from its key, the refill no longer probes streams split by split or deletes events it can't place, and the stream lookups go back to what main does. The tests for separator-bearing names go with it. --------- Co-authored-by: Robin Baeckman <27041454+RobinBaeckman@users.noreply.github.com> Co-authored-by: Priamo <pgermosen@gmail.com> |
||
|
|
58097a832a |
fix(lambda): send a function's logs to the log group its LoggingConfig names (#5895)
* fix(lambda): send a function's logs to the log group its LoggingConfig names Floci stored LoggingConfig.LogGroup and read it back, but every execution environment still wrote to /aws/lambda/<name> and told the function so in AWS_LAMBDA_LOG_GROUP_NAME. Measured on AWS (eu-west-1, 2026-10-16): a function whose LoggingConfig names a group writes INIT_START, START, its own output, END and REPORT there, Lambda creates the group when it is missing, and /aws/lambda/<name> is never created. AWS_LAMBDA_LOG_GROUP_NAME and AWS_LAMBDA_LOG_STREAM_NAME name that group and stream. Once LoggingConfig names a group, which several functions can share, each stream's name carries the function's name: 2026/10/16/my-fn[$LATEST]<id> instead of 2026/10/16/[$LATEST]<id>. It does even when the group named is /aws/lambda/<name> itself, so the rule is whether a group is named, not whether it differs from the default. Both launchers, Docker and Kubernetes, and GetFunctionConfiguration's LoggingConfig now take the group and the stream from one place, LambdaLogDestinations. Floci skips delivering a log group to a Lambda subscription destination that writes its own logs there, which would feed the function its own output forever. That check assumed the group was /aws/lambda/<name>, so a forwarder subscribed to the group its LoggingConfig names would loop. It now asks LambdaLogDestinations for the function's group, and falls back to the default name, from the same place, for a function it cannot find. * fix(logs): skip only a function's own streams when it forwards its log group The guard that keeps a subscription from feeding a Lambda destination its own output looked the function up by name in the caller's account and Region at $LATEST, and skipped the whole group once it matched. In a group LoggingConfig names, which several functions can share, a forwarder then lost every other function's logs; a destination naming a published version or alias was checked against $LATEST's group; and a function in another account than the ambient one was not found, so its own custom group was fed back to it. The function is now the one the destination ARN names, through getFunctionByArn, with its account, Region and qualifier, and in a named group only the streams carrying its name are skipped, the shape measured on AWS for a named group (2026/10/16/<name>[$LATEST]<id>); every stream of the default group is still the function's own. A destination ARN that does not parse as a function's is not a loop and is no longer caught as any RuntimeException. Tests: another function's stream in a shared group reaches the forwarder while its own is skipped, and a destination naming a published version is checked against that version's group (both fail on the previous head); the stream ownership rule in LambdaLogDestinationsTest. |
||
|
|
9dcb1b65ae |
feat(core): translate LocalStack variables in Java instead of the entrypoint (#5851)
* feat(core): translate LocalStack variables in Java instead of the entrypoint The LocalStack-to-Floci variable mapping (PERSISTENCE, EDGE_PORT, LOCALSTACK_HOST, GATEWAY_LISTEN, LS_LOG/DEBUG, the Lambda and Docker variables, the DNS suffixes, USE_SSL, CUSTOM_SSL_CERT_PATH) lived in docker/localstack-parity.sh, sourced by the image's entrypoint. A JVM run or a native binary on the host never saw it. LocalStackParity now computes the same mapping and LocalStackParityConfigSource serves it at ordinal 301, just above environment variables, as the exported variables did. A key is produced only when its Floci variable is unset, so an explicit Floci setting still wins; the DNS suffixes are still appended to any configured ones; LOCALSTACK_PARITY=false still turns it all off. TlsConfigSource, which reads its properties before the configuration exists, consults the mapping too. The script, its shell test and every Dockerfile copy of it are removed; the test cases move to LocalStackParityTest. Refs #5767 Signed-off-by: Hector Ventura <hectorvent@gmail.com> * fix(core): keep TLS backends on loopback, keep configured DNS suffixes, and pass LocalStack settings to hooks Review follow-ups for the Java LocalStack translation: - Dockerfile.compat took docker-entrypoint.sh from the published native image, which still sourced the removed localstack-parity.sh, so the compat image never became healthy. It now copies the entrypoint from the build context, as it already does healthcheck.sh. - At ordinal 301 the parity source outranked TlsConfigSource's loopback pin (300): with TLS on and GATEWAY_LISTEN set, the backends bound the gateway address while the proxy dialled 127.0.0.1. It now sits at 299, below environment variables and the TLS source and above .env and config/application.yml, where the exported variables used to be. - floci.dns.extra-suffixes is no longer a translated property, which on JVM and native runs replaced suffixes set in application.yml. The five readers append LocalStack's and Floci's suffixes to the configured list through LocalStackParity.withDnsSuffixes instead. - GATEWAY_LISTEN=0.0.0.0:4566 (or [::]:4566, or a list) gives the host to quarkus.http.host and the port to floci.port when EDGE_PORT is unset, instead of a host Floci rejects as malformed. - Init hooks get the translation as FLOCI_*/QUARKUS_* variables again, as they did when the entrypoint exported them. Signed-off-by: Hector Ventura <hectorvent@gmail.com> * fix(core): parse LOCALSTACK_HOST and GATEWAY_LISTEN the way LocalStack does Both take LocalStack's host-and-port forms (HostAndPort.parse in its config.py): host:port, host, :port, [v6]:port and [v6]. - LOCALSTACK_HOST is <hostname>:<port>, localhost.localstack.cloud:4566 by default. Its port went into floci.hostname, so the base URL came out as http://localhost.localstack.cloud:4566:4566. floci.hostname now gets the host alone. - GATEWAY_LISTEN=:4566, LocalStack's default host on 4566, did not match and stopped startup with "Refusing to listen on malformed host". An empty host now keeps Floci's own bind address and takes just the port. Signed-off-by: Hector Ventura <hectorvent@gmail.com> --------- Signed-off-by: Hector Ventura <hectorvent@gmail.com> |
||
|
|
9e6be8ff21 |
fix(docker): run boto3 on Python 3.12 in the compat image (#5649)
* fix(docker): run boto3 on Python 3.12 in the compat image * fix(docker): link python3 and pip3 in /usr/bin so absolute-path hooks keep working |
||
|
|
4e47507a7b |
fix(autoscaling): match DescribeTags input validation (#5894)
Signed-off-by: Andre Kurait <akurait@amazon.com> |
||
|
|
ae7e6d1240 |
fix(lambda): preserve immutable deployment snapshots (#5818)
Signed-off-by: Andre Kurait <akurait@amazon.com> |
||
|
|
e1fe876149 |
fix(swf): deliver Lambda outcomes through one decision task (#5859)
Signed-off-by: Andre Kurait <akurait@amazon.com> |