Commit Graph
2211 Commits
Author SHA1 Message Date
Franklin G. Mendoza 6a728f1b9f feat(cloudwatchlogs): add cross-account policy operations (#3089)
* feat(cloudwatchlogs): add cross-account policy operations

* fix(cloudwatchlogs): align cross-account policy contracts

* fix(cloudwatchlogs): enforce account policy quotas

* fix(cloudwatchlogs): validate field index policy scopes

* fix(cloudwatchlogs): parse field index criteria safely

* fix(cloudwatchlogs): align field index quota parsing
2026-09-05 21:08:07 -04:00
lex00 1aa981fef2 fix(ec2,ecr,eks,elasticache,msk,opensearch): degrade gracefully with no Docker daemon (#2975)
* fix(ec2,ecr,eks,elasticache,msk,opensearch): degrade gracefully with no Docker daemon

Extends the daemonless degradation pattern #2386 established for MemoryDB,
Neptune and DocDB to the remaining container-backed services. Create paths
probe the daemon on failure, keep serving metadata, and log the outage once;
a failure with a reachable daemon still propagates.

* fix(opensearch,msk): keep the readiness pollers when the daemon is reachable

Create set the terminal state before the container started, which orphaned the readiness pollers. The terminal state is now set only in mock mode or when the daemon is unreachable, matching EKS. ElastiCache stops a partially created container before degrading to metadata.

* fix(elasticache): fail the create when a container was already started

Degrading to metadata now happens only when no container was created. A failure after creation runs the cleanup and rethrows. The service rollback then runs and no available group is persisted without a container.

* test(elasticache): stub tryStart in the parameter group reservation tests

The three tests from #3023 stubbed start, which createReplicationGroup no longer calls on this branch.
2026-09-05 21:01:38 -04:00
Ammar 43e2a48263 fix(lambda): deliver extension INVOKE when the runtime receives the invocation (#3070)
* fix(lambda): deliver extension INVOKE when the runtime receives the invocation

* test(lambda): cover extension INVOKE delivery at runtime dispatch time

Migrates the two existing extension-event tests to poll
/runtime/invocation/next before asserting delivery, since
notifyExtensionsOfInvoke() now fires from sendInvocation() rather than
enqueue(). Adds coverage for the remaining #2573 cases: a not-yet-polling
extension still receiving its queued event, the warm dispatch path, no
duplicate INVOKE on write-failure requeue, the stopped guard racing
quiesce()'s SHUTDOWN fan-out, and pinning that a runtime which never polls
never triggers the extension event.

* fix(lambda): remove em-dashes from new test comments

Greptile flagged four comments added in the previous test commit for
using em-dashes, which AGENTS.md's documentation style rule prohibits
repo-wide. Rewords each to use a comma or period instead; no behavior
or assertion changes.
2026-09-05 20:54:14 -04:00
Franklin G. Mendoza b199894e19 feat(controltower): add enabled control operations (#3056)
* feat(controltower): add enabled control operations

* fix(controltower): harden baseline state and pagination

* fix(controltower): register persisted control model
2026-09-05 20:19:56 -04:00
Mario Toffia 615056999e feat(acm): map CertificateExport and CertificateTransparencyLoggingPreference onto the certificate options (#3111)
The AWS::CertificateManager::Certificate provisioner accepted both properties
and ignored them, so every certificate a stack created carried the ACM
defaults. Both now become the certificate's Options, with the CloudFormation
defaults (export DISABLED, transparency logging ENABLED) when absent, and a
value other than ENABLED or DISABLED fails the resource before any ACM call.

Updates follow the registry schema: CertificateExport is createOnly, so a
change replaces the certificate through the existing delete-or-unwind path,
while a changed CertificateTransparencyLoggingPreference calls
UpdateCertificateOptions on the existing certificate and keeps its ARN.
Export is never sent to UpdateCertificateOptions, since ACM does not allow
changing it once the certificate exists.

CertificateAuthorityArn stays ignored; private CA is not emulated.
2026-09-05 18:42:39 -05:00
Matheus Oliveira d2d7eb4131 fix(cloudformation): refuse UpdateStack on a ROLLBACK_COMPLETE stack (#3104)
AWS treats a stack that rolled back after a failed create as terminal, so UpdateStack and an UPDATE change set are now refused with the ValidationError real CloudFormation emits.

Closes #3097

Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>
2026-09-05 17:37:29 -05:00
soreavis fcb5bd02c0 fix(kinesis): reject non-string tag members instead of coercing them (#3099)
CreateStream, AddTagsToStream and RemoveTagsFromStream read tag
values and TagKeys entries with asText(), so a number, boolean or
null member was stored as its text ("5", "true", "null") and an
object or array member as the empty string, rather than rejected.
AWS models Tags as a map of string values and TagKeys as a list of
strings, so none of those shapes is a valid request. The CreateStream
tag change (#2494) named this as the separate fix to land on its own,
and the SES tag parser already answers the same shapes with
SerializationException (#2512).

Reject a present-but-non-string tag value or TagKeys entry, a Tags
member that is not an object, and a TagKeys member that is not a
list, with a 400 SerializationException; a missing or null member
still yields no tags, as before. The tags are parsed before the
stream is created or looked up: CreateStream would otherwise leave
an untagged stream behind on a rejected Tags member, and a malformed
member is answered ahead of the not-found or in-use error a bad
stream raises.
2026-09-05 17:09:15 -04:00
Niels Kootstra 43cdbe234f fix(ec2): honor AMI architecture for containers (#3096)
* fix(ec2): honor AMI architecture for containers

* fix(ec2): preserve created AMI architecture
2026-09-05 17:04:41 -04:00
Mario Toffia b4d80a5596 feat(cognito): route custom domains by Host (#3095)
* feat(cognito): route /oauth2 requests on a custom domain by Host

CognitoCustomDomainFilter (PreMatching, priority 12) resolves the request
Host against the domain store and rewrites /oauth2/token and
/oauth2/userInfo onto the /cognito-idp/oauth2 handlers. The pool the domain
belongs to travels in a request property, so the controllers pin exactly the
pool the filter matched and a caller cannot supply it. The token endpoint
refuses a client of another pool with invalid_client and userInfo refuses a
token of another pool with invalid_token, as AWS does. The lookups scan
every account because an OAuth call carries no SigV4 account.

The discovery document advertises https://<domain>/oauth2/... for a pool
with a custom domain. S3VirtualHostFilter skips a request the Cognito
filter routed, the way it already skips CloudFront ones, since a custom
domain under a Floci suffix looks like a bucket host.

* docs(cognito): custom domain routing

* fix(cognito): run custom domain requests in the domain's account and keep domain names unique

A request on a custom domain carries no AWS credential, so AccountContextFilter
put it in the default account and the client, pool and user lookups missed a
domain created under another account. The Cognito filter now pins the domain's
account in a request property that AccountContextFilter honours before header
resolution. Domain creation checks the name across every account, as AWS's
single domain namespace does, and a name two accounts already hold from older
data is not routed.

Also adds the OAuth contract tests for the routed endpoints (client_secret_post,
error codes, token claims, userInfo refusals, unserved paths, prefix domains,
interleaved requests on several threads) in a second integration class.

* fix(cognito): make the domain uniqueness check and write one step

Two accounts creating the same custom domain at once both passed the
cross-account scan and wrote under their own account-prefixed keys, leaving a
name that routing then refused as ambiguous. The check and the write now run
under one lock, the way identity-provider mutations already do. A 16-thread
unit race and a two-account integration race pin exactly one owner.
2026-09-05 16:56:01 -04:00
Niels Kootstra 8686651de1 fix(appconfigdata): honor requested poll interval (#3092) 2026-09-05 15:53:16 -04:00
Kenshin Okinaka 15b401032d refactor(ses): move the tag dispatch helpers into their domain services (#3090)
* refactor(ses): move the tag dispatch helpers into their domain services

* docs(ses): move the stranded tenant-ARN comment onto ResourceRef
2026-09-05 15:41:46 -04:00
Mario Toffia 3c6c005ff1 feat(tls): a local root CA that signs Floci's server certificate (#3078)
* refactor(acm): one issuer-signing primitive in CertificateGenerator

buildCertificate always signed with the subject's own key. signCertificate now
takes the issuer DN and key explicitly; generateCaCertificate and
generateIssuedCertificate sit on top of it, with serverAuth or clientAuth EKU on
leaves. Existing public methods keep their signatures and output; metadata now
follows ACM: colon-separated hex serial and the certificate's real signature
algorithm in upper case.

* refactor(cloudhsmv2): sign emulated hardware certificates through CertificateGenerator

Deletes the private generateCert copy; the shared primitive also marks the two
CA levels of the chain as CAs, which the old code did not.

* refactor(acm): normalize imported certificate metadata and check issued key relationships

ImportCertificate now stores the serial as colon-separated hex and the
signature algorithm in upper case, the same shape generated certificates
report. generateIssuedCertificate verifies the leaf against the issuer's
certificate and refuses a supplied key pair whose halves do not match.

* refactor(acm): refuse a supplied key pair that is not of the requested algorithm

* refactor(acm): match a supplied EC key pair by named curve, not field size

* feat(tls): FlociCertificateAuthority, a persistent local root CA

Loads or creates {persistent-path}/tls/floci-root-ca.{crt,key} with an
owner-only key, signs serverAuth and clientAuth leaves through
CertificateGenerator, and regenerates with a WARN when the pair is corrupt,
expired, not a CA, or the key does not match the certificate. A CDI producer
exposes the same pair to beans, using the directory the config bootstrap used.

* feat(tls): issue the HTTPS server certificate from the local CA

The leaf is floci-server.{crt,key}, signed by floci-root-ca; a pre-CA
self-signed leaf, a leaf from a regenerated CA and an expired leaf are replaced
on boot. Published through quarkus.tls.key-store.pem.0.* so the TLS registry
owns it and can reload it. The server key is written owner-only.

* feat: serve the local CA at GET /_floci/ca.pem

TlsLocalCaIntegrationTest boots the HTTP server on the TLS registry keys and
completes a handshake trusting only the PEM this endpoint serves.

* fix(lambda): inject the local root CA into containers instead of the server leaf

The leaf will be reissued as SANs grow; pinning it would break after the first
reissue. The CA is stable.

* docs(tls): trust the local CA once instead of disabling verification

* feat(tls): create private key files owner-only and log why a CA was regenerated

* feat(tls): serve the user certificate from ca.pem in custom-cert mode, log the CA fingerprint

With floci.tls.cert-path set, GET /_floci/ca.pem returns that file, the same
file the Lambda launcher mounts, and creates no local CA. The CA's SHA-256
fingerprint is logged at startup so an out-of-band copy can be checked, and a
file system without POSIX permissions gets a WARN instead of a silent default.

* feat(tls): ca.pem is a bundle in custom-cert mode; clear the bootstrap directory on every boot

With a user-provided certificate the endpoint returns that file followed by
the local CA, so both the HTTPS endpoint and anything Floci issues validate
from one file. TlsConfigSource resets its resolved directory on construction
so a later boot in the same JVM with TLS off or a user certificate never
reuses a stale value.

* docs(lambda): drop two em-dashes from the CA trust javadoc

* test(tls): cover an expired leaf, an expired CA, a missing CA key and the producer's directory choice

* docs(tls): describe IoT device certificates as a follow-up of the local CA
2026-09-05 15:35:30 -04:00
Mario Toffia 4e05fdf582 refactor(acm): one issuer-signing primitive in CertificateGenerator (#3077)
* refactor(acm): one issuer-signing primitive in CertificateGenerator

buildCertificate always signed with the subject's own key. signCertificate now
takes the issuer DN and key explicitly; generateCaCertificate and
generateIssuedCertificate sit on top of it, with serverAuth or clientAuth EKU on
leaves. Existing public methods keep their signatures and output; metadata now
follows ACM: colon-separated hex serial and the certificate's real signature
algorithm in upper case.

* refactor(cloudhsmv2): sign emulated hardware certificates through CertificateGenerator

Deletes the private generateCert copy; the shared primitive also marks the two
CA levels of the chain as CAs, which the old code did not.

* refactor(acm): normalize imported certificate metadata and check issued key relationships

ImportCertificate now stores the serial as colon-separated hex and the
signature algorithm in upper case, the same shape generated certificates
report. generateIssuedCertificate verifies the leaf against the issuer's
certificate and refuses a supplied key pair whose halves do not match.

* refactor(acm): refuse a supplied key pair that is not of the requested algorithm

* refactor(acm): match a supplied EC key pair by named curve, not field size
2026-09-05 15:27:17 -04:00
Scott Steen 0471d6f488 feat(bedrock-runtime): stream ConverseStream incrementally (#3043)
ConverseStream previously buffered the whole proxied response, translated it in
one shot, and returned it as a single byte[]. Both backends now write frames
through a JAX-RS StreamingOutput as they're known, and the proxy backend reads
the upstream SSE response via HttpResponse.BodyHandlers.ofLines() instead of
ofString() - text deltas reach SDK clients as the model generates them instead
of landing all at once when the response finishes.

Once the StreamingOutput starts writing, JAX-RS has already committed the 200
response, so a failure discovered only after streaming begins - a stream that
never reaches a finish_reason or "[DONE]" (upstream connection dropped
mid-generation) - can no longer become an HTTP error status. It's now reported
as a modelStreamErrorException event, the same wire shape (:message-type:
exception, :exception-type: <name>) and modeled exception real Bedrock uses
for a mid-stream failure, verified to decode correctly through
BedrockRuntimeAsyncClient's generated ConverseStreamResponseHandler. A stream
that completes normally (finish_reason or "[DONE]" seen) with no content is
now treated as a legitimate empty completion rather than an error, matching
real Bedrock.

Added a compatibility-tests/sdk-test-java case exercising
BedrockRuntimeAsyncClient.converseStream end to end, proving the emitted
event-stream frames decode correctly through the real AWS SDK rather than
only Floci's own byte-level assertions.
2026-09-05 15:17:39 -04:00
Mihai BlidaruandMihai Blidaru 724be0a6a7 fix(s3): return composite multipart checksums and match S3 on UploadPart, GetObjectAttributes and CopyObject responses (#3093)
* fix(s3): return composite checksums for multipart uploads

CompleteMultipartUpload stored the checksum of the whole object but labelled
it COMPOSITE, so clients that recompute the composite value from the part
checksums, as the AWS documentation describes, never matched it.

Follow the AWS checksum type rules, verified against real S3:

- SHA1/SHA256 are always COMPOSITE, CRC32/CRC32C default to COMPOSITE and
  CRC64NVME is always FULL_OBJECT. x-amz-checksum-type on CreateMultipartUpload
  selects FULL_OBJECT for CRC32/CRC32C; incompatible combinations fail with
  InvalidRequest, and the response echoes x-amz-checksum-algorithm/-type.
- The composite value is the algorithm applied to the concatenated binary part
  checksums, Base64 encoded, with a "-<part count>" suffix. It is returned by
  CompleteMultipartUpload, HeadObject and GetObject (with x-amz-checksum-type),
  while GetObjectAttributes omits the suffix, as AWS does.
- A checksum sent on CompleteMultipartUpload is validated against the stored
  type: a mismatching value is a BadDigest (the composite is accepted with or
  without its suffix), a checksum type different from the one the upload was
  created with is an InvalidRequest, per-part checksums in the request body
  that do not match the uploaded parts are an InvalidPart, and a COMPOSITE
  upload completed without the checksum of every part is an InvalidRequest
  (FULL_OBJECT uploads need none, as on S3). A non-numeric
  PartNumber is a MalformedXML instead of a 500.
- UploadPart echoes the part checksum (x-amz-checksum-<algorithm>) when the
  upload declared an algorithm, as S3 does; without one no header is returned.
- CopyObject writes a single object without a part manifest; a composite source
  gets a full-object checksum recomputed with its algorithm, and CopyObjectResult
  carries the checksum elements, matching AWS.
- GetObjectAttributes lists part-level checksums only for COMPOSITE objects: a
  FULL_OBJECT multipart object reports its PartsCount alone and a single-part
  object has no ObjectParts element.

The algorithm and type rules live in two new enums, ChecksumAlgorithm and
ChecksumType, parsed once from the request headers; S3Checksum builds the
full-object, composite and GetObjectAttributes views of a checksum.

The boto3 compatibility suite gains multipart upload_file cases for SHA256 and
for the SDK's default CRC32, asserting the composite value and the part list.

The S3 docs drop the stale note that checksum responses focus on SHA-1 and
SHA-256 (CRC32, CRC32C and CRC64NVME have been supported since #877) and list
the AWS algorithms Floci rejects.

* fix(s3): return the GetObjectAttributes ETag without quotes

S3 returns the ETag element of GetObjectAttributes without the surrounding
quotes that HeadObject, ListParts and CompleteMultipartUpload keep. Verified
against real S3 with the same object: head_object gives "af3c...-3" while
get_object_attributes gives af3c...-3, and the AWS CLI reference shows the same
in its get-object-attributes example. Floci echoed the quoted value, so a client
comparing both saw different strings on Floci and equal ones nowhere.

* fix(s3): give a copied object its own ETag

CopyObject kept the ETag of the source, so the copy of a multipart object
carried the "<md5-of-md5s>-N" value of its parts. S3 writes a copy as a single
object and returns the MD5 of the whole content as its ETag, in CopyObjectResult
and HeadObject alike (verified against real S3: source "af3c...-3", copy
"a5f04f..."). The copy now keeps the ETag storeObject computes.

* fix(s3): send CopyObjectResult as application/xml

The CopyObject response carried Content-Type: text/plain;charset=UTF-8 for an
XML body. S3 labels it application/xml like every other XML response.

* test(s3): cover multipart checksums in every SDK compatibility suite

Each SDK implements flexible checksums differently, so the multipart flows are
exercised per client rather than once: the Go transfer manager (what
terraform-provider-aws uses), @aws-sdk/lib-storage for Node, the Java SDK v2 both
low-level and through S3TransferManager on the multipart-enabled async client, the
AWS CLI (s3api, aws s3 cp --checksum-algorithm and a plain aws s3 cp that goes
multipart on its own) and boto3. Every case asserts the composite or full-object value computed in the
test itself, the UploadPart echo, the suffix-less GetObjectAttributes checksum
and unquoted ETag, the rejected Complete without part checksums, and the copy
of a multipart object as a single full object with its own ETag. The default
algorithm cases accept whatever the SDK version declares (CRC32 composite or
full object, or none) and check the stored value against it.

* test(terraform): upload a large aws_s3_object with Terraform and OpenTofu

The IaC suites created buckets but never an object, so the code path that
surfaced the composite checksum bug, an aws_s3_object above the provider's part
size uploaded through the SDK transfer manager, was not covered. Both suites now
upload a 12 MiB file generated by the test setup with checksum_algorithm SHA256
and check that HeadObject reports a COMPOSITE checksum equal to the composite
computed locally over the part sizes GetObjectAttributes lists, that the state
attribute holds the same value, and that re-planning the object shows no drift.

compat-opentofu moves to the same aws-cli image as compat-terraform (2.34.32):
2.15 predates the S3 checksum type and cannot show ChecksumType in its output.

* fix(s3): reject x-amz-checksum-type without a checksum algorithm

CreateMultipartUpload only parsed x-amz-checksum-type when an algorithm was
declared, so a type sent on its own, valid or not, was silently ignored. S3
validates the header regardless: an unknown value is InvalidRequest "Value for
x-amz-checksum-type header is invalid." and a valid one without an algorithm is
InvalidRequest "The x-amz-checksum-type header can only be used with the
x-amz-checksum-algorithm header." (both verified against real S3).

* test(s3): log cleanup failures in the multipart checksum compat tests

The Java, Node and Go cases swallowed errors while deleting their objects and
bucket. They now report what could not be deleted and why, so a leftover is
diagnosable instead of silent.

---------

Co-authored-by: Mihai Blidaru <mihai.blidaru@lynxfctech.com>
2026-09-05 15:12:13 -04:00
Mario Toffia ebdf092cce feat(iot): firehose and cloudwatchLogs rule actions (#3013)
* feat(iot): firehose and cloudwatchLogs rule actions

A topic rule can now deliver to a Kinesis Data Firehose delivery stream
(separator appended to each record, batchMode splitting a JSON array
into one record per element) and to CloudWatch Logs (one log event per
publish, or per array element with batchMode, in a stream named after
the rule that is created in the log group on first use).

* fix(iot): take timestamp and message from each batched cloudwatchLogs element and check the firehose separator

With batchMode the cloudwatchLogs action wrote every array element as one
log event whose message was the element's JSON text and whose timestamp was
the publish time. AWS requires a batched payload to be an array of
{"timestamp": <epoch ms>, "message": "<text>"} objects and takes both from
each element. The action now does the same; an element without a numeric
timestamp is stamped with the publish time and one without a message is
logged as its JSON text, so a batch that ignores the format still lands.

CreateTopicRule and ReplaceTopicRule reject a firehose separator that is
not a newline, tab, Windows newline or comma, the FirehoseSeparator pattern
of the IoT API model, with InvalidRequestException.
2026-09-05 14:02:24 -05:00
Vũ Thế Huy 173ff45b12 fix(elasticache): resolve order-dependent crossGroupAuthIsRejected test failure (#1991) (#3074)
* fix(elasticache): fix order-dependent crossGroupAuthIsRejected failure and handle proxy socket closing cleanly

* fix(elasticache): address review feedback on socket cleanup logging and test isolation

* fix(elasticache): use JBoss Logger and verify cleanup status in integration test
2026-09-05 14:04:43 -04:00
Matheus Oliveira 37faaa8abe feat(kms): support ImportKeyMaterial for Origin=EXTERNAL keys (#3068)
CreateKey accepts Origin=EXTERNAL, GetParametersForImport issues a real RSA
wrapping key, and ImportKeyMaterial unwraps and installs the material.
Expiry and DeleteImportedKeyMaterial return the key to PendingImport.

Fixes #1916

Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>
2026-09-05 14:00:44 -04:00
Franklin G. Mendoza 532e27986e feat(servicequotas): add quota request history lookup (#3054)
* feat(servicequotas): add quota request history lookup

* fix(servicequotas): validate history tokens and quota scope
2026-09-05 13:52:22 -04:00
Facundo ParedesandFacundo Paredes a31a9599fd fix(cloudformation): reconcile AWS::Pipes::Pipe on UpdateStack (#2970)
* test(cloudformation): pin UpdateStack over AWS::Pipes::Pipe

An unchanged pipe name must update the pipe instead of calling createPipe
again, a changed Source is refused as replacement worthy, and a rename
creates the replacement before deleting the original. The three existing
PipesCfnProvisioner cases move out of LeafCfnProvisionerTest so the class
has one test file.

* fix(cloudformation): reconcile AWS::Pipes::Pipe on UpdateStack

provision() re-runs for every resource on every UpdateStack, so a pipe
already on file under the same name went back through createPipe and the
stack rolled back with ConflictException. It is now updated in place from
the prior physical id. A changed Source is create-only on the resource and
is refused with a ValidationError instead of replacing the pipe, and a
rename creates the replacement before deleting the original.

* test(cloudformation): delete the pipe update stack at the end of its case

The pipe survived the case in the shared emulator, and PipesIntegrationTest
listPipes counts pipes globally, so it saw three where it expects two. The
case now deletes its stack and asserts the pipe is gone.

* test(cloudformation): pin the pipe update path on tags, Source and failed lookups

A rename whose deletePipe throws still completes, a describePipe error that
is not the not-found one propagates unchanged, an absent or blank Source
reports the required property fault the create path reports, and the tags
the template declares reach the pipe on a same name update.

* fix(cloudformation): reconcile pipe tags and report the real fault on update

Four defects on the pipe update path. A rename whose deletePipe failed
propagated after the replacement was already created, orphaning it with no
stack resource pointing at it; that cleanup is now best effort and logged,
as it is for AWS::Kinesis::Stream. A describePipe failure that was not the
not-found one fell into the create arm and surfaced as ConflictException,
hiding the real error. A template with no Source was diagnosed as a
replacement worthy Source change instead of the missing required property
the create path reports. Tags declared in the template went stale, since
nothing reconciled them; they now travel through the TagHandler calls
PipesService already exposes.

* fix(cloudformation): restore the pipe when a failed update rolls back

updatePipe lands before the tag calls it cannot carry, so a listTags,
untagResource or tagResource that failed left the pipe holding the new
configuration under tags that were neither the old nor the new set, and the
stack rolled back without putting it back. CloudFormation restores every
resource an update touched, so the pipe now snapshots what it carries before
its first mutating call and restores from that snapshot.

The snapshot holds the properties updatePipe accepts plus the tags and the
region; Name, Source and Arn are create-only or derived. It describes the
update in flight: provision drops the one an earlier update left behind
before it decides whether it mutates the pipe at all.

CfnResourceProvisioner gains a rollbackUpdate hook that answers false by
default, and CloudFormationResourceProvisioner delegates to the provisioner
registered for the resource type before its own Step Functions arm, so a pipe
owns its rollback instead of adding a branch to that class.

* test(cloudformation): pin the pipe rollback on the properties the failed update added

* fix(pipes): clear the properties a failed update added when the pipe is restored

The rollback path now writes the snapshotted configuration in full through restorePipe,
while updatePipe keeps the UpdatePipe contract of leaving an unset property alone.

* test(pipes): pin both meanings an unset property carries on the pipe writers

* test(cloudformation): pin the pipe rename cleanup on the committed update cleanup path

* fix(cloudformation): delete the pipe a rename displaces on the committed update cleanup

The pipe left under the prior name was deleted inside provision, with any failure
swallowed at warn. It now travels the same update cleanup path every replaced
resource takes: three attempts after the stack update commits, DELETE_IN_PROGRESS
then DELETE_COMPLETE or DELETE_FAILED, and an orphan named in the stack's
UPDATE_COMPLETE status reason.

CfnResourceProvisioner gains the updateCleanupPhysicalId, completeUpdate,
hasReplacementUpdate and clearUpdate hooks beside rollbackUpdate, and the four
methods on CloudFormationResourceProvisioner ask the registry before falling
through to the Step Functions arm. UpdateCleanupResult moves to the provisioners
package so an extracted provisioner can return one.

* test(cloudformation): pin the cleanup-in-progress status a pipe rename puts the stack in

* test(cloudformation): pin the pipe rename rollback of a failed stack update

An update that renames a pipe and fails at a later resource must end with the
stack resource pointing at the prior pipe, the replacement gone and no resource
reported as UPDATE_FAILED. The guard case pins the refusal: a pipe standing under
the replacement's name that this update did not create is not deleted.

* fix(cloudformation): roll back a pipe rename to the pipe it displaced

A rename replaces the pipe, and an update that fails at a later resource never
commits that replacement. The prior pipe is still on file, since the rename only
records it for the committed cleanup, so rollbackUpdate points the stack resource
and its Arn attribute back at it, deletes the replacement, and spends the rename
record: a rollback owes no committed cleanup, and a stale record would delete the
pipe the rollback just restored.

The pipe about to be deleted is identified by the creation time recorded when this
update created it, which the rename record now carries beside the displaced name.
Any other pipe standing under that name belongs to somebody else, so the rollback
refuses and leaves both pipes in place rather than guess.

UpdateReplacePolicy Retain does not reach that delete: it governs the pipe a
committed replacement displaces, which this path keeps by making it the resource's
physical id again, while the replacement is a resource this update created.

* test(cloudformation): pin the pipe restore a failed tag reconciliation owes

A tag call that fails after updatePipe has written the pipe leaves it carrying
the update the stack disowns. One test pins the pipe coming back to its prior
description and tags with the stack reporting UPDATE_ROLLBACK_COMPLETE, the
other pins UPDATE_ROLLBACK_FAILED naming the pipe when the restore fails too.

* fix(cloudformation): restore a pipe eagerly when its own update fails

updateExistingPipe writes the pipe through updatePipe and then through the tag
calls, so a failure among them left the pipe carrying the update the stack was
about to disown: the snapshot that would undo it rides on the provisioner's own
copy of the resource, which the service discards when it puts the previous
resource back, and the restored marker it then sets short-circuits the rollback
hook. The reconcile-in-place path now honours the contract the rename path
already did and restores from that snapshot inside provision, spending it there,
while the failure that interrupted the update is what reaches the caller.

A restore that fails leaves the pipe in a configuration nobody recorded, so its
reason goes on the resource under the rollback-failure marker and the stack
lands on UPDATE_ROLLBACK_FAILED naming the pipe instead of reporting a clean
rollback; the restore failure travels with the original as suppressed.

The rollback hook keeps the case it was written for, a failure at a later
resource, where this pipe's update committed and its snapshot is still unspent.

* test(cloudformation): pin the displaced pipe an interrupted rename cleanup leaves behind

A cleanup phase that stops before it deletes the pipe a rename displaced leaves
the stack in UPDATE_COMPLETE_CLEANUP_IN_PROGRESS with the pipe alive. The next
update owes that deletion, and the pipe is gone by the time the stack reports
UPDATE_COMPLETE.

* fix(cloudformation): finish an interrupted cleanup before the next update runs

The cleanup phase of a committed update marks the stack
UPDATE_COMPLETE_CLEANUP_IN_PROGRESS and persists it before any delete runs, so a
phase that stops halfway leaves the marker on the resource with the displaced
entity still alive. Provisioning drops that marker as its first act, and neither
the update nor a later DeleteStack names the displaced entity again, so it
leaks.

An update now finishes that pending cleanup before it parses the template: a
marker present at entry belongs to a phase that never ended, since a phase that
finishes clears it and so does a rollback. Whatever the resumed cleanup cannot
delete joins this update's own cleanup failures in the UPDATE_COMPLETE status
reason.

* test(cloudformation): pin the orphan a resumed cleanup gives up on

The update that resumes an interrupted cleanup reports what that cleanup could
not delete. A resumed deletion that fails all three attempts leaves the stack
UPDATE_COMPLETE naming the pipe in the status reason, with a DELETE_FAILED event
carrying the failure.

* test(cloudformation): pin the prior pipe a rollback keeps when the replacement delete fails

* fix(cloudformation): keep the prior pipe when a rename rollback cannot delete the replacement

The rollback pointed the resource at the prior pipe only after deleting the
replacement, so a delete that failed left the resource naming the replacement
with the rename cleanup still recorded. The next update read that cleanup and
deleted the prior pipe, which is the pipe the rollback existed to preserve, and
reported UPDATE_COMPLETE with no status reason.

The resource now names the prior pipe and spends the cleanup before the delete
is attempted, and the replacement name travels into the delete as a parameter
rather than being read off the resource. The failure still propagates and the
stack still lands UPDATE_ROLLBACK_FAILED naming the resource; what is left
orphaned is the replacement the failed update created.

* test(cloudformation): pin the refusal of an update while an interrupted cleanup owns the stack

A status ending in _IN_PROGRESS says an operation owns the stack, so UpdateStack and
CreateChangeSet are refused with a ValidationError naming the stack and that status,
and DeleteStack is the escape that removes the displaced pipe as well as the current
one.

* fix(cloudformation): refuse an update while an operation owns the stack

An update no longer picks up the cleanup phase an earlier update abandoned. That phase
ran inside the new update's transaction, so every non-happy exit of the new update had to
account for a failure it did not cause.

A status ending in _IN_PROGRESS is a precondition instead: it says an operation owns the
stack, and UpdateStack and CreateChangeSet are refused with a ValidationError naming the
stack and that status. Nothing finishes an abandoned phase.

DeleteStack stays allowed in every status, since it is now the only way out of one, and it
deletes whatever the resource's pending cleanup names as well as the physical id the
resource carries. That reaches every resource type, not just the one that surfaced it.

* test(cloudformation): pin the refusal message CloudFormation itself emits

The refusal was asserted in this project's own bracket wording, which no real client ever
receives. An emulator is matched against by tooling that reads the message, so the
assertion now carries the string CloudFormation emits verbatim: the stack id in
Stack:<arn> form, the status, and 'state and can not be updated.' with its own spelling
and trailing period.

* fix(cloudformation): emit the refusal in CloudFormation's own wording

The refusal named the stack in this project's bracket idiom. Real CloudFormation names it
as Stack:<stack id arn> and ends the sentence with 'state and can not be updated.', which
is what a client matching on the message expects to read, so the emulator emits that.

---------

Co-authored-by: Facundo Paredes <25681464+facuparedes@users.noreply.github.com>
2026-09-05 12:41:58 -05:00
Vũ Thế Huy f214050867 fix(cloudformation): resolve list-valued intrinsics for DBSubnetGroup SubnetIds (#2946)
* feat(cloudformation): add list-aware resolveStringList to template engine (#2937)

* fix(cloudformation): resolve cross-stack SubnetIds for DBSubnetGroup (#2937)

* fix(cloudformation): resolve list-valued intrinsics for every list property (#2937)

* fix(rds): name the missing subnet ids in DBSubnetGroup error (#2937)

* fix(cloudformation): evaluate Fn::If list-valued branches in resolveStringList (#2937)

* fix(cloudformation): route ProvisionContext.resolveStringList through the list-aware engine (#2937)

ProvisionContext.resolveStringList was a scalar-only copy of the monolith
helper that CloudFormationResourceProvisioner already reroutes, and it is
the one the extracted per-service provisioners call (IamRoleCfnProvisioner
ManagedPolicyArns, OrganizationsCfnProvisioner ParentIds and TargetIds).
Delegate to engine.resolveStringList so a list-valued intrinsic
(Fn::Split / Fn::GetAZs / Fn::Cidr, including one selected by Fn::If)
expands to its real values instead of collapsing to one comma-joined
string, keeping "every list property" true and stopping the two helpers
from drifting.

The mock engines in IamRoleCfnProvisionerTest and OrganizationsCfnProvisionerTest
now delegate resolveStringList to the real method (literal arrays still
resolve each element through the existing resolve(...) stub).

* fix(cloudformation): expand nested list-valued intrinsics in array branches selected by Fn::If (#2937)

* chore: remove accidentally committed docs/superpowers/ from the merge

These are local planning notes from an unrelated task, never meant to
be tracked; git add -A during the second/main merge conflict
resolution swept them in along with it, and their em-dashes tripped
the Documentation Style CI check.

* fix(cloudformation): stop Fn::Select from dropping blank list entries

resolveList's array branch delegated to resolveStringList, which
drops blank entries for its provisioner-facing contract (SubnetIds,
VPCZoneIdentifier, ...). Fn::Select is positional, so a blank entry
ahead of the selected index shifted every later index instead of
being treated as a real element.

Extracted the shared array-expansion logic (recursing into nested
list-valued intrinsics like Fn::Split) into resolveListElements,
used by resolveList without the blank-drop and by resolveStringList
with it.

* test(cloudformation): stub engine.resolveStringList in AcmCfnProvisionerTest

ProvisionContext.resolveStringList now routes through
engine.resolveStringList (2cea55bd), but AcmCfnProvisionerTest's mock
engine never stubbed it, so Mockito's default answer (an empty list)
made every SubjectAlternativeNames resolve to []. Same fix already
applied to IamRoleCfnProvisionerTest and OrganizationsCfnProvisionerTest.
2026-09-05 12:40:23 -05:00
TATSUNO “Taz” Yasuhiro 97915d3668 fix(dynamodb): calculate consumed capacity correctly (#3071)
* fix(dynamodb): bill reads on pre-filter size and honor ConsistentRead

ConsumedCapacity for GetItem, Query and Scan now follows the DynamoDB
read billing model. Units are half a unit per 4KB read, doubled for a
strongly consistent read, with the half unit minimum. Query and Scan
carry the pre-filter byte size of the read items out of the service, so
a FilterExpression or a narrow projection no longer makes the read look
cheaper than it is.

Verified with the paritysuite dynamodb-conformance tier1 suite.

* fix(dynamodb): charge secondary index writes in ConsumedCapacity

PutItem, UpdateItem, DeleteItem and BatchWriteItem now report the
index side of a write. Each GSI and LSI is charged by how the write
changes what the index stores. One unit for an insert, an in place
update or a delete, two units when an index key changes, and nothing
when the stored view is unchanged or the item never touches the index.
Under INDEXES the response carries the Table arm plus a per index map
only for the indexes that were charged, and the top level total folds
them in. BatchWriteItem reports one entry per table with summed arms.

Verified with the paritysuite dynamodb-conformance tier1 suite.

* test(dynamodb): pin the ConsumedCapacity billing model

Mirror paritysuite dynamodb-conformance tier1 cases.

* fix(dynamodb): size index reads on the projected view the index stores

* test(dynamodb): pin BatchWriteItem ConsumedCapacity shape and per-table arms

* fix(dynamodb): validate BatchWriteItem ReturnConsumedCapacity and report LSI reads under LocalSecondaryIndexes
2026-09-05 13:31:54 -04:00
TATSUNO “Taz” Yasuhiro 5c8cff61b8 fix(dynamodb): merge shared-prefix projection paths and compact list indices (#3072)
* fix(dynamodb): merge shared-prefix projection paths and compact list indices

ProjectionExpression paths that share a prefix now merge into one
reconstructed structure instead of the first or last path winning.
Projected list indices compact to ascending source order, so l[2], l[0]
returns both elements as a two element list.

Matches DynamoDB behavior verified by the paritysuite dynamodb-conformance
tier1 suite (8 tests).

* fix(dynamodb): reject malformed and out-of-range projection list indices as ValidationException

* refactor(dynamodb): simplify projection evaluator internals and tests

* chore(dynamodb): brace single-line conditionals in ProjectionEvaluator

* fix(dynamodb): reject leading-zero projection list indices like real DynamoDB

* fix(dynamodb): accept only ascii digits in projection list indices
2026-09-05 12:52:49 -04:00
Niels Kootstra 0a57f0ac08 fix(wafv2): validate resource names on operations (#3066) 2026-09-05 12:49:13 -04:00
Kenshin Okinaka f677edad43 fix(ses): align v1 Query boolean parsing with probed xsd 1.1 behavior (#3075)
* fix(ses): align v1 Query boolean parsing with probed xsd 1.1 behavior

Probed against real AWS SES: an absent Query-protocol boolean member is
not an error, it deserializes to false and the request proceeds to
semantic validation; a present-but-empty value is MalformedInput
"missing value for boolean type"; any value other than case-sensitive
true/false/1/0 is MalformedInput "boolean must follow xsd1.1
definition".

Replace parseRequiredBoolean and parseOptionalBoolean with a single
parseXsdBoolean implementing that contract, and update the affected
integration tests.

* test(ses): cover EventDestination.Enabled xsd boolean semantics

Probed against real AWS SES: the nested EventDestination.Enabled member
follows the same Query-protocol boolean contract as top-level members
(absent deserializes to false, empty value and non-xsd values are the
respective MalformedInput errors, and 1/0 are accepted).
2026-09-05 12:40:04 -04:00
Ben YounesandBen Younes a006b27694 fix: honor Kinesis ExplicitHashKey routing (#3069)
* fix: honor kinesis explicit hash keys

* fix(kinesis): reject numeric ExplicitHashKey and migrate legacy shard ranges (#3069)

Address the two review findings on explicit-hash-key routing:

- Reject a non-string ExplicitHashKey JSON node with SerializationException
  in PutRecord and PutRecords, instead of letting asText coerce a JSON number
  into an accepted decimal string, preserving AWS wire-protocol fidelity.
- Repartition legacy multi-shard streams whose open shards still carry the old
  full-span hash range into disjoint contiguous ranges before explicit-hash
  routing, so an explicit key no longer collapses onto the first shard after an
  upgrade. Already-disjoint (new/split/merged) streams are left untouched.

RED -> GREEN: 3 new tests failed on the prior HEAD
(putRecordRejectsNumericExplicitHashKey, putRecordsRejectNumericExplicitHashKey,
putRecordMigratesLegacyOverlappingShardRangesForExplicitHashKey), all green
after the fix. Kinesis suite: 118 run, 0 failures.

---------

Co-authored-by: Ben Younes <2910651+ousamabenyounes@users.noreply.github.com>
2026-09-05 12:35:06 -04:00
Franklin G. Mendoza b6489ac933 feat(guardduty): add member account operations (#3052)
* feat(guardduty): add member account operations

* fix(guardduty): align member creation semantics
2026-09-05 12:29:30 -04:00
Vũ Thế Huy 0ab9979edf fix(athena): register every Glue database as a DuckDB schema so <db>.<table> resolves (#2993)
* feat(athena): extract GlueViewDdlBuilder with schema qualification and aliases

* feat(athena): wire GlueViewDdlBuilder into AthenaService

* docs(athena): document Glue database schema registration and aliases

* fix(athena): propagate getDatabases failure and harden DDL table quoting

* fix(athena): skip Glue tables with nonexistent S3 bucket and cleanup AthenaTest

* fix(athena): avoid redundant table fetch and add qualified query compatibility test

* fix(athena): do not skip views for tables with nonexistent S3 bucket
2026-09-05 11:19:46 -04:00
Niels Kootstra 2e303e2a0b fix(eventbridge): scope replay cancellation by ARN (#3058)
* fix(eventbridge): scope replay cancellation by ARN

* test(eventbridge): avoid ordered replay latch race
2026-09-05 10:39:07 -04:00
Vũ Thế Huy 4daba7ed6a feat(redshift): wire the Simple Query DDL interceptor into the proxy (#3029)
* feat(redshift): add PostgresWireDecoder for frontend wire-message framing

* feat(redshift): intercept Simple Query DDL through RedshiftInterceptingBridge

* test(redshift): end-to-end DDL rewrite over the Simple Query protocol

* docs(redshift): document the Simple Query DDL interceptor

* fix(redshift): remove em-dashes and address review feedback on bridge

* fix(redshift): stream opaque non-query frames without size limit

* fix(redshift): stream oversized simple query frames to passthrough

* test(redshift): import stream types in RedshiftInterceptingBridgeTest

* test(rdsdata): fallback to direct H2 driver on classloader mismatch

* test(redshift): remove oversized socket test from RedshiftInterceptingBridgeTest
2026-09-05 10:36:34 -04:00
Guilherme Scaranse 5512db0e05 fix(lambda): persist, validate and enforce event source mapping FilterCriteria (#3060)
* fix(lambda): persist and validate event source mapping FilterCriteria

CreateEventSourceMapping/UpdateEventSourceMapping accepted FilterCriteria,
returned 200, then silently dropped it (get-event-source-mapping reported
null): EventSourceMapping had no such field and the hand-maintained
parse/response allowlists never mentioned it.

Persist it as a typed nested FilterCriteria/Filter on EventSourceMapping
(Jackson round-trips it via EsmStore); parse and validate it at create and
update (well-formed JSON object patterns whose values are non-empty match
arrays or nested objects; max 5 filters; max 4096-char pattern; empty
object / empty Filters / null clear); echo it back omit-when-unset. Add
EsmFilterCriteriaUtils to wrap a stored FilterCriteria as the
{"FilterCriteria":{"Filters":[...]}} node PipesFilterMatcher consumes and
to correlate matched records to their sources by identity.

Poller enforcement (Kinesis/DynamoDB/SQS) follows in a separate change.

* fix(lambda): enforce event source mapping FilterCriteria in the pollers

Round 1 persisted and validated FilterCriteria; this wires it into the three
Lambda event-source pollers so filters actually take effect, reusing the
existing PipesFilterMatcher (unchanged) via EsmFilterCriteriaUtils.

- Kinesis: filter against the AWS dialect, top-level base64-DECODED `data`
  (plus `partitionKey`), while the delivered event keeps `kinesis.data`
  base64. The shard checkpoint now advances to the newest FETCHED sequence
  whenever a batch is disposed of (successful invoke OR fully filtered out),
  so filtered-out records are consumed rather than re-read forever; an invoke
  that errors or is throttled still leaves the checkpoint unmoved.
- DynamoDB Streams: same checkpoint discipline; the per-record node
  (top-level eventName + dynamodb.*) is both the delivery and filter shape.
- SQS: non-matching messages are deleted immediately (AWS consumes filtered
  SQS messages), a fully-filtered batch returns without invoking, and all
  post-filter delete/return logic operates only on the matched subset.

Unfiltered mappings are unchanged (no filter nodes built, same list reference).
Adds KinesisEventSourcePollerTest and extends the DynamoDB/SQS poller tests
(matching-only delivery, fully-filtered checkpoint-advance/delete, invoke-error
and throttle no-advance with same-window retry, dialect pin, non-JSON drop).

Also documents FilterCriteria in docs/services/lambda.md.

* style(lambda): remove em dashes from lines this branch adds

AGENTS.md requires colons, commas or periods instead of em dashes. Comment,
javadoc and docs prose only; no code or string literals change.

* fix(lambda): validate filter-pattern operators, arity and operand types

The structural check accepted any non-empty match array, so a malformed operator
reached the matcher and corrupted delivery silently, in whichever direction the
matcher happened to fail. {"numeric":[">","abc"]} coerced its operand to zero and
matched every positive value; {"numeric":[">"]} matched every record because the
comparison loop never ran; an unknown operator matched nothing, so the pollers
checkpointed past or deleted every record. Enforcement makes an unsatisfiable
pattern destructive rather than inert, so it is now rejected at create/update.

Each match element must be a string, number, null, or an object carrying exactly
one operator. Operands are checked per operator, and numeric must be a sequence
of comparison/value pairs. An operator AWS documents but the matcher does not
implement (cidr, wildcard) is rejected with a distinct message rather than
silently dropping records. This couples the validator to PipesFilterMatcher's
operator set, which the previous comment avoided on purpose; that trade no longer
holds now the pollers act on the result.

Stricter than AWS for cidr, wildcard and boolean literals, all of which AWS
accepts. Docs record the deviation and the reason.
2026-09-05 10:32:42 -04:00
Vũ Thế Huy f00fb4c289 feat(ssm): model documents and associations with full lifecycle operations (#3057)
* feat(ssm): model SsmAssociation and extend SsmDocument metadata

* feat(ssm): add listDocuments and association lifecycle methods to SsmService

* feat(ssm): handle ListDocuments and Association actions in SsmJsonHandler

* test(ssm): add integration tests for ListDocuments and Association lifecycle

* test(ssm): update listDocuments_returnsEmptyList in SsmIntegrationTest to use filter

* fix(ssm): AWS fidelity fixes for associations and document listing

- reject duplicate CreateAssociation calls (name+instanceId or
  name+targets) with AssociationAlreadyExists
- implement UpdateAssociation end-to-end with an AssociationVersion
  counter
- read MaxErrors/MaxConcurrency/ComplianceSeverity on create instead
  of silently dropping them
- honor ListAssociations (AssociationFilterList) and ListDocuments
  (Owner) filters instead of ignoring them
- set SsmDocument.owner on create so ListDocuments/Owner filtering
  works
- remove the invented GetAssociation action (real SSM only has
  DescribeAssociation)
- require InstanceId or Targets on CreateAssociation
- fix a startsWith("") bug that let a blank Name filter value match
  every document

Also: extract targetsToArray/parseTargets/parseParameters helpers,
drop dead SsmAssociation.getDate()/setDate(), and de-flake/rename two
ListDocuments/ListAssociations tests that no longer describe
unmodeled resources.

* fix(ssm): address PR #3057 review comments

- honor the ListDocuments PlatformTypes filter instead of ignoring it
- validate DocumentVersion on CreateAssociation/UpdateAssociation so
  associations can't persist a reference to a document version that
  never existed
- treat a legacy null-owner document (persisted before Owner existed)
  as owned by the caller's account when filtering by Owner, since the
  store already guarantees it belongs to that account

* fix(ssm): retain document version history and normalize legacy owners

- retain version history in SsmDocument on updateDocument so associations and getDocument can resolve historical versions
- validate DocumentVersion against document's retained version history
- normalize null legacy document owners to caller account ID so Owner is included in ListDocuments responses

* fix(ssm): resolve legacy document versions that predate retained history

A document persisted before the Versions field was added deserializes
with an empty versions map even when its DocumentVersion is already
past 1, since only the current content was ever retained. Both
validateDocumentVersion and the GetDocument/DescribeDocument version
lookups required exact map membership, so a legitimate historical
version number for such a document was rejected with
InvalidDocumentVersion instead of resolving to a best-effort fallback.

SsmDocument.hasVersion/getContentForVersion now treat any numeric
version in 1..documentVersion as valid, falling back to the current
content when the original was never captured.

* fix(ssm): stop GetDocument/DescribeDocument from mislabeling content

hasVersion's lenient range check (added to stop legitimate legacy
version references being rejected on association create/update) was
also used by GetDocument/DescribeDocument's version lookup, together
with a content fallback to the document's current content. That
meant a request for an old version whose real content was never
retained got back the current content labeled as the requested
version -- a caller had no way to tell it wasn't genuine history.

Split the concern: hasVersion stays lenient for reference checks that
never expose content (association DocumentVersion validation).
GetDocument/DescribeDocument now use the new hasRetainedContent,
which only accepts versions actually present in the retained map, and
getContentForVersion no longer fabricates a fallback.

* docs(ssm): document the hasVersion/hasRetainedContent divergence

A review comment on PR #3057 flagged that an association can
reference a legacy document version successfully (hasVersion) while
GetDocument/DescribeDocument reject the same version
(hasRetainedContent) because its content was never captured.

Not fixing this: the two prior fixes on this thread already ruled out
both alternatives -- rejecting the association reference reintroduces
the original bug (legitimate legacy versions blocked), and returning
fallback content in GetDocument reintroduces the mislabeled-content
bug. The divergence is the least-bad option given the content is
genuinely unrecoverable. Documented the reasoning on both methods and
in the regression test so it isn't "fixed" back into either bug.
2026-09-05 10:28:04 -04:00
Vũ Thế Huy 6653b9a4e4 feat(iam): support DynamoDB fine-grained access control (#2926) (#3011)
* refactor(iam): make the policy condition context multi-valued

Condition keys such as dynamodb:LeadingKeys and dynamodb:Attributes are set-typed by definition, but the evaluator carried the request context as Map<String,String> from the filter all the way into the condition block, so a set could not be represented at all.

Change the type to Map<String,List<String>> across evaluate, simulateCustomPolicy, simulatePrincipalPolicy and the condition helpers, and update the three in-tree call sites. Non-set operators keep today's semantics by comparing only the first value, which is behaviour-preserving for every key that is single-valued today. normalizeConditionContext now preserves an empty list, which the set operators need to distinguish an empty set from an absent key.

* feat(iam): support ForAllValues and ForAnyValue set operators

ForAllValues: and ForAnyValue: appeared nowhere in the IAM package, so
evaluateConditionBlock stripped only an IfExists suffix and the whole
prefixed string reached the operator switch as an unknown operator, which
yields false. Every policy scoping DynamoDB access through
ForAllValues:StringLike therefore denied the requests it was written to allow.

Parse the quantifier prefix ahead of the IfExists strip so
ForAnyValue:StringEqualsIfExists composes, and evaluate the quantifier over
the request's value list, reusing evaluateSingleCondition for each member so
every existing operator works under a quantifier with no new operator code.
Empty-set semantics follow AWS: ForAllValues matches vacuously, ForAnyValue
does not. An absent key still fails closed without IfExists.

* fix(iam): read every SimulatePrincipalPolicy context key value

extractContextEntries read only ContextKeyValues.member.1 and dropped the
rest, which was invisible while the condition context was single-valued but
silently breaks set operators: a ForAnyValue: condition satisfied by the
second supplied value evaluated as implicitDeny. Reuse extractIndexedValues
to collect the whole member list per context entry.

* feat(dynamodb): add a KeyConditionExpression partition-key value reader

IAM condition-key extraction needs the value a Query pins its partition key
to, which today only DynamoDbAccessPathValidator can compute and only as a
side effect of validation. Add a narrow package-internal reader over the
existing ExpressionEvaluator instead of widening the validator's visibility.
Anything it cannot resolve returns null, which the policy layer treats as an
unknown leading key and fails closed on.

* feat(dynamodb): extract LeadingKeys, Attributes and Select from a request

Add a static extractor covering GetItem, PutItem, UpdateItem, DeleteItem,
Query, BatchGetItem and BatchWriteItem. Partition-key values come from Key,
Item, the Query KeyConditionExpression or the per-table RequestItems entries;
attribute names come from Key/Item fields, AttributesToGet,
ProjectionExpression, UpdateExpression targets and ExpressionAttributeNames.

Whatever cannot be determined is absent rather than guessed, so an
unresolvable leading key yields an empty list and the policy layer fails
closed on it.

* feat(iam): populate the DynamoDB condition keys from the request

IamConditionContextResolver supplied s3:* keys only and returned null for every other service, so dynamodb:LeadingKeys, dynamodb:Attributes and dynamodb:Select were never in the request context and no DynamoDB fine-grained policy could match. Add a dynamodb branch that reads the body already buffered by ResourceArnBuilder, resolves the table's key schema through a lazily injected DynamoDbService, and emits the three keys.

A key that cannot be resolved is omitted rather than guessed, so a policy scoping access through it denies the request.

* test(iam): cover the DynamoDB LeadingKeys scenario end to end

Add the issue #2926 acceptance criteria at evaluator level, plus an HTTP test
with enforcement enabled where one scoped session reads USER_alice and is
denied USER_bob against the same table, and a request whose Key omits the
partition attribute is denied because its leading key cannot be proven.

* docs(iam): document the set operators and the DynamoDB condition keys

Record ForAllValues:/ForAnyValue: with their empty-set semantics, the three dynamodb:* condition keys and the actions they cover, and the fail-closed consequence for a request whose leading key cannot be determined.

* fix(iam): correct negated-operator, empty-set and locale handling in conditions

Three fail-open gaps in the condition evaluator, all more reachable now that the
set operators make multi-valued and negated conditions common:

- A negated operator (StringNotEquals, ArnNotLike, NotIpAddress, ...) against a
  condition that lists several values was ORed across them, so the value matched
  as long as it differed from any one entry. AWS ANDs the negated match across
  the list; a ForAllValues:StringNotEquals deny-list on dynamodb:Attributes now
  actually denies.
- Null treated a present-but-empty set as present, so the Null:{key:"false"}
  guard that policies pair with ForAllValues did not block the vacuous empty-set
  allow. An empty set now counts as absent for Null, matching AWS.
- The per-key lower-casing used the default locale while the context map is
  normalised with Locale.ROOT, so under a Turkish locale a key would never match
  its own Deny statement. Both sides now use Locale.ROOT.

* perf(iam): resolve the table key schema without the item-count scan

IamConditionContextResolver called DynamoDbService.describeTable on every
enforced DynamoDB request, and describeTable refreshes the table's item count
by calling size() on a ConcurrentSkipListMap ??? an O(items) traversal ??? before
the request is even authorized. The resolver only needs the HASH key name.

Add DynamoDbService.findTable, which returns the stored definition without the
count refresh, and switch the resolver to it. findTable returns Optional and
never throws, so the surrounding try/catch, its Logger and the now-unused
injected ObjectMapper go away.

* feat(dynamodb): widen condition attribute extraction and support legacy KeyConditions

dynamodb:Attributes under-reported: it collected item/key fields, AttributesToGet,
the projection and update expressions and ExpressionAttributeNames, but never the
names a FilterExpression, ConditionExpression or KeyConditionExpression references.
A Query projecting only allowed attributes while filtering on a forbidden one would
slip past a ForAllValues:StringEquals on dynamodb:Attributes. Walk the parsed
expression tree so literal names, not only #aliases, are captured.

A Query using the legacy KeyConditions map instead of KeyConditionExpression
produced no dynamodb:LeadingKeys at all. Read the EQ entry for the partition key
from that map as a fallback, and take attribute names from KeyConditions and
QueryFilter.

Also pins DynamoDbKeyConditionParser on begins_with (never an equality) and a
top-level OR (not constrained to one partition), both of which must yield null.

* docs(iam): note negated-operator, empty-set and widened Attributes semantics

Record that a negated condition operator ANDs across multiple policy values
(making ForAllValues:StringNotEquals a usable deny-list), that Null treats a
present-but-empty set as absent, and that dynamodb:Attributes now also reflects
filter / condition / key-condition expression names and the legacy KeyConditions
EQ entry.

* fix(dynamodb): replace em-dash with colon in DynamoDbConditionKeys

* fix(dynamodb): resolve GSI partition keys and capture UpdateExpression read attributes

* docs(dynamodb): clarify fail-closed Javadoc applies to LeadingKeys not Attributes
2026-09-05 10:19:17 -04:00
Mario Toffia d771783afb feat(cognito): check the custom domain certificate in ACM and mark it in use (#3035)
* feat(cognito): require an issued ACM certificate for a custom domain and track it as in use

CreateUserPoolDomain and UpdateUserPoolDomain stored any CertificateArn
as given. The certificate must now exist in ACM, in us-east-1, with
status ISSUED, as AWS requires; anything else is rejected with AWS's
InvalidParameterException message.

While a domain uses a certificate, ACM lists the domain's CloudFront
distribution under InUseBy and DeleteCertificate refuses with
ResourceInUseException. Deleting the domain, or moving it to another
certificate, releases the old one. AcmService gains addInUseBy and
removeInUseBy for this; the refusal on delete already existed.

DeleteStack deleted resources in reverse insertion order, so a
certificate added by a later update was deleted before the domain that
still used it and the stack ended in DELETE_FAILED. Resources are now
deleted in reverse dependency order from the stack's template, as on
AWS, with insertion order as the fallback when the template cannot be
read.

* feat(cognito): register the certificate before storing the domain and require a certificate ARN

Review follow-ups:

- The domain was stored before it was registered on its certificate,
  so a certificate deleted between the check and the registration left
  a stored domain that ACM did not protect. Registration now comes
  first on create, and a changed certificate is checked and registered
  before an update touches the domain; the old certificate is released
  after the store. A certificate that disappears in that window fails
  with the same InvalidParameterException as a missing one.
- The ARN check accepted any ACM resource. It now also requires the
  resource to be certificate/<id>, before ACM is asked.
2026-09-05 10:06:53 -04:00
Franklin G. Mendoza 587d0b5758 fix(organizations): return account state (#3053) 2026-09-05 07:50:02 -04:00
Aniket Shukla ec034a503a fix(lambda): reject scalar structure members (#3051)
* fix(lambda): reject scalar structure members

* fix(lambda): validate environment variables shape
2026-09-05 07:45:56 -04:00
Aniket Shukla 51f5591f85 fix(codebuild): persist build numbers across restarts (#3049)
* fix(codebuild): persist build numbers

* fix(codebuild): isolate counters by account

* fix(codebuild): isolate runtime builds by account
2026-09-05 07:40:45 -04:00
Guilherme Scaranse 8a2161ab5e fix(stepfunctions): let Express executions reuse names and type the nested StartExecution refusal (#3059)
StartExecution enforced execution-name uniqueness on Express state machines, but AWS
does not: an Express name is immediately reusable and every start is its own concurrent
execution. Uniqueness, and the 90-day reuse window, applies to Standard workflows only.

- StepFunctionsService.startExecution now gives an Express execution a per-start ARN
  (express:<stateMachine>:<name>:<uuid>) and skips the execution-store collision check, so
  a reused name starts a new, independent execution instead of failing with
  ExecutionAlreadyExists. This also closes a data-loss hazard: same-name Express starts
  would otherwise share one store key, letting a completing execution overwrite another.
  Standard behavior (idempotent same-input replay while RUNNING, ExecutionAlreadyExists
  otherwise) is unchanged.
- AslExecutor.invokeNestedStateMachine now wraps the child StartExecution call so a refusal
  becomes a typed, catchable error (StepFunctions.ExecutionAlreadyExistsException) instead of
  States.Runtime, which no Catch or Retry can match. This mirrors the aws-sdk:sfn:startExecution
  path, which keeps its Sfn. prefix and is unchanged.

Tests cover Express name reuse and a same-name no-clobber regression at the service level;
nested-refusal typed-error, catch, retry and Sfn-vs-StepFunctions prefix cases for bare,
.sync and .sync:2; a wire-level StartExecution integration test; and a .sync/.sync:2 success
guard. The Express idempotency test that pinned the old divergence is removed.

AWS Compatibility: Express StartExecution is non-idempotent and enforces no name uniqueness,
and the express:<stateMachine>:<name>:<id> ARN shape matches the Step Functions resource-ARN
definition; the optimized states:startExecution integration reports StepFunctions.<Code>Exception
for a Standard-child collision. Left as documented deviations, not changed here: the 90-day
Standard name-reuse window is not modeled, and finished Express executions are retained rather
than evicted.
2026-09-05 07:37:26 -04:00
BingEdward 2d26f93e7d fix(dynamodb): apply GSI throughput updates (#3032)
* fix(dynamodb): apply GSI throughput updates

Fixes #3028

* fix(dynamodb): reject conflicting GSI updates
2026-09-05 07:33:41 -04:00
Mario Toffia 7ec4c89d0f fix(iot): isolate topic rule actions and run the error action (#3012)
* fix(iot): isolate topic rule actions and run the error action

One failing action of a topic rule no longer fails the publish or the
actions after it. The failure is logged, and once every action ran the
rule's errorAction receives the AWS failure document (ruleName, topic,
base64OriginalPayload, failures). CreateTopicRule and ReplaceTopicRule
keep awsIotSqlVersion and errorAction, and GetTopicRule returns them.

* fix(iot): map nested payload values to DynamoDB maps and lists in the dynamoDBv2 action

Objects and arrays in a payload were flattened to empty strings, which
also emptied the failures list of the error action's failure document.
They now become DynamoDB M and L attribute values, as on AWS.

* fix(iot): skip a topic rule action without a type and keep the stack trace of a failed action

An action object without a recognisable member is skipped with a warning
before anything is dispatched, so the failure document can never see a
missing type, and the warnings for a failed action, error action or
unparsable stored rule now carry the exception.
2026-09-05 07:31:01 -04:00
Mario Toffia c3d977a3e3 feat(apigateway): provision AWS::ApiGateway::DomainName and BasePathMapping (#3040)
* feat(apigateway): provision AWS::ApiGateway::DomainName and BasePathMapping

Both types were stubs: the stack turned green while no domain or mapping
existed, Fn::GetAtt on the domain resolved to the literal attribute name, and
a request sent to the custom domain was not routed. The new provisioner calls
the existing CreateDomainName and CreateBasePathMapping. Ref and every
Fn::GetAtt attribute return what GetDomainName reports, a changed DomainName
or BasePath replaces the resource (created before the prior one is deleted),
and everything else is patched in place.

The physical id of a mapping is the compound identifier CloudFormation uses
for the type, <DomainName>|<BasePath>, with (none) for an empty base path.

Service fixes needed so the provisioned values can be read back through the
API: CreateDomainName keeps regionalCertificateArn and regionalCertificateName
(both were dropped), an EDGE domain gets a distributionDomainName and the fixed
CloudFront hosted zone, GetDomainName returns domainNameArn,
endpointConfiguration.types and tags, UpdateDomainName accepts the
/endpointConfiguration/types/EDGE patch path, domain tags are managed through
the tag API on the domain ARN, and CreateDomainName checks the name and stores
the domain under one lock so two concurrent creates cannot both succeed.

* fix(apigateway): keep the distribution in step with a domain's endpoint type

A move to EDGE through UpdateDomainName left the domain without a
distributionDomainName, and a move back to REGIONAL kept the old one, so
GetDomainName and Fn::GetAtt reported CloudFront fields that did not match the
endpoint type. Both create and update now go through one helper that puts a
distribution in front of an EDGE domain and drops it for a REGIONAL one.

* fix(apigateway): serialize domain and mapping changes, refuse a taken base path, validate the endpoint patch path

The stores hand out live objects, so a domain patch, a tag write and a
mapping patch were read-modify-write steps that concurrent calls could lose
or corrupt: eight concurrent tag writes on one domain kept four tags. Every
change to a custom domain or a base path mapping now runs under one lock, and
a tag write replaces the tag map instead of changing the one a reader may be
iterating.

CreateBasePathMapping on a base path that already has a mapping answers
ConflictException as AWS does; before, the new mapping silently replaced the
old one, so eight concurrent creates of one base path all succeeded.

UpdateDomainName accepted any /endpointConfiguration/types/<x> path; the path
must now name the type the domain has, as on AWS.

The provisioner sends the PATCH before it reconciles the tags, so a rejected
update leaves the tags as they were. Tests cover every case above, the
remaining cells of the update matrix (a prior resource gone under a new name),
and the REGIONAL to EDGE move end to end through a stack.

* fix(apigateway): refuse an endpoint type other than REGIONAL or EDGE on CreateDomainName

UpdateDomainName already rejected any other value, but CreateDomainName stored
whatever string the request carried, so a PRIVATE or misspelled type produced a
domain that was neither regional nor edge-optimized and that nothing could
route or describe. Private custom domains are not emulated, so the create now
answers BadRequestException with the same message as the update, and nothing
is stored. Adds the two remaining provisioner matrix cells as tests: a taken
domain name fails the resource without deleting anything, and a resource
without Properties is rejected.
2026-09-04 22:45:24 -04:00
Priamo Germosen 252bfe85a2 feat(lambda): mint EKS bearer tokens natively for the kubernetes executor (#2981)
* docs(lambda): qualify which kubeconfig auth methods the Kubernetes executor supports

#2919 replaced the Fabric8 Kubernetes client with a plain REST client that
only understands static-token and client-certificate kubeconfig auth. The
Kubernetes executor section still said Floci "uses your local kubeconfig"
without qualification, which reads as full kubectl parity. exec and
auth-provider credential plugins (aws eks get-token, gcloud) fail with a
named error instead, so an EKS or GKE user following the doc as-is would
be surprised.

Follow-up noted on hectorvent's approval of #2919.

* feat(lambda): mint EKS bearer tokens natively for the kubernetes executor

#2919 dropped the Fabric8 Kubernetes client, whose kubeconfig handling
covered exec-credential plugins like `aws eks get-token` as a side effect
of shelling out to them via client-go. The replacement REST client
rejected that shape outright, so kubeconfigs generated by
`aws eks update-kubeconfig` (the common case for a real EKS cluster)
stopped working.

Adds EksTokenMinter, which recognizes the `aws eks get-token
--cluster-name <name>` exec shape and mints the bearer token itself:
a presigned sts:GetCallerIdentity URL with x-k8s-aws-id bound into the
signature, base64url-encoded and prefixed with k8s-aws-v1., matching
what aws-iam-authenticator's webhook expects and what the AWS CLI's
own `aws eks get-token` produces. No subprocess is spawned and no SDK
dependency is added, keeping KubernetesApiClient as it was after #2919.

Recognition scans for "eks", "get-token" as a consecutive pair
anywhere in the exec args, rather than requiring them first: confirmed
against the AWS CLI's own update_kubeconfig.py, a generated kubeconfig
always puts the global --region ahead of the subcommand and --output
json after it, so a strictly-positional check would have rejected
every kubeconfig that tool actually produces.

Credentials are resolved from AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY/
AWS_SESSION_TOKEN, falling back to the shared credentials file
(AWS_PROFILE, default ~/.aws/credentials). Both are read from the
kubeconfig exec block's own `env` entries first: `aws eks
update-kubeconfig --profile <p>` threads the profile through exec.env
precisely because the plugin has no other reason to see it. An
AWS_PROFILE the exec block names explicitly is honored ahead of static
keys that merely happen to be ambient in Floci's own process, rather
than falling out of plain env-var-beats-profile precedence: those
ambient keys weren't necessarily meant for this resolution, so letting
them silently outrank a profile the kubeconfig specifically asked for
would authenticate as the wrong principal. A lone access key or secret
key, at either the exec.env or ambient-env tier, is rejected outright
rather than silently falling through to the next source, matching
botocore's own PartialCredentialsError instead of quietly picking a
different identity than whatever was actually intended. A session
token is only ever combined with the access/secret key pair from the
same source (exec.env or ambient) it came from, never mixed across
the two, since a session token is only valid for the specific key
pair STS issued it alongside.

STS is signed against the region's actual partition suffix, sourced
from the AWS SDKs' own public partition metadata (botocore's
partitions.json): amazonaws.com for the commercial aws partition and
aws-us-gov, amazonaws.com.cn for aws-cn, and the classified
ISO/ISOB/ISOE/ISOF partitions each under their own distinct domain.
Previously this always assumed the commercial partition, so a
non-standard-partition cluster would get a token signed for a host
that isn't its real STS endpoint.

Role assumption is rejected explicitly, in every form get-token's own
--role-arn flag can actually reach this code as: not just the long
form and the abbreviated --role that update_kubeconfig.py writes when
--role-arn was passed to update-kubeconfig, but every unambiguous
prefix in between (--role-a, --role-ar) that AWS CLI's own argument
parser equally accepts, since role-arn is the only get-token option
starting with "role", plus all of those flags' --flag=value spellings.
Missing any of these would silently mint a token under ambient or
profile credentials instead of the identity the kubeconfig asked for.
Any other exec command or an auth-provider plugin still fails with a
named error rather than being silently mishandled;
SSO/IMDS/container-credentials/IRSA are not implemented.

mint's signing timestamp now takes an injectable Clock (defaulting to
Clock.systemUTC() for every existing caller) instead of calling
Instant.now() directly, so a test can pin it and assert on the exact
resulting signature. Added such a test: the signature for fixed
credentials, cluster, region and timestamp is checked against a value
computed by a from-scratch Python re-implementation of the SigV4 spec,
not ported from this code, so the two can't share a bug. Every other
test up to now only checked the token's shape (right host, right
query keys, a signature that looks like a signature); this is the
first one that proves the actual bytes are what the spec says they
should be.

Also updates docs/services/lambda.md's Kubernetes executor section,
which still said the aws eks get-token exec plugin was unsupported.
2026-09-04 18:05:00 -05:00
Vũ Thế Huy 80725e6f48 fix(dynamodb): flush persistence once per affected table in batch and transact writes (#2998)
* test(dynamodb): add tests asserting single persistence flush per table in batch and transact writes

* fix(dynamodb): flush persistence once per affected table in batch and transact writes (#2995)

* docs(dynamodb): document batch persistence and recommend wal/hybrid for write workloads (#2995)

* fix(dynamodb): pre-validate operations and guarantee persistence flush in batch and transact writes (#2995)

* fix(dynamodb): reject duplicate items in transaction and rollback partial writes on failure
2026-09-04 14:06:13 -04:00
lex00 dd9cdc1207 feat(cognitoidentity): identity pool management plane (CRUD, roles, principal-tag maps, tags) (#2977)
* feat(cognitoidentity): identity pool management plane (CRUD, roles, principal-tag maps, tags)

Emulates the Cognito Identity (federated identity pools) management API:
CreateIdentityPool through DeleteIdentityPool, ListIdentityPools with
pagination, SetIdentityPoolRoles/GetIdentityPoolRoles including role
mappings, Set/GetPrincipalTagAttributeMap, and resource tagging. JSON 1.1
under the AWSCognitoIdentityService target prefix, signing name
cognito-identity.

* fix(cognitoidentity): require AllowUnauthenticatedIdentities and key tag writes by pool region

An omitted AllowUnauthenticatedIdentities returned success with false persisted. It now fails with ValidationException. TagResource and UntagResource wrote the pool back under the signing region rather than the region in its ARN.

* fix(cognitoidentity): reject a non-boolean AllowUnauthenticatedIdentities

Jackson coerced strings and numbers to a boolean instead of failing the request.
2026-09-04 12:16:18 -04:00
TATSUNO “Taz” Yasuhiro e5afe3518b fix(kms): apply real RSAES-OAEP for RSA keys in Encrypt and Decrypt (#3038)
* fix(kms): apply real RSAES-OAEP for RSA keys in Encrypt and Decrypt

Encrypt on an RSA key now produces raw RSA-OAEP ciphertext of the
modulus length. Decrypt accepts a ciphertext made locally with the
public key from GetPublicKey, so the normal envelope pattern works.
Encrypt, Decrypt, and ReEncrypt read the EncryptionAlgorithm request
fields and return them in responses.

Validate plaintext length between 1 and 4096 bytes on every encrypt
path. Turn a malformed blob payload into InvalidCiphertextException
instead of a 500. GenerateDataKey now names itself in key usage
errors and rejects non symmetric keys like real AWS.

Error codes and messages for algorithm mismatch, wrong key usage,
missing KeyId, encryption context on asymmetric keys, and oversized
plaintext were measured against real AWS KMS in us-east-1 and match.

Fixes #3024

* test(kms): rename a GenerateDataKey test to state the thrown exception
2026-09-04 11:21:25 -04:00
Kenshin Okinaka 9cbec13750 refactor(ses): move template rendering and the ObjectMapper into SesTemplateService (#3030)
* refactor(ses): move template rendering and the ObjectMapper into SesTemplateService

* fix(ses): require an explicit ObjectMapper in the SesTemplateService test constructor
2026-09-04 11:20:08 -04:00
Kurt McAlpine 23728e0b75 feat(ecr): prefer locally present images over the loopback registry rewrite (#3022)
* feat(ecr): prefer locally present images over the loopback registry rewrite

EcrRegistryManager.rewriteImageUri rewrote every AWS-shaped
<account>.dkr.ecr.<region>.amazonaws.com/<repo>:<tag> URI to Floci's
loopback registry unconditionally, so a container image Lambda function
(or ECS task) whose image was built locally and tagged with its real ECR
URI could never run: the launcher started the registry:2 sidecar and
tried to pull from it, failing with "failed to resolve reference ..."
(Lambda.InitError) even though the daemon already held the image.

The rewrite now first asks the Docker daemon whether the image exists
under the URI as given; if it does, the URI is used unchanged and the
registry container is not started. Images the daemon does not have keep
the existing rewrite-and-pull path, so CDK DockerImageFunction flows are
unaffected. floci.services.ecr.prefer-local-images
(FLOCI_SERVICES_ECR_PREFER_LOCAL_IMAGES, default true) restores the old
behaviour when set to false.

Verified with a provided.al2023 Go image tagged
000000000000.dkr.ecr.ap-southeast-2.amazonaws.com/e2e/hello-image:local:
Invoke fails on 2.0.1 and succeeds with this change, both with Floci as
a host process and inside a container sharing the host's docker.sock; an
image absent from the daemon still takes the rewrite path.

* fix(ecr): inspect the image reference ContainerBuilder launches when preferring local images

With floci.docker.image-registry-base set, rewriteImageUri inspected the bare
AWS-shaped URI while ContainerBuilder later prefixed it, so a locally present
image was reported as found and then missed at launch. Resolve the image
through ContainerBuilder before asking the daemon so both paths agree.
2026-09-04 10:59:51 -04:00
Matheus André d398376642 fix(elasticache): implement parameter group reservation to prevent deletion during provisioning (#3023)
Signed-off-by: Matheus André <matheusandr2@gmail.com>
2026-09-04 10:51:05 -04:00
David c48b6b0b0a fix(lambda): do not publish a version when nothing has changed (#2941)
"AWS Lambda doesn't publish a version if the function's configuration and
code haven't changed since the last version." Publishing was unconditional,
so repeated publishes accumulated identical versions.

Unchanged is decided by $LATEST's revisionId, which is regenerated on every
code and configuration update, so a version records the revision it was cut
from and a later publish that finds it unmoved returns that version. Keying
on the revision rather than comparing the fields a snapshot copies means a
field added later is covered without anyone remembering to update a
comparison. Versions published before this carry no source revision and never
match, so existing state keeps its previous behaviour.

Three carve-outs, each with a test:

Description is supplied at publish time rather than carried on $LATEST, so a
publish naming a new one is a real publish even when nothing else moved.
LambdaVersionIntegrationTest already asserted that and decides the case.

Only the most recent version counts, because AWS compares against the last
version: a description going A then B then A must publish again rather than
matching the older A.

A hot-reload function's code lives in a bind-mounted directory that changes
with no API call, so revisionId cannot witness it and these always publish.

Two existing tests change, because the behaviour they assert is the one this
fixes. LambdaServicePersistenceTest reached version 3 by publishing three
times with nothing changed; its subject is the counter surviving a restart,
so it now varies the description. CodeDeployTest published identical bytes
twice to get two versions for a blue/green shift; it now deploys a real
change between them, which is what a blue/green deployment does anyway.

Closes #2822
2026-09-04 10:33:59 -04:00
Michal Schreiber 91d7ab8935 fix(docdb): accept an existing security group on CreateDBCluster and ModifyDBCluster (#2991)
* fix(docdb): accept an existing security group on CreateDBCluster and ModifyDBCluster

The security group lookup passed null for group names, which
Ec2Service.describeSecurityGroups does not accept, so any existing group
id answered an internal error while a made-up one was refused correctly
before that filter ran.

Closes #2990

* test(docdb): clean up the EC2 fixtures of the security-group bats case

* test(docdb): tear down the security-group case's EC2 fixtures even when it fails

* test(docdb): delete the case's VPC even when its security group was never created
2026-09-04 10:33:20 -04:00