Commit Graph
3500 Commits
Author SHA1 Message Date
Goooooooooody 90c55114f9 fix(appconfig): resolve AppConfigData identifiers by name as well as ID (#4661)
* fix(appconfig): resolve AppConfigData identifiers by name as well as ID

StartConfigurationSession looked the application, environment and profile
up by ID only. AWS accepts either, and the AppConfig agent and Lambda
extension are normally given names, so they got ResourceNotFoundException
against Floci. Resolve each identifier by ID first, then by name.

* fix(appconfig): prefer an exact ID over a name and skip nameless resources

Resolve each AppConfigData identifier with a direct ID lookup first (kept
within the parent application), so an ID is never shadowed by another
resource's name and legacy unprefixed keys stay reachable; only a miss
scans by name, and the name match is null-safe.

* fix(appconfig): answer a missing session identifier with ResourceNotFoundException

An omitted or null Application, Environment or ConfigurationProfile
identifier reached the name fallback and threw a NullPointerException.
It now returns ResourceNotFoundException, as the direct lookups did.

* style(appconfig): brace the null-identifier guards

* fix(appconfig): reject a missing session identifier with BadRequestException
2026-09-29 16:49:27 -04:00
Sam Fakhreddine e6d22e8bcf fix(lambda): validate enum and pattern-constrained request fields (#4611)
* fix(lambda): validate enum and pattern-constrained request fields

CreateFunction, UpdateFunctionConfiguration, PublishLayerVersion, the event source mapping calls, and the function URL calls now reject values outside the botocore Runtime/Architecture/FunctionResponseType/FunctionUrlAuthType/InvokeMode enums and the Role/Handler/KMSKeyArn/LayerVersionArn/Alias/Arn patterns (including AWS-managed awslayer ARNs and eusc- regions), and ListEventSourceMappings honors its EventSourceArn filter. Constraint failures use ValidationException, matching the existing pattern checks in LambdaArnUtils.

* fix(lambda): validate KMSKeyArn on update, alias names, event source ARNs, and PackageType

Adds KMSKeyArn pattern on UpdateFunctionConfiguration, alias name pattern and length on Create/UpdateAlias, EventSourceArn pattern on CreateEventSourceMapping, and PackageType enum on CreateFunction.

* fix(lambda): accept every botocore NamespacedFunctionName in ListEventSourceMappings

Add eusc- region, dotted names and $LATEST.PUBLISHED to the function name pattern.

* fix(lambda): reject non-list members and validate before mutating on update

UpdateFunctionUrlConfig now validates AuthType and InvokeMode before applying
either, so a rejected request leaves the stored config unchanged. A non-list
Layers, CompatibleRuntimes or CompatibleArchitectures is a SerializationException
instead of being read as absent. Get and DeleteFunctionUrlConfig enforce the
FunctionUrlQualifier constraint, UpdateFunctionConfiguration enforces the 256
character Description limit, and an empty or missing alias name is rejected.
2026-09-29 16:07:56 -04:00
vamsiakandVamsi Akavarapu 0383ecf53e fix(apigateway): resolve AWS variables on REST import (#4547)
* fix(apigateway): resolve AWS variables on REST import

* fix(apigateway): preserve OpenAPI mapping templates

* fix(apigateway): resolve imported authorizer variables

* chore(ci): retry Docker Hub limited tests

* fix(apigateway): resolve import variables across definitions

* test(apigateway): cover variable imports with AWS SDK

* refactor(apigateway): remove unused import validation region

* style(apigateway): sort OpenAPI parser import

* fix(apigateway): preserve imported authorizer merge behavior

---------

Co-authored-by: Vamsi Akavarapu <16164447+vamsiak@users.noreply.github.com>
2026-09-29 15:32:17 -04:00
Mario Toffia 86c4904bcc fix(ssm): resolve Secrets Manager references in GetParameter (#4581)
* fix(ssm): resolve Secrets Manager references in GetParameter

GetParameter and GetParameters now answer
/aws/reference/secretsmanager/<secret-id>[:<version-id-or-label>] from
Secrets Manager, with the checks, error texts and response fields
measured against AWS: WithDecryption must be true, a missing secret is
ParameterNotFound, and GetParameters lists a reference it cannot answer
in InvalidParameters. ECS task secrets and CodeBuild parameter-store
variables read through the same path; a CloudFormation
AWS::SSM::Parameter::Value<String> parameter still refuses one, as on AWS.

* fix(ssm): check secretsmanager:GetSecretValue on a Secrets Manager reference

AWS reads /aws/reference/secretsmanager/ with the caller's own
secretsmanager:GetSecretValue, checked before the secret is looked up.
With IAM enforcement on, a caller allowed only ssm:GetParameter now gets
the ValidationException AWS sends, and GetParameters fails as a whole.

* fix(ssm): authorize a Secrets Manager reference on the secret's ARN

A grant on a secret's exact ARN, which CDK grantRead and a CloudFormation
Ref produce, did not match the suffix-less name ARN, so an allowed caller
was refused. The check now uses the secret's ARN and falls back to the
name only when the secret does not exist.

* fix(ssm): check a Secrets Manager reference's value on the secret it came from

The value is read by name after the check, so a secret force-deleted and
recreated in between was returned on the old secret's grant. The ARN of
the secret actually read is now checked too.

* fix(ssm): read a Secrets Manager reference's value from the secret it described

* docs(ssm): note the partial-ARN fallback a Secrets Manager reference read leaves

* fix(ssm): return SourceResult on a Secrets Manager reference

* fix(ssm): reject a malformed Secrets Manager reference before checking IAM

* chore(ssm): sort SsmService imports
2026-09-29 14:57:11 -04:00
Abhigya 014156a546 fix(ecs): register reachable task addresses in Cloud Map and bound synthesised ENI addresses (#4509)
* fix(ecs): register reachable task addresses in Cloud Map and bound synthesised ENI addresses

ECS service discovery registered an awsvpc task's ENI address, but task
containers never join the subnet's network, so peers resolved a name and
then timed out. Register the address the task container holds on its
Docker network instead, falling back to the ENI address only when there
is no running container.

The synthesised private-address fallback in EC2 counted past the subnet
CIDR (10.70.1.549) and restarted at .10 on every boot. It now allocates
inside the subnet CIDR, skips the AWS-reserved addresses and every address
a persisted ENI, instance or NAT gateway still holds, and reports
InsufficientFreeAddressesInSubnet when the subnet is full.

* fix(ec2): hold the synthesised-address lock until the resource is persisted

The allocator chose a free address under its lock but released it before the
network interface, instance or NAT gateway holding the address was stored, and
it decides what is free from stored resources. Two concurrent creates could
both take the same address, most visibly at the end of a /28 where the cursor
clamps back onto the last one handed out.

A dedicated lock now covers allocation through persistence at each caller:
CreateNetworkInterface, CreateNatGateway and the RunInstances loop, where it
is taken inside imageRegistryLock.

* fix(ecs): advertise the container port for an awsvpc task registered at its container address

* docs(ecs): state which Cloud Map address and port each network mode registers

* fix(ecs): look for stale Cloud Map instances at an awsvpc task's container address

The registrar registers an awsvpc task at the address its container holds on
its Docker network, but the eviction from #4513 resolved the task's addresses
through resolveContainerHost, which is 127.0.0.1 when Floci runs natively, so a
stale instance at the container address was never found. Load balancer target
eviction is unchanged, since targets are still registered through
resolveContainerHost.

* refactor(ec2): nest the address allocation lock visibly inside runInstances

Scope privateIpAllocationLock to the instance-building loop, the only part that
allocates and persists addresses, and indent it under imageRegistryLock.

* fix(ec2): allocate a launch's addresses before storing any of its instances

A RunInstances larger than the subnet's free addresses failed with
InsufficientFreeAddressesInSubnet only after the instances that fit had been
stored with their root volumes. The launch now allocates every address first,
counting the ones it has already picked as taken, and releases any Docker
leases it took when the subnet runs out.
2026-09-29 14:36:28 -04:00
Simone Primarosa b2d668d9ae fix(eks): stop mirroring cluster audit logs to the Floci console (#4589)
* fix(eks): stop mirroring cluster audit logs to the Floci console

* docs(eks): clarify audit stream console flag

* fix(eks): scope console flag to audit exec stream

* test(eks): reuse shared log capture helper
2026-09-29 14:27:48 -04:00
Aniket Shukla ef08877837 fix(eks): isolate capacity backups from live clusters (#4663) 2026-09-29 14:25:29 -04:00
XuJian 78c06239be feat(sns): support SMS account preferences (#4597)
* feat(sns): support SMS account preferences

* fix(sns): include result element in SetSMSAttributes response

* fix(sns): validate SMS sender IDs and cover JSON updates

* refactor(sns): centralize SMS preference storage key
2026-09-29 14:20:34 -04:00
TiM 18ef1f58e9 fix(s3): honour If-Match on DeleteObject and the ETag element on DeleteObjects (#4526)
* fix(s3): honour If-Match on DeleteObject and the ETag element on DeleteObjects

A conditional delete was ignored: DeleteObject with a stale If-Match answered
204 and deleted the object, and a DeleteObjects entry carrying a stale <ETag>
was reported under <Deleted> and removed. S3 treats both as preconditions.

The precondition is evaluated against the current version of the key, as S3
documents, including when versionId addresses an older version. A matching
ETag (or *) proceeds; a mismatch answers 412 PreconditionFailed and leaves the
object in place; a missing key or a current delete marker answers 404 NoSuchKey.
In DeleteObjects each entry is checked on its own and a failure is reported
under <Error> while the rest of the batch proceeds.

The check runs under the bucket monitor that PutObject's conditional write
already holds, so an overwrite cannot land between the check and the delete.

* fix(s3): require s3:GetObject for a conditional delete by ETag

An ETag condition on DeleteObject, or an <ETag> element in DeleteObjects,
tells the caller whether the object still has that ETag, so S3 requires
s3:GetObject alongside s3:DeleteObject for it. The If-Match: * existence
check needs only s3:DeleteObject. DeleteObjects reports a refused entry
under <Error> as AccessDenied and deletes the rest.

* fix(s3): require s3:GetObject for an ETag-conditional delete under IAM

The bucket-policy check added earlier left the IAM identity-policy layer
alone, so an IAM user allowed s3:DeleteObject but not s3:GetObject could
still delete by ETag. IamEnforcementFilter now authorizes that read for a
DeleteObject whose If-Match is an ETag, the way it already does for a
conditional PutObject. If-Match: * still needs only s3:DeleteObject.

* fix(s3): limit the IAM conditional-delete read to DeleteObject

AbortMultipartUpload is also a DELETE on an object key filed under
s3:DeleteObject, and it has no object ETag to compare, so an If-Match on it
must not ask for s3:GetObject. The read is now required only when the DELETE
carries no subresource besides versionId.

* fix(s3): skip the IAM delete read only for routed subresources

Allowing only versionId as a query key let any other parameter bypass the
check, including the x-id=DeleteObject SDKs add and the X-Amz-* parameters of
a presigned URL, while the controller still handled the request as a
conditional DeleteObject. The read is now skipped only for the subresources
S3Controller routes elsewhere: uploadId, tagging and annotation.

* style(s3): import XmlPath in the conditional-write test

* docs(s3): record why a delete marker answers 404 on a conditional delete

The conditional-deletes guide says 412, real S3 answered 404 when measured. The comment keeps the next reader of the guide from flipping it back.
2026-09-29 11:44:08 -04:00
XuJian 95cbe7de34 feat(appsync): execute VTL pipeline resolvers on sidecar (#4586)
* feat(appsync): execute VTL pipeline functions

* fix(appsync): validate VTL functions before early return
2026-09-29 11:36:27 -04:00
TATSUNO “Taz” Yasuhiro 1465251e0c fix(dynamodb): reject a request member of the wrong JSON type (#4636)
* chore(dynamodb): vendor the input shapes of botocore's DynamoDB model

tools/aws/regen_dynamodb_shapes.py keeps each operation's input shape and
the type of every shape it reaches, from the pinned botocore release.
make aws-data-sync regenerates it and make aws-data-check keeps it in sync.

* fix(dynamodb): reject a request member of the wrong JSON type

DynamoDB answers a member of the wrong JSON type with a
SerializationException before it runs the operation, such as
"NUMBER_VALUE cannot be converted to String" for a number BillingMode or
IndexName. The message names the JSON token and the Java type, or says
"Unexpected field type", "Unexpected value type in payload",
"Start of structure or map found where not expected" or "UnknownError"
by where the value sits. The first bad member in body order is reported.
A JSON null counts as absent and an unknown member is ignored.

Floci now checks every DynamoDB JSON request against the vendored input
shapes. A number in an ExclusiveStartKey S value is one of these errors on
AWS, so that test now expects the SerializationException.

* fix(dynamodb): keep provenance out of the shapes freshness check

The shapes file now carries its provenance in a _source block, like the
other vendored AWS data, and --check compares it without that block. A
run against --botocore-data or a local checkout no longer reports the
file as stale when only the botocore label differs.
2026-09-29 11:18:40 -04:00
Aniket Shukla 33617e340d fix(iam): match condition values case-sensitively (#4672)
* fix(iam): match condition values case-sensitively

* chore(ci): retry transient registry pull failure
2026-09-29 11:05:26 -04:00
Aniket Shukla 970bdf2e54 fix(iam): return protocol-correct access-denied statuses (#4673)
* fix(iam): return protocol-correct access-denied statuses

* chore(test): alphabetize IAM enforcement imports
2026-09-29 10:52:39 -04:00
Aniket Shukla 9ae71eceda fix(rds): recover metadata after backend startup failures (#4532)
* fix(rds): recover metadata after backend startup failures

* fix(rds): restore control-plane and member retry relays

* fix(rds): isolate member relay recovery failures

* fix(rds-data): retry member relays for running clusters

* fix(rds-data): avoid locking healthy cluster resolution
2026-09-29 08:08:43 -04:00
Abhigya e8b768382a fix(lambda): apply FunctionResponseTypes on UpdateEventSourceMapping (#4584)
* fix(lambda): apply FunctionResponseTypes on UpdateEventSourceMapping

UpdateEventSourceMapping ignored FunctionResponseTypes, so turning
ReportBatchItemFailures on or off for an existing mapping succeeded but
changed nothing: GetEventSourceMapping kept the old list and the pollers
kept retrying whole batches. Apply the member when present, sharing the
create path's parsing; an empty list clears it.

* fix(lambda): validate FunctionResponseTypes on event source mappings

AWS accepts at most one FunctionResponseTypes entry, and only
ReportBatchItemFailures. Reject anything else with
InvalidParameterValueException on both CreateEventSourceMapping and
UpdateEventSourceMapping instead of storing it.

* fix(lambda): validate every UpdateEventSourceMapping member before applying any

A request that failed on a later member (FunctionName in another region,
empty Topics) still changed the members parsed before it on the stored
mapping, which the pollers share. A JSON null FunctionResponseTypes is now
an absent member, and a non-array value is a SerializationException rather
than silently clearing ReportBatchItemFailures.

* fix(lambda): honour ReportBatchItemFailures on Kinesis event source mappings

The Kinesis poller checkpointed the whole batch after a successful invoke,
so records the function reported in batchItemFailures were never retried.
It now checkpoints just before the lowest reported record and retries the
whole batch on a malformed response, matching the DynamoDB Streams poller.
2026-09-29 08:00:57 -04:00
Aniket Shukla 1d646c6fea fix(cloudwatch): retain metric-math alarm query definitions (#4594)
* fix(cloudwatch): retain metric-math alarm query definitions

* test(cloudwatch): use shared XML parser for alarm assertions
2026-09-29 07:42:52 -04:00
Langning Zhang cfc9a440c1 fix(apigateway): merge OpenAPI imports in PutRestApi (#4570)
* fix(apigateway): merge OpenAPI imports in PutRestApi

Signed-off-by: zhanglangning <zln1905391059@163.com>

* fix(apigateway): preserve authorization across API merges

Signed-off-by: zhanglangning <zln1905391059@163.com>

* fix(apigateway): preserve authorization across API merges

Signed-off-by: zhanglangning <zln1905391059@163.com>

* fix(apigateway): reject invalid PutRestApi modes

Signed-off-by: boulea7 <zln1905391059@163.com>

---------

Signed-off-by: zhanglangning <zln1905391059@163.com>
Signed-off-by: boulea7 <zln1905391059@163.com>
2026-09-29 07:37:44 -04:00
stodan 2ec5300029 fix(apigateway): drop the SigV4 Authorization header before REST integrations (#4567)
* fix(apigateway): drop the SigV4 Authorization header before REST integrations

API Gateway drops the inbound Authorization header on its way to a REST
Lambda or HTTP integration when the method is AWS_IAM, or on any method
when the header carries a SigV4 signature. Floci forwarded it into the
AWS_PROXY event and the HTTP_PROXY request, so a function serving both
Bearer-token users and IAM-signed services saw "AWS4-HMAC-SHA256 ..."
where AWS delivers no header at all.

X-Amz-Date, X-Amz-Security-Token and every other header still pass
through, a Bearer token on a non-IAM method is unchanged, and REQUEST
authorizer events keep the header. HTTP API (v2) is unchanged: AWS
documents no such stripping there.

* test(apigateway): cover method.request.header.Authorization mappings on AWS_IAM routes

* test(apigateway): fold the Authorization header tests into ProxyEventIamIdentityTest
2026-09-29 07:29:26 -04:00
Simone Primarosa 047d0d848c feat(eks): bound cluster containers and derive kubelet reservations (#4590)
* feat(eks): bound cluster node capacity and reserve kubelet resources

* fix(eks): use the large managed node pod cap

* fix(eks): preserve node capacity through restart failures and restores

* fix(eks): retain restored node until capacity replacement starts

* fix(eks): let concurrent node groups share user data execution

* fix(eks): finalize first node group after bootstrap

* fix(eks): retain restored replacement when backup cleanup fails

* fix(eks): stop live node before retrying backup cleanup

* ci: retry transient mqtt port collision

* fix(eks): preserve cluster API port during node capacity change

* test(docker): verify exec attach stream closes on timeout

* fix(eks): keep capacity backup names outside cluster namespace
2026-09-29 07:14:19 -04:00
mitsukado-shinagawaandmitsukado-shinagawa ac41ff339a fix(stepfunctions): bound a .sync Task by its TimeoutSeconds, not by a poll count (#4519)
* fix(stepfunctions): bound a .sync Task by its TimeoutSeconds, not by a poll count

A Task waiting on ecs:runTask.sync or states:startExecution.sync gave up
after 600 polls at 100 ms, about 60 seconds, whatever its TimeoutSeconds
said; that clock was read for a task-token wait alone. The deadline is
now computed once at schedule time and shared by awaitToken and both
.sync loops, which poll until it or the execution's budget fires. The
Task's clock ends the state as States.Timeout with a TaskTimedOut event
and no cause, the shape the token wait already used.

Closes #4518

* fix(stepfunctions): stop the job a timed-out .sync Task was waiting on

Measured on AWS: when a Task's TimeoutSeconds fires around an
ecs:runTask.sync or states:startExecution.sync, Step Functions stops
the ECS task (stopCode UserInitiated) or aborts the child execution,
both with the cause "The Task state in AWS Step Functions execution
[<arn>] which was managing this resource was aborted". Floci left the
job running. Best effort, like AWS: a job already gone is logged and
the timeout is still what the state reports.

* fix(stepfunctions): end a .sync wait on StopExecution and start its clock at schedule time

Review follow-ups on #4519. The Task's TimeoutSeconds is read before the
scheduled event is built, so a large input cannot extend it. A late wake
re-reads the execution's clock, so a spent budget ends the execution
TIMED_OUT rather than the Task. Both .sync loops read the execution back
each poll and, once StopExecution has marked it ABORTED, stop the job and
unwind without writing an event, instead of polling until a clock ran
out. Tests cover .sync:2 under a Catch on States.Timeout and the aborted
parent; the nested test imports its types.

* docs(stepfunctions): drop the two em dashes the .sync timeout change added

* chore(stepfunctions): let sleepOrTimeOutExecution delegate to sleepOrTimeOutTask

With no Task deadline (Long.MAX_VALUE) sleepOrTimeOutTask parks on the
execution's budget alone and ends the execution TIMED_OUT, which is
exactly what sleepOrTimeOutExecution did in its own copy.

---------

Co-authored-by: mitsukado-shinagawa <mitsukado-shinagawa@users.noreply.github.com>
2026-09-29 07:05:49 -04:00
Aniket Shukla 071a170ce9 fix(lambda): return current reserved concurrency in GetFunction (#4592)
* fix(lambda): return current reserved concurrency in GetFunction

* fix(lambda): omit concurrency for qualified GetFunction reads
2026-09-28 23:48:33 -05:00
XuJian 89344b76dc feat(appsync): authorize data source service roles (#4555)
* feat(appsync): authorize data source service roles

* test(appsync): verify service role at dispatch boundary

* fix(appsync): tighten service role authorization checks

* fix(appsync): honor IAM enforcement setting for data sources

* fix(appsync): adapt Lambda resolver test to authorizer dependency
2026-09-28 23:48:19 -05:00
Priamo Germosen aeb304d7b4 docs(iam): describe the list-violation value omission as a choice (#4626)
The javadoc on checkListLength said leaving the value out of a list
constraint violation matched how AWS reports one. That is not established:
captured violations elsewhere in AWS do quote the list, such as Lambda's
"Value '[x86_64, arm64]' at 'architectures'", and IAM's own are
inconsistent about it. The wording generalised the helper's existing
behaviour into a claim about AWS that nothing here verified.

The behaviour is unchanged and deliberate, so the comment now says it is
Floci's choice and gives the actual reason: a request that breaks the
limit should not echo every member back in the error message.

Comments only; the emitted message is byte-identical.
2026-09-28 23:39:09 -05:00
TATSUNO “Taz” Yasuhiro 3b70ce0827 perf(docker): trim docker-java reflection, 3 MB off the native image (#4625)
* perf(docker): register only the docker-java classes Jackson uses

The native image registered every docker-java class for reflection,
including the command interfaces, the command classes and their executors.
docker-java creates those with new, so the registration only kept code for
commands Floci never runs, like swarm, services and secrets.

Keep the model classes and the Jackson-annotated response, request body
and config file classes. Jackson reads and writes only these.

* perf(docker): register only the docker-java classes Floci's commands reach

Keep the model and Jackson-annotated classes reached from the Docker
commands Floci runs. This drops the swarm, service, secret, config, event
and image list models, and the request bodies of commands Floci never
sends.
2026-09-28 23:25:58 -05:00
Abhigya 451a30f98e fix(ecs): release stale task containers and registrations, and evict ones that would misroute a reused address (#4513)
* fix(ecs): release a previous run's task containers and registrations at startup

Task state is memory-only, so a restarted Floci knows no task and the
service scheduler starts a replacement for each service. A run that ended
without a graceful shutdown left its task containers serving beside those
replacements, and even a graceful one left their load balancer targets and
Cloud Map instances registered, so a dead task's target followed its
address to whichever container Docker handed it to next.

At startup, before the scheduler runs, ECS now removes the containers this
Floci owns (task containers now carry the floci_owner_port label EC2 and
the security-group helpers already use), deregisters the IP targets in each
service's target groups, and deregisters the Cloud Map instances its tasks
registered. The owner identity is computed by one shared helper.

* fix(ecs): release only the registrations ECS recorded, and retry failed container removal

The startup sweep recognised a previous run's load balancer targets by
their address shape and its Cloud Map instances by their ECS attributes,
so it also removed a target or instance registered by hand into the same
target group or Cloud Map service. Both registrars now persist each
registration they make, keyed by task ARN, drop the record on
deregistration, and at startup release exactly what was recorded.

Removing a leftover container now uses strict removal, and the result
says whether every leftover is gone. Until it is, each reconciliation
tick retries the sweep and starts no service task. The sweep only
considers containers created before this process started, so a retry
never touches a task this run launched.

* fix(ecs): tell a previous run's containers apart by run label, and record registrations before making them

The startup sweep kept every container created in the same second this process started, so a run killed within that second left an orphan the sweep reported as gone. Containers now carry a per-process floci.ecs-run label, also stamped on security-group helpers, and the sweep keeps only the current run's.

Target and Cloud Map registrations are now written to the ledger before they are made, so a process killed in between still leaves a record for the next run to release.

* fix(ecs): leave a target already in its group to whoever registered it

ELBv2 registration is idempotent, so a task whose address and port matched a target registered by hand adopted it: the ledger recorded it, and a task stop or the startup release then removed it. The registrar now skips and never records a target that is already registered.

* fix(ecs): deregister only the targets a task recorded when it stops

A task whose targets were all already in their groups records nothing, and its stop fell back to deregistering the targets its containers resolve to, removing the ones registered by hand. Every task this process knows went through the recording registrar, so the fallback now serves only a task without an ARN, which cannot be recorded.

* fix(ecs): retry the leftover sweep only when a service needs a task, and warn once

With Docker unreachable, the boot sweep failed and every 5 second tick then
logged two WARNs forever, even with no service to run. The retry now runs only
where a service is about to start a task, and both the sweep failure and the
blocked-launch message are WARNs the first time and DEBUG after.

* fix(ecs): log a repeated blocked service launch at DEBUG

* fix(ecs): retry the leftover sweep before RunTask and StartTask launches too

A task started through RunTask or StartTask no longer bypasses a failed sweep:
the common launch path retries it and stops the task with TaskFailedToStart
while a previous run's containers remain. Sweep failures are tracked per kind,
a failed listing and each container that would not go, so a new failure is
still a WARN after an earlier one cleared.

* fix(ecs): evict unrecorded registrations at a starting task's address, and adopt its own target

A target already in its group when a task started was skipped and never recorded, so a registration no task recorded, as one a Floci version without the ledger made, survived every task stop and restart. When a task of the same service came up on its address it left it in place, and when another service's task took the address the target or Cloud Map instance routed the first service's traffic to it.

A target at the task's own address and port is now recorded as the task's, so its stop deregisters it, as ECS does on AWS. When a task starts, every target and Cloud Map instance at one of its addresses that no live task recorded is deregistered from the target groups and Cloud Map services the region's ECS services name, with a warning. A loopback address matches only on the task's host ports.

* fix(ecs): evict only registrations that actually point at a starting task

The eviction matched every unrecorded target at any of a task's addresses on any port, including its ENI address. ECS registers no target at the ENI address, and an ENI address is unique only within its VPC, so an IP target for something in another VPC could be removed; a target on a port the task does not publish sends it nothing either.

Targets are now matched only at a container's Docker address on the ports its bindings declare. Cloud Map instances still match a container address on any port, since a DNS answer carries none, and match the ENI address only in a namespace of the task's own VPC.
2026-09-28 23:25:48 -05:00
Priamo Germosen 0232d5d224 fix(codeartifact): treat identical-content asset republish as idempotent (#4619)
PublishPackageVersion silently overwrote a generic-format asset's stored
bytes whenever the same asset name was republished to an Unfinished
package version, with no comparison against what was already there. AWS's
own docs ("Overwriting package assets" in the CodeArtifact packages
overview) say a republish is only rejected when the content actually
differs from what's already stored; byte-identical content succeeds
idempotently. Compares the new upload against the existing asset's real
bytes (read the same way GetPackageVersionAsset does, not the in-memory
PackageAsset.content field, which is @JsonIgnore and unreliable after a
reload) and now returns ConflictException on a genuine mismatch instead of
silently replacing the content.
2026-09-28 22:58:39 -05:00
Hyun Lee 1ea5a865e3 fix(cloudformation): keep unchanged AWS::ApiGateway::Resource on update and remove it on delete (#4511)
* fix(cloudformation): keep unchanged AWS::ApiGateway::Resource on update and remove it on delete

UpdateStack runs provision again for every resource, and the Resource
arm called CreateResource unconditionally. For a resource whose
RestApiId points at an API outside the stack, the second CreateResource
under the same parent failed with "Another resource with the same
parent already has this name" and the update rolled back.

The delete side had the same gap. Only AWS::ApiGateway::RestApi had a
delete, relying on its cascade, which never runs when the API is not
part of the stack. DeleteStack left the stack's resources and methods
on the API, and deploying the stack again failed with the same error.

- Resource: RestApiId, ParentId and PathPart are all createOnly, so an
  update that keeps them keeps the resource. A changed one creates the
  replacement and then removes the old resource. The API a resource was
  created on is recorded with it, since a resource id alone does not
  name its API, and DeleteStack removes the resource from that API.
- Method: DeleteStack removes the method named by its physical id. An
  update that changes RestApiId, ResourceId or HttpMethod removes the
  method it replaced.

* fix(cloudformation): leave replaced API Gateway resources to stack cleanup

A Resource or Method whose createOnly properties changed deleted the
entity it replaced while the update was still running. When a later
resource failed, the rollback could not bring it back, and
UpdateReplacePolicy: Retain was ignored.

The displaced entity is now recorded with ReplacementCleanup, like the
other provisioners that replace: it is deleted in the cleanup after
the update commits, kept under Retain, and a rollback deletes the
replacement and restores the previous physical id.

Deleting a method split its physical id on hyphens, which named the
wrong method when the HTTP method itself had one. Resources and methods
now record their API, resource and HTTP method keyed by physical id,
and every delete path uses that record. Splitting the id is kept only
for methods provisioned before the record existed.

* fix(cloudformation): report nothing to roll back for an unchanged API Gateway resource

When an update kept an AWS::ApiGateway::Resource and a later resource
failed, rollbackUpdate returned false because no replacement had been
recorded. The rollback walker then reported "Rollback is not
implemented" for the resource, and the stack ended in
UPDATE_ROLLBACK_FAILED although nothing about it had changed.

RestApiId, ParentId and PathPart are all createOnly, so an update that
kept the resource's physical id left it untouched, and rollback now
reports success for it without calling the API.

AWS::ApiGateway::Method is unchanged: an update rewrites its method,
integration and responses in place, and rolling back an in-place
update belongs with the broader work in #4385.
2026-09-28 22:55:14 -05:00
Mario Toffia c326dce977 feat(dynamodb): optional DynamoDB Local backend (#4504)
* feat(dynamodb): add the external Local operation client

Adds DynamoDbLocalClient, which forwards DynamoDB and DynamoDB Streams
wire calls to an external DynamoDB Local over SigV4-signed HTTP/1.1.
The caller's account becomes the access key and its region the signing
region, so Local keeps each account and region apart. Requests are
never retried.

Reply.successBody now owns the AWS error body conversion, which the
API stream reader reuses.

* feat(dynamodb): add the DynamoDB Local backend

Adds DynamoDbLocalBackend, a DynamoDbBackend that forwards every wire
call to an external DynamoDB Local through DynamoDbLocalClient.

- Namespaces: the caller's account and region select the Local
  namespace; table and stream ARNs from another account or region are
  rejected.
- Identities: table, index and stream ARNs in replies are rewritten
  from Local's fixed ddblocal shape to public ARNs, and stream records
  carry the caller's region.
- Metadata: tags live in a Floci store because Local keeps none;
  replica updates are refused; a global table is its single-region
  table; stream enable and disable are idempotent like native.
- Lifecycle: startup waits up to 30s for Local to accept connections,
  and emulator resets are refused because the data lives outside
  Floci.

DynamoDbBackend groups the four seam interfaces so one object is the
whole engine.

* feat(dynamodb): enable the optional Local backend

floci.services.dynamodb.backend selects the engine: native (default)
or local, which forwards to the DynamoDB Local at local-endpoint.
Both engines are client proxies, so the unselected one is never
constructed. With local selected, the stream reader keeps checkpoints
for the life of the stream, and /_floci/info reports the backend in
dynamodb_backend.

DynamoDbLocalBackendIntegrationTest runs against a real DynamoDB Local
when FLOCI_SERVICES_DYNAMODB_LOCAL_ENDPOINT is set.

* docs(dynamodb): document the DynamoDB Local backend

* fix(dynamodb): harden the Local backend endpoint check, stream paging and startup probe

Reject AWS endpoints in every partition, with a trailing dot, and endpoints with user info.
Translate ListStreams paging ARNs, retry any I/O failure until the startup deadline, and
call DescribeTable outside the tag lock.

* fix(dynamodb): tighten Local ARN ownership, batch table names and global TableId

A table ARN of another account or partition is ResourceNotFoundException, a stream ARN of
another partition is refused, and a batch naming one table twice is a ValidationException
instead of a dropped entry. A global table on Local has an empty TableId instead of a random
one. Document the Resource Explorer limit.

* fix(dynamodb): mark the Local readiness probe region as partition-invariant

* test(dynamodb): pin the table record of an untagged typed Local create

* docs(dynamodb): state the Local readiness bound and stack delete protection

* fix(dynamodb): lift deletion protection on the Local direct delete and cap the readiness probe

- DynamoDbTableAccess.deleteTable is the direct engine delete with no
  deletion-protection check. The Local backend now clears
  DeletionProtectionEnabled before DeleteTable, so CloudFormation deletes
  behave the same on both backends. The wire DeleteTable still enforces it.
- Each readiness probe is bounded by the remaining 30 second budget and never
  exceeds the configured request timeout, so startup fails within the budget.

* fix(dynamodb): align Local tag errors with the native wire path

- ListTagsOfResource on a missing table is AccessDeniedException, as on the
  native wire path.
- A table ARN whose partition is not an AWS partition is a
  ValidationException instead of a foreign resource.
- Tag operations report a table ARN of another region as
  ResourceNotFoundException, as native does; TableName fields keep the
  region-mismatch ValidationException.
- Document which regions Resource Explorer searches, and note that a failed
  direct delete leaves deletion protection off.

* docs(dynamodb): state the tested DynamoDB Local version
2026-09-28 22:54:00 -05:00
Hector Ventura 833a43bfa7 feat(core): vendor the per-region hosted zones, SAML URLs and VPC endpoint prefixes (#4545)
* feat(core): vendor the per-region hosted zones, SAML URLs and VPC endpoint prefixes

tools/aws/regen_region_facts.py transcribes the per-region and per-partition constants AWS publishes only as prose tables into src/main/resources/aws/region-facts.json: the Terraform provider's load balancer and S3 website hosted-zone maps, the CloudFront hosted zone per partition (cross-checked against the CDK), and the CDK's SAML sign-on URLs and VPC endpoint service-name exceptions. AwsRegionFacts serves them, as Optionals where a partition publishes nothing (the ISO and EUSC partitions have no hosted zones). make aws-data-check regenerates and compares where the local reference checkouts exist, and verifies the file's shape where they do not.

Behaviour this changes: network load balancers report their own hosted zone per region instead of the Application one, Classic and Application load balancers report their region's zone, API Gateway EDGE domains carry the CloudFront zone of their partition, SAML assertions are checked against the sign-on URL of the provider's partition, and the AWS-managed S3 and DynamoDB prefix lists carry the partition's service-name prefix.

Also carries the follow-ups from the #4494 review: bucketRegionForCreate cites the S3 model for the us-east-1 rules, docs/services/s3.md gains a Bucket Regions section, and the Marketplace files are gated per line with stated reasons instead of being allowlisted by path, so a new region literal there is caught.

Part of #4272

* fix(core): harden the region facts against restarts, partitions without CloudFront, and CI without sources

The source-free data check rejected real twelve-character hosted zone ids such as ap-southeast-1's NLB zone ZKVM4W9LS7TM, which failed the vendored-data job. It now accepts Route 53's id length range and checks substance: every partition has an entry whose VPC endpoint prefix is its reversed DNS suffix, every region is published in partitions.json, SAML URLs are https sign-on URLs, and unknown fields are refused.

Load balancers restored from storage take the hosted zone of their region and type again, so balancers stored before the per-region lookup stop reporting the old fixed zone. An EDGE API Gateway custom domain is refused where the partition has no CloudFront, since it would have no distribution zone to alias to. A customer prefix list may not take the prefix of the AWS-managed lists its region carries, cn.com.amazonaws. in China. The partitions doc now says which ISO hosted zones exist.

* fix(core): hold only a changed endpoint type to the partition, and name malformed region facts

UpdateDomainName checked the partition for EDGE on every patch, so an EDGE custom domain stored in GovCloud before the rule could no longer take a certificate or security-policy update; only a patch that changes the endpoint type is held to the partition now. The source-free region-facts check reports a partition or region entry that is not an object by name instead of failing with a traceback, and its test asserts on computed results rather than on calls that write the fixture.

* fix(core): keep gateway endpoint names on com.amazonaws, allow EDGE only in the commercial partition, and keep SAML working where no sign-on URL is published

The AWS-managed prefix lists belong to the S3 and DynamoDB gateway endpoints, which the CDK names com.amazonaws.<region>.<service> in every partition (GatewayVpcEndpointAwsService); the reversed-suffix table applies to interface endpoints only. The managed lists are back to that name and the cn.com.amazonaws. reservation is gone; DescribeVpcEndpointServices now names the interface services through the table instead, keeping the S3 gateway entry on com.amazonaws.

Edge-optimized API Gateway exists only in the commercial partition: China has CloudFront but no edge-optimized APIs or domains (its API Gateway documentation says so), so EDGE custom domains are refused everywhere else. Where the CDK publishes no SAML sign-on URL (aws-iso-e, aws-iso-f, aws-eusc) assertions keep being checked against the commercial URL, as every partition was before, instead of all being refused. applyEndpointType has its javadoc back.
2026-09-28 23:52:35 -04:00
Abhigya 0a786207d6 fix(lambda): return event source mapping ARN and support tagging mappings (#4587)
* fix(lambda): return event source mapping ARN and support tagging mappings

CreateEventSourceMapping now stores Tags, every mapping response carries
EventSourceMappingArn, and TagResource/ListTags/UntagResource route
event-source-mapping ARNs to the mapping instead of rejecting them as
non-function ARNs.

* fix(lambda): address review on event source mapping ARN and tags

- CloudFormation builds EventSourceMappingArn from the region and account
  the mapping is stored in, not the stack's, so it matches Lambda's ARN.
- TagResource rejects a non-object Tags or a non-string tag value with
  SerializationException instead of persisting it.
- The tag APIs match a mapping ARN exactly, so an ARN in another partition
  is reported as ResourceNotFoundException.
- Explain the tolerated teardown failures in LambdaEsmTagsTest.
2026-09-28 23:43:54 -04:00
GoooooooooodyandGoooooooooody 76f8c09341 fix(docker): make the Docker client pool size configurable, default 1024 (#4276)
The shared DockerClient's connection pool was hard-coded to 100. Each live
Lambda container holds two of those connections for its whole lifetime
(the followed log stream and the exit watcher), so about 50 warm
containers exhaust the pool. Create, start, stop and remove then wait for
a free connection, including the idle-container stop that would release
one, and the emulator stalls.

Expose the size as floci.docker.max-connections
(FLOCI_DOCKER_MAX_CONNECTIONS), reject values below 1, and default it to
1024 so that the 500-port Lambda runtime API range, not the Docker pool,
is the ceiling on concurrent Lambda containers.

Refs #2219, #2224

Co-authored-by: Goooooooooody <205637002+Goooooooooody@users.noreply.github.com>
2026-09-28 22:04:05 -05:00
Priamo Germosen 240fd865f0 fix(iam): match IAM's constraint-violation message shape (#4613)
The MaxItems and ServiceNamespaces validation messages added in #4543 did
not read the way IAM's do. AWS leads with the error count, quotes the
offending value, and names only the bound that was actually broken, so a
MaxItems of 1001 says "Member must have value less than or equal to 1000"
and nothing about the minimum.

Both messages now go through the helpers this handler already had for that
shape. tagValidationError builds the scalar form, so it is renamed
validationError now that it serves more than the tag paths, and MaxItems
reports whichever side of the range it fell outside rather than reciting
both. checkListLength builds the list form, which deliberately does not
quote the value, and takes its limit as an argument so ServiceNamespaces
can use it instead of echoing 201 namespaces back in an error message.

The tests asserted only that the response contained "ValidationError",
which is what let the wrong shape through in the first place. They now
assert the whole message, on the parsed Error.Message element rather than
the raw body, since the XML escapes the quotes AWS puts around the value.
2026-09-28 22:02:28 -05:00
Priamo Germosen 26146a3f94 feat(iam): expand wildcard service grants against a vendored namespace catalog (#4544)
GetServiceLastAccessedDetails reports the services an entity can reach, but
a grant that names no namespace could not be expanded: "Action": "*", a
globbed prefix such as s3*, and any NotAction all denote a set no policy
document spells out. A user holding only AdministratorAccess came back with
an empty report. Closes #4487.

The list of namespaces is vendored in aws/iam-service-namespaces.json and
generated by tools/aws/regen_service_namespaces.py from AWS's Service
Reference Information index, whose per-service "service" field is the IAM
namespace itself. botocore is deliberately not the source, even though every
other vendored file here comes from it: a namespace is not any botocore
field, since CloudWatch's endpointPrefix is monitoring and its serviceId is
CloudWatch against an IAM namespace of cloudwatch. A rule over botocore
metadata is wrong for some service, and a wrong namespace is worse than a
missing one because it names something IAM does not have.

That index is a live endpoint rather than a pinned dependency, so unlike
regen_partitions.py a fresh generation is not byte-identical and byte
equality is the wrong gate. What must be guaranteed is that nothing in the
file is invented, which is checked directly: make iam-namespaces-check
validates the file's shape offline, and make iam-namespaces-verify checks
online that every namespace in it still exists upstream, failing on one that
does not. Services AWS has added since the last sync are reported without
failing, since the file being behind makes the report incomplete rather than
wrong.

A namespace a policy names outright is kept whether or not the catalog knows
it, so a catalog trailing an AWS launch still reports an explicitly named
service; only wildcard expansion depends on it being current. A globbed
prefix now expands to the namespaces it matches rather than being treated as
every service and then dropped.
2026-09-28 22:02:13 -05:00
Abhigya b830ade6cd fix(elbv2): scope SetRulePriorities conflicts to the rule's listener (#4507)
* fix(elbv2): scope SetRulePriorities conflicts to the rule's listener

SetRulePriorities rejected a priority held by any rule in the region, so a
rule on one load balancer could not move to a priority used on another. AWS
scopes rule priorities to a listener ("A listener can't have multiple rules
with the same priority"), as CreateRule already did here.

Conflicts are now checked per listener, against that listener's rules that
are not part of the request. Two rules of the same listener given the same
priority in one request now fail with PriorityInUse instead of both being
applied.

* test(elbv2): keep SetRulePriorities compatibility tests in execution order

* fix(elbv2): check SetRulePriorities collisions against the concurrent rule map

The listener index lists are plain ArrayLists that CreateRule and DeleteRule
mutate without a lock, so iterating them could throw
ConcurrentModificationException. Iterate the region's ConcurrentHashMap and
filter by listener instead.
2026-09-28 22:46:06 -04:00
Abhigya e1cc7439f6 fix(elbv2): tunnel WebSocket upgrades to instance and ip targets (#4517)
* fix(elbv2): tunnel WebSocket upgrades to instance and ip targets

The ALB data plane stripped Connection and Upgrade as hop-by-hop headers and
proxied a WebSocket handshake as a plain request, so the target answered it as
a non-upgrade (typically 400) and socket.io clients stayed on long-polling.

Forward the handshake with its upgrade headers, relay the target's 101, then
tunnel bytes both ways until either side closes or the load balancer's
idle_timeout.timeout_seconds passes with no data. A target that refuses the
upgrade has its answer relayed unchanged. Upgrades to Lambda targets are
rejected with 400, as AWS does.

Closes #4516

* fix(elbv2): bracket IPv6 target literals in the proxied Host header

Covers WebSocket upgrades to instance targets as well.
2026-09-28 22:36:42 -04:00
Kenshin Okinaka 673c8838cf refactor(ses): model SES sends as an envelope plus content, like the v2 SDK (#4529)
* refactor(ses): model SES sends as an envelope plus content, like the v2 SDK

The five SES send methods took up to 15 positional parameters, and every
new send field cascaded through all of them and their callers. Sends now
follow the v2 SDK shape: a SendEmailRequest envelope carrying a sealed
EmailContent (Simple, Template, InlineTemplate or Raw), and a
SendBulkEmailRequest for bulk. SesService exposes sendEmail, which
switches on the content, and sendBulkEmail.

The controllers keep their validation, error codes and tenant gates;
each maps its wire input onto the envelope and picks the content
variant. The request always carries the content being sent: rendering
and header sanitizing rebuild it rather than holding a second copy.

No wire behaviour changes.

* refactor(ses): share the recipient join between the request and MIME headers
2026-09-28 21:40:58 -04:00
XuJian 11b762d08b fix(appsync): send VTL Lambda payload to function (#4579)
* fix(appsync): pass JS Lambda request envelope to function

Signed-off-by: xujiantop-crypto <265865031+xujiantop-crypto@users.noreply.github.com>

* fix(appsync): send VTL Lambda payload to function

---------

Signed-off-by: xujiantop-crypto <265865031+xujiantop-crypto@users.noreply.github.com>
2026-09-28 21:25:53 -04:00
TATSUNO “Taz” Yasuhiro dad5648b7b fix(dynamodb): validate GSI and LSI index names like AWS (#4601)
AWS checks IndexName on CreateTable GSIs and LSIs and on every UpdateTable
GSI Create, Update and Delete. It must be present, match [a-zA-Z0-9_.-]+
and be 3 to 255 characters long. The error names the member path, lists
the pattern error before the length error, and comes before the table
lookup. Floci accepted any name, and a malformed name on Update or Delete
was reported as a missing index.
2026-09-28 21:19:53 -04:00
Vũ Thế Huy 5ae46c2bd3 fix(ssm): support parameter selectors in GetParameter and align LabelParameterVersion with AWS (#4461)
* fix(ssm): support name:version and name:label selectors in GetParameter

- Support name:version and name:label selectors in GetParameter and GetParameters
- Resolve selector against parameter history copies without mutating stored parameters
- Validate labels in LabelParameterVersion per AWS spec (reject numeric and reserved labels)
- Return invalid labels in InvalidLabels response
- Synchronize labelParameterVersion and clone history entries to handle concurrent updates without in-place mutation
- Enforce 10-label maximum limit per parameter version
- Default to latest version only when ParameterVersion is omitted
- Guard against NPE and trailing colons in getParameter selector lookup

Closes #4396

* fix(ssm): enforce label validation constraints in LabelParameterVersion

- Reject empty labels and labels exceeding 100 characters with ValidationException
- Reject empty label lists and lists with more than 10 labels with ValidationException
- Update findSelectedVersion comment to reflect that labels are unique across versions
2026-09-28 21:07:46 -04:00
Vũ Thế Huy b8cae89a2d refactor(glue): extract shared Glue and Redshift role helpers (#4459)
* refactor(glue): move PartitionProjection from athena to glue package

PartitionProjection resolves Glue table partition layout, not Athena-specific
logic — Athena is only its current caller. Moving it into services/glue gives
the upcoming GlueTableResolver (Redshift Spectrum Phase 2) a home for it
without a glue-depends-on-athena layering inversion.

readPath and assertInjectedColumnsFiltered become public (their callers stay
in services/athena, a different package now); enabled/parameter stay
package-private since nothing outside the class uses them.

* refactor(glue): extract GlueTableResolver from GlueViewDdlBuilder

GlueViewDdlBuilder now delegates table-to-read-plan resolution (read function
inference, read expression, Iceberg detection, column projection) to a new
public GlueTableResolver, so Redshift Spectrum's Glue-backed external tables
can reuse the same logic Athena already proved correct.

* refactor(redshift): extract RedshiftRoleAccess from S3CopySimulator

COPY and UNLOAD's IAM role resolution and S3 authorization now live in a
standalone RedshiftRoleAccess, matching the existing ManifestReader
extraction pattern in this package, so Redshift Spectrum's Glue-backed
external schemas (IAM_ROLE-authorized reads) can reuse it instead of
duplicating role-session and policy-evaluation logic. Adds direct coverage
for the enforced-policy-denial path, which only had implicit
enforcement-off coverage before this extraction.

* fix(redshift): follow RedshiftRoleAccess in native init list and partition baseline
2026-09-28 18:51:53 -05:00
Clement 4001556a31 fix(elasticache): honor top-level user passwords and let ModifyUser change auth and access string (#4431)
* fix(elasticache): honor top-level user passwords and let ModifyUser change auth and access string

CreateUser read passwords only from AuthenticationMode, so a user created
with the top-level Passwords member (aws elasticache create-user --passwords)
was stored as no-password-required. ModifyUser ignored AuthenticationMode.Type,
NoPasswordRequired, AccessString and AppendAccessString, so a user's auth mode
and permissions could not be changed without deleting it.

Both actions now resolve authentication from AuthenticationMode or from the
top-level Passwords and NoPasswordRequired members, and reject contradictory
combinations with InvalidParameterCombination.

* test(elasticache): use explicit response types in the user auth compat test

* ci: re-run checks after a Docker Hub image pull rate limit

The previous run's shard 3 failed on 'toomanyrequests: Data limit exceeded' while pulling images for three ECS and core Docker integration tests. Nothing in this branch touches those paths.
2026-09-28 18:06:53 -05:00
Priamo Germosen 0f79cba0d9 fix(iam): apply the documented MaxItems and ServiceNamespaces limits (#4543)
The last-accessed readers accepted any MaxItems and treated an omitted one
as no limit at all, and ListPoliciesGrantingServiceAccess accepted any
number of service namespaces. The IAM API reference documents all three
bounds, so a client that pages against AWS saw different results here.

GetServiceLastAccessedDetails and GetServiceLastAccessedDetailsWithEntities
both state that the item count "defaults to 100" when MaxItems is omitted,
with a valid range of 1 to 1000. An omitted MaxItems now pages at 100 and
reports IsTruncated with a Marker rather than returning the whole report,
and a value outside the range is a ValidationError instead of being honored.
serviceNamespaceListType allows a maximum of 200 members, which is now
enforced alongside the existing minimum of 1.

The overflow guard on the page arithmetic stays even though the new ceiling
makes a value large enough to overflow unreachable, because the ceiling and
the offset are enforced in different places.
2026-09-28 17:24:48 -05:00
Priamo Germosen 585bad28c2 refactor(docker): share one helper for running a command in a container (#4505)
Ten container managers each carried their own copy of the docker exec
round trip: create the exec, attach a frame callback, wait for it, then
read the exit code. The copies disagreed on what a timeout returns, on
whether an attach-stream error throws, and on how output frames are
decoded.

ContainerExec now owns that round trip. MWAA, Flink, Timestream,
Redshift, RDS, EKS, both EC2 managers and the ECS credentials proxy call
it, and the four identical ExecResult records and three
ContainerExecResult variants give way to ContainerExec.Result. The seven
Docker integration tests that hand-rolled the same exec (EKS IMDS, IRSA,
pod identity, Route 53 and VPC route programming, EC2 volumes, RDS
Postgres) use it as well.

A timeout now returns exit code -1 with the output captured so far and a
"Timed out after Ns" note in stderr. MWAA, Flink and EKS still throw on a
timeout, through Result.throwIfTimedOut. Output is decoded once from the
collected bytes, so a multi-byte character split across frames survives,
and an interrupt keeps the thread's interrupt flag. The two EC2 managers
keep reporting a Docker error as a failed result, so an attach error on
one sshd path still falls through to the next. An interrupt is the
exception in Ec2ContainerManager: it still ends the setup step it hits,
as it did before, instead of being retried on the next sshd path.

The ECS credentials proxy's reachability probe waited on its exec with no
timeout at all. It now gives up after 10 seconds and treats that like any
other failed probe, retrying until its verify budget runs out.
2026-09-28 17:24:38 -05:00
Niels Kootstra 93ec5967fe fix(s3): return NoSuchTagSet from GetBucketTagging on untagged buckets (#4585)
GetBucketTagging returned 200 with an empty TagSet when a bucket had no tags, including after DeleteBucketTagging. AWS returns the NoSuchTagSet error instead. S3 Control ListTagsForResource still reports an empty list.
2026-09-28 16:25:06 -04:00
XuJian fbbbf244af fix(cognito): reject missing SRP challenge session (#4578)
Signed-off-by: xujiantop-crypto <265865031+xujiantop-crypto@users.noreply.github.com>
2026-09-28 14:34:12 -04:00
XuJian 864f79cf31 fix(s3): sign generated presigned URLs with SigV4 (#4373)
* fix(s3): align generated presigned URLs with SigV4 and request region

* fix(s3): refresh presign credentials after storage reset

* fix(s3): retire expired generated presign sessions

* fix(iam): sweep expired sessions by stored key

* fix(s3): scope generated presign credentials

* fix(s3): authorize conditional generated URLs and slash keys

* test(s3): preserve signed URL semantics in tagging and SES regressions

* fix(s3): reject tag injection on scoped generated PUT URLs

* style(s3): alphabetize presigner Java imports

* fix(s3): deny scoped requests without a raw HTTP path

* fix(s3): authorize proxied presigned URLs by signed path

* fix(s3): use signed path for proxied object requests

* style(s3): order presigned URL test imports
2026-09-28 12:21:52 -04:00
Niklas Herder 5ec18c507c fix(dynamodb): reject undefined expression attribute placeholders (#4398)
* fix(dynamodb): reject undefined expression attribute placeholders

PutItem/DeleteItem/UpdateItem ConditionExpression, UpdateItem's own
UpdateExpression, Query KeyConditionExpression, Query/Scan FilterExpression,
and TransactWriteItems' ConditionCheck/Put/Delete/Update ConditionExpression
and Update UpdateExpression accepted a #name or :value placeholder with no
matching ExpressionAttributeNames/Values entry, instead of rejecting it with
AWS's ValidationException. Writes fell through to a false
ConditionalCheckFailedException (or, inside a transaction, a
TransactionCanceledException with a false ConditionalCheckFailed reason),
reads silently evaluated the condition as non-matching (Query) or ignored it
entirely (Scan), and an undefined #name in an UpdateExpression's SET clause
was silently stored as an attribute literally named "#n" instead of being
rejected (standalone UpdateItem and inside a transaction alike). An undefined
#name in KeyConditionExpression additionally surfaced the wrong error, "Query
condition missed key schema element", because attribute resolution silently
left the alias unresolved.

Generalizes the pattern already used for UpdateExpression's undefined :value
check and Query's FilterExpression undefined #name check into a shared
requireDefinedTokens helper, applied to the remaining expression/handler
combinations, and built on the same ordered token scanner extractHashTokens
and extractColonTokens already used. The helper reports whichever undefined
token appears first in the text; in UpdateItem the ConditionExpression check
now runs before the unused-EAN/EAV checks rather than after.
ProjectionExpression's undefined #name check and KeyConditionExpression's
undefined :value check were already correct and are untouched.

* fix(dynamodb): check undefined placeholders before semantic validation

ExpressionEvaluator.validateExpression's semantic checks (contains()'s
distinct-operand rule, begins_with()'s operand type, BETWEEN's bound
ordering) ran before requireDefinedTokens at every call site, so an
undefined #name/:value could surface the wrong error, e.g.
contains(#missing, #missing) reported the distinct-operand error instead
of the undefined name. Verified against amazon/dynamodb-local:3.3.1 that
DynamoDB reports the undefined placeholder first for contains(), begins_with()
type mismatch, and BETWEEN bound ordering, while a syntax error or redundant
parentheses still outrank an undefined placeholder.

Splits validateExpression into validateSyntax (tokenize/parse/redundant-
parentheses, unchanged position) and validateSemantics (the checks above),
and reorders each handler to run requireDefinedTokens between them.
validateExpression itself is untouched and still used as-is by
DynamoDbVectorSearch's SearchConditionExpression.

In UpdateItem, ConditionExpression's semantic check must also outrank the
unused-EAN/EAV checks (#2893), not just requireDefinedTokens: moved
validateSemantics to run immediately after requireDefinedTokens(conditionExpression)
in both the UpdateExpression-present and UpdateExpression-absent branches,
ahead of checkUnusedEan/checkUnusedEav. Verified the same ordering already
held in PutItem, DeleteItem, Query and Scan (their unused checks already ran
after validateSemantics), and that TransactWriteItems has no unused-EAN/EAV
check to conflict with.

Also adds braces to the unbraced conditionals in the token scanner added by
the previous commit, per AGENTS.md.

* fix(dynamodb): keep projection validation after filter semantics

The syntax/semantics split moved FilterExpression's undefined-token and
semantic checks below ProjectionExpression's in Query and Scan, so a
Query/Scan with FilterExpression "contains(a, a)" and an undefined #name in
ProjectionExpression now reports the projection error instead of the filter
one. Verified against amazon/dynamodb-local:3.3.1: FilterExpression's checks
outrank ProjectionExpression's, which in turn outrank
KeyConditionExpression's (unchanged, and already correctly ordered).
2026-09-28 12:13:36 -04:00
TATSUNO “Taz” Yasuhiro e7e49f9125 fix(dynamodb): report a missing GSI on UpdateTable the way AWS does (#4564)
On AWS, deleting or updating a GSI the table does not have fails with
ResourceNotFoundException "Requested resource not found: Index <index>
for table <table>", with the table name even when TableName is an ARN.
Floci used its own message for a delete and a ValidationException for an
update.
2026-09-28 11:03:18 -04:00
XuJian 5e2edcb89b feat(appsync): execute VTL unit resolvers over data sources (#4423)
* feat(appsync): execute VTL unit resolvers over data sources

* fix(appsync): reject unbatched VTL Lambda BatchInvoke

* fix(appsync): normalize VTL Lambda payload and transact RDS statements

* fix(appsync): preserve sequential RDS statement effects

* fix(appsync): send full VTL request document to Lambda
2026-09-28 10:27:46 -04:00
Simone Primarosa a8eedb1fd9 feat(route53resolver): apply resolver rules to DNS resolution (#4538)
* feat(route53resolver): apply resolver rules to DNS resolution

Resolver rules were stored and ignored. The embedded DNS server now consults them
before resolving a name itself, via two CDI SPIs so core.common.dns imports neither
Route 53 Resolver nor EKS: DnsForwardingRuleSource supplies the rules associated with
one VPC, DnsClientVpcSource maps a query's source address to the VPC it came from.

FORWARD rules forward the raw query to their TargetIps, each on its own port, in a
random order with the next target tried when one does not answer. SYSTEM and RECURSIVE
rules carry no targets and hand the query back to Floci, so a SYSTEM rule carves a
subdomain out of a broader FORWARD. Matching is exact-or-subdomain on label boundaries
and the most specific matching rule wins. A rule takes precedence over a private hosted
zone matching the same name, as AWS documents. Floci's own suffixes and ec2.internal
names resolve locally whatever the rules say, as AWS autodefines system rules for its
internal domains. A rule whose targets are all unreachable answers SERVFAIL for that
query only.

Route53ResolverDnsForwardingRules reads the rule and association stores through
Route53ResolverService across account partitions, since the packet path has no caller.
EksClusterManager claims its cluster node container addresses for the cluster's
resourcesVpcConfig.vpcId.

* fix(route53resolver): scope rule DNS lookups to the querying account

AssociateResolverRule stores whatever VPCId the caller names without proving
ownership of it, so joining associations across account partitions by VPC id let
one account redirect another account's cluster DNS by naming its VPC. The DNS
client VPC now carries the account alongside the VPC id, and the rule source
reads only that account's associations.

Rules are fetched by id instead of scanned for, so a query reads only the rules
an association named rather than the whole rule store, and registration warns
when a running cluster's container addresses cannot be determined instead of
leaving its rules silently inert.

Also stop setting the authoritative bit on the SERVFAIL answer for a forwarded
query: Floci is not the authority for a name a rule sends elsewhere.

* style(route53resolver): import Optional instead of qualifying it inline

* fix(route53resolver): scope rule DNS lookups to the querying region

Route 53 Resolver is regional, so a rule created in one region governs nothing in
another, but the DNS path matched on account and VPC alone. A rule created in
eu-west-1 therefore steered a query from a VPC in us-east-1. The DNS client origin
now carries the region, and a rule is only applied when its own region matches.

The stores carry no region in their keys, so a rule's region is read back from the
ARN the service minted for it rather than reshaping the stores. A stored rule with
no parseable ARN has no region to claim and is treated as belonging to the region
asking, which no create path can produce.

Associations are now read as rule ids rather than as nodes, so a query no longer
deep-copies a record per association when all it needs is which rules to look at.

* test(eks): pin the warning when a cluster's addresses cannot be determined

Inspecting the node container can fail, and when it does the cluster gets no VPC
mapping and its queries quietly ignore every associated resolver rule. Nothing
fails, so the warning is the only way a reader finds out, which makes it worth a
test rather than leaving it to inspection.

Levels are compared by severity rather than identity because JBoss LogManager
has its own Level constants, so its WARN is not java.util.logging's WARNING.
2026-09-28 09:44:28 -04:00