Commit Graph
2573 Commits
Author SHA1 Message Date
vamsiakandVamsi Akavarapu 1abc817c5d fix(stepfunctions): serialize Scheduler target input (#4168)
Co-authored-by: Vamsi Akavarapu <16164447+vamsiak@users.noreply.github.com>
2026-09-22 15:45:58 -04:00
Niels Kootstra 3cf6c76811 fix(rds-data): reject invalid secret credentials (#3759)
Return AWS-compatible errors for secret retrieval and invalid credentials,
without falling back to master credentials, with focused coverage.
2026-09-22 15:01:41 -04:00
Simone Primarosa 10eeafad69 feat(ec2): add an arm64 Amazon Linux 2023 image catalog entry (#4163)
Add an arm64 Amazon Linux 2023 entry to the EC2 image catalog paired
with the existing x86_64 image. The new entry provides the official
AWS GA arm64 AMI name and public SSM parameter paths under
/aws/service/ami-amazon-linux-latest/.
2026-09-22 14:49:05 -04:00
Anders Wasen 27633bf94d feat(appsync): execute APPSYNC_JS resolvers via a Node sidecar (#3422)
* feat(appsync): execute APPSYNC_JS resolvers via a Node sidecar

A field with a resolver resolved to null: no data fetchers were registered, so graphql-java
fell through to its property fetcher on an empty root. This runs the resolver instead, for
UNIT and PIPELINE alike, over NONE, AWS_LAMBDA, RELATIONAL_DATABASE and AMAZON_DYNAMODB data
sources.

Resolver JavaScript runs in a Node sidecar container rather than in process. Floci's published
image is a Mandrel native executable, which carries no Truffle languages, so there is no
in-process JavaScript to embed; running real Node also means a bundle executes as written, ES
modules and all. @aws-appsync/utils is a shim the sidecar writes at boot rather than the
published package, so a resolver call never depends on npm being reachable.

The pipeline follows AppSync's: ctx.stash threads through every stage, each stage sees the last
as ctx.prev.result, runtime.earlyReturn stops everything, util.error fails the field with the
type the resolver chose, and util.appendError returns its errors beside the data. A data source
failure does not fail the field on its own: the stage's response() handler is called with
ctx.error set and decides whether to re-raise or suppress, which is why resolvers carry an
explicit if (ctx.error) branch.

VTL mapping templates are not executed. A VTL stage fails its field saying so rather than
resolving to null, since a null that means "not implemented" is indistinguishable from a null
that means "no rows".

Carries model/FunctionConfiguration and AppSyncService so it builds and tests standalone; both
are identical to the copies in the AppSync CloudFormation change and collapse on merge.

* feat(appsync): enforce the APPSYNC_JS subset before evaluating resolver code

The sidecar is real Node, so it accepted JavaScript AWS rejects: async functions, promises,
classes, try/catch, while loops, this, and imports of Node builtins. For an emulator that is
the worst failure available, since a local run green-lights resolver code that cannot deploy.

Imports are restricted by a module resolve hook rather than a source scan, so a dynamic import
of a builtin cannot slip past either. An async handler is caught before it runs and a handler
returning a promise after. The remaining constructs are found by scanning the source with
comments, strings and template text blanked first, so the same keywords inside them are not
flagged. A rejected resolver fails its field with errorType UnsupportedFeature and the line.

Enforcement is on by default and can be turned off with
floci.services.appsync.js-runtime.enforce-appsync-subset, which exists only so a false positive
cannot block someone whose code AWS does accept.

Checking real resolvers against it found a gap of the same kind in the other direction:
@aws-appsync/utils/dynamodb is a real module the shim did not provide, so valid code was being
rejected. It now implements get, put and remove; the helpers that compile a condition or update
expression throw by name rather than returning something the data source would mishandle.

Also from review: cap the /evaluate request body, keep integer precision in the DynamoDB NS
branch as the N branch already did, reject two SQL parameters bound to the same name instead of
letting the Data API report it, drop the container id and close the log follower in reset(), and
bound the docker probe in the integration test so an unresponsive daemon cannot hang CI.

* feat(appsync): add the js-runtime url knob and stop the sidecar through ContainerTeardown

Follows the sidecar contract the other managed containers use. floci.services.appsync.
js-runtime.url points the runtime at a Node server that is already running, in which case
ensureStarted skips container management entirely: nothing is created, adopted or stopped, and
the URL is probed with the short adopt budget so a wrong one says so instead of holding the
first resolver for the full start timeout. Same shape and meaning as floci.services.duck.url.

NodeAppSyncJsRuntime now implements ContainerTeardown, so EmulatorLifecycle stops the sidecar
with the other process-bound containers at a deterministic point rather than only through
@PreDestroy, which the interface documents as running too late for the final storage flush.
Teardown is a no-op for a pre-configured URL, since that server is not ours to stop.

* fix(appsync): serialize reset() and stop the sidecar it gives up on

reset() touched started, baseUrl, containerId and logStream without holding the monitor that
ensureStarted() and stopManagedContainers() both take. A failed evaluation could therefore clear
those fields in the window after a container had been created and its id recorded but before
started was set, dropping the only handle to a live container: teardown then saw a null id,
treated the sidecar as never started, and the container was leaked rather than stopped.

reset() is now synchronized on the same monitor, and reentrant so the callers already holding it
are unaffected. The failure path in post() goes through discardSidecar(), which stops and removes
the container before clearing the fields instead of forgetting it, since forgetting is what leaks:
nothing else holds the id. A pre-configured url owns no container, so teardown there stays a no-op.

The regression races eight failing evaluations against startup and asserts every container the
runtime created was also stopped. It needs a transport-level failure to reach the path: a 500 is
rethrown as an AwsException before it, so the stub drops the connection instead. Against the
previous reset() it fails with expected <[container-1]> but was <[]>.

* refactor(appsync): run resolvers through the GraphQL sidecar callback

out of Floci, which left this branch building DataFetchers for a schema that no
longer has any. Resolver execution moves onto the sidecar's batched resolver
callback instead, so the engine stays in the sidecar and the resolvers, the data
sources and the Node runtime stay here.

/v1/execute now carries a resolve block naming every planned coordinate that has
a resolver, with a callback URL and a token minted for that one operation. The
sidecar batches each execution level into one POST /appsync-resolve, which runs
the field's resolver and answers with a value or an error. denyFields still win,
so a denied coordinate is never listed and never reaches a resolver, and the
token stops working as soon as the operation returns.

AppSyncResolverExecutor takes a ResolverInvocation record instead of a
DataFetchingEnvironment. Every value it read off the environment is on the
record, so the pipeline, the data source invokers and the JS runtime are
unchanged. ResolverDataFetcher is gone: fields with no resolver are the sidecar's
own property fetcher again, and a resolver that disappears mid-operation falls
back to the source property rather than failing.

One AppSync behaviour does not fit the callback response, which carries a value
or an error per field and never both. util.appendError means report this and
keep the data, so those errors come back on the operation's session and are
merged into the response envelope, which keeps data and appended errors together
as AppSync returns them.

Also gives the sidecar container host.docker.internal on Linux, since it now has
to reach Floci back, moves the JS runtime image pin into application.yml so CI
prefetches it the way it does the sidecar pins, and puts the Docker integration
test on the shared AppSyncGraphqlSidecarProfile so it is namespaced and gated
like the other AppSync integration tests.

* ci(appsync): prefetch the Node image only on the shard that starts it

The js-runtime prefetch matched /appsync/, so all four shards pulled
node:22-alpine although only the shard carrying
AppSyncJsResolverDockerIntegrationTest starts that container. Every other test
in the package is a unit test. Matching the class name instead is three fewer
Docker Hub pulls per run, which is what this script exists to avoid.

* fix(appsync): keep null arguments and move the resolver callback under _floci

Two review points from #3422.

ResolverInvocation copied arguments and variables with Map.copyOf, which rejects
a null value, so getMessages(nextToken: null) threw out of the callback and
answered 500. That failed every field in the batch, not only the field carrying
the null. Both copies are now null tolerant, and an explicit null stays
distinguishable from an absent argument: it is present in ctx.args and null,
where an absent one is not there at all.

The callback moves from /appsync-resolve to /_floci/appsync/resolve, with the
EKS webhooks. A bare path is reachable as a path-style S3 request for a bucket
of that name, and an S3 bucket name cannot begin with an underscore, so the
prefix cannot be shadowed.

The null case is covered both ways: a unit test in ResolverCallbackResourceTest
that fails with a NullPointerException against the previous code, and three
queries in the Docker round trip covering an explicit null, its value reaching
ctx.args, and an absent argument for contrast.
2026-09-22 14:41:55 -04:00
Kenshin Okinaka 235ee91a76 feat(ses): scan raw sends for the EICAR test file and keep it out of the mailbox store (#4156)
* feat(ses): scan raw sends for the EICAR test file and keep it out of the mailbox store

The content scan now covers raw sends: the wire bytes are searched for the
plain and the base64-encoded signature before parsing, so a message the
lenient MIME parser cannot walk is still caught, and the parsed message is
walked part by part, decoding attachments, descending into forwarded
messages and decoding RFC 2047 header words. A candidate found on the wire
is confirmed by decoding the run around it, so a base64 near-miss of the
signature is not rejected.

A rejected record keeps only its source, its envelope and RejectReason;
subject, headers, reply-to addresses, bodies and raw data are dropped, and
the inspection endpoint lists it in neither the Simple nor the raw shape, so
the signature never reaches the mailbox store on disk. A MIME parse failure
logs the exception class only, since the message text could echo content.

* test(ses): pin that a rejected raw send publishes no parsed subject

The raw rejection test checked the header block and the recipient lists but
read commonHeaders only for the recipients, so a subject leaking back into
the event would have gone unnoticed.
2026-09-22 14:12:02 -04:00
Simone Primarosa 90d8c355d9 fix(eks): validate the node group launchTemplate against EC2 on CreateNodegroup (#4148)
Validate node group launchTemplate specifications against EC2 during
CreateNodegroup. Reject requests where neither or both of id and name
are supplied, or where the referenced launch template or version does
not resolve in EC2, with InvalidParameterException (400). Resolve
launch templates and construct nodegroup ARNs using the cluster's region
rather than the default region.
2026-09-22 14:06:04 -04:00
TATSUNO “Taz” Yasuhiro 8f2706a903 perf(s3): speed up CompleteMultipartUpload by reusing part ETags (#4145)
* perf(s3): reuse part ETags for the composite ETag on multipart completion

CompleteMultipartUpload hashed every part with MD5 again to build the
composite ETag. UploadPart already stores that MD5 as the part ETag, so
the completion now parses it instead.

* chore(s3): replace the java.util wildcard import in S3Service
2026-09-22 13:56:20 -04:00
Daniël van Ziel 00cfcef8f9 fix(stepfunctions): honor Wait Timestamp and TimestampPath (#4099) 2026-09-22 13:42:52 -04:00
Daniël van Ziel 8e6faffcaf fix(kinesis): paginate ListShards with an opaque NextToken (#4098) 2026-09-22 13:38:28 -04:00
Hector Ventura f9e96f3d22 feat(cloudformation): apply DynamoDB GlobalTable Replicas (#4134)
AWS::DynamoDB::GlobalTable was provisioned as a plain table and its Replicas
property was ignored. Now the declared replica regions are reconciled onto the
table via the same applyReplicaUpdates the UpdateTable ReplicaUpdates path uses.

- Create adds every declared replica region; update diffs declared vs tracked,
  adding new regions and removing dropped ones so an edited Replicas list
  converges.
- The deployment region is served by the table itself and the service rejects a
  replica there, so it is filtered out rather than tracked.
2026-09-22 13:34:03 -04:00
Hector Ventura 32856bfee0 feat(cloudformation): write Route53 RecordSet records into the zone (#4132)
AWS::Route53::RecordSet was a name-only resource: it set a physical id and wrote
nothing, so the record never existed. Now the declared record is applied to its
hosted zone via ChangeResourceRecordSets and removed on stack delete.

- Validate the schema-required Type and Name, and reject a non-numeric TTL (the
  schema types TTL as a string) with a ValidationError rather than letting a raw
  NumberFormatException escape.
- Resolve the zone from HostedZoneId (a Ref resolves to the real id) or by an
  exact name match against HostedZoneName. listHostedZonesByName is a starts-at
  paginator, so the result is filtered to the zone whose name equals the request,
  rejecting when none or more than one matches, rather than writing into whatever
  zone sorts first.
- Apply the record as an UPSERT so create and update both converge; delete
  reconstructs a matching DELETE change from the zone id and type recorded at
  create time, tolerating a zone or record already gone.
- When an update changes the record's identity (zone, Name, Type or
  SetIdentifier), remove the record the prior provision wrote so it does not
  linger in the zone and later block the zone's own delete.

Ref stays the record name; no Fn::GetAtt attribute is published (Id remains
gapped, as before).
2026-09-22 13:29:07 -04:00
Chiara Forresi e8b03538e6 feat(glue): add security configuration CRUD (#3870)
* feat(glue): add security configuration CRUD

Implement AWS Glue security configuration create, get, list, and delete operations with encrypted configuration round trips, account and region isolation, persistence, and integration coverage.

* fix(glue): close catalog encryption handler case

Close the PutDataCatalogEncryptionSettings switch arm so the merged security configuration cases compile.

* test(glue): cover empty security configuration lists

Restore coverage for the empty GetSecurityConfigurations response and keep the test setup aligned with the rebased GlueService constructor.

* refactor(glue): name security configuration length limit

Use a named constant for the documented 255-character security configuration name limit.

* fix(glue): serialize security configuration timestamps
2026-09-22 13:21:15 -04:00
Matheus André cde8f48084 fix(cloudwatchlogs): return creationTime in DescribeLogGroups and DescribeLogStreams (#4137)
The LogGroup and LogStream API shapes carry the creation timestamp as
creationTime, but both responses wrote it as createdTime, so SDK clients
and the CLI saw it as unset. Only the response key changes; the persisted
model field keeps its name so existing data is unaffected.

Closes #4084

Signed-off-by: Matheus André <matheusandr2@gmail.com>
2026-09-22 13:17:48 -04:00
TATSUNO “Taz” Yasuhiro 5d9986aa6c fix(dynamodb): add missing ConsumedCapacity to transaction responses (#4151)
* fix(dynamodb): add missing ConsumedCapacity to transaction responses

* fix(dynamodb): wait for an in-flight same-token transaction and free the token when it fails

* fix(dynamodb): reject an invalid ReturnConsumedCapacity on transactions before they run
2026-09-22 09:39:02 -04:00
Simone Primarosa f5c63ff398 feat(eks): deliver audit logs from the cluster API server (#4146) 2026-09-22 09:21:54 -04:00
luiseterc df68eebaef feat(ec2): support an external image catalog (#4144) 2026-09-22 09:09:42 -04:00
Hector Ventura e60cf84922 fix(cloudformation): publish EC2 SecurityGroup Id and Instance VpcId for Fn::GetAtt (#4155)
Both are handler-backed but were gapped, so Fn::GetAtt resolved to the literal
"Logical.Attr" string instead of the real value. Publish SecurityGroup Id
(= GroupId) and Instance VpcId, and drop their gap rows. Instance State stays
gapped, as there is no stable value to publish for it.
2026-09-22 09:03:21 -04:00
Priamo Germosen 0524d156d4 feat(codeartifact): serve the maven format through a real Reposilite-backed proxy (#4059)
GetRepositoryEndpoint for format=maven now returns a URL real Maven clients
(mvn deploy, mvn dependency:get, Gradle) can publish to and resolve from
directly, backed by a shared Reposilite sidecar container started lazily on
first use. A CodeArtifact repository maps to its own Reposilite repository,
provisioned automatically and never reused even across delete/recreate of a
same-named repository, so a fresh repository can never inherit a previous
one's artifacts.

Adds GetAuthorizationToken (a token scoped to a domain, with the 900-43200s
custom range; 0 falls back to 12 hours) and requires it on every Maven proxy
request, either as the password of HTTP Basic credentials, the form AWS's
Maven guide configures with username aws, or as a Bearer token. Maven
requests are not SigV4-signed, so the region and account come from the token.

Also enforces AWS's 5 GB asset size quota on the Maven endpoint, matching the
existing PublishPackageVersion check. Artifacts do not survive a Floci
restart; the service page documents this as a known limitation.
2026-09-22 07:42:05 -05:00
Priamo Germosen 06007deea8 fix(cognito): default ExplicitAuthFlows to refresh, SRP and custom auth (#4081)
A user pool client created without ExplicitAuthFlows was treated as allowing every auth flow, where AWS defaults such a client to ALLOW_REFRESH_TOKEN_AUTH, ALLOW_USER_SRP_AUTH and ALLOW_CUSTOM_AUTH. USER_PASSWORD_AUTH against a no-list client succeeded on Floci and is refused on AWS.

Apply that default at auth time, in the existing gate added by #3974. CreateUserPoolClient, UpdateUserPoolClient and DescribeUserPoolClient keep storing and returning exactly what was normalized, empty when unset, matching AWS: Terraform's Cognito acceptance tests confirm the empty read-back for both an omitted list and an explicit empty one, and materialising the default into storage would fail Terraform apply with an inconsistent-result error.

Tests and compatibility fixtures that created a no-list client and then signed in with a flow outside the default now enable that flow on their client.
2026-09-22 07:41:58 -05:00
Priamo Germosen eca5a1bb14 feat(iam): add ECS task-role session registration and orphan sweep (#4143)
Adds SessionCredential.ecsTaskArn and IamService.registerEcsTaskRoleSession/
sweepOrphanedEcsTaskRoleSessions, mirroring the EC2 instance-session pattern
(registerEc2InstanceSession/sweepOrphanedEc2InstanceSessions): a task-role
session lives in the same session store as any other temporary credential,
tagged by the exact task ARN it was minted for, and none of it survives a
Floci restart since no ECS task does either.

Nothing calls these yet. First piece of ECS task-role credential vending,
split out on its own since the rest (the credential issuer, its endpoint,
and how tasks reach it) is substantial enough to review in separate pieces.
2026-09-22 07:38:51 -05:00
Priamo Germosen 2f5aa99701 feat(iam): add ListInstanceProfileTags (#4140)
TagInstanceProfile and UntagInstanceProfile already existed; the read side
was missing. Mirrors ListUserTags's response shape, and sorts the result
by tag key to match the documented AWS behavior.

Also adds the instance-profile tag actions to AwsQueryController's
IAM_ACTIONS fallback set, completing the Tag/Untag/List triple already
present there for users, roles and policies.

Covers the trio in the SDK compatibility suite (compatibility-tests),
which previously had no instance-profile tagging coverage.
2026-09-22 07:38:45 -05:00
Priamo Germosen 63c0c3ada5 test(iam): share one IAM enforcement test profile instead of nine identical ones (#4139) 2026-09-22 07:38:39 -05:00
Priamo Germosen 2277217438 test(docker): pin the single-connect guard for ports plus link-local IPs (#4138)
createAndStart with both a published port and a link-local address must
connect to the network once, not twice: create()'s pre-start attach already
sets LinkLocalIPs, and startCreated()'s post-start reconnect for port-bound
containers has to stay skipped when that attach already ran. Without the
!spec.hasNetworkConfiguration() guard, the test fails on a double connect.

Raised by hectorvent in review on #4063; missed that PR's merge by one push.
2026-09-22 07:38:32 -05:00
Priamo Germosen 86493303cd fix(firehose): serialise flusher ticks so two polls cannot buffer the same records (#4141) 2026-09-22 07:38:26 -05:00
Priamo Germosen 83ae2b4697 fix(lambda): mount hot-reload read-only and refuse Docker socket directories (#4154)
Bind-mount the hot-reload host directory at /var/task read-only, as /var/task is in AWS Lambda, and, when no allow-list is set, refuse the host root, /var, /proc, and anything under /run or /var/run, where the Docker socket lives or can be reached. Move the no-allow-list warning onto StartupEvent, beside NetworkExposureGuard, so it reaches an operator who has not called Lambda yet.
2026-09-22 07:38:20 -05:00
Abhigya 7cd441231f feat(ecs): serve the task metadata endpoint v4 (#4120)
An application in an ECS task, the AWS SDK integrations that read task
identity, and the aws-for-fluent-bit init process all expect
ECS_CONTAINER_METADATA_URI_V4 to resolve. Under Floci it was never set,
so any of them fell back or failed.

AWS serves the endpoint on the link-local address 169.254.170.2, which a
local container cannot be given. Floci serves the same paths on its own
port instead: clients read the environment variable rather than the
address, so nothing has to know the difference.

The id is minted per container before the container is created, the way
the ECS agent mints one, because the container's own environment has to
carry the URI and so it cannot be derived from the Docker id the daemon
returns afterwards. EcsService.findByMetadataId resolves an id back to
its container and task.

The task document carries Cluster, TaskARN, Family, Revision, the
statuses, Limits in vCPUs, the pull timestamps, AvailabilityZone,
LaunchType, ServiceName for a service's task, VPCID for an EC2 task,
and, on Fargate, ClockDrift and EphemeralStorageMetrics. Floci has no
clock drift and does not meter the disk, so those report a synchronized
clock and zero usage. An awsvpc container's Networks object describes
the task ENI and the subnet it sits in; a local ENI has no DHCP option
set behind it, so the gateway, the resolver and the search domain are
derived the way a real VPC assigns them.

The stats paths read the daemon when the request arrives and return
Docker's own ContainerStats document, plus the network_rate_stats the
agent adds. Docker reports cumulative counters only, so the rates are a
delta across two consecutive samples, which is also why AWS documents a
container as having to run for about a second before its stats appear. A
container with no running Docker container behind it reports an empty
document rather than an error.

Because that pair costs a collection tick, task/stats samples the task's
containers in one pass: every stream is opened before any of them is
waited on, and the waits share one deadline. A sidecar polls that path
for network metrics, so the response has to cost about one tick however
many containers the task has, not one tick per container.
2026-09-22 08:18:55 -04:00
Matheus André 93f8d1421a fix(wafv2): enforce the 50-tag limit and key/value constraints on tags (#4118)
TagResource, UntagResource and the Create* operations accepted any number
of tags with keys and values of any length. Match the AWS WAFv2 contract:
at most 50 tags per resource (WAFLimitsExceededException), keys of 1-128
and values of up to 256 characters restricted to the documented character
set (WAFInvalidParameterException with Field/Parameter/Reason).

Closes #4035
2026-09-22 08:07:29 -04:00
Hector Ventura a0e3b6b674 fix(cloudformation): publish RuleName and the RDS group ARNs the current registry schemas declare (#4135)
The current CloudFormation registry schemas changed the readOnlyProperties
of six resource types, and CfnSchemaCoverageTest, which only runs where the
schema corpus is present, has failed against them since.

AWS::Events::Rule now declares RuleName, and AWS::RDS::DBSubnetGroup and
AWS::RDS::DBParameterGroup declare DBSubnetGroupArn and DBParameterGroupArn.
The provisioners set all three; until now Fn::GetAtt on them resolved to the
literal LogicalId.Attribute string. The two RDS models already carry the ARN.

AWS::RDS::DBInstance now declares StorageOperationStatus and
StorageOperationPercentProgress, which Floci does not emulate, so both are
recorded as gaps. AWS::CertificateManager::Certificate and
AWS::Route53::RecordSet no longer declare Id, so their gap rows go.
2026-09-22 07:58:13 -04:00
Hector Ventura 69e371721b fix(cloudformation): make EKS Nodegroup Ref the composite cluster/nodegroup id (#4136)
AWS::EKS::Nodegroup Ref returned the bare nodegroup name, but AWS returns the
composite "<clusterName>/<nodegroupName>" id. Publish that as the physical id
(Ref) and the readOnly Id attribute, and drive delete from the stored
ClusterName and NodegroupName attributes rather than parsing the physical id.

Removes the EKS Nodegroup Id gap row now that the attribute is set.
2026-09-22 00:52:41 -04:00
lex00 9e1e974712 test: use generic tag and key fixtures instead of a downstream project's names (#4119)
* test: use generic tag and key fixtures instead of a downstream project's names

Four test files used a particular consumer's project name and its own tag keys
as arbitrary fixture values. The names carry no meaning for anyone reading
these tests, and a reviewer flagged the same thing on #3944.

No behaviour changes. The values are only ever compared against themselves.

* test(s3): point the truncated-key guard at the key the rename produces

The guard asked for ".store-sentinel", the tail of the old key. After the
rename the tail is ".sentinel", so it requested a key neither behaviour ever
stores and would have passed with a 404 even if the truncation bug returned.

Derives the truncated key from the key under test and pins the derivation, so
renaming the key cannot quietly empty the guard again.
2026-09-21 23:42:15 -04:00
Hector Ventura 2c8f43b600 chore(cloudformation): tidy monolith comments (#4131)
Comment-only cleanup of the CloudFormationResourceProvisioner thin dispatcher,
no behavior change:

- Replace the last 5 em-dashes in method comments with commas, per the docs
  style rule (no em-dashes anywhere).
- Drop the stale and mislabelled section headers the per-service migration left
  behind (the empty CloudWatch Logs / Auto Scaling / EKS / Pipes headers, and
  the ApiGateway (V1) / CloudFront headers that no longer head that code), and
  reposition the single Helpers header above the actual private helpers.
2026-09-21 23:40:07 -04:00
Hector Ventura c847a99828 fix(cloudformation): improve EC2 Instance update fidelity (#4130)
On UpdateStack the EC2 Instance provisioner kept a reused instance unchanged,
ignoring mutable property edits and never replacing on a createOnly change.

- Reconcile InstanceType and SecurityGroupIds in place on a reused instance via
  ModifyInstanceAttribute / ModifyInstanceGroups. UserData and IamInstanceProfile
  have no in-place Ec2Service path yet, so they stay a follow-up.
- Force replacement on a changed PrivateIpAddress or AvailabilityZone. Both are
  createOnly and are not applied to the instance at launch, so the change is
  detected against the value declared on the previous provision and recorded on
  the resource, not the instance's auto-assigned value. A property with no
  recorded prior value is not treated as a change, so adopting this does not
  replace instances whose template did not actually change.
2026-09-21 23:36:17 -04:00
lex00 28ca34ad6c fix(cloudformation): apply an S3 bucket's declared configuration and its policy (#3950)
S3CfnProvisioner translated CorsConfiguration and VersioningConfiguration
and nothing else, and AWS::S3::BucketPolicy took a physical id and stopped,
so a stack reported CREATE_COMPLETE for a bucket with no lifecycle, no
public-access block, no default encryption, no tags and no policy.

PublicAccessBlockConfiguration, LifecycleConfiguration, BucketEncryption
and Tags are now translated into the XML their S3 API calls take and handed
to the same service methods, so they are validated and stored exactly as a
direct PutBucket* would be. The policy document has its intrinsics resolved
and is put on the bucket.

The policy's physical id is the bucket name, as the registry schema's
primaryIdentifier declares, and deleting the resource removes the policy,
tolerating a bucket the stack already deleted. The class javadoc names the
properties that are covered and those still dropped.

Closes #3947
2026-09-21 22:27:54 -05:00
XuJian bd40c21982 fix(cloudformation): apply IAM user tags (#4010)
AWS::IAM::User now applies its declared Tags on create and reconciles them
on update (added, changed and removed keys against the prior set), restoring
the prior tags through CfnRollback on failure.

Closes #3998
2026-09-21 22:26:32 -05:00
Vũ Thế Huy a5254defb6 fix(cloudformation): propagate nested stack failure status reason and cover changeset rollbacks (#3921)
When a nested stack fails with no status reason of its own, as after an
UPDATE_ROLLBACK_COMPLETE, the parent's ChildStack event now says the
nested stack rolled back or failed with its terminal status instead of
"failed: null". Cover the changeset create and update rollback paths,
asserting the parent's ResourceStatusReason, and restore the @Test on
the nested-output regression test.
2026-09-21 22:20:41 -05:00
Matheus Oliveira ee4acfdf81 test(cloudformation): pin the nested-stack rollback that caused #3854 (#3919)
Add a deterministic regression test: a nested stack resource that
fails to create must roll the parent back rather than report
CREATE_COMPLETE with its Fn::GetAtt output left as the raw literal.
It fails on the pre-#3609 matching logic and passes on main.

#3609 fixed #3854. The volatile on Stack.status stays as a documented
invariant (the deploy thread writes status last); it is not the fix.

Refs #3854

Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>
2026-09-21 22:15:15 -05:00
Matheus André a6d330384e fix(wafv2): return WAFNonexistentItemException as 400 (#4117)
The WAFv2 API reference documents WAFNonexistentItemException with HTTP
status 400, but WafV2Service raised it with 404 at every throw site
(resource lookups by id/name, ARN lookups for tags, logging configuration,
permission policy and web ACL association). Align all seven sites with the
documented status and cover the ARN-based lookups in the integration test.

Closes #4034

Signed-off-by: Matheus André <matheusandr2@gmail.com>
2026-09-21 23:12:17 -04:00
Priamo Germosen 73316c52e7 fix(lambda): store hot-reload host paths with POSIX separators (#4080)
Build the stored and mounted hot-reload path from its segments joined with a forward slash, so a JVM whose default separator is a backslash does not hand Docker a path it cannot use.
2026-09-21 21:54:29 -05:00
Priamo Germosen 15247f0ff5 test(firehose): drive the flusher ticks from the test instead of sleeping (#4077) 2026-09-21 21:54:26 -05:00
Priamo Germosen 87375fecc0 test(lambda): poll for the reactive sync instead of sleeping five seconds (#4076) 2026-09-21 21:54:23 -05:00
Priamo Germosen f50431c6d6 test(apigatewayv2): delete the WebSocket tests' Lambda functions concurrently in cleanup (#4075) 2026-09-21 21:54:19 -05:00
Priamo Germosen 7f5336e2dc docs(iam): document dispatched actions missing from the service page (#4074)
CreateSAMLProvider, GetSAMLProvider, ListSAMLProviders, TagInstanceProfile,
UntagInstanceProfile, the Organizations root-access actions, and the
ListMFADevices/ListServerCertificates stubs are dispatched by IamQueryHandler
but were not listed. Also correct the GetAccountSummary note: Providers counts
OIDC providers only, so it is no longer described as zero for OIDC.
2026-09-21 21:54:16 -05:00
Simone Primarosa 8dcdf7b911 feat(eks): serve pod identity credentials on 169.254.170.23 (#4124)
* feat(eks): serve pod identity credentials on 169.254.170.23

* fix(eks): safely handle cluster arn and initialize test cluster in pod identity integration test

* test(eks): configure fixed test port for pod identity docker integration test

* fix(eks): isolate pod routing and restore webhook timeout
2026-09-21 22:07:50 -04:00
Priamo Germosenandjkvw-del 30c89986bd feat(docker): attach link-local addresses to a container's network endpoint (#4063)
Add ContainerSpec.linkLocalIps and ContainerBuilder.withLinkLocalIp so a
container can be given link-local IPv4 addresses on its Docker network
endpoint. docker-java does not expose NetworkingConfig on create, so the
endpoint is reconnected with LinkLocalIPs while the container is still in
the created state, before it starts. A failed attach removes the container.

Taken from #2987, adapted to the current ContainerSpec and create flow.

Co-authored-by: jkvw-del <j.kvw@mejortechnologies.com>
2026-09-21 20:54:55 -05:00
Simone Primarosa d5b7b7f676 feat(eks): deliver control plane logs to CloudWatch Logs (#4111) 2026-09-21 21:24:09 -04:00
Kenshin Okinaka d272cd3ceb fix(ses): publish a Bounce for suppressionlist@simulator and split events by cause (#4073)
* fix(ses): publish a Bounce for suppressionlist@simulator and split events by cause

suppressionlist@simulator.amazonses.com published a Reject event. Real SES
publishes a hard Bounce for it: bounceType Permanent, bounceSubType General,
and a diagnostic that names the suppression. Reject is the outcome of the
content scan, which the simulator has no address for. Verified against SES
in us-east-1 on 2026-09-21 through an SNS event destination.

The same probe confirmed that a recipient on the account-level suppression
list bounces with bounceSubType OnAccountSuppressionList, or is complained
about with complaintSubType OnAccountSuppressionList, and that SES publishes
one event per cause: a message reaching both bounce@simulator and a
suppressed address produces two Bounce events, each listing only its own
recipients. Floci merged them into one General bounce.

One classifier, SesRecipientEvents, now decides the events a send produces
per recipient, and the publisher and identity notifications consume its
output, so the simulator and suppression semantics have a single home.
complaint@simulator now publishes Delivery before Complaint, as the
simulator documents, a list-management opt-out bounces under its own cause,
every bounce and complaint block carries its own feedbackId, and complaints
carry arrivalDate.

Reject stays reachable the way AWS documents it: a Simple send carrying the
EICAR test file in its subject, a header or a text body is accepted and then
rejected with reason "Bad content" and not relayed. The signature is
assembled from fragments at runtime and never appears in source. Scanning
raw MIME and keeping the signature out of the mailbox store follow
separately.

* fix(ses): drop the content of a rejected record

A send the content scan rejected was still recorded in full, so its subject,
body and headers reached the sent-email store, the inspection endpoint and,
with persistence on, the disk. The record now keeps only its source, its
envelope and RejectReason, and the inspection endpoint shows the reason.

* fix(ses): keep the scanned content out of a rejected message's events

The Send and Reject events of a rejected message carried the subject and
the additional headers in their mail block, so with headers enabled a
subject carrying the test string reached every event destination and, with
persistence on, the disk. Both events now carry the envelope but no subject
and no headers, a small deviation from SES that keeps the string off disk
entirely; the docs say so.
2026-09-21 21:15:52 -04:00
Vũ Thế Huy ccb6b63d00 feat(sns): deliver published messages to firehose subscriptions (#4079)
Deliver published messages to Firehose delivery stream subscriptions (sns:Publish -> firehose:PutRecord). Support RawMessageDelivery attribute to switch between raw payload and JSON envelope. Tolerates subscriber delivery errors without failing publisher.

Closes #4068
2026-09-21 21:12:23 -04:00
TATSUNO “Taz” Yasuhiro d6682cf452 perf(s3): compute CRC64NVME eight bytes at a time (#4126)
S3 uses CRC64NVME when a request declares no checksum algorithm, so
every such PutObject, UploadPart and CompleteMultipartUpload pays for it.
The byte-at-a-time loop took about 2.4 ms per MB. Slicing-by-8 takes
about 0.6 ms per MB and gives the same values.
2026-09-21 20:09:59 -04:00
Simone Primarosa d8239b3e66 feat(eks): inject pod identity credentials through a mutating webhook (#4110)
* feat(eks): inject pod identity credentials through a mutating webhook

Each real-mode cluster gets a MutatingWebhookConfiguration in its k3s
server manifests directory, scoped to pod CREATE and pointing at a
per-cluster, per-account Floci endpoint. On a pod create Floci looks up
an association matching the pod's namespace and service account name
and, when the eks-pod-identity-agent addon is installed, returns a
JSONPatch carrying the projected token volume, the mount and the two
container credentials environment variables, the same shape real EKS
injects. A pod that matches nothing is admitted unchanged.

The webhook carries failurePolicy: Ignore and every path through the
admission handler admits the pod, including a malformed review and an
internal error, so it can never block a pod from being created.
Kubernetes only accepts an https webhook URL with a caBundle it trusts,
so registration needs floci.tls.enabled; with TLS off the cluster starts
with a warning and pods are not mutated. A failed registration logs and
leaves the cluster running.

Nothing answers http://169.254.170.23/v1/credentials yet, so an injected
pod still cannot obtain credentials.

* fix(eks): default the pod identity webhook off until the credential endpoint exists

Injecting AWS_CONTAINER_CREDENTIALS_FULL_URI sends the SDK down the
container credentials path, and nothing answers that URI yet, so a
workload that was picking up credentials earlier in the chain loses
them. On by default that is a regression for anyone already recording
associations, in exchange for a capability that cannot work. Turning it
off also takes the per-cluster warning off a default install.

The webhook timeout drops from the Kubernetes default of 10 seconds to
3. Floci is a local process, so a healthy call takes milliseconds and
the timeout only runs down when Floci is unreachable, which every pod
creation in the cluster pays for.
2026-09-21 19:58:05 -04:00
Abhigya 14d13ee798 fix(elasticache): re-provision caches on restart instead of reporting a dead endpoint as available (#4094)
* fix(elasticache): re-provision caches on restart instead of reporting a dead endpoint as available

Only cluster-mode replication groups were re-provisioned on boot.
Cluster-mode-disabled groups and Memcached clusters were deliberately out
of scope, so a restart removed their containers (EmulatorLifecycle stops
and removes them on ShutdownEvent) and nothing brought them back, while
the persisted record kept its `available` status: the control plane
answered healthy with nothing behind the endpoint, and every connection
failed.

The proxy port made it worse. `usedPorts` is process-local and was only
re-reserved inside the cluster-mode branch, so a restarted group's
advertised port was free for the next create to take, pointing the old
endpoint at an unrelated cache rather than failing cleanly.

Restore now covers every record, mirroring the create path for the shape
it restores: the container and auth proxy come back for a
cluster-mode-disabled group, the container for a Memcached cluster. Ports
are reserved and records marked `creating` synchronously, before anything
can be served; the container work runs in the background so a slow Docker
daemon cannot delay readiness. A record whose data plane cannot come back
is reported `create-failed` (`restore-failed` for a cache cluster, the
value AWS models there) with no endpoint, and its port is released.

No reachable Docker daemon stays the documented degraded mode rather than
a failure: the record keeps its metadata and reports available without a
container, as it does on create.

CacheClusterStatus gains RESTORE_FAILED and a wireName(), matching
ReplicationGroupStatus. Both are values AWS models: CacheClusterStatus is
one of available, creating, deleted, deleting, incompatible-network,
modifying, rebooting cluster nodes, restore-failed or snapshotting, and
ReplicationGroup Status is one of creating, available, modifying,
deleting, create-failed or snapshotting.

* fix(elasticache): take the group monitor before a restore writes back

Restore ran its data-plane work and its write-back outside the per-record
monitor `deleteReplicationGroup` takes, so a delete that arrived in the
first seconds after boot, while the record was still `creating`, could be
undone: the delete removed the record and released its port, then the
restore finished starting the container and proxy and put the record back
as `available`. The group the caller was told had been deleted came back,
with a live cache behind it. `deleteCacheCluster` took no monitor at all,
so Memcached had the same race with nothing to synchronize against.

The container work still runs outside the monitor, as it does on create: a
restore that may pull an image must not hold a delete behind it. Only the
write-back takes the monitor, and it re-reads the record first. A record
that is gone, or has become `deleting`, is not written back; the container
the attempt started is stopped, and the port is left alone because the
delete that removed the record released it already. Releasing it a second
time would return a port a later create had since taken to the pool.

The same guard covers the failure paths: a restore that fails for a record
deleted meanwhile tears down but reports nothing, rather than resurrecting
the record as `create-failed`.

`ElastiCacheMemcachedService` gains the per-cluster monitor
`ElastiCacheService` already had, taken by `deleteCacheCluster` and the
restore write-back.
2026-09-21 19:47:09 -04:00