* feat(apigatewayv2): implement UpdateVpcLink and VPC link tagging
* feat(cloudformation): provision AWS::ApiGatewayV2::VpcLink
* fix(cloudformation): keep VPC link and integration connection state on updates
* fix(cloudformation): restore the integration connection when its own update fails
ListTenants now honours Filter.TENANT_NAME_CONTAINS and Filter.SENDING_STATUS
the way SES v2 matches them, with the validation messages and precedence SES
answers: the filter's keys and values, then the page size and an empty token,
then the filter's values. The filter is applied before the page is cut, and a
token continues only the filter it was taken with.
* fix(dynamodb): size() of a Binary counts its bytes, not its base64 text
size() on a B attribute returned the length of the base64 text, so a
3-byte value had size 4 and conditions and filters such as
size(b) = :three gave the wrong answer. It now decodes the value first.
begins_with on binaries now decodes through the same helper, so a value
that is not base64 fails with a 400 SerializationException, as the
binary comparisons already did, instead of an uncaught 500.
* test(dynamodb): cover begins_with matching a valid binary prefix
* fix(athena): accept IN lists and check each table in the injected-partition filter
The injected-partition check treated any mention of the column in a WHERE
clause as a filter, and it matched a table by name prefix.
- Accept col IN ('a', 'b'): Athena allows IN lists for injected columns, up to
1,000 values.
- Check every source table on its own alias, so a filter on one table cannot
stand in for another table's filter. A comma separated source counts like a
FROM or JOIN source, and a table name must end at an identifier boundary so
events_daily is not a reference to events.
- Accept an unqualified column when exactly one source in the query declares it.
- Accept a constant wrapped in parentheses, and reject a computed value such as
'abc' || suffix, which is not a static value.
- NATURAL, LATERAL and TABLESAMPLE after a table name are not taken for its alias.
* fix(athena): address review feedback for injected partition projection filter
- Support comma-separated sources after JOIN ... ON or USING clauses
- Scope ambiguous column check to each subquery FROM clause
- Preserve quoted aliases and aliases specified with AS keyword
- Accept static literals wrapped in arbitrary balanced parentheses
- Enforce the 1,000 item limit on IN lists according to Athena spec
* fix(athena): mask subqueries in where clause to isolate partition filter scopes
* fix(athena): accept constant expressions in injected partition filter
* fix(athena): exclude function invocations and cast types from source column matching
* fix(athena): reject qualified CTE and source column references in partition filter
* fix(athena): allow multi-part function calls in static partition filter
* fix(core): let RequestScopes run background work in a given region
RequestScopes.runAs only set the account, so work running outside a
request resolved RegionResolver.getRegion() and getPartition() to the
deployment defaults. New runAs/callAs/callAsChecked overloads take a
region too and set it with its partition; a region outside every
published partition leaves the partition unset so it falls back to the
deployment's, as a request does. Inside an already active scope the
previous account, region and partition are restored. The account-only
methods keep their behaviour.
CloudFormationService's private runUnderScope, which did the same thing
for stack operations, now uses the shared method.
* test(core): fail the RequestScopes region test when the worker thread throws
The helper that runs each case on a fresh virtual thread joined it without
passing on the thread's exception, so a failure while a scope was restored
after the body could leave the recorded values intact and the test green.
It now captures anything the worker throws and fails the test with it.
* fix: mint ARNs in the request region for Amazon MQ, MSK, EKS Fargate, AppSync and ElastiCache users
Several create paths minted the new resource's ARN with the emulator's
default region instead of the region the request was signed for, so a
resource created in eu-west-1 reported a us-east-1 ARN:
- Amazon MQ CreateBroker (broker ARN)
- MSK CreateConfiguration (configuration ARN)
- EKS CreateFargateProfile, which now takes the cluster's own region
- AppSync CreateDomainName (ARN and the appsync-api host) and
CreateChannelNamespace
- ElastiCache user ARNs in CreateUser/DescribeUsers responses, now
rendered in the request region like the other user responses
RequestRegionArnIntegrationTest signs each request for eu-west-1 and
checks the ARN's region; all five cases fail without this change.
* fix: keep ElastiCache user and AppSync channel namespace ARNs in their resource's region
ElastiCache users are not stored per region, so DescribeUsers signed for
another region can read a user; rendering its ARN from each request's
region reported the same user under different ARNs. The ARN is now minted
once at CreateUser and stored on the user. Users persisted before keep the
default-region ARN they were always reported with.
A channel namespace now takes its region from its parent API's ARN rather
than from the request, since an API is still reachable by id from another
region.
UploadPartCopy loaded the whole source object into a byte array and parsed
x-amz-copy-source-range with Integer.parseInt, so a source of 2 GiB or
more, or any range offset past 2 GiB, failed as an internal error. A range
that ran past the end of the source was silently padded with zero bytes.
The source is now opened as a stream, the way GetObject serves it, and
only the requested range is read, with offsets parsed as longs. A bad
range gets the error S3 returns, as recorded in LocalStack's AWS-validated
snapshot for UploadPartCopy: anything but one bytes=first-last range with
first <= last is InvalidArgument naming the expected form, a range that
ends past the source is InvalidArgument naming its size, and one that
starts past it is InvalidRequest; the InvalidArgument errors carry
ArgumentName and ArgumentValue. A copied part is still held in a byte
array on its way into the upload, so a range over that limit returns
EntityTooLarge until UploadPart can store a part without one.
Moves the parts of Ec2KeyMaterial that are key-format handling rather than
anything EC2 owns into core.common.SshPublicKeys: decoding an
"ssh-rsa AAAA..." line into its length-prefixed fields, reading the RSA key
they carry, writing that form back, and the colon-hex MD5 helper. The
field-length bound that keeps an attacker-declared length from being
allocated moves with it, comment included.
No behaviour change. EC2 keeps its own semantics where they are its own: the
DER-based ssh-rsa fingerprint, the ed25519 branch, and the SHA-1 private-key
fingerprint for a generated pair. The shared digest helper is named for what
it computes rather than for a fingerprint, because EC2 hashes the DER while
OpenSSH hashes the blob and both produce sixteen bytes of colon-hex, so a
function named for one would invite the other's caller to reuse it wrongly.
Step 1 of 2: IAM's SSH public key operations need the same parse, and the
PEM conversions they also need land with that code rather than uncalled here.
Follow-up from #5019 (noted by @hectorvent on that PR's review): the pypi
upload preflight built its sidecar request URIs with a raw string
concatenation into URI.create, and checked a filename against the simple
index with a plain substring search. Both have the same classes of bug the
GetPackageVersionAsset bridge's own pypi, npm, and Maven paths were already
fixed for in #5019: a #, ?, or / in a caller-supplied package name or
filename could truncate/reinterpret the request or splice in extra path
segments, and a shorter real filename that is a substring of a longer one
(e.g. a detached .asc signature file) could be wrongly treated as already
published.
Fixed by routing every caller-supplied segment through the same
SidecarUriUtils helpers #5019's bridge code uses (also pulled out into a
shared class there), and by matching the simple index's hrefs exactly
instead of searching the raw response body.
* fix(marketplace): serve Entitlement and Agreement in every region AWS publishes
GetEntitlements and the Marketplace Agreement API refused every region but
us-east-1, on the assumption that AWS Marketplace is commercial-only. AWS
publishes more endpoints than that: Entitlement also runs in cn-northwest-1
and eusc-de-east-1, and Agreement in us-iso-east-1, us-isob-east-1,
us-isof-south-1 and eusc-de-east-1 (botocore endpoints.json). Both now accept
exactly those regions and keep refusing the rest with AWS's message and error
code, so cn-north-1, which has neither endpoint, is still rejected.
* fix(marketplace): name the served regions in the Entitlement and Agreement refusals
Both refusals still said "available only in us-east-1" after the region sets
grew, so a caller in an unserved ISO, EUSC or China region was pointed at a
commercial region it cannot reach. Each message now lists the regions its
API serves, as Marketplace Discovery's already does. No reference source
carries AWS's text for these refusals, so the comment no longer calls it
AWS's.
Close-out items of the multi-partition initiative (#4272):
- Lambda layers were only tested across partitions negatively. A layer
published under a cn-north-1 scope now has its own test: the returned ARN
is arn:aws-cn:lambda:cn-north-1:..., GetLayerVersionByArn resolves it, and
a China function attaches it (BL-104).
- partitions.md names FLOCI_PARTITIONS_ALLOW_UNKNOWN_REGIONS under Related and
lists two more unsourced values: the EKS Pod Identity token audience
outside the commercial partition, and the exact error AWS WAF returns for
the CLOUDFRONT scope where the partition has no CloudFront (BL-105).
- AwsRegions.ALL, the commercial advertised list kept as a deprecated alias
during the partition sweep, had no caller left in src/main. It is removed
and its three tests call advertised("aws"); the KNOWN_IDS javadoc no longer
points at it (BL-106).
* fix(eks): keep the API server port reserved when Docker cannot remove the container
stopAndRemove is best effort: it logs Docker errors and returns. Releasing the port regardless could hand it to another cluster while the old container still publishes it. stopAndRemove now reports whether Docker confirmed the container is gone, and stopCluster only releases the port then.
* fix(eks): fail the delete when Docker cannot remove the cluster container
Keeping the port reserved after an unconfirmed removal orphaned it once DeleteCluster dropped the cluster record: nothing released it until Floci restarted, so repeated failures could exhaust the API server port range. stopCluster now uses stopAndRemoveStrict, as it already does for the capacity backup, so the delete fails and keeps the record, and a retried delete releases the port once Docker confirms the container is gone. This reverts the boolean return on the best-effort stopAndRemove, which no longer has a caller that needs it.
* fix(core): close the log stream after the container stops in strict cleanup
stopAndRemoveStrict closed the log stream before stopping the container, so its follower could shut down while Docker was still stopping it and drop the final log lines. stopAndRemove already closes after the stop and remove; the strict variant now does the same. This keeps EKS control-plane logs intact now that stopCluster uses the strict variant, and fixes the same ordering for RDS.
* fix(eks): keep the log stream of a cluster whose container could not be removed
When Docker could neither stop nor remove the container, stopAndRemoveStrict still closed its log stream and stopCluster had already dropped the handle, so a container that kept running lost its control-plane and audit logs and the retried delete had nothing to close. The strict variant now closes the stream only once the container is stopped or gone, as stopAndRemove does, and stopCluster puts the handle back when removal fails.
* fix(eks): keep a failed cluster delete retryable without stale state
When Docker cannot remove the cluster container, the delete now leaves
everything a retry needs and nothing it could trip over:
- the log handle is never put back on failure; it is removed by value
once the container is gone, so a delete that lost a race to a
successful one cannot restore a handle under a deleted cluster's name
- attaching logs for a new or adopted container closes and replaces a
handle still registered under the name instead of skipping the attach,
so a recreated cluster always gets its control-plane logs
- the node stays registered on the metadata server until the container
is confirmed gone
- the host port is read and cleared under the cluster lock, so it is
released exactly once
- stopAndRemoveStrict leaves the log stream open on any removal failure
and closes it only once the container is gone
- DeleteCluster restores the previous status instead of leaving the
cluster stuck in DELETING; only the delete that set DELETING restores it
* fix(eks): reject a DeleteCluster that overlaps one still in progress
A delete that failed to remove the container restored the shared
cluster's status even while an overlapping delete had removed the
container and was still tearing the cluster down, so the cluster briefly
looked ACTIVE with no API server behind it.
Deletes of the same cluster now run one at a time: an overlapping
DeleteCluster fails with ResourceInUseException, so only the delete that
set DELETING can restore the previous status. The guard tracks the
delete in progress rather than the status, so a cluster left in
DELETING by an earlier failure can still be deleted again.
The EKS token webhook looked long-term keys up through findSecretKey,
which is account-scoped. k3s calls the webhook with no account routing,
so it saw only the default account's keys. A correctly signed
`aws eks get-token` from a user in any other account was rejected:
kubectl reported "the server has asked for the client to provide
credentials".
The webhook now uses a new IamService.findSecretKeyInAnyAccount. It
tries the request's account first and scans the other accounts only on
a miss. Inactive keys are still refused, and temporary (ASIA) keys never
reach the scan. findSecretKey itself stays account-scoped: the
ElastiCache, MemoryDB and RDS IAM-auth proxies verify through it and do
not compare the key's account with the cluster's.
Because a long-term key can now reach the webhook from any account, the
legacy identity (system:masters) is limited to long-term keys owned by the
cluster's account, or by the default account on unscoped webhook paths
that predate per-account clusters. This also tightens one existing case:
a default-account key used to get system:masters on clusters of every
account, and now gets it only on the default account's clusters.
Session credentials without an instance ID still map to the legacy
identity on any cluster; that predates this change and is left alone.
Co-authored-by: Robin Baeckman <27041454+RobinBaeckman@users.noreply.github.com>
ReposiliteSidecarClient, VerdaccioSidecarManager, and PypiserverSidecarManager
each carried an identical copy of combine/encodeSegment (added across the
GetPackageVersionAsset bridge's review cycle in #5019). Extracted into
SidecarUriUtils so the three clients can't drift apart on this again.
UploadSigningCertificate, ListSigningCertificates, UpdateSigningCertificate
and DeleteSigningCertificate, stored per user with the documented quota of
two and account-wide duplicate detection compared on the encoded form.
The body is parsed on upload, because MalformedCertificate cannot be
answered without reading it. Status accepts Active, Inactive and Expired:
the API Reference gives all three as valid values even though the
parameter's prose explains only the first two. UserName is optional on
every operation and resolves from the access key that signed the request.
A certificate blocks DeleteUser until it is removed, which AWS lists as a
prerequisite, and follows the user across an UpdateUser rename rather than
being stranded on a name that no longer exists. The credential report's
cert_1 and cert_2 columns are backed by the store instead of always
reporting FALSE, reporting N/A for the rotation date unless the
certificate is Active, as the User Guide defines them.
* feat(cognito): provision user pool users
Add a CloudFormation provisioner for AWS::Cognito::UserPoolUser. Ref is the
username Cognito reports (the sub in an email-as-username pool). Every property
is createOnly: a changed custom-named user is refused as on AWS, any other change
replaces the user, and each delete targets the pool the user was created in.
* fix(cognito): refuse a RESEND user pool user that already exists
* fix(cognito): keep the user's pool out of Fn::GetAtt
* fix(cognito): keep only owed users in the pool record
* perf(kms): build the KMS curves directly so unused BouncyCastle curves leave the native image
Any BouncyCastle named curve lookup reaches every curve the tables know,
including the binary SecT curves. BcEcKeys now builds the five curves KMS
uses from their own BouncyCastle classes and encodes keys itself, in the same
DER layout as before. RsaKeyType builds the PSS signer's key parameters from
the JDK key instead of going through BouncyCastle's key factories.
* test(compat): cover the KMS key paths that call BouncyCastle directly
secp256k1 signing, EC key import for every curve, and RSA PSS digest signing
had no test in the suite that runs against the native image.
* chore(kms): note where each curve generator comes from
* feat(wafv2): provision web ACL associations
WafV2CfnProvisioner now serves AWS::WAFv2::WebACLAssociation with Ref
ResourceArn|WebACLArn, as measured on AWS. Any property change replaces
the pair through ReplacementCleanup. Delete disassociates only while the
resource still uses that ACL, so cleanup of an old pair keeps the new one.
Rollback re-associates the restored pair.
* test(wafv2): cover ResourceArn replacement and read stack outputs with XmlPath
* fix(route53): store CloudFormation record names fully qualified
Route 53 always stores and lists a record name fully qualified, ending in a dot, even when the request leaves the dot off. Floci's ChangeResourceRecordSets API already adds the dot, but an AWS::Route53::RecordSet created through CloudFormation was stored exactly as the template wrote it, so ListResourceRecordSets returned it without the dot. The CloudFormation provisioner now stores the dotted name and compares dotted names when it looks up a record to replace on update or remove on stack delete. The resource's Ref is unchanged and still returns the name as the template wrote it.
* fix(route53): create CloudFormation record sets instead of upserting them
An AWS::Route53::RecordSet was always written with an UPSERT, on stack create as well as update. A stack could therefore overwrite a record that someone had already created through the Route 53 API under the same name, and deleting the stack then removed that record too.
Real CloudFormation sends CREATE for a record the resource does not own yet, so the stack fails with "already exists" and the other record is left alone. The provisioner now does the same: it sends CREATE on stack create and on an update that changes the record's zone, name, type or set identifier, and keeps UPSERT when an update re-applies the record it already wrote. A failed create records no zone and no physical id, so neither the rollback nor a later DeleteStack touches the existing record.
* fix(route53): treat a blank CloudFormation SetIdentifier as no identifier
A record set whose template gave SetIdentifier as an empty string was written with that empty identifier, but the value saved for later updates and deletes dropped it. The next ordinary UpdateStack therefore saw a different record, sent CREATE, and failed as a duplicate. DeleteStack also looked for a record without an identifier and left the empty-identifier record in the zone.
Route 53 requires a set identifier of at least one character, so the provisioner now reads a blank SetIdentifier as absent. The written record, the saved value and the update comparison then agree. The class and change comments now also say that an update keeping the same record sends UPSERT, which replaces whatever record holds that identity.
* fix(route53): match CloudFormation records an earlier version stored as written
Before this branch, the provisioner stored a record set with the template's Name and SetIdentifier as written, so an undotted name or an empty identifier. With persistent storage that record survives an upgrade, and the stricter lookup no longer matched it: DeleteStack and a rename left it in the zone, where it blocks the zone's own delete. An update keeping the same identity sent a fully qualified UPSERT, which the zone stored beside the old copy instead of replacing it.
The lookup now compares names fully qualified on both sides and reads a blank SetIdentifier as none, so it finds the old record. After a same-identity UPSERT, the provisioner deletes any copy of the identity that is not stored in the canonical form it just wrote.
* fix(route53): treat a trailing dot and a blank set identifier as the same record
Route 53 treats a record name with or without the trailing dot as the same record, and requires a set identifier of at least one character. The service compared both literally, so a record an earlier CloudFormation provisioner stored with the template's undotted Name or empty SetIdentifier could sit beside the fully qualified form: a CREATE of the dotted name succeeded instead of failing as a duplicate, and an UPSERT added a second record instead of replacing the first.
The CREATE, UPSERT and DELETE checks now share one identity comparison, sameRecord, which compares names fully qualified and reads a blank set identifier as none. The CloudFormation provisioner's record lookup uses it too, so DeleteStack and a rename find a record stored either way. This replaces the provisioner's own legacy-copy cleanup, which deleted any non-canonical copy without knowing who owned it, and could remove another stack's record.
* fix(route53): remove one record per DELETE
An earlier version compared record names literally, so persistent storage can hold the same record both undotted and dotted, possibly for two owners, with the same values. Now that DELETE matches both forms, removing every match would also delete the other owner's copy. A DELETE now removes a single record, preferring the copy named exactly as the request names it.
* fix(route53): find the CloudFormation record named as its physical id first
An earlier version stored a record's name as the template wrote it, and could leave another owner's copy in the other form beside it. The lookup for stack delete and rename took the first record with the same identity, and the zone listing sorts the undotted copy first, so it could delete the other owner's record. It now prefers the record named exactly as the physical id, and falls back to the identity match for records this version wrote fully qualified.
Under fan-out load the single Docker socket drops connections mid-call
(Broken pipe, Connection reset) and the operation fails. Split out of #2707.
- Retry transient I/O at the transport: RetryingDockerHttpClient retries
replay-safe control-plane calls with capped backoff (policy in
DockerRetry). Interrupted I/O is not retried, except
SocketTimeoutException, and the interrupt flag is kept.
- Split log-follow streams onto their own @StreamingDocker client and pool
(floci.docker.streaming-max-connections, default 512) so they cannot
starve create/start/stop calls. Exec and wait streams stay on the main
pool for now.
- Adopt the container a replayed named create already made (409 matched by
a per-attempt label) instead of failing and leaking it. Unnamed container
creates, network creates, restart and network connect/disconnect are
never replayed.
- Retry tar copies at the call site with RetryingTarCopier (Lambda
launcher, EC2 authorized_keys, EKS webhook kubeconfig and registries.yaml,
MWAA); a local tar-writer failure is reported at once.
- Send Connection: close on control-plane requests, since the Apache
transport reuses pooled sockets the daemon has already closed (Podman).
Hijacked requests and the streaming pool are unchanged.
* fix(ses): serve the POST list bindings and Filter of ListEmailIdentities and ListConfigurationSets
Since AWS SDK for Java 2.55.8 and botocore 1.43.105 the SES v2 model sends
ListEmailIdentities as POST /v2/email/list-identities and ListConfigurationSets
as POST /v2/email/list-configuration-sets, each with a new Filter member.
Floci only served the GET bindings, so these lists failed for current SDKs.
Both lists now answer on both bindings. The filter follows real SES, probed
on 2026-10-03: what it matches, its validation messages and their precedence,
and a NextToken that continues only the filter it was taken with. The filter
is applied before the page is cut, so filtered pages are exact.
* fix(ses): bind identity list tokens to an unambiguous filter scope
A name filter of "null" produced the same token scope as an absent name, so a
token from one filter continued the other. The scope now leads with the type
and status, which never hold the separator, and ends with the name. The name
filter also runs before the status refresh, so domains it excludes are not
checked against Route 53.
* docs(ses): mark the GET list bindings as the pre-Filter ones
Serve RestoreDBInstanceToPointInTime and RestoreDBClusterToPointInTime,
and report the restorable window: LatestRestorableTime on
DescribeDBInstances, EarliestRestorableTime and LatestRestorableTime on
DescribeDBClusters.
Requests are checked as the API reference describes: exactly one of
RestoreTime (RestoreToTime) and UseLatestRestorableTime, a time inside
the window or InvalidRestoreFault, PointInTimeRestoreNotEnabled for an
instance with backups off, and exactly one source. An instance source is
named by identifier or DbiResourceId, a cluster source by identifier, ARN
or DbClusterResourceId; automated backups ARNs answer
DBInstanceAutomatedBackupNotFound since no automated backups are kept.
Floci keeps no transaction log, so the target is seeded from a
pg_dumpall of the source taken when the request arrives, as read
replicas are. The restored data is the source's latest state for any
time in the window, and LatestRestorableTime is the current time. Only
PostgreSQL sources are accepted, as for CreateDBSnapshot.
Closes#4952
* feat(lambda): accept and echo DurableConfig on functions
CreateFunction and UpdateFunctionConfiguration take DurableConfig, PublishVersion snapshots it, and every read echoes it. ExecutionTimeout is required on create, RetentionPeriodInDays defaults to 14, a durable function's Timeout defaults to min(ExecutionTimeout, 900) and its logging to JSON. Update merges the members, and a function created without DurableConfig cannot gain one. KMSKeyArn is validated against its pattern and stored, the key itself is not looked up.
* chore(lambda): trim the DurableConfig tests to one case per rule
* feat(lambda): durable functions log in JSON format only
A durable function rejects LogFormat Text on create and update, and a LoggingConfig without LogFormat reads back as JSON. An empty KMSKeyArn means no key.
* chore(lambda): let the logging helpers own the durable JSON rule
validateLoggingConfig and applyLoggingConfig take the durable flag, so a durable function's default format and the Text rejection live in one place and a LoggingConfig without LogFormat keeps its log levels. applyDurableConfig sets the retention default and merges, and the test uses chainable helpers.
* chore(lambda): say why the durable compat test ignores a failed cleanup
CompleteMultipartUpload built the whole object as one byte array, so an
object over Integer.MAX_VALUE bytes failed with an ArithmeticException,
and anything smaller still needed the full object in the heap.
In the persistent, hybrid and wal modes the parts are now copied file to
file into one assembled file in the upload's directory, before the bucket
lock is taken, and that file is renamed into place under the lock. A
versioned bucket hard-links the current file to the versioned one rather
than writing a second copy, which is safe because object files are only
ever replaced by a rename, never modified in place.
The full-object checksum is combined from each part's CRC and size,
which is how S3 linearizes full-object checksums and why it offers them
only for the CRC algorithms, so the object's bytes are never read for it
and a mismatched expected checksum is rejected before assembly.
Since the ETag and checksum now come from the part records, each
UploadPart stores its bytes under its own storage ID kept on the record
and drops the bytes it replaced only after publishing the new record.
CompleteMultipartUpload reads each record once and assembles exactly the
bytes those records name, so an UploadPart racing a Complete makes that
Complete fail with InvalidPart instead of storing a checksum that
describes different bytes.
Memory mode still holds an object in one byte array, so an UploadPart
that takes an upload past the largest array the JDK allocates, or a
CompleteMultipartUpload over it, now fails with EntityTooLarge instead of
exhausting the heap or overflowing the array size.
Multipart uploads are tracked only in memory, so the part files under
.multipart are removed at startup and on reset. Without that, a crash
during assembly would leave a file as large as the object on disk for
good. The S3 docs describe the memory-mode limit, the disk space a
completion needs, and the operations that still read a whole object into
memory.
* fix(cloudformation): resolve change sets by ARN without stack name
* test(cloudformation): verify change set ARN execution with SDK
* test(cloudformation): wait for change set execution status
* fix(cloudformation): tighten change set ARN validation tests
* feat(codepipeline): evaluate V2 stage conditions and rules
Evaluates beforeEntry/onSuccess conditions with VariableCheck and LambdaInvoke rules, records rule executions, and supports OverrideStageCondition.
* fix(codepipeline): bound MATCHES evaluation time and guard rule records and overrides against races
MATCHES: match against a deadline-checked CharSequence so a backtracking pattern fails the rule after 1s instead of hanging the run.
Rule records: mutate and serialize them under the execution lock, and build ListRuleExecutions from a locked snapshot.
OverrideStageCondition: when the run has failed on the condition but not yet left activeRuns, wait (bounded, outside the lock) so the override resumes it.
* fix(codepipeline): harden V2 stage conditions after review
Honor SKIP only before entry, resolve declared variable defaults, fail
rules on unresolved variable references, reject overrides after a pipeline
change, surface a busy-run override as a conflict, hide internal condition
state from GetPipelineExecution, and use the DeploymentWindow provider name.
* fix(codepipeline): keep an accepted stage-condition override when another waiter times out
* fix(codepipeline): reject stale OverrideStageCondition with ConditionNotOverridableException
* refactor(codepipeline): share the busy ConflictException across its four throw sites
* refactor(codepipeline): inject the override test hooks through the constructor
* fix(codepipeline): emit no stage events for a stage skipped by beforeEntry
* fix(s3): return account owner IDs in bucket and parts listings
* fix(s3): bind multipart uploads to bucket ownership
* fix(s3): coordinate multipart uploads with bucket deletion
* fix(s3): preserve parallel multipart operations under deletion guard
* refactor(s3): reuse default owner display name in responses
* fix(s3): serialize operations on the same multipart upload
* style(s3): order project imports before Java imports
AWS requires the principal to hold permission on the old name and the new
one, so that a rename into a name they may not write fails. ResourceArnBuilder
named only the stored certificate, so a Deny on the destination did not match
and the rename went through.
UpdateServerCertificate now names both the current ARN and the one the
request would produce, which the filter authorizes once per resource. The
destination is built beside the stored ARN so it keeps the certificate's
partition and account, and an update that renames and moves nothing still
names a single resource.
* fix(cloudformation): roll back in-place Cognito user pool and client updates
A stack update that changed a user pool or user pool client in place and
then failed on a later resource ended in UPDATE_ROLLBACK_FAILED, because the
provisioner kept no snapshot to put them back. It now snapshots the settings
an update can change before the update call and restores them on rollback,
spending the snapshot only once the restore succeeds.
UpdateUserPool and UpdateUserPoolClient only apply what a request names, so
they cannot clear a setting the update added. CognitoService gains
userPoolSettings/restoreUserPoolSettings and their client counterparts,
which copy exactly those settings, leave the pool's signing keys and the
client's secrets out of the snapshot, and put the settings back on the
stored entity.
* fix(cloudformation): drop the Cognito update snapshot when the update commits
Greptile on #5006: once a stack update commits, the engine calls
completeUpdate for every resource but clearUpdate only after a
replacement's cleanup, so an in-place pool or client update left its
settings snapshot in the stored stack metadata until the resource was next
provisioned. completeUpdate now drops it before delegating to the
replacement cleanup; the update committed and nothing will roll it back.
Also orders the test's org imports (org.junit before org.mockito), which
were already out of order on main.
ResolvedServiceCatalog declared apigatewayv2 and sesv2 as credential
scopes, but every SDK signs those services as apigateway and ses
(botocore signingName, Java v2 codegen, Go v2 endpoints, JS v3 auth
scheme). The extra names only widened what the unknown-service guard let
through: a REST request signed apigatewayv2 or sesv2 reached a route no
real client would send it to. Both are dropped; API Gateway v2 JSON
requests still route by their AmazonApiGatewayV2. target and REST
/v2/apis by its resource class. A hand-written client that signed with
either name now gets UnknownOperationException, and
floci.protocols.reject-unknown-service-scope=false still turns the guard
off.
The tests that signed with the dropped names now sign as their SDKs do,
and UnknownServiceScopeGuardIntegrationTest pins both rejections next to
the accepted scope.
* fix(cloudformation): apply every SQS queue property and reset dropped ones on update
SqsCfnProvisioner applied five of the thirteen mutable AWS::SQS::Queue
properties: DelaySeconds, MessageRetentionPeriod, MaximumMessageSize,
ReceiveMessageWaitTimeSeconds, KmsMasterKeyId, KmsDataKeyReusePeriodSeconds,
SqsManagedSseEnabled and RedriveAllowPolicy never reached the queue. All of
them now do, on create and update.
An update also kept the old value of a property the template dropped, while
CloudFormation applies the whole template as the desired state. Each dropped
property is now put back as a fresh queue has it: the stored attribute is
removed, except MessageRetentionPeriod, which SQS rejects empty and is written
as 345600, and ContentBasedDeduplication on a FIFO queue, written as false.
FIFO-only attributes are left alone on a standard queue and
SqsManagedSseEnabled is not reset, as LocalStack's parity-tested provider
records for AWS.
* fix(cloudformation): treat an SQS queue property that resolves to AWS::NoValue as absent
Greptile on #4972: the engine resolves AWS::NoValue to blank, so
MessageRetentionPeriod: {Fn::If: [cond, 1209600, AWS::NoValue]} reached the
attribute map as an empty value. On update it skipped the 345600 reset and
SetQueueAttributes rejected it; on create the empty value replaced the
queue's default (VisibilityTimeout "" among them). Every scalar and JSON
property that resolves to blank is now absent, so a condition that drops a
property leaves the default on create and resets it on update.
* test(cloudformation): pin the AWS-recorded SqsManagedSseEnabled update behaviour
Review on #4972 asked to let a dropped SqsManagedSseEnabled reset to its
create default. AWS does not: LocalStack's AWS-recorded parity test
test_update_fifo_queue_remove_all_properties_except_queuename updates a
queue created with SqsManagedSseEnabled: false and a KMS key to name-only,
and AWS then reports DelaySeconds and MessageRetentionPeriod reset, no KMS
key, and SqsManagedSseEnabled still false. The integration test replays that
case, so the exception in resetDroppedAttributes cannot go without a red
test.
* fix(cloudformation): keep a dropped DeduplicationScope and FifoThroughputLimit as AWS does
Review on #4972: the AWS-recorded parity case that pins SqsManagedSseEnabled
(LocalStack test_update_fifo_queue_remove_all_properties_except_queuename)
also shows DeduplicationScope messageGroup and FifoThroughputLimit
perMessageGroupId unchanged after an in-place name-only update, while
ContentBasedDeduplication returns to false. The reset cleared both, which
also changed delivery: without DeduplicationScope, two messages sharing a
deduplication id in different message groups collapsed into one.
Both now join SqsManagedSseEnabled in RETAINED_ON_UPDATE, and
ContentBasedDeduplication still resets. The integration test replays the
FIFO half of the recording next to the SSE half.
Replace the ListServerCertificates stub with the server-certificate
lifecycle: UploadServerCertificate, GetServerCertificate,
UpdateServerCertificate, DeleteServerCertificate, ListServerCertificates
and the tag operations.
The uploaded material is really parsed, because two of the upload's
modeled errors cannot be answered otherwise. CertificateBody, and every
certificate in CertificateChain rather than only its first block, must be
readable PEM or the upload is MalformedCertificate; the private key must
match the certificate's public key or it is KeyPairMismatch. The match is
a sign-then-verify check, so it holds for RSA and EC alike. All of it goes
through core.common.Pem rather than a second copy of the parsing.
Expiration is read from the certificate's own notAfter rather than stored
separately, so it cannot drift from what it describes. ServerCertificateId
uses AWS's ASCA prefix. The private key is stored and never returned: AWS
marks privateKeyType sensitive and models it only on the upload, so
neither reader echoes it back, and ListServerCertificates returns metadata
only as AWS documents.
Request shapes are enforced from the wire model: the 16384-character caps
on the body and key, the much larger 2097152 cap on the chain, and the
per-account quota of 20 that the User Guide's table publishes, counted
under the same lock as the write. A rename that only changes case is
allowed, excluding the certificate from its own duplicate check by id the
way updateUser does.
GetAccountSummary's ServerCertificates count is now backed by the store
instead of a hardcoded zero.
ResourceArnBuilder gains an iam case naming the certificate an operation
targets, so a policy statement scoped to one certificate constrains it
under enforcement. Every other IAM action still resolves to *, which is
long-standing behaviour rather than something this adds; documented in
docs/services/iam.md and tracked in #4979.
DeleteServerCertificate does not raise the in-use DeleteConflict AWS
returns when a load balancer still references the certificate. Floci
cannot determine that yet, because ELB Classic and CloudFront store
certificate identifiers without resolving them against IAM. Documented,
and tracked in #4875.
* fix(ecr): support image scanning configuration updates
* fix(ecr): validate scanning configuration booleans
* fix(ecr): accept null scan-on-push values
* docs(ecr): list the image scanning configuration actions
Add PutImageScanningConfiguration and BatchGetRepositoryScanningConfiguration
to the Supported Actions table. The table is not generated, so the docs check
does not catch a missing row.
ServiceQuotas only curated codebuild, lambda and organizations; every
other service code got three CRC-synthetic quotas, so real VPC codes
such as L-FE5A380F answered NoSuchResourceException from
GetServiceQuota and GetAWSDefaultServiceQuota. Terraform's
aws_servicequotas_service_quota reads exactly these codes before
requesting an increase.
Add a curated "vpc" entry, plus its service name:
- L-FE5A380F "NAT gateways per Availability Zone" = 5
- L-2AEEBF1A "Rules per network ACL" = 20
Values are the AWS defaults rather than the generous GENERIC_QUOTA_VALUE,
following the organizations entry (L-E619E033 = 50): callers compare a
desired value against these defaults to decide whether to request an
increase, so a realistic default keeps them on the path they take
against AWS. The emulator does not enforce either limit. The synthetic
quotas are still appended.
* fix(cloudformation): resolve a stack id only to the stack carrying it
resolveStack turned an ARN into its stack name and returned whatever live
stack held that name. After a stack was deleted and its name reused,
DescribeStacks with the old stack id returned the new live stack (new id,
CREATE_COMPLETE) instead of the retained deleted one, and DeleteStack with
the old id deleted the new stack.
An ARN now resolves to a live stack only when the stack ids match, so
DescribeStacks/DescribeStackEvents fall through to the retained deleted
record (DELETE_COMPLETE), DeleteStack on the old id is the existing no-op,
and other operations answer "Stack with id ... does not exist".
* fix(cloudformation): send the real stack id in custom resource events
The custom resource event carried a made-up StackId (stack/<name>/<random
uuid>), so a handler calling DescribeStacks(event.StackId) now gets
"does not exist" since stack ids resolve only to the stack carrying them.
Pass the engine's stack id on Create/Update and stash it for Delete, which
only sees the StackResource.
* fix(apigateway): map authorizer context in HTTP integrations
HTTP backends need verified authorizer context from parameter mappings. Resolve scalar context values and replace mapped headers regardless of casing so client claims cannot remain beside verified values.
* fix(apigateway): drop unresolved context headers
Remove inbound context-mapped headers even when verified context is absent or non-scalar. Cover missing authorizer claims, forged repeated headers, OPTIONS and unresolved method mappings.
* fix(apigateway): preserve original mapping inputs
Keep HTTP proxy header, query and path mapping sources separate from outgoing destinations. Cover both mapping orders with present and missing authorizer claims through both REST execution endpoints.
* fix(s3): honour CopyObject destination and copy-source preconditions
CopyObject ignored every precondition. If-None-Match: * over an existing
destination, and If-Match with a stale destination ETag, both answered 200 and
overwrote it; If-Match against a missing destination created it; and the four
x-amz-copy-source-if-* headers were never read, on CopyObject or UploadPartCopy.
Destination If-Match / If-None-Match now travel into the write the copy already
performs, so they are checked by the same code and under the same bucket
monitor as a conditional PutObject: 412 on a failed condition, 404 NoSuchKey
for If-Match on a missing key. Other If-None-Match values keep the literal-ETag
meaning they have on PutObject.
The copy-source conditions are checked against the resolved source object
with the pairing rules S3 documents for CopyObject: a matching if-match makes
if-unmodified-since irrelevant, and a matching if-none-match fails whatever
if-modified-since says. Every failure is 412, never 304. Dates compare at
second precision, the resolution of an HTTP date and of Last-Modified.
* test(s3): pin CopyObject's condition names and pairing controls
Destination failures now assert the <Condition> they report, and each
pairing test first shows its date condition's result alone, so the pair's
outcome can only come from the precedence rule.
* test(s3): assert a rejected UploadPartCopy leaves the existing part intact
* fix(lambda): skip Runtime API ports held by other processes
PortAllocator only tracked ports handed out inside its own JVM. When
another process in the same network namespace held the lowest port of the
range, allocate() returned it anyway and RuntimeApiServer retried the same
bind for 5s before the cold start failed, while the rest of the range sat
idle. Probe each candidate by binding 0.0.0.0 (as RuntimeApiServer does)
and fall through to the next port; a held port is not kept reserved, so it
is handed out again once its holder lets go.
* fix(lambda): keep Runtime API port tests off host ports
The exhaustion message now says a port may be in use by this floci or
held by another process, since allocate() skips externally held ports and
the pool can run dry with few of its own ports out.
Pool-bookkeeping tests ran on 9200-9299 (OpenSearch's port) and 12000+,
which the bindability probe now binds for real. Make the probe injectable
through the package-private constructor and pass an always-bindable one
there, so those tests no longer depend on what is listening on the host.
The held-port test keeps the real probe and skips itself when the OS hands
out a port too close to 65535 for its range. Rewrap the class Javadoc.