Commit Graph
2280 Commits
Author SHA1 Message Date
Vũ Thế Huy 6bdf14210e fix(redshift): accept s3table log destination and reject mutual snapshot restore params (#4340)
* fix(redshift): accept s3table log destination and reject mutual snapshot restore params

Closes #4242

* fix(redshift): preserve S3-table logging configuration and report status

Pass S3TableKmsKeyId and S3TableGranularity through EnableLogging, store them on Cluster, and serialize S3Tables in LoggingStatus responses.

* fix(redshift): validate S3-table logging settings

* fix(redshift): complete S3 table logging status
2026-09-25 15:20:20 -04:00
Niels Kootstra 26eafba246 fix(lifecycle): exit when startup is interrupted (#4420)
The InterruptedException branch in onHttpStart restored the interrupt
flag and logged, but never called Quarkus.asyncExit() like the other
startup failure branch does. An interrupted startup hook left the
process half-started instead of exiting.
2026-09-25 15:09:53 -04:00
Niels Kootstra 444e9e8d6a fix(sts): validate DurationSeconds (#4418)
* fix(sts): validate DurationSeconds

STS actions accepted any DurationSeconds value: non-numeric input
silently fell back to the default and no range was enforced. Validate
it against the AWS bounds (900-43200 for AssumeRole,
AssumeRoleWithWebIdentity and AssumeRoleWithSAML; 900-129600 for
GetSessionToken and GetFederationToken), returning ValidationError for
out-of-range values and InvalidParameterValue for non-numeric ones.

* test(sts): cover DurationSeconds accepted at the limits
2026-09-25 15:01:04 -04:00
Mario Toffia 5bad6774f6 refactor(dynamodb): isolate backend operation execution (#4379)
* refactor(dynamodb): route wire operations through a backend seam

Rename the native wire handlers to NativeDynamoDbJsonHandler and NativeDynamoDbStreamsJsonHandler.
Add DynamoDbOperations as the raw operation seam, plus typed DynamoDbItemAccess and DynamoDbTableAccess contracts.
Add NativeDynamoDbBackend behind the seam and DynamoDbBackendSelector as the one immutable selection.
Keep DynamoDbJsonHandler and DynamoDbStreamsJsonHandler as thin entry points that resolve account and region.
Add RequestScopes.callAsChecked and let AslExecutor delegate to it.

* refactor(dynamodb): route Java consumers through DynamoDbFacade

DynamoDbFacade hands out the selected item and table capabilities and is
now the one DynamoDB Resource Explorer provider in place of DynamoDbService.
CloudFormation, Step Functions, the IAM condition context and the Redshift
backfill call it with an explicit scope; the IoT dynamoDBv2 action writes as
the rule's owning account.
2026-09-25 14:57:13 -04:00
XuJian 0be4d07111 fix(rds): align snapshot copy and encryption responses (#4355)
* fix(rds): align snapshot copy and encryption responses

* fix(rds): clean failed restores in target regionfix(rds): clean failed restores in target region

* fix(rds): allow cross-region snapshot copies by ARN

* fix(rds): require target KMS key for encrypted cross-region copies
2026-09-25 14:50:59 -04:00
lex00 a33c4e0b00 fix(autoscaling): round-trip the whole target tracking configuration (#4369)
* fix(autoscaling): round-trip the whole target tracking configuration

DescribePolicies carried PredefinedMetricSpecification.PredefinedMetricType and
TargetValue and nothing else, so three members the model gives
TargetTrackingConfiguration were accepted at PutScalingPolicy and then absent
from the read.

CustomizedMetricSpecification was dropped whole, along with its MetricName,
Namespace, Statistic, Unit, Period and Dimensions. DisableScaleIn was dropped,
and so was ResourceLabel on the predefined specification.

A client comparing its configuration against the live policy therefore sees a
difference that never resolves, however many times it re-applies. A policy that
names neither specification still reports neither.

* fix(autoscaling): carry the Metrics form of a customized metric, and refuse a bad Period

CustomizedMetricSpecification.Metrics is the metric data query form, the way
metric math reaches a target tracking policy. I listed it when reading the
model and then built only the MetricName form, so a policy defined by queries
was accepted at put and came back without them.

Metrics now round-trips with its Id, Expression, Label, ReturnData and
MetricStat, and MetricStat with its Metric, Stat, Unit, Period and Dimensions.
A specification is built when either MetricName or the first query id is
present.

Integer.valueOf on a client-supplied Period threw out of the handler, so a
non-numeric value was reported as InternalFailure. A bad Period is a
ValidationError, on the specification and inside a MetricStat alike.

* fix(autoscaling): validate DisableScaleIn and ReturnData instead of coercing them

Boolean.parseBoolean turns anything that is not "true" into false, so
DisableScaleIn=maybe was accepted and read back as false, a setting the caller
never asked for. ReturnData had the same hole.

This handler already carries parseOptionalBoolean, which raises ValidationError
for anything other than true or false, so both now use it. DisableScaleIn was
not flagged and had the same defect.

* fix(autoscaling): round-trip a metric data query's own Period

TargetTrackingMetricDataQuery carries a Period of its own, which the model
keeps separate from the Period on its MetricStat. Nothing parsed it, the
model had no field for it, and nothing wrote it, so a query period sent to
PutScalingPolicy was accepted and then absent from DescribePolicies. It goes
through parseMetricPeriod like the others, so a bad value is a ValidationError.

* chore: retrigger CI after a cancelled shard

Shard 4 of the previous run was cancelled by the runner, which failed the
summary job. Shards 1 to 3 passed.
2026-09-25 14:37:08 -04:00
lex00 49f253d0ec fix(ec2): report an unknown subnet id from DescribeSubnets as an error (#4408)
* fix(ec2): report an unknown subnet id from DescribeSubnets as an error

A requested SubnetId that does not exist was dropped from the result instead of
raising. An empty list tells the caller the subnet is gone when the id may
simply be wrong, and a waiter polling for a subnet it just created cannot tell
not-yet from never.

describeVpcs already reads its own requested ids this way, so this is the same
shape applied to subnets. A describe naming no ids still lists the region.

* fix(ec2): raise the unknown subnet id from the query handler, not the service

describeSubnets is shared with ELB, ELBv2, DMS, ElastiCache, RDS and others,
each of which reads an absent id as its own error. ElbV2Service raises
SubnetNotFound and DmsService raises InvalidSubnet, and both are the codes
those APIs owe their callers. Raising InvalidSubnetID.NotFound in the service
replaced them. Move the per-id check to handleDescribeSubnets so only the EC2
query surface changes, and reuse the existing requireSubnet helper.

Assertions now read the XML elements rather than the response text.

* test(ec2): validate the unknown subnet id with SDK clients

AGENTS.md asks for management APIs to be exercised through an SDK client
rather than handcrafted requests alone. Ec2Client.describeSubnets raises
InvalidSubnetID.NotFound for a missing id, on its own and mixed with a good
one, and resolves the known id.

The ELBv2 case pins the regression the query handler placement avoids. With
the check in describeSubnets, CreateLoadBalancer answers a missing subnet
with InvalidSubnetID.NotFound rather than the SubnetNotFound that API owes
its callers, and this test fails.

* test(ec2): delete the VPC even when subnet creation fails

Creating the subnet outside the try meant a failure there left the VPC
behind, which accumulates against persistent storage.
2026-09-25 13:53:02 -04:00
Luke Gordon b0ad799c5c fix(s3): allow delete markers and new versions over object-locked versions (#4390)
* fix(s3): allow delete markers and new versions over object-locked versions

Object Lock protects versions, not keys. On a versioned bucket, a simple
DeleteObject (no versionId) adds a delete marker and PutObject, CopyObject
and CompleteMultipartUpload add a new current version; none of them modify
or remove the locked version, so they must not be denied.

Only check lock protection on the current version when it is a
pre-versioning (null-version) object, which Floci replaces rather than
keeping as a noncurrent version.

* test(s3): cover locked pre-versioning objects under versioned writes
2026-09-25 13:50:06 -04:00
David 14ae1dfbdb feat(glue): start, read and stop job runs, and list and batch get jobs (#4382)
A job could be created but never run: StartJobRun and the other run
actions answered InvalidAction. Add StartJobRun, GetJobRun, GetJobRuns,
BatchStopJobRun, ListJobs and BatchGetJobs.

Runs follow Glue's state machine without executing the script. They are
settled on read, so floci.services.glue.job-run-duration-seconds (default
0, succeed at once) can keep a run RUNNING long enough to stop it or hit
MaxConcurrentRuns. DeleteJob also removes the job's runs.

Part of #4380
2026-09-25 11:52:12 -04:00
Niels Kootstra c9c01729f2 fix(mwaa): run CLI commands off the event loop (#4343)
* fix(mwaa): run CLI commands off the event loop

* fix(mwaa): run CLI execs on their own worker pool

* fix(mwaa): own the CLI pool from construction and release it on failed start
2026-09-25 11:23:10 -04:00
XuJian 73ea1e2463 feat(appsync): execute VTL unit resolvers over NONE (#4356)
* feat(appsync): execute VTL unit resolvers over NONE

* fix(appsync): preserve pipeline early returns

* style(appsync): fix pipeline lookup indentation

* style(appsync): align pipeline result assignment
2026-09-25 11:13:45 -04:00
Mario Toffia 7334cac52b fix(lambda): honor LATEST and stop deleted DynamoDB stream mappings writing back (#4318)
A DynamoDB Streams mapping created with StartingPosition LATEST is now
pinned after the stream's newest record at creation, so only later
writes are delivered. Previously every mapping without a checkpoint
started from TRIM_HORIZON.

The poll worker now re-reads the stored mapping after its fetch and
skips the batch when the mapping was deleted or disabled meanwhile. An
invocation still running when the mapping is deleted completes, but
its result is dropped: no retry state, no OnFailure destination send,
and no checkpoint write that would re-insert the mapping into the
store. This also covers a state reset racing an in-flight poll.

Refs #4311
2026-09-25 11:12:19 -04:00
Abhigya 04878b8c57 feat(cloudmap): resolve DNS namespaces and register ECS tasks in them (#4122)
* feat(cloudmap): resolve DNS namespaces and register ECS tasks in them

Cloud Map's control plane already accepted namespaces, services and
instances and read them back correctly, but nothing answered DNS for
<service>.<namespace>. A container that registered successfully still
failed to resolve its peers, and the gap only surfaced at application
runtime because every API call looked right.

The embedded DNS server now consults DnsRecordSource implementations
before forwarding a query upstream, and Cloud Map provides one: a DNS
namespace resolves to the AWS_INSTANCE_IPV4 of the instances registered
under it, one A record each. The SPI keeps the direction right, since
core must not import a service. Which instances answer follows Route 53:
the healthy ones while any instance is healthy, all of them when none
is, and at most eight records either way. HTTP namespaces do not
resolve, matching AWS, where they are reachable only through
DiscoverInstances.

An ECS service that declares serviceRegistries now registers each running
task as an instance of the named Cloud Map service, and deregisters it
when the task stops, mirroring EcsLoadBalancerRegistrar. The address is
the task's ENI address on an awsvpc task and the container's Docker
network address otherwise, which is the one a peer container can reach.
Alongside it the instance carries the metadata attributes the ECS
service discovery documentation lists: AVAILABILITY_ZONE, REGION,
ECS_SERVICE_NAME, ECS_CLUSTER_NAME and ECS_TASK_DEFINITION_FAMILY.
serviceRegistries stays raw: registryArn, containerName and
containerPort are the only members anything acts on.

* test(ecs): pin the Cloud Map registration hooks with a docker mode test

EcsServiceDiscoveryRegistrarTest drives the registrar directly, so removing
EcsService's calls to it left every ECS test green. The registration only runs
in docker mode, which the suite mocks out, so nothing covered the wiring.

The new test runs ECS unmocked under a profile, creates a service that declares
serviceRegistries, and drives one reconciler tick to launch a real container. It
asserts the Cloud Map name resolves to the task's ENI address while it runs, and
that stopping the task removes the instance and the answer. Commenting out
either hook fails it: the register hook on the resolve assertion, the deregister
hook on the instance one.

Security-group enforcement goes back to its shipped default of off for the
profile. The suite turns it on and its helper needs rootful Docker, which is a
requirement of security groups rather than of service discovery.

Also corrects the health status deviation note. An instance registered without
AWS_INIT_HEALTH_STATUS starts HEALTHY on AWS too, so the deviation is not the
initial status but that Floci never moves it: AWS registers an ECS task
UNHEALTHY and promotes it once the container health check passes, for a service
that declares HealthCheckCustomConfig.

* fix(cloudmap): retain DNS ownership and ECS registry targets

* fix(cloudmap): keep namespace apex queries authoritative

* style(dns): remove em dash from test heading
2026-09-25 11:11:28 -04:00
Mario Toffia 294f368814 refactor(dynamodb): move table mutations behind the service (#4378)
CreateTable, UpdateTable and the Kinesis toggles now validate, mutate and
persist in NativeDynamoDbTableService. The handler keeps wire parsing, response
formatting, the Kinesis precision check, and UpdateTable's PAY_PER_REQUEST
throughput and GSI update index checks (they must precede request parsing
errors). Its 4-arg constructor is package-private for tests. Behavior is unchanged.
2026-09-25 11:06:32 -04:00
Niels Kootstra cd21d58403 fix(eventbridge): stop a cron rule deleted or disabled mid-delivery (#4346)
* fix(eventbridge): stop a cron rule deleted or disabled mid-delivery

* fix(eventbridge): swap the next cron timer in atomically

* test: drive the cron timer by hand instead of waiting on real time

* test: cover a stop landing between the re-arm check and the swap
2026-09-25 10:47:54 -04:00
TATSUNO “Taz” Yasuhiro 59fda495a6 fix(sts): Reject SAML signature transforms that AWS rejects (bonus: native image shrunk by 7 MB) (#4372)
* perf(sts): drop the XSLT and XPath signature transforms from the native image

AWS answers AssumeRoleWithSAML with InvalidIdentityToken "Response signature
invalid" when the signature reference uses an XPath, XPath Filter 2.0 or
inclusive canonicalization transform, even though the signature itself is
valid. It accepts the enveloped signature transform alone or with exclusive
canonicalization, which is what SAML 2.0 core 5.4.4 allows. The verifier now
rejects the other transforms the same way.

These transforms can no longer run, but every registered transform is
reachable through one virtual call in the JDK XML signature code, so the
XSLT compiler and the XPath engine were still compiled into the native image.
Substitutions cut them out.

* chore(sts): cover the exclusive canonicalization with comments transform

AWS accepts a SAML signature whose reference uses the enveloped signature
transform with exclusive canonicalization with comments.

* fix(sts): check SAML signature transforms before unmarshalling the signature

In the native image, unmarshalling an XPath Filter 2.0 transform throws
MissingReflectionRegistrationError for XPathType[], so AssumeRoleWithSAML
returned 500 instead of InvalidIdentityToken "Response signature invalid".
The transform algorithms are now read from the DOM before the JDK parses
their parameters.
2026-09-25 10:45:51 -04:00
lex00 fde0688ef3 fix(ec2): reject a DescribeVpcs filter name the service does not serve (#4366)
* fix(ec2): reject a DescribeVpcs filter name the service does not serve

matchesFilters answers true for a name it does not recognise, so an
unsupported filter matched every VPC in the account rather than narrowing
anything. A caller reading that result gets a wrong answer with nothing saying
it is wrong, which is worse than an error. Real EC2 refuses the name.

VPC_FILTERS is the set DescribeVpcs documents, plus the undocumented
cidr-block alias matchesFilters already honours and real EC2 accepts.
describeVpcs now runs requireSupportedFilters, the same helper the
egress-only gateway and VPN gateway describes already use.

* fix(ec2): match the three VPC filters the check newly accepted

VPC_FILTERS admitted dhcp-options-id, owner-id and
ipv6-cidr-block-association.ipv6-pool, and matchesFilters had no arm for any of
them, so each fell to the catch-all and matched every VPC. Accepting a name the
matcher does not implement is worse than refusing it, because the filter is
then taken and silently matches everything. All three have backing data on the
model, so they are matched rather than dropped from the set.

The test asserted only a 200, which is why it did not catch this. It now
creates a VPC and checks each accepted name narrows away from it on a value
nothing can carry, and still finds it on a value it does.

The javadoc claimed one undocumented alias. There are three: cidr-block,
isDefault and tag-value.

Also imports ValidatableResponse rather than qualifying it inline.
2026-09-25 10:43:38 -04:00
Hector Ventura a777879518 fix(cloudformation): reconcile a named secret in place on UpdateStack (#4299)
* fix(cloudformation): reconcile a named secret in place on UpdateStack

SecretsManagerCfnProvisioner called CreateSecret on every provision, so an
identical UpdateStack of a named AWS::SecretsManager::Secret rolled back with
"A secret with the name ... already exists", the failure mode of #2134. The
provisioner now adopts the prior secret: a same-named secret (or a generated
name, kept stable) is reconciled where it stands, description and KMS key
through UpdateSecret, tags driven to the template, an explicit SecretString that
differs from the current value as a new version, and a GenerateSecretString
value left alone so a no-op update does not rotate it. A changed Name is the
replacement the registry schema defines. Tags and KmsKeyId now reach the create
call too.

CloudFormationNamedResourceIdenticalUpdateIntegrationTest runs create, an
identical update and a delete for 36 resource types that carry an explicit
create-only name, so a named type cannot regress this quietly; the secret was
the one of the 36 that did.

Closes #2134

* fix(cloudformation): generate a secret value when an update switches from SecretString to GenerateSecretString

Provisioning with SecretString removed FlociSecretGenerateIdentity, so the next update could not tell a pre-upgrade record from an explicit value and skipped generation. Record "none" instead; only an absent attribute is treated as a legacy record that keeps its value.

* fix(cloudformation): generate for a pre-upgrade secret switching to GenerateSecretString

Records persisted before FlociSecretGenerateIdentity existed cannot say whether the prior template used SecretString. Keep the current value only when it has the shape the GenerateSecretString config produces; otherwise generate, as main did through createSecret.

* fix(cloudformation): always generate for a pre-upgrade secret with GenerateSecretString

The current value cannot show whether a legacy record's prior template used SecretString or a different generation policy, so the length and template-shape check could keep a value that should have been regenerated. Generate on the first update instead; main never kept such a value across an update, since it called createSecret each time.
2026-09-25 10:36:06 -04:00
Aniket Shukla 09276c75dc fix(lambda): honor alias async destination configuration (#4348)
* fix: route Lambda async destinations by invoked alias

* test: verify qualified Lambda ARN executor calls

* test: cover real alias destination routing
2026-09-25 10:28:52 -04:00
Hector Ventura 6fcfc0450a fix(core): refuse a SigV4 scope region that no AWS partition publishes (#4393)
* fix(core): refuse a SigV4 scope region that no AWS partition publishes

P2b of the multi-partition plan. RegionResolver.resolveRegionFromAuth took the
credential-scope label with no membership test, so polygondwanaland-west-1
became a region with its own storage namespace and its own ARNs. A label that
no partition publishes or admits by its regionRegex is now refused with a 400:
S3-signed requests get S3's XML AuthorizationHeaderMalformed ("the region '...'
is wrong", the S3 and minio wording), everything else InvalidSignatureException.
The pattern rule is the AWS SDKs' own, so a region launched after the vendored
data was refreshed (eu-south-9) is still served. moto
(MOTO_ALLOW_NONEXISTENT_REGION) and LocalStack (ALLOW_NONSTANDARD_REGIONS)
refuse the same way by default; floci.partitions.allow-unknown-regions
(FLOCI_PARTITIONS_ALLOW_UNKNOWN_REGIONS) restores the old any-label behaviour.

* fix(core): answer an unknown scope region in the caller's protocol, including presigned POST

A form-encoded request now gets a Query ErrorResponse instead of JSON, which Query SDKs cannot parse, and an S3 presigned POST's form credential is checked for an unknown region with S3's AuthorizationHeaderMalformed, as minio does.
2026-09-25 10:12:46 -04:00
Priamo Germosen 5913812b53 fix(codepipeline): fall back when the source poll interval is not positive (#4361)
floci.services.codepipeline.source-poll-interval-ms reached
scheduleWithFixedDelay unchecked. That call rejects a non-positive delay,
and it happens from @PostConstruct, so setting the key to 0 or a negative
value threw IllegalArgumentException while CodePipelineService was being
constructed and left the service unavailable rather than merely
mis-scheduled.

resolveSourcePollInterval now keeps a positive value and otherwise warns
and falls back to the 500ms default, matching resolveInterval in
SwfTimeoutSweeper, which guards the same hazard for the same reason: a
misconfigured interval is not worth failing every other service for.

The new test drives 0, -1 and Long.MIN_VALUE through the startup path
with a proxied EmulatorConfig, so it needs no Quarkus application of its
own. Bypassing the guard turns it red with IllegalArgumentException.

Also corrects the awaitSourcePollCycles javadoc added in #4236. It
claimed the helper blocks until the poller has had that many chances to
run, which a wall-clock sleep does not guarantee: the poller runs on a
fixed delay and each pass takes time of its own, so completed cycles are
a floor in practice. The reason the wait scales with the configured
interval is unchanged.
2026-09-25 07:41:13 -05:00
Priamo Germosen 3e6c7a3472 feat(codeartifact): serve the npm format through a real Verdaccio proxy (#4336)
GetRepositoryEndpoint for format=npm now returns a working registry
endpoint: real npm/yarn/pnpm clients can publish to and install from it,
proxied straight through to a real Verdaccio instance rather than
reimplemented. Every request needs Authorization: Bearer <token> from
GetAuthorizationToken, matching npm's own _authToken config and, unlike
Maven's HTTP Basic support, Bearer only.

Unlike Reposilite, Verdaccio has no native concept of multiple named
repositories inside one instance, so each CodeArtifact repository gets
its own container instead of sharing one, started lazily on first use
and identified by a fresh id assigned at CreateRepository time so a
repository deleted and recreated under the same name never inherits the
previous one's packages. Each container is started with
VERDACCIO_PUBLIC_URL set to that repository's own proxy URL so package
metadata it returns (dist.tarball) points back through Floci instead of
the container's own internal, client-unreachable address.

VerdaccioSidecarManager implements the RepositorySidecarManager
interface CodeArtifactService already generalized DeleteRepository's
cleanup over, so a deleted repository's Verdaccio container is stopped
and removed the same generic way Maven's Reposilite storage is released.
The per-key container lifecycle (map of running containers, per-key
start lock, health poll, restart-on-unhealthy, stop-all) has nothing
Verdaccio-specific in it, so it is pulled out into PerKeyContainerPool
for a future per-repository sidecar to reuse directly.

CodeArtifactNpmDataPlane is a raw streaming proxy rather than a JAX-RS
controller, since npm's wire protocol has no fixed path shape the way
Maven's GAV layout does; Verdaccio already speaks that protocol
correctly, so this only needs to authenticate the request and forward
it. The publish/fetch integration test replays a real request the npm
CLI sent during manual verification, captured with a tiny Node.js
capture server, so it exercises the exact envelope shape (including a
real gzip tarball attachment) npm publish actually produces; the full
round trip was additionally verified by hand with the real npm CLI
against a live Floci instance.
2026-09-25 07:40:58 -05:00
Priamo Germosen d2c0705ea9 fix(iam): authorize the service that serves the request, not the one it was signed for (#4295)
A target-dispatched request is routed on X-Amz-Target, but the enforced action took its service prefix from the caller's SigV4 credential scope. Signing a DynamoDB PutItem under the lambda scope authorized lambda:PutItem while the call still ran against DynamoDB, so a policy denying dynamodb:* never matched.

Take the service from the protocol claim instead, which only carries one when the request really is dispatched on the wire's own naming, and never for AWS_QUERY, whose claim is built from the credential scope. Reading the target header directly here would instead let a header attached to an S3 request move the authorization to another service while S3 still served it.
2026-09-25 07:40:42 -05:00
vamsiakandVamsi Akavarapu 1a009300dd feat(apigateway): enforce Cognito user pool authorizers (#4323)
* feat(apigateway): enforce Cognito user pool authorizers

* fix(apigateway): honor Cognito authorizer configuration

* fix(cognito): reject signed-out REST authorizer tokens

* style(apigateway): order imports

* style(apigateway): explain authorizer type clash

* chore(ci): rerun PR test workflow

* refactor(apigateway): isolate Cognito user pool authorization

---------

Co-authored-by: Vamsi Akavarapu <16164447+vamsiak@users.noreply.github.com>
2026-09-25 07:11:07 -04:00
lex00 6cd1bb3794 feat(rds): add and remove a subscription's source identifiers (#4363)
* feat(rds): add and remove a subscription's source identifiers

SourceIds was write-once. CreateEventSubscription accepts the list and
ModifyEventSubscription has no SourceIds member, so
AddSourceIdentifierToSubscription and RemoveSourceIdentifierFromSubscription
are the only way to change it and neither existed.

Adding an id the subscription already carries is a no-op. The model declares
only SourceNotFoundFault and SubscriptionNotFoundFault for these operations,
so no fault fits a duplicate. Removing an id the subscription does not carry is
SourceNotFound, which is the fault that does fit.

* fix(rds): refuse a missing SubscriptionName as a parameter error

SubscriptionName and SourceIdentifier are both required by the model, and only
the identifier was checked. A missing name fell through to the subscription
lookup and came back as SubscriptionNotFound, telling the caller the
subscription does not exist when the request simply did not name one. The two
required members now fail the same way on both operations.

Also imports assertEquals in the new test rather than qualifying it inline.
2026-09-25 07:08:02 -04:00
Kenshin Okinaka 08c6ce0768 feat(ses): add v2 export jobs (#4327)
* feat(ses): add v2 export jobs

CreateExportJob, GetExportJob, ListExportJobs and CancelExportJob render the
per-recipient timelines already stored at send time as CSV or JSON, through
the same aggregation BatchGetMetricData serves, so an export and a query of
one window cannot disagree.

Real SES writes the file into a bucket it owns and refuses a caller-chosen
S3Url, so Floci does the same and writes into its own S3 emulation, which is
what the presigned URL on a finished job resolves against.

The VDM gate answers BadRequestException here where message insights and
metric data answer NotFoundException, so SesAccountService takes the caller's
error shape and keeps one copy of the probed sentence.

* fix(ses): use the published concurrent-export quota and prove the reset test parks

* fix(ses): scope the export bucket per account and fix two row-count bugs

* fix(ses): make the reset drain test deterministic and document the presigner limit

* test(ses): assert the reset thread finished, since join returns on timeout too
2026-09-24 22:54:36 -04:00
Mario Toffia 88a992757e feat(lambda): bisect failing DynamoDB stream batches and keep refused failures (#4337)
BisectBatchOnFunctionError now splits a batch that fails with a function
error in half, keyed by checkpoint, until the poison record is isolated.
Splits do not consume the retry quota; throttles and partial batch
responses do not split.

A discarded batch whose OnFailure destination refuses the send is parked
at the persisted checkpoint and only the send is retried with backoff,
instead of checkpointing past a batch that was never delivered.
2026-09-24 21:18:00 -04:00
Niels Kootstra 3096a3cf7c fix(secretsmanager): bound rotation threads and lock storage (#4344)
* fix(secretsmanager): bound rotation threads and lock storage

* fix(secretsmanager): keep rotation threads non-daemon and drop the lock count test

* chore: rerun CI

* fix: set rotation thread flags explicitly and pin the test to the pool size
2026-09-24 21:15:29 -04:00
TATSUNO “Taz” Yasuhiro 8f606c3587 fix(dynamodb): match AWS error messages for item calls and projections (#4315)
* fix(dynamodb): drop the table name from ResourceNotFound on item calls

AWS answers a data-plane call on a missing table with the bare message
"Requested resource not found". Floci named the table there, which only
control-plane calls such as DescribeTable do.

* fix(dynamodb): reject overlapping and undefined ProjectionExpression paths

AWS rejects a read whose ProjectionExpression names the same document path
twice, or names a path that covers another one, and it does so before the
read, so a request that matches nothing still fails. An undefined #alias in
a projection path is rejected the same way. Floci accepted both and only
trimmed the item afterwards.

The check runs on GetItem, Query, Scan, BatchGetItem and TransactGetItems.

* test(dynamodb): pin the ResourceNotFound message every item call returns

Covers the missing-table half next to the existing CREATING-table case, and
records that DescribeTable still names the table.

* fix(dynamodb): reject BatchGetItem mixing AttributesToGet and ProjectionExpression

AWS weighs the two projection styles across the whole request. One table
entry carrying both, or one entry naming AttributesToGet while another names
ProjectionExpression, fails with the expression conflict message. Floci
accepted both shapes.

* fix(dynamodb): reject DeleteItem carrying both Expected and ConditionExpression

PutItem and UpdateItem already rejected the mix. DeleteItem ran the legacy
Expected block alongside the condition instead.

* fix(dynamodb): answer an empty BatchGetItem RequestItems the way AWS does

AWS moved BatchGetItem to the validation framework message for an empty
RequestItems map. BatchWriteItem still answers with its own sentence, so
only the read side changes.

* fix(dynamodb): match AWS wording for a StreamViewType with streams disabled

CreateTable answers "Table is being created with a stream disabled,
UpdateViewType should not be specified".

* fix(dynamodb): name the set type when a binary set has duplicates

AWS answers a BS duplicate with "Input collection [, ]of type BS contains
duplicates.", with no space before "of". String and number sets keep the
plain wording.

* refactor(dynamodb): read each projection path once per loop in validatePaths

* refactor(dynamodb): compare projection path prefixes with subList

* fix(dynamodb): reject overlapping and undefined ProjectionExpression paths on SearchVectors

* refactor(dynamodb): declare the BatchWriteItem cost table with its type

* test(dynamodb): pin the overlapping projection rejection on reads that match nothing
2026-09-24 21:13:18 -04:00
Simone Primarosa 922402210f feat(ec2): attach volumes as real block devices (#4354)
* feat(ec2): attach volumes as real block devices

* fix(ec2): address review feedback on volume block device attachments

* fix(ec2,eks): handle volume deletion failures and node volume re-attachment on restore

* test(eks): verify cluster node instance registration and listener callback

* fix(ec2,eks): address review comments on loop device detachment and config

* fix(ec2): support both util-linux and busybox losetup in volume loop lookup
2026-09-24 21:10:55 -04:00
Mario Toffia 4abba5a218 fix(lambda): preserve CloudFormation event source mapping options (#4316)
AWS::Lambda::EventSourceMapping now forwards MaximumBatchingWindowInSeconds,
MaximumRetryAttempts, MaximumRecordAgeInSeconds, BisectBatchOnFunctionError,
FilterCriteria, DestinationConfig and ScalingConfig to LambdaService, so a
stack-created mapping matches an API-created one. On UpdateStack each of
these that the template omits is sent as null, which clears it.

ParallelizationFactor and TumblingWindowInSeconds are not modeled and remain
ignored; the resource-type table notes this.

Fixes #4313
2026-09-24 21:05:00 -04:00
Hector Ventura eb2872f578 fix(core): read ARNs and Step Functions integration ids in every partition (#4358)
P2 of the multi-partition initiative (#4272), the parse side. StatesIntegration
replaces the literal arn:aws:states::: integration ids the ASL executor and the
definition validator compared against: the CDK builds them as
arn:${Aws.PARTITION}:states:::, so a China or GovCloud state machine never
matched (aws-cdk task-utils.ts:36). Only AWS's three suffixes (.sync, .sync:2,
.waitForTaskToken) parse, and a dispatch that does not read the suffix accepts
none, so sqs:sendMessage.bogus stays unsupported as it was. AwsArnUtils
.resourceIfArnFor replaces the 16 startsWith("arn:aws") probes, so bucket
policies, S3 resource paths, assumed-role principals, SAML role pairs, EKS
instance profiles, Security Hub, OAM and CloudTrail selectors recognise China,
GovCloud and ISO ARNs, and an assumed role's underlying role is rebuilt in the
session's own partition. Where a check used to pin arn:aws: and thereby the
commercial partition, it now pins the partition explicitly: a root principal
matches only a caller of the same partition and account, and a Security Hub
resource ARN must carry the request's partition. The 25 hand-rolled partition
alternations in regexes collapse onto AwsArnUtils.PARTITION_REGEX. The
partition-literal baseline drops from 270 to 195 gated occurrences.

Part of #4272
2026-09-24 21:03:38 -04:00
Niels Kootstra 6ed4726f52 fix(appsync): bound the Lambda authorizer result cache (#4345)
* fix(appsync): bound the Lambda authorizer result cache

* fix: keep the authorizer cache cap under concurrent inserts
2026-09-24 20:55:27 -04:00
lex00 09dcbabe2b feat(rds): manage event notification subscriptions (#4332)
* feat(rds): manage event notification subscriptions

CreateEventSubscription, DescribeEventSubscriptions, ModifyEventSubscription
and DeleteEventSubscription were all missing, so the subscription resource
could not be created.

Constraints come from the model. A SubscriptionName under 255 characters, a
required SnsTopicArn, SourceType limited to the documented valid values, and a
SourceIds list that may only be supplied alongside the SourceType its ids
belong to. An omitted Enabled activates the subscription, which the model
describes only in the negative: a subscription that is not activated is
created but not active. Modify applies only the members the request names.

Nothing is published to the topic. A subscription is stored and reported back
and no RDS event reaches SNS through it. The docs say so.

* fix(rds): synchronize the event subscription methods and cite the SourceIds constraint

createEventSubscription checked for a duplicate name and then stored, so two
concurrent creates of the same name both passed the check and the second
overwrote the first with neither caller seeing SubscriptionAlreadyExist. The
four methods are synchronized now, matching the 48 other public synchronized
methods in this file and the find-then-throw-then-store shape of
createDbSnapshot.

The comment on the SourceIds coupling said only that the model states it,
which sent a reviewer to the operation documentation where it is absent. It
now quotes the constraint and says it lives on
CreateEventSubscriptionMessage.SourceIds rather than on the operation.

* fix(rds): keep a rejected modify inert, carry subscription tags, and page the describe

Four findings from the automated review, all confirmed against the model.

ModifyEventSubscription wrote SnsTopicArn before validating SourceType, so a
request carrying a new topic and an unmodelled source type answered 400 with
the topic already changed. The store returns the live instance, so a later
describe reported it. This is the same shape as the Lambda code signing bug in
#4286 and I did not carry the lesson across.

CreateEventSubscriptionMessage has a Tags member that was dropped on the
floor, and resolveTagHandle had no arm for an es: ARN, so a subscription could
neither be created with tags nor tagged afterwards.

DescribeEventSubscriptionsMessage has MaxRecords and Marker, and its output
shape has Marker. None were read or emitted, so a bounded page returned
everything with no way to continue.

The new test used var, which AGENTS.md prohibits, the same thing flagged on
#4286.

* fix(rds): bound MaxRecords and resume paging past a deleted marker

Two defects I introduced in the pagination added last round.

MaxRecords was unbounded. Zero built an empty page and then read its last
element, throwing IndexOutOfBoundsException, and a negative value produced
invalid bounds. The model documents minimum 20, maximum 100, default 100, and
handleDescribeEvents a few hundred lines up already enforces that range. An
omitted value now defaults to 100 rather than returning everything.

The marker resumed by looking for its own name, so a subscription deleted
between calls left the offset at zero and handed back the first page again.
Resuming at the first name strictly greater than the marker is stable under
deletion.

The test used MaxRecords 1, a value the model rejects, so it exercised a page
size real RDS never serves. It now creates 21 subscriptions and pages with 20.

* fix(rds): validate MaxRecords before the named-subscription shortcut

The range check sat after the early return for a named subscription, so a
request naming one alongside an out-of-range MaxRecords succeeded. Request
validation should not depend on which branch serves the read.
2026-09-24 20:51:09 -04:00
Priamo Germosen dd05c533e5 fix(iam): emit State before Description in GenerateCredentialReport (#4329)
GenerateCredentialReportResponse's member order in the wire model, and the
order AWS's own documented example emits them in, is State then
Description. The handler had them reversed. Query-protocol XML parsers
match by element name, not position, so nothing was actually broken by
this; it's a fidelity fix, not a behavior fix.

Follow-up from #4298's review.
2026-09-24 17:38:07 -05:00
Priamo Germosen 70df224189 test(codepipeline): make the S3 source poll interval configurable so the negative tests wait less (#4236) 2026-09-24 17:37:36 -05:00
Abhigya 76cc27f2f1 fix(ecs): retry teardown of redeployed task containers (#4280)
* fix(ecs): retry teardown of redeployed task containers

* test(ecs): wait for explicit task stop in SDK compatibility test

* fix(ecs): serialize teardown and align stop compatibility test

* test(ecs): observe blocked concurrent stop without delay

* fix(ecs): preserve unknown exits and serialize startup transition
2026-09-24 15:51:05 -04:00
XuJian b658c5f020 feat(ecr): update and validate pull-through cache rules (#4342) 2026-09-24 15:38:19 -04:00
Simone Primarosa 077b65df5c feat(ec2): implement ModifyVolume and volume modification state (#4320) 2026-09-24 15:14:59 -04:00
XuJian 4a51c0e814 feat(dlm): manage lifecycle policies (#4335)
* feat(dlm): manage lifecycle policies

* fix(dlm): use shared partition regex
2026-09-24 15:08:34 -04:00
Simone Primarosa 6de5e40f54 feat(eks): label cluster nodes with their topology zone and region (#4308) 2026-09-24 15:06:57 -04:00
Niels Kootstra 06ec4b563a fix(ec2): validate and expire IMDSv2 session tokens (#4303)
* fix(ec2): validate and expire IMDSv2 session tokens

PUT /latest/api/token accepted any TTL and tokens never expired. Require an
integer X-aws-ec2-metadata-token-ttl-seconds between 1 and 21600 (400
otherwise) and reject an expired or unknown token with 401, as IMDS does.
Requests without a token still use IMDSv1.

* test(ec2): use the shared MutableClock in Ec2MetadataTokenTest

Drop the test's private clock in favour of
io.github.hectorvent.floci.testing.MutableClock, which other tests
already share and which starts at the same instant.

* fix(ec2): reject an IMDSv2 token presented from another instance

A valid token won over the caller's IP, so container B presenting
container A's token received A's metadata, credentials included. The
docs say a token is not valid on other instances. Answer 401 when the
caller's IP maps to a different instance than the token's; an
unregistered IP still defers to the token.
2026-09-24 15:04:24 -04:00
Vũ Thế Huy 4e3bbe539c fix(s3): validate checksum passed via presigned url query parameters (#4254)
* fix(s3): validate checksum passed via presigned url query parameters (#4188)

* fix(s3): support checksum algorithm in query on presigned copy and drop unused overloads
2026-09-24 14:57:34 -04:00
Hyun Lee bdbc7e93d3 fix(apigatewayv2): reject an out-of-range AuthorizerResultTtlInSeconds (#4294)
CreateAuthorizer and UpdateAuthorizer read AuthorizerResultTtlInSeconds with a bare Number cast and stored any integer, so -1 or 99999 was accepted and returned by GetAuthorizer. The API Gateway v2 model constrains the member to 0-3600 (IntegerWithLengthBetween0And3600) and lists BadRequestException (HTTP 400) as the error for invalid input, which is what the service now throws.

UpdateAuthorizer checks the value before changing any field, because the store hands back the live authorizer and a rejected request must not leave half of the patch applied. ImportApi and ReimportApi check the x-amazon-apigateway-authorizer TTL while planning, so a rejected reimport keeps the previous definition. AWS::ApiGatewayV2::Authorizer goes through the same service call, so an out-of-range value now fails the resource.

Closes #4072
2026-09-24 14:41:18 -04:00
Franklin G. Mendoza 02ad6aa768 fix(codepipeline): resolve effective source revisions (#3514) 2026-09-24 13:30:42 -04:00
Aniket Shukla 243797c2c6 fix(apigateway): provision CloudFormation MOCK CORS responses (#4324)
Preserve method response headers, integration request templates, and integration responses when creating AWS::ApiGateway::Method resources. This lets Serverless-style OPTIONS MOCK methods emit their configured CORS headers.
2026-09-24 12:27:25 -04:00
Aniket Shukla c595792795 fix(ec2): report instance platform details (#4322) 2026-09-24 12:14:36 -04:00
TATSUNO “Taz” Yasuhiro 9454ceed21 fix(dynamodb): filter an unkeyed PartiQL index read on the index view (#4319) 2026-09-24 12:10:00 -04:00
lex00 41ceed4dba feat(lambda): manage code signing configurations (#4286)
* feat(lambda): manage code signing configurations

CreateCodeSigningConfig and its Get, Update, Delete and List siblings were
missing, so aws_lambda_code_signing_config and anything else that manages the
resource had nothing to call.

Adds the five, backed by a store. Constraints come from the model: an id of
csc- plus 17 characters, AllowedPublishers required with one to twenty signing
profile ARNs, a Description of at most 256 characters, and Warn as the default
UntrustedArtifactOnDeployment.

ListFunctionsByCodeSigningConfig now resolves the configuration instead of
answering every well-formed ARN with a 404. That answer was correct only while
no configuration could exist. A known one reports no functions, since
PutFunctionCodeSigningConfig is still not wired.

Nothing verifies a signature, so a configuration never gates a deployment. The
docs say so.

* fix(lambda): register the code signing config model for reflection

PersistedModelReflectionTest flagged it: a type reachable from persisted
storage needs @RegisterForReflection or native-image persistence breaks on
restart. The two nested shapes need it too.

* docs(lambda): name the ARN pattern as the reason the id alphabet is lowercase

The comment credited the id pattern, which is the looser of the two.
CodeSigningConfigId allows csc-[a-zA-Z0-9-_\.]{17} and CodeSigningConfigArn
ends in csc-[a-z0-9]{17}, so the ARN is what binds the alphabet. Anyone
reconciling the code against the old comment could widen it, still satisfy the
id pattern, and start emitting ARNs that do not conform.

Also imports List in the new test instead of writing java.util.List.of inline.

* fix(lambda): mint the code signing config ARN through AwsArnUtils

The ARN was assembled from a hardcoded arn:aws: prefix, so it named the
commercial partition whatever region the request carried. AwsArnUtils resolves
the partition from the region, which is what the partition-literals gate asks
for.

* fix(lambda): validate every member of an update before applying any

The store hands back the live instance, so validating and setting in turn left
an earlier member written when a later one was rejected. An update carrying a
valid Description and an empty AllowedPublishers answered 400 with the
description already changed, visible to the next GetCodeSigningConfig and
saved by the persistent and hybrid stores on their next write.

aRejectedUpdateChangesNothing sends that combination, and the same shape with
the policy as the rejected member, and asserts the description is unchanged
after each. It fails without the reordering.
2026-09-24 12:05:29 -04:00
lex00 db07c56704 fix(opensearch): report an endpoint for a domain with no container behind it (#4284)
* fix(opensearch): report an endpoint for a domain with no container behind it

A domain reports Processing false as soon as it is created, but Endpoint stays
blank whenever there is no container: the service is mocked, or the container
could not be started. SDK waiters poll DescribeDomain until the domain is
active and names an endpoint, so neither exit is ever reached and a create
hangs until the caller's own deadline instead of failing.

Both paths now synthesize an AWS-shaped endpoint,
search-<domain>-<suffix>.<region>.es.amazonaws.com, with the suffix derived
from the domain name so it survives a restart. The container path is
unchanged.

* docs(opensearch): say which cases the synthesized endpoint covers

The javadoc claimed SDK waiters poll DescribeDomain until the domain names an
endpoint. botocore ships no waiters for opensearch or es, and Terraform's
create wait only checks that Endpoint is non-nil, which "" already satisfies.

It also claimed the fallback covers a container that could not be started.
tryStartDomain rethrows whenever Docker is reachable, so it returns false only
when no daemon is reachable at all.

Both now say what they actually cover: mock mode and an unreachable Docker
daemon, reporting an AWS-shaped endpoint in place of a blank one. The test's
class comment carried the same two claims.

* fix(opensearch): take the synthesized endpoint's DNS suffix from the partition

The endpoint hardcoded .es.amazonaws.com, so a cn or gov region reported a
commercial hostname. AwsRegions.dnsSuffixFor resolves it from the region, which
is what the partition-literals gate asks for.

theEndpointTakesItsDnsSuffixFromThePartition creates a domain in cn-north-1 and
asserts the endpoint ends in .amazonaws.com.cn.
2026-09-24 12:04:44 -04:00