Commit Graph
456 Commits
Author SHA1 Message Date
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 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
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
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
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
Kenshin Okinaka 903efdf58e ci: key the ECR Public prefetch on the classes that start each image (#4600)
* ci: key the ECR Public prefetch on the classes that start each image

prefetch-images.sh keyed the four Lambda runtimes on any /lambda/ path in
shard.txt, and partition.sh spreads the Lambda tests over every shard, so
each of the four shards pulled all four runtimes (674 MiB) plus the Firelens
router (105 MiB) from ECR Public anonymously before its tests started. ECR
Public counts that transfer per runner IP, and once the quota is spent every
later anonymous pull fails with "toomanyrequests: Data limit exceeded",
which is how a 2 MiB busybox pull took a shard down on main twice on
2026-09-27.

Measured from a full four-shard run by pairing each ImageCacheService
"Pulling image" / "Image already present locally" line with the class that
logged it: nodejs:20 is reached from every shard, python:3.14 and
python:3.12 each have one Docker-backed class, nodejs:18 was pulled by every
shard and started by none, and the Firelens router has one class. Each entry
now keys on those classes, which cuts a shard's ECR Public prefetch from
about 800 MiB to between 120 and 330 MiB. A class the list misses pulls
inline, as before.

The tests also used three busybox tags (latest, 1.36, stable) for the same
2 MiB image. They now share one pin, TestImages.BUSYBOX (busybox:stable,
the tag application.yml and the compatibility suites already use), and the
prefetch script reads that pin from the class the way it reads the sidecar
pins from application.yml, so one prefetch serves every test and the two
cannot drift apart. The one test that pulls the other architecture keeps a
tag of its own: a foreign-platform pull replaces what the local tag points
at on a daemon without the containerd image store, and the docker build in
the VolumesFrom test resolves its base from that local tag.

Each key that names a class is checked against src/test/java, and a stale
name is written to the log, so a rename cannot silently turn a prefetch off.

The prefetch also set off ECR Public's per-second limit on its own: every
pull started in the background at once, so the shard's ECR Public pulls
landed in the same second. They are now queued and pulled one after another,
a second apart, small images first because core/common/docker sorts near
the top of every shard, while the Docker Hub pulls stay parallel. And each pull now
writes one result line to prefetch-images.log, printed by a step after the
tests, so a failed or still-running prefetch can be told apart from a test
pulling the image itself.

* ci: pull the Docker library test images from Docker Hub

The first run of the prefetch results log showed where the quota actually
runs out. On the two shards that failed, the very first pull of the job,
docker/library/busybox or docker/library/python from the ECR Public mirror,
came back with "toomanyrequests: Data limit exceeded" before the job had
transferred anything, so the shard's own volume was not what spent it. The
same runner then pulled busybox from Docker Hub seven seconds later and a
116 MiB lambda/ image from ECR Public half a minute after that, both fine.
The mirror at public.ecr.aws/docker/library has an anonymous quota of its
own, shared by runner IP and often already spent when a job starts, while
GitHub-hosted runners pull Docker Hub without a limit: the fourteen Docker
Hub images each shard prefetches have never failed.

TestImages now names busybox and python-alpine the Docker Hub way, with the
reason in its Javadoc, and the prefetch pulls them with the other Docker Hub
images instead of queuing them behind the ECR Public runtimes. The three
python-alpine literals share one pin. The pin is read with a regex that
tolerates spacing, and a pin the script cannot read writes a "prefetch
skipped" line instead of silently pulling nothing. An image two entries
name is pulled once. The results step also lists any docker pull still
running, so an early exit does not make an unfinished pull look like one
that never ran.

* test(compat): pull the SageMaker and CodeBuild images from Docker Hub

The SageMaker compatibility tests (Java and Python) and the CodeBuild one
named busybox through the public.ecr.aws/docker/library mirror, the same
namespace whose anonymous quota fails the Build and Test shards, and the
native Python jobs of another PR failed on it the same way. They now name
the image the Docker Hub way. The CodeBuild digest is the same on both
registries, so that reference only changes its host.
2026-09-28 21:17:51 -04:00
TATSUNO “Taz” Yasuhiro dce7983b15 chore(ci): native CI now fails when the native image breaks a Docker call (#4514)
* chore(ecs): read the task metadata stats from inside a container

No compatibility test reached Docker's stats API, so the native image could lose the docker-java stats models without any test failing.

* chore(compat): reach the Docker commands no native test used

Recording the Docker API calls of the Java suite against the native
image showed commands no test reached. Cover the ones a CI run can reach:

- ECS Exec resizes the terminal of an interactive session
- a Lambda function with 33 MB of unzipped code is served from a code
  volume, which lists the volumes
- Timestream for InfluxDB reboots an instance

* chore(ci): run container-backed EC2 against the native image

The native suites run EC2 in mock mode, so no native test reached the
Docker calls only container-backed EC2 makes: building the security group
helper image, committing an instance as an AMI and removing that image,
and the VPC networks. A new job starts the native image with
container-backed EC2, once with security group enforcement and once
without, since an enforced instance lives in its helper's network rather
than on a VPC network. It ends by killing and restarting Floci, which must
remove the VPC network the tests leave behind.

* chore(compat): trust Floci's test certificate in the ECS Exec session client

The native CI job runs Floci with TLS, which makes the ExecuteCommand stream URL wss:// on Floci's test CA.

* chore(ci): launch arm64 EC2 guests in the container-backed EC2 job

The job runs on an arm64 runner, and the x86_64 AMI starts its guest as linux/amd64. The VPC network instances never reached running there. Maven also logs its test counts now, so a skipped phase shows in the job log.

* chore(compat): say why the new tests' cleanup failures are ignored

* chore(ci): stop waiting for Floci once it reports unhealthy in the EC2 job

The wait kept polling for the full minute after an unhealthy status, unlike the existing wait step in the same workflow.
2026-09-28 21:04:01 -04: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
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
David bc15516cc0 feat(glue): create and run workflows (#4471)
Glue had no workflows: CreateWorkflow, StartWorkflowRun and the rest
answered InvalidAction. Add CreateWorkflow, GetWorkflow, ListWorkflows,
BatchGetWorkflows, UpdateWorkflow, DeleteWorkflow, StartWorkflowRun,
StopWorkflowRun, ResumeWorkflowRun, GetWorkflowRun, GetWorkflowRuns,
GetWorkflowRunProperties and PutWorkflowRunProperties, and let triggers
belong to a workflow.

StartWorkflowRun fires the workflow's starting triggers inside a new
run. The workflow's conditional triggers fire only on job runs and
crawls of that run, evaluate AND within it, and start their actions in
it; job runs get --WORKFLOW_NAME and --WORKFLOW_RUN_ID. A run completes
once nothing in it runs and nothing more fires. GetWorkflow and
GetWorkflowRun report the graph of trigger, job and crawler nodes.

Closes #4380
2026-09-28 09:26:50 -04:00
Simone Primarosa 70c1c407bc feat(ec2): support instance and network-interface route targets (#4416)
Support InstanceId and NetworkInterfaceId in CreateRoute, ReplaceRoute,
and DescribeRouteTables, automatically resolving InstanceOwnerId.

- Parse and store InstanceId and NetworkInterfaceId on Route
- Validate instance target existence and set InstanceOwnerId to caller account
- Enforce single-target mutual exclusion across all supported route targets
- Remove InstanceId and NetworkInterfaceId from UNSUPPORTED_ROUTE_TARGETS
- Render instanceId, instanceOwnerId, and networkInterfaceId in DescribeRouteTables
- Add DescribeRouteTables filter support for route.instance-id and route.network-interface-id
- Document route target support in docs/services/ec2.md
- Add integration tests in Ec2RouteTargetIntegrationTest
- Add AWS SDK compatibility tests in Ec2RouteTargetTest
2026-09-27 09:18:29 -04:00
Kenshin Okinaka 3441532a9d feat(ses): paginate template lists and align ListExportJobs paging (#4465)
* feat(ses): paginate template lists and align ListExportJobs paging

Add a namespaced Pagination.paginate overload and SesListPaging, which
holds the probed per-operation page-size bounds, default page sizes,
error messages and empty-token handling. ListTemplates (v1) and
ListEmailTemplates (v2) now page newest first and share one token
namespace, so a token from either continues the other. Without a page
size the template lists serve 10, as SES does. ListExportJobs refuses a
PageSize above 100 instead of clamping it, returns a null NextToken on
the last page, and uses SES's own error messages.

* refactor(ses): inject the template service clock and drop the paging test sleeps

* test(ses): tick the clock between template create and update
2026-09-27 08:44:58 -04:00
Priamo Germosen 67437115c5 feat(iam): add last-accessed reporting actions (#4488)
Add GenerateServiceLastAccessedDetails, GetServiceLastAccessedDetails,
GetServiceLastAccessedDetailsWithEntities and ListPoliciesGrantingServiceAccess.

Floci records no service-access history, but AWS's "never used" shape keeps
the report and nulls the usage fields rather than emptying the report, so
that is what these reproduce. GetServiceLastAccessedDetails lists every
service the entity could reach through its permissions policies and leaves
LastAuthenticated and TotalAuthenticatedEntities absent for the ones never
used. GetServiceLastAccessedDetailsWithEntities lists the entities that
could have used the reported permissions: a group report yields the group's
users, a policy report the users and roles it is attached to, and a user or
role report that entity. Both lists come from permissions-policy logic,
which Floci can evaluate, so both are computed rather than stubbed; the
usage timestamps are the only part left out.

A report is produced when the job is created and stored with it, matching
AWS, where the Get operations retrieve a report that Generate produced. So
editing the policies afterwards does not change what a completed job
answers, and deleting the entity does not stop a valid JobId resolving.
Generate resolves the whole ARN first, rejecting one whose account is not
the caller's or whose path is not the resolved entity's, so it cannot fall
back to a same-named local identity; AWS-managed policy ARNs carry the
literal "aws" account and are allowed through to the global catalog. An
unknown JobId is NoSuchEntity, Granularity is validated and echoed back as
JobType, and both readers honour MaxItems and Marker.

ListPoliciesGrantingServiceAccess needs no job and no usage history, since
AWS defines it purely over permissions-policy logic. A user contributes its
own managed and inline policies plus those of every group it belongs to,
while a group or role contributes only its own; permissions boundaries are
excluded. Only Allow grants, and Allow with NotAction grants every service
the list does not carve out. It models a Marker but no MaxItems, so only the
former is applied.

Services reachable only through a wildcard or NotAction cannot be
enumerated without a catalog of IAM service namespaces, which is tracked
separately in #4487 and documented.
2026-09-26 20:12:27 -04:00
stodan 60d112542d fix(cloudformation): delete UPDATE_FAILED resources on DeleteStack (#4470)
* fix(cloudformation): delete UPDATE_FAILED resources on DeleteStack

A failed update whose rollback cannot restore a resource leaves it
UPDATE_FAILED with its physical id and the stack in
UPDATE_ROLLBACK_FAILED. DeleteStack only walked CREATE_COMPLETE,
UPDATE_COMPLETE and DELETE_FAILED resources, plus UPDATE_FAILED ones
whose provisioner opted in, so every other failed resource was skipped
without an event and the stack still reached DELETE_COMPLETE, leaving
the role, log group or bucket behind.

Delete every UPDATE_FAILED resource that has a physical id. Delete a
CREATE_FAILED resource only when the provisioner marked its entity as
created by the stack, as the create rollback does, since a failed
create can name an entity that existed before.

Closes #4467

* test(cloudformation): clean up the outside log group when the test fails

* docs(cloudformation): list the resource statuses DeleteStack deletes

* fix(cloudformation): mark a failed nested stack the operation created as stack-owned

A nested stack whose child fails during creation came back CREATE_FAILED
with the child's stack id but no ownership marker, so neither the create
rollback nor DeleteStack deleted the child stack.

* test(cloudformation): clean up the stack, role and log group when the test fails

* docs(cloudformation): update the hasPendingRollbackCleanup javadoc now that DeleteStack no longer calls it
2026-09-26 16:23:44 -05:00
Abhigya a5ded3e162 fix(apigateway): import x-amazon-apigateway-any-method in the native image and roll back failed imports (#4473)
* fix(apigateway): import x-amazon-apigateway-any-method in the native image and roll back failed imports

The ANY pseudo-operation reaches the service as an untyped extension map, and it was
bound to io.swagger.v3.oas.models.Operation with Jackson bean deserialization. The
swagger model graph is not registered for reflection, so in the native image every
ImportRestApi or PutRestApi body with x-amazon-apigateway-any-method failed with
BadRequestException. Parse it with the swagger parser's own Operation reader, the one
that already builds the real verbs, which needs no reflection.

A failed import also left state behind: ImportRestApi kept a half-built API whose id the
caller never received, and PutRestApi left the API cleared and partly rebuilt. ImportRestApi
now deletes what it created and PutRestApi restores the API-scoped state it replaced.

* chore(apigateway): import swagger Json instead of qualifying it inline
2026-09-26 14:03:30 -04:00
Abhigya 5af1d4048e fix(elasticache): report a ConfigurationEndpoint only for cluster-mode-enabled replication groups (#4469)
A cluster-mode-disabled replication group reported a ConfigurationEndpoint
alongside NodeGroups[0].PrimaryEndpoint. AWS only returns ConfigurationEndpoint
for a cluster-mode-enabled group, and terraform-provider-aws branches on its
presence: when it is set, primary_endpoint_address and reader_endpoint_address
are left null.
2026-09-26 13:33:47 -04:00
David 0d813adf95 feat(glue): create, run and chain triggers (#4436)
Glue had no triggers: CreateTrigger and the rest answered InvalidAction.
Add CreateTrigger, GetTrigger, GetTriggers, ListTriggers,
BatchGetTriggers, UpdateTrigger, DeleteTrigger, StartTrigger and
StopTrigger.

StartTrigger runs an ON_DEMAND trigger's actions. An activated
CONDITIONAL trigger fires when a watched job run or crawl finishes in
the named state, evaluated after every Glue request, so a chain of
triggers completes within the request that starts it when runs finish
at once. Runs started by a trigger carry its TriggerName. SCHEDULED
triggers are stored and can be activated but do not fire on a timer.

Part of #4380
2026-09-25 23:14:51 -04:00
David 93c7b1f93f feat(glue): start and stop crawls, crawler metrics, listing and schedules (#4427)
A crawler could be defined but never run: StartCrawler answered
InvalidAction and a crawler stayed READY with no LastCrawl. Add
StartCrawler, StopCrawler, GetCrawlerMetrics, ListCrawlers,
BatchGetCrawlers, UpdateCrawlerSchedule, StartCrawlerSchedule and
StopCrawlerSchedule.

Crawls follow the crawler state machine without reading data and are
settled on read, as job runs are;
floci.services.glue.crawler-run-duration-seconds (default 0) can keep a
crawler RUNNING. UpdateCrawler and DeleteCrawler are refused while a
crawl runs, and DeleteCrawler removes the crawl history.

Part of #4380
2026-09-25 18:50:30 -04:00
Priamo Germosen 3d35eabf51 feat(iam): finish the SAML provider lifecycle (#4360)
Adds UpdateSAMLProvider, DeleteSAMLProvider, TagSAMLProvider,
UntagSAMLProvider and ListSAMLProviderTags, and adds tags to GetSAMLProvider.

UpdateSAMLProvider re-parses a new SAMLMetadataDocument the same way
CreateSAMLProvider does and replaces the stored entity ID and certificate.
The document is optional on the request: omitting it (metadata == null) is
a no-op, but an explicitly empty one is invalid input, the same as
CreateSAMLProvider already rejects it as; the two are distinguishable at
the wire level and were previously treated the same.

The update replaces the stored provider with a newly built one rather than
mutating the existing, already-published object's fields one at a time:
assertion verification (StsQueryHandler) reads a provider via find() /
findForAccount() without taking providerLock, so setting entityId and
certificate as two separate writes on the live object could let it
observe one field updated and the other not. Publishing a fully-built
replacement through the same ConcurrentHashMap-backed store means any
reader, synchronized or not, sees either the old provider intact or the
new one intact, never a mix.

DeleteSAMLProvider's existence check now runs inside the same lock as the
delete itself, not before it: two concurrent deletes could otherwise both
pass the check before either removed the provider, so the second returned
success instead of NoSuchEntity, and a delete racing a recreate of the
same ARN could remove the newly created provider instead of the deleted
one.

DeleteSAMLProvider itself does not check or update any role whose trust
policy still references the provider's ARN. This corrects an assumption
from the original gap-report plan (which expected a delete-blocked-while-
referenced check, by analogy with DeletePolicy's attachment guard): AWS's
own docs say the opposite, that deletion always succeeds and it is a later
AssumeRoleWithSAML against the now-dangling ARN that fails, not this call.

GetSAMLProvider and ListSAMLProviderTags both sort their tags by key,
matching AWS's own documented behavior for both, which the same wording
in ListInstanceProfileTags's docs already established the precedent for.

Also completes AwsQueryController's IAM_ACTIONS fallback set for every
SAML provider action, including the three pre-existing ones
(ListSAMLProviders, CreateSAMLProvider, GetSAMLProvider), none of which
were there before, and adds SDK-client coverage for the whole SAML
provider lifecycle to compatibility-tests/sdk-test-java/IamTest.java,
which (like the three pre-existing SAML actions) had none.
2026-09-25 17:39:15 -05:00
lex00 fd3696a9fc fix(ec2): report a flow log's custom LogFormat (#4386)
* fix(ec2): report a flow log's custom LogFormat

CreateFlowLogs parsed LogFormat and stored it on the flow log, and
DescribeFlowLogs never emitted it. A client comparing its declared format
against the live flow log saw the field unset every time and proposed the same
change on every plan.

XmlBuilder.elem skips a null, so a flow log created without a custom format
reports no element rather than an empty one.

LogGroupName is also in the model's FlowLog shape and is not parsed, stored or
emitted here. That is a missing input rather than a dropped round-trip, and it
needs a decision about how it sits alongside LogDestination, so it is left
out of this change.

* test(ec2): address the flow log format assertions by id

DescribeFlowLogs serves no filters, so the resource-id filter these tests
passed was ignored and both described every flow log in the region. The
negative test then found the other test's custom format whenever it ran
second. Capture the id CreateFlowLogs returns and describe that one log.

* test(ec2): validate the flow log format with the EC2 SDK client

AGENTS.md asks for management APIs to be exercised through an SDK client
rather than handcrafted requests alone. Ec2Client.describeFlowLogs decodes
logFormat as the field the create call set, and reports null when the flow
log was created without one.

* test(ec2): tolerate a null id when cleaning up the flow log test

List.of rejects a null, so a failed CreateFlowLogs would have thrown from
the finally block and left the VPC behind, masking the real failure.

* fix(ec2): report the default log format when none was set

CreateFlowLogs builds the flow log with the default format when LogFormat is
omitted, so the flow log carries one from that point and DescribeFlowLogs
reports it. Omitting the element left the same gap this branch set out to
close, one step further in.

DEFAULT_LOG_FORMAT is the version 2 fields in the order AWS documents. It is
separate from DEFAULT_HEADER, which is the alphabetised superset written as
the header line of a generated log file.

* docs(ec2): restore the DEFAULT_HEADER javadoc the new constant displaced

The new constant landed between DEFAULT_HEADER and its comment, leaving that
comment attached to nothing. It also called the value a version 5 field order,
which it is not. It is every available field in alphabetical order.
2026-09-25 16:40:36 -04:00
vamsiakandVamsi Akavarapu 41d07f6e3b fix(apigateway): register native VTL map reflection (#4405)
* fix(apigateway): register native VTL map reflection

* fix(apigateway): package VTL reflection metadata for native build

* test(apigateway): cover native VTL collection methods

* chore(ci): retry flaky test shard

* chore(ci): retry timed out test shard

---------

Co-authored-by: Vamsi Akavarapu <16164447+vamsiak@users.noreply.github.com>
2026-09-25 15:19:54 -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
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
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
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 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
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
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
XuJian 1952ba4052 feat(ecr): manage pull through cache rules (#4304)
Signed-off-by: XuJian <265865031+xujiantop-crypto@users.noreply.github.com>
2026-09-24 08:36:06 -04:00
Kenshin Okinaka 34be03b334 feat(ses): add v2 BatchGetMetricData (#4302)
Aggregates the per-recipient timelines already stored at send time, so the
batch metrics and GetMessageInsights cannot disagree about what a send
produced. Buckets are whole UTC days, the series is sparse rather than zero
filled, the end of the range is exclusive, and counting is per recipient.

SentEmail gains the configuration set the send resolved to, which the
CONFIGURATION_SET dimension filters on. The VDM gate moves into a shared
SesVdmGate so the two gated operations keep one copy of the probed message.

Metrics that need a real mailbox to act stay empty, as does TRANSIENT_BOUNCE,
since every bounce Floci derives is permanent.
2026-09-24 08:34:15 -04:00
Abhigya bae7e0316a feat(s3): enforce Block Public Access on the data plane (#4253)
* feat(s3): enforce Block Public Access on the data plane

The four Block Public Access flags were stored and returned but never read
by any authorization path, so put-public-access-block was accepted and
changed nothing: a bucket left public by a policy or an ACL stayed readable.

Enforce all four, combining a bucket's configuration with its owner
account's and taking the most restrictive of the two, as AWS does.

BlockPublicPolicy and BlockPublicAcls reject the write that would introduce
public access, which AWS applies whoever the caller is, so they do not sit
behind enforce-auth. RestrictPublicBuckets and IgnorePublicAcls suppress
access an existing policy or ACL grants, which only has meaning once
anonymous authorization runs, so they take effect under enforce-auth.

Deciding what counts as public follows the documented AWS rules: an ACL is
public when it grants any permission to AllUsers or AuthenticatedUsers, and
a policy is assumed public unless a wildcard-principal statement pins a
recognised condition key to a fixed value. A single public statement makes
the whole policy public, so RestrictPublicBuckets also withholds the
cross-account delegation a separate non-public statement grants.

Enabling a setting never rewrites stored state; an existing public policy
or ACL is left exactly as written.

* test(s3): pin the Block Public Access contract at the wire

Cover the write-time flags under the default configuration and the
read-time flags under enforce-auth, including the reproduction that
motivated the fix: put-public-access-block followed by an anonymous
GetObject on a bucket whose policy is public.

Each enforcing assertion is paired with a negative control that must keep
passing without the fix, so a test cannot pass vacuously: the without-BPA
case still returns 200, and the owner's signed access is never affected.
Reverting the S3Service change fails the 11 enforcing assertions and leaves
the 10 controls green.

Unit tests cover the settings record's parsing and most-restrictive merge,
the ACL public-status rule, and the policy public-status rule against the
examples in the AWS documentation.

* test(s3): validate Block Public Access through the AWS SDK

Drives BlockPublicPolicy and BlockPublicAcls with S3Client so the rejection
is seen the way an SDK caller sees it: a 403 carrying the AccessDenied error
code, not just a status line. Both apply without enforce-auth, which is the
configuration this suite runs against.

* test(s3): drop the em-dash from the Block Public Access display name

* fix(s3): recognize scoped access point ARN in bucket policies

* fix(s3): honor ForAnyValue in public policy checks
2026-09-24 08:23:12 -04:00
c3m2r4 babb43ac3d fix(cloudwatch): return storedBytes on DescribeLogGroups (#4202)
* fix(cloudwatch): return storedBytes on DescribeLogGroups

AWS reports log-group storedBytes as the sum of stream sizes. Floci
always returned 0, which breaks SDK clients that read the field.

* style(cloudwatch): import collection test helpers
2026-09-24 07:30:14 -04:00
Vũ Thế Huy a450cdc9b0 feat(redshift): support Redshift Spectrum phase one (#4184)
* feat: add Redshift Spectrum metadata catalog

* feat: parse Redshift Spectrum DDL

* feat: read Redshift Spectrum CSV data from S3

* feat: classify and rewrite Redshift Spectrum queries

* feat: materialize Spectrum rows into PostgreSQL

* feat: intercept Redshift Spectrum queries

* test: cover Redshift Spectrum wire integration

* docs: document Redshift Spectrum phase one

* fix: handle Spectrum extended queries

* fix: preserve Spectrum query protocol state

* fix: resolve Spectrum cursor paging and extended query race condition

- Await prior backend queries before streaming local Spectrum Extended Query frames
- Drop synthetic Spectrum Parse/Bind/Describe/Close frames from coordinator pending queue
- Support server-side cursor pagination with PortalSuspended across multiple Execute cycles
- Add cascade cleanup for unexhausted portal cursors when prepared statement is closed

* fix(redshift): register SpectrumMaterializer for GraalVM runtime initialization

* fix(redshift): forward non-Spectrum queries and register storage models for reflection

* docs(redshift): clarify Spectrum temp table lifecycle across protocols

* docs(redshift): note that Simple Query Spectrum creates a temp table per query

---------

Signed-off-by: Vũ Thế Huy <31652864+vuthehuyht@users.noreply.github.com>
2026-09-23 23:34:03 -04:00
Abhigya f2d6710b24 fix(rds): apply DBInstanceClass, AllocatedStorage and EngineVersion on ModifyDBInstance (#4214)
* fix(rds): apply DBInstanceClass, AllocatedStorage and EngineVersion on ModifyDBInstance

ModifyDBInstance parsed the password, IAM auth, subnet group, option group,
security groups and the backup and monitoring settings, but never read
DBInstanceClass, AllocatedStorage or EngineVersion. A resize or an engine
upgrade returned 200 while DescribeDBInstances kept reporting the values the
instance was created with, so a caller that diffs its configuration against a
read-back saw the same pending change on every run.

The three members move into a DbInstanceScalingChanges record that the handler
fills from the request and the service applies, with the rules the AWS API
reference states for them:

- AllocatedStorage below the current size fails with InvalidParameterCombination
- an increase under 10% is rounded up to 10% greater on PostgreSQL, MySQL and
  MariaDB, and taken as given on SQL Server
- the same size is not a change and is left alone
- a different major EngineVersion needs AllowMajorVersionUpgrade

Floci applies the change immediately rather than deferring it to the preferred
maintenance window: it runs no maintenance window and models no
PendingModifiedValues, so a deferred change would never be applied at all.

* fix(rds): reject a ModifyDBInstance scaling change before applying any member

The scaling members were validated as they were assigned: the class was set,
then the storage was resolved, which can refuse a shrink, then the engine
version was checked, which can refuse a major upgrade. The instance a modify
works on is the stored object rather than a copy, so a request refused at the
second or third step had already written the earlier ones, and a read-back
reported a class the 400 said it never got.

The checks now run in resolveFor, ahead of every setter in modifyDbInstance,
including the password rotation that reaches the running container. applyTo is
left as pure assignment of an already-resolved record.
2026-09-23 11:41:15 -04:00
Kenshin Okinaka d214144c86 chore(compat): bump the pinned AWS SDKs for the compatibility suites (#4237)
The SES tenant-level deliverability launch on 2026-09-17 added a TENANT_NAME
metric dimension to BatchGetMetricData and a TenantName filter to the message
insights export. Both reached the Java SDK in 2.55.0 and botocore in a release
after the pinned one, so the suites could not express either against the
versions pinned here.

Java moves 2.52.0 to 2.55.3 and Python 1.43.69 to 1.43.100, the current
releases of each.
2026-09-23 11:11:41 -04:00
Allen Sanborn 4b3923712a feat(redshiftserverless): add namespace lifecycle and tagging (#3631)
* feat(redshiftserverless): add namespace lifecycle

Amazon Redshift Serverless was absent entirely: every call returned
UnknownOperationException, so Terraform's aws_redshiftserverless_namespace
could not be planned or applied against Floci.

Add a JSON 1.1 service under the RedshiftServerless. target prefix with
CreateNamespace, GetNamespace, ListNamespaces, UpdateNamespace, and
DeleteNamespace. Namespaces are account and Region scoped and stored through
StorageFactory. AWS defaults are applied on create (dbName dev, kmsKeyId
AWS_OWNED_KMS_KEY, empty logExports, status AVAILABLE), adminUserPassword is
accepted and never returned, DeleteNamespace returns the removed namespace
with status DELETING, and UpdateNamespace applies only the supplied fields.

Workgroups, snapshots, and the tagging operations remain unemulated.

* feat(redshiftserverless): add namespace tagging operations

Terraform's aws_redshiftserverless_namespace calls ListTagsForResource on
every read once tags are involved, so the namespace lifecycle alone left the
resource broken as soon as a config set tags.

Add ListTagsForResource, TagResource, and UntagResource. Lookup is by
resourceArn rather than namespace name, scoped to the caller's Region, since
that is how AWS keys these operations; the namespace is currently the only
taggable Redshift Serverless resource, so any other ARN is reported absent.
TagResource merges into the existing tags, UntagResource removes by key, and
tags passed to CreateNamespace are readable back and survive UpdateNamespace.

* fix(redshiftserverless): emit creationDate as ISO-8601 per the API model

The awsJson1.1 default is epoch seconds and 133 call sites use it, but this
model overrides it: TimestampFormatTrait ISO_8601 on creationDate (and on all
eleven other timestamp members in the package, audited). Strict clients broke
on the number: Terraform's Go SDK failed to decode and orphaned the created
namespace outside state; the Java SDK failed to unmarshall. Only botocore's
lenient parsing let CLI checks pass. Emitted via the repo's millisecond-ISO
idiom; format pinned by regex in the integration test and by a new
handler-level unit test class covering the wire layer that had none
(timestamp shape, nextToken emission, maxResults type guard). Checklist note
added to AGENTS.md + CONTRIBUTING.md so the next service checks the trait
before reaching for the epoch idiom.

* docs(redshiftserverless): the ISO-8601 rule is per member, not model-wide

Review follow-up: the earlier claim that every timestamp member in this model
carries TimestampFormatTrait(ISO_8601) is wrong — 15 of the model's 30 INSTANT
members carry no trait and fall back to the awsJson1.1 epoch default. The
shipped code is unaffected (creationDate, the only timestamp emitted, is
genuinely ISO_8601), but the claim was load-bearing guidance: whoever adds
snapshots or scheduled actions next would have applied ISO-8601 to trait-free
members and reintroduced the bug in the opposite direction. Narrowed in all
four places it appeared.

* fix(redshiftserverless): validate collection types, copy-on-update; drop em dashes

A present iamRoles, logExports, tags or tagKeys member that was not a JSON
array parsed to null and was then indistinguishable from an omitted member,
so a malformed UpdateNamespace silently kept the stored value and returned
200 instead of reporting the request as invalid. Only a missing or null
member now means "omitted"; a present member of the wrong type, or a
collection holding a non-string element, is a ValidationException naming the
member.

updateNamespace mutated the stored Namespace in place while GetNamespace and
ListNamespaces read without taking the same monitor, so a concurrent reader
could observe a torn object with some fields updated and some not. Build the
new state on a copy and store that instead, which also makes the write-back
explicit. The same in-place mutation was present in tagResource,
untagResource and deleteNamespace, so all four now copy. Merge semantics are
unchanged.

Replace the em dashes in the timestamp guidance with commas and periods, per
the repository ban.

* fix(redshiftserverless): reject Redshift reserved words as namespace names

CreateNamespace rejects a namespace name that is an Amazon Redshift SQL
reserved word, so names like select or user passed the length and
[a-z0-9-] checks here and were persisted. Add the documented reserved
word list to the shared namespace-name validator, which create, get,
update and delete all reach, so the rejection is consistent.
2026-09-23 10:13:24 -04:00
TATSUNO “Taz” Yasuhiro 133ef62d27 feat(dynamodb): vector indexes and SearchVectors (#4215)
* feat(dynamodb): define vector indexes on the table control plane

* feat(dynamodb): serve SearchVectors against vector indexes

* feat(dynamodb): validate vector attributes on write

* feat(dynamodb): report vector write capacity on writes

* fix(dynamodb): reject a PartiQL read of a vector index

* test(dynamodb): cover vector search in Floci's own suite

* fix(dynamodb): match AWS on vector member paths and the f32 number format

* fix(dynamodb): match AWS on the vector search validation gaps

* perf(dynamodb): stop retaining and recomputing per candidate in vector search

* docs(dynamodb): document that indexes are not stored
2026-09-23 08:57:08 -04:00
Kenshin Okinaka e947b6a2a1 feat(ses): add v2 GetMessageInsights (#4157)
* feat(ses): add v2 GetMessageInsights

Serves the per-recipient event timeline for a sent message. The timeline is
derived at send time from the events SesRecipientEvents classifies for the
send, the same classification that drives configuration-set event publishing
and identity notifications, then stored on the SentEmail record, so the read
path is a plain lookup and no new event store is needed. SentEmail also gains
the EmailTags the operation returns, and a raw send now stores its parsed MIME
subject, when present, as a simple send does.

Insights additionally report DELIVERY for an ordinary recipient so a plain
send does not look stuck at SEND; a suppressed recipient never gets DELIVERY,
since it is dropped before the relay, and a message the content scan rejected
ends every recipient's timeline at REJECT. What gets published is unchanged.

Probed against real SES in us-east-1: the operation is gated on Virtual
Deliverability Manager and reports that before it looks at the message id, a
missing message names the account alongside the id, Isp carries the literal
UNKNOWN_ISP when the provider cannot be identified, BounceType is the
upper-case enum member, and an account-suppressed recipient is reported with
BounceSubType ON_ACCOUNT_SUPPRESSION_LIST and SES's own suppression text as
the diagnostic, the upper snake spelling this operation uses where the
published events say OnAccountSuppressionList. Floci deliberately records the
mailbox-simulator sends and the multi-recipient mail that VDM drops, because
dropping both would leave insights permanently empty, and returns one entry
per envelope recipient where an AWS response carries at most one.

* test(ses): pin the message-insights VDM gate to one account

The gate reads the account VDM attributes, which are account-scoped like
every other SES store, but no test said so: the isolation test enables VDM
for both of its accounts. An account that never enabled it now has to meet
the gate while others in the same region are past it.

* feat(ses): report a content-rejected raw send in message insights

The raw send path classified its recipients with a hardcoded false, because
the content scan did not exist on this branch's base. It does now, so the
real scan result reaches the timeline: a rejected raw send reports SEND then
REJECT instead of a delivery it never had.

Its stored tags follow the same rule the published events already use, the
request's own tags only, so tags read off a refused message's headers cannot
resurface through GetMessageInsights.
2026-09-23 00:17:28 -04:00
Abhigya fcc89c0e8d feat(ecs): implement ExecuteCommand (#4121)
* feat(ecs): implement ExecuteCommand

ECS Exec was accepted at the API but opened nothing: a client got a
response it could not connect to. This implements the whole path, so
`aws ecs execute-command` gives a real shell in a task's container.

The gate matches AWS. The session must be interactive, which is the only
mode ECS supports; the task must belong to the cluster the request
names, must be RUNNING and must have been run with enableExecuteCommand;
and the container must have a runtime behind it, so a mock-mode task
answers TargetNotConnectedException.

The response carries a session with a single-use tokenValue and a
streamUrl pointing at Floci's own data channel, which is where
session-manager-plugin then connects. Floci plays the SSM agent's half
of the Session Manager protocol on that channel, the binary AgentMessage
framing, the handshake, sequenced acknowledgements and terminal resizes,
and bridges it to a docker exec with a TTY.

Two threads meet on that channel. Every call into the Docker daemon
blocks, so it runs on a worker rather than on the event loop, and the
daemon streams the container's output back on its own thread; frames are
written from the channel's Vert.x context only, which also keeps the
outbound sequence numbers in the order they reach the wire. The command
is attached to only once the client has accepted the handshake, so no
output can be written to a channel that is still being opened.

Deliberate limits, documented in docs/services/ecs.md:

- The command runs through /bin/sh -c, so an image without a shell
  cannot be exec'd into.
- Sessions are in memory, single use, and expire after five minutes if
  nobody connects.
- ExecuteCommand logging, the executeCommandConfiguration that sends
  session transcripts to S3 or CloudWatch, is not implemented. The
  cluster field still round-trips.

EcsExecSessionRegistry holds a SecureRandom, so it is registered under
--initialize-at-run-time for the native image.

AgentMessageTest covers the wire framing against a JDK-side encode and
decode, EcsExecuteCommandIntegrationTest covers the API gate, and
EcsExecChannelDockerIntegrationTest runs a real session end to end under
Docker.

* fix(ecs): compare the ECS Exec session token in constant time

The token is the single gate in front of an interactive shell in a
container, so compare it with MessageDigest.isEqual on the UTF-8 bytes
rather than String.equals, which returns on the first differing
character. Matches the constant-time comparison the repo already does in
ScimController, IamAuthValidator and LambdaLayerService.

A failed claim still leaves the session in place: dropping it would let
anyone holding a session id cancel somebody else's session.

* fix(ecs): expire an unclaimed ECS Exec session on read

Only create() swept the session map, and neither claim() nor find()
looked at createdAt, so a session nobody connected to stayed claimable,
token included, until the next ExecuteCommand call happened to come in.
On an idle emulator that is forever, which also made the five minute
expiry documented in docs/services/ecs.md untrue.

claim() and find() now go through liveSession(), which drops a session
past SESSION_TTL and reports it as gone: claim() rejects it before the
token comparison, and the WebSocket upgrade refuses to open a channel
for it. The registry takes the CDI Clock so the tests exercise expiry
without waiting out the TTL.
2026-09-22 23:47:40 -04:00
Roberto Perez Alcolea 343e1574fa fix(s3): reject unsigned checksum headers on presigned requests (#4153)
Match S3 behavior by requiring supported x-amz-checksum-* headers to be included in X-Amz-SignedHeaders. Return AccessDenied with HeadersNotSigned when a presigned request includes an unsigned checksum header.
2026-09-22 20:21:40 -04:00
Niels Kootstra 4753428567 fix(rds): bind PostgreSQL IAM tokens to the published endpoint and authorize rds-db:connect (#4100)
* fix(rds): bind PostgreSQL IAM tokens to the published endpoint

The PostgreSQL proxy validated IAM auth tokens with the two-argument
validator, so a token generated for any host, port or region was
accepted as long as the signature and DBUser matched. The MySQL proxy
already checked the token against the endpoint it publishes. Thread the
same binding into the PostgreSQL handler and validate against it.

* fix(rds): carry account and resource ids in the proxy binding

RdsService now builds the proxy binding itself at every relay start
(instances, clusters, RDS Proxy relays and restart restores) from the
published endpoint, port, region, account and DbiResourceId or
DbClusterResourceId, so the auth proxy has everything rds-db:connect
is scoped to. The convenience startProxy overload that re-derived the
region from the relay key is gone along with it.

* feat(rds): authorize rds-db:connect when IAM enforcement is on

After the token signature checks out, the auth proxy now asks IAM whether
the token's principal may perform rds-db:connect on
arn:aws:rds-db:<region>:<account>:dbuser:<resource-id>/<db-user>, the
same check AWS runs. It only applies when services.iam.enforcement-enabled
is on; a caller IAM does not know keeps the filter's bypass. The client
still sees the engine's generic authentication failure, and the denial is
logged in AWS's wording so the cause is visible server-side.

* refactor(rds): rename RdsMysqlBinding to RdsProxyBinding

Both engines, Aurora clusters and RDS Proxy relays now validate IAM
tokens against it, so the MySQL-specific name was misleading.

* docs(rds): describe IAM token endpoint binding and rds-db:connect

* test(rds): cover a replayed IAM token in the JDBC compat suite

* fix(rds): accept IAM tokens generated for the loopback name of the endpoint

Floci advertises the name containers reach it by (host.docker.internal
natively, its own address in Docker), while a client on the host connects
to the same proxy over the loopback interface and generates its token for
localhost or 127.0.0.1. Binding tokens strictly to the advertised host
therefore refused every native client; the published port still has to
match, so a token for another instance on the same host is still refused.

The compatibility workflow sets FLOCI_SERVICES_RDS_ENDPOINT_HOST=floci as
it already does for Redshift, so the tests' tokens name what the
containerised Floci publishes.

* feat(rds): make the PostgreSQL IAM token endpoint binding opt-in

Refusing a PostgreSQL token generated for another hostname, port or
region matches RDS but breaks clients whose tokens name a different
host than the endpoint publishes, so the check now sits behind
services.rds.iam-token-endpoint-binding
(FLOCI_SERVICES_RDS_IAM_TOKEN_ENDPOINT_BINDING), off by default.
MySQL and MariaDB keep requiring the endpoint as before, and the
rds-db:connect check still runs whenever IAM enforcement is on.
The compatibility workflow turns the flag on so the replayed-token
case stays covered.

* fix(rds): refuse an IAM token that reaches the validator without a binding

Every proxy publishes a binding, so a token without one has nothing to
be checked against; validating its signature alone was a fail-open
path. The signature-only validate(token, user) overload and the MySQL
handleAuth overloads that passed no binding are removed; production
only ever used the ones that pass it.

* fix(rds): sanitize the rds-db resource named in the refused connection warning

The database user is part of that resource and comes straight from the
client's startup message, so it is stripped of control characters like
the other client-controlled values in the warning.

* docs(rds): call a refused IAM token the engine's ordinary authentication failure

The exact message differs per engine, and RDS PostgreSQL words it
differently from Floci's handler today, so the docs no longer promise
one wording.

* docs(rds): move the IAM token binding row into the RDS variables table

The row had landed above the page heading, where it rendered as a
stray one-row table; it now follows FLOCI_SERVICES_RDS_ENDPOINT_HOST
as it does on the RDS page.

* fix(rds): bind PostgreSQL IAM tokens to the endpoint by default

A stock Floci still accepted a PostgreSQL token generated for another
endpoint, the replay this change set out to close, and PostgreSQL and
MySQL disagreed about it in a way RDS never has. The endpoint check is
now on for every engine. services.rds.iam-token-endpoint-binding
(FLOCI_SERVICES_RDS_IAM_TOKEN_ENDPOINT_BINDING=false) stays as the
escape hatch for clients that generate tokens for a container name or
DNS alias the endpoint does not publish. The compatibility workflow no
longer needs to turn the check on.

* chore(ci): rerun after a Docker Hub rate limit failed shard 1
2026-09-22 15:49:14 -04:00
Daniël van Ziel 8e6faffcaf fix(kinesis): paginate ListShards with an opaque NextToken (#4098) 2026-09-22 13:38:28 -04:00
Matheus André cde8f48084 fix(cloudwatchlogs): return creationTime in DescribeLogGroups and DescribeLogStreams (#4137)
The LogGroup and LogStream API shapes carry the creation timestamp as
creationTime, but both responses wrote it as createdTime, so SDK clients
and the CLI saw it as unset. Only the response key changes; the persisted
model field keeps its name so existing data is unaffected.

Closes #4084

Signed-off-by: Matheus André <matheusandr2@gmail.com>
2026-09-22 13:17:48 -04:00
Priamo Germosen 0524d156d4 feat(codeartifact): serve the maven format through a real Reposilite-backed proxy (#4059)
GetRepositoryEndpoint for format=maven now returns a URL real Maven clients
(mvn deploy, mvn dependency:get, Gradle) can publish to and resolve from
directly, backed by a shared Reposilite sidecar container started lazily on
first use. A CodeArtifact repository maps to its own Reposilite repository,
provisioned automatically and never reused even across delete/recreate of a
same-named repository, so a fresh repository can never inherit a previous
one's artifacts.

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

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

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

Tests and compatibility fixtures that created a no-list client and then signed in with a flow outside the default now enable that flow on their client.
2026-09-22 07:41:58 -05:00
Priamo Germosen 2f5aa99701 feat(iam): add ListInstanceProfileTags (#4140)
TagInstanceProfile and UntagInstanceProfile already existed; the read side
was missing. Mirrors ListUserTags's response shape, and sorts the result
by tag key to match the documented AWS behavior.

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

Covers the trio in the SDK compatibility suite (compatibility-tests),
which previously had no instance-profile tagging coverage.
2026-09-22 07:38:45 -05:00
Kenshin Okinaka d272cd3ceb fix(ses): publish a Bounce for suppressionlist@simulator and split events by cause (#4073)
* fix(ses): publish a Bounce for suppressionlist@simulator and split events by cause

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

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

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

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

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

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

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

The Send and Reject events of a rejected message carried the subject and
the additional headers in their mail block, so with headers enabled a
subject carrying the test string reached every event destination and, with
persistence on, the disk. Both events now carry the envelope but no subject
and no headers, a small deviation from SES that keeps the string off disk
entirely; the docs say so.
2026-09-21 21:15:52 -04:00
Allen Sanborn 532bae5525 feat(dms): add replication subnet group lifecycle and tagging (#3630)
* feat(dms): add replication subnet group lifecycle

AWS DMS was entirely absent, so every terraform-aws-data-storage example
using aws_dms_replication_subnet_group failed at plan with
UnknownOperationException.

Adds a minimal dms service on AWS JSON 1.1 (X-Amz-Target prefix
AmazonDMSv20160101.) implementing CreateReplicationSubnetGroup,
DescribeReplicationSubnetGroups and DeleteReplicationSubnetGroup.
Subnets are resolved against the emulated EC2 service, so the VpcId and
Availability Zones a group reports are the ones its subnets actually
have, and AWS's own rules are enforced: the identifier is stored
lowercase, "default" is reserved, subnets must share a VPC, and a group
must cover at least two Availability Zones.

Tagging actions and replication instances, endpoints and tasks are out
of scope and still report UnknownOperationException.

* feat(dms): add resource tagging for replication subnet groups

Terraform's aws_dms_replication_subnet_group reads tags back through
ListTagsForResource, so without the tagging trio the resource could be
created but never read cleanly.

Adds ListTagsForResource, AddTagsToResource and RemoveTagsFromResource,
and stores the Tags member of CreateReplicationSubnetGroup with the
group. DMS does not return a subnet group ARN from describe, so the
provider builds arn:aws:dms:<region>:<account>:subgrp:<id> client side;
Floci parses that form back to the stored group and rejects anything
else, including another account's ARN, with ResourceNotFoundFault.

* fix(dms): address review findings

Emit IsReadOnly on ReplicationSubnetGroup, the one member of the model's
seven the response was missing. It is always false: a read-only group is
one DMS manages for a zero-ETL integration, which Floci does not emulate.

Fault a cross-Region ARN the way a cross-account one already faulted.
Storage is keyed by the caller's Region, so honouring an eu-west-1 ARN
from a us-east-1 caller silently reached the caller's own group of that
name rather than the one named.

Reject a subnet with no Availability Zone as InvalidSubnet. Set.copyOf
rejects nulls, so such a subnet raised a NullPointerException and
surfaced as a 500 instead of a client error.

Adds the user-realistic minimum-AZ case: two subnets sharing one AZ,
which the previous tests did not cover because they passed one subnet.

* fix(dms): reject wrongly-typed tag, filter and arn-list members

A present member of the wrong JSON type was coerced rather than
rejected. asText() on an object yields the empty string, so a tag whose
Value was an object stored an empty value and reported success; a
Filters or ResourceArnList member that was not a list was ignored
outright, which turned a filtered describe into an unfiltered one.

Every string member now answers SerializationException when it is
present with another JSON type, matching what AWS returns when a
json-1.1 member will not deserialize, and matching how Kinesis, Cognito
and KMS already report the same class of error here. An absent member
stays a parameter error: missing and mistyped are different faults.

* fix(dms): paginate DescribeReplicationSubnetGroups and validate the description

DescribeReplicationSubnetGroups returned every matching group in one response and
ignored both MaxRecords and Marker, so an SDK or Terraform paginator diverged from a
live account as soon as more than one page of groups existed.

Page through the shared opaque-cursor helper, keyed on the group identifier, so a
Marker stays resumable across groups created or deleted between requests. MaxRecords
defaults to 100 and is rejected outside the documented 20 to 100 range rather than
clamped, with the InvalidParameterValueException a live account answers. Marker is
emitted only while a further page remains: an SDK paginator treats any Marker as "ask
again", so one on the final page loops forever.

ReplicationSubnetGroupDescription now also enforces the model's printable-character
constraint, so a value carrying a control character such as 0x01 is rejected instead
of persisted.

* docs(dms): describe the Marker as the opaque cursor it is

* fix(test): DmsTest must compile at the sdk-test-java module's Java 17 target

List.getFirst() is a Java 21 SequencedCollection method. The main project
compiles at 21, but compatibility-tests/sdk-test-java pins source/target 17, and
DmsTest was the only file in that module using getFirst() -- so the native arm64
sdk-test-java image failed to build and every test in it was skipped.

This was not caught earlier because the previous head of this PR had no CI
rollup at all; the merge that made the branch mergeable is what first ran the
job. Replaced with get(0), which is what the rest of the module uses.

* style(test): import Objects and Collectors instead of naming them inline

AGENTS.md asks for imports rather than inline fully-qualified names.
DmsServiceTest had two: java.util.Objects::nonNull and
java.util.stream.Collectors.toMap. Neither was imported; both now are.
2026-09-21 19:45:01 -04:00