Commit Graph
1738 Commits
Author SHA1 Message Date
Mario Toffia c6505c9144 fix(iot): honour attributePayload.merge, thingTypeName and expectedVersion on things (#6657)
* fix(iot): honour attributePayload.merge, thingTypeName and expectedVersion on things

UpdateThing replaced the attributes with whatever the request carried, so a
merge update dropped the stored attributes and a type-only update wiped them.
It now merges when attributePayload.merge is true, removes an attribute given
an empty value, leaves the attributes alone when the request has none, sets or
removes the thing type, and rejects a missing or deprecated type and a
removeThingType that also names a type. DeleteThing now honours
expectedVersion, and a stale version reports AWS's message.

Closes floci-io/floci#6655

* fix(iot): serialize UpdateThing and DeleteThing, reject a malformed thingTypeName

A merge is a read-modify-write and expectedVersion is a compare-and-set,
so both now run under one thing write lock. An empty or malformed
thingTypeName on UpdateThing is an InvalidRequestException, as in AWS,
instead of being treated as absent.

* test(iot): race versioned thing updates and deletes, rerun the SDK test on AWS

A race test holds the thing write lock to one winner per expected
version. On AWS the SDK test borrows an active test thing type, as
fleetIndexSearch does, since a deprecated type cannot be deleted for
five minutes and a rerun would fail.

* fix(iot): answer a malformed thingTypeName with AWS's validation message

UpdateThing now builds the refusal with SmithyValidationErrors, listing
the length violation before the pattern one, as measured on AWS.
2026-10-26 18:58:11 -04:00
James McMahon 1bf019f89a fix(ecs): honour privileged EC2 task containers (#6659) 2026-10-26 17:38:28 -04:00
Aniket Shukla 95960f80e8 fix(codedeploy): honor ListApplications continuation tokens (#6678) 2026-10-26 17:27:41 -04:00
Jackson Price 9fd0578181 fix(elb): keep Classic load balancer health checks per account (#6666)
* fix(elb): keep Classic health checks apart between accounts

The Classic health checker kept its instance states and its probe timer
under the region and the load balancer name. A Classic name is unique
only within one account, so when two accounts each had a load balancer
called web they shared one entry. Creating the second web replaced the
first one's periodic check with its own, and deleting it removed the
first account's instance states too: those instances then reported
OutOfService with reason ELB ("Instance registration is still in
progress") and were no longer checked.

The key now includes the load balancer's account, and the checker's
methods take the load balancer itself instead of a region and a name,
so the account always comes with it.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

* fix(elb): restore every account's Classic load balancers at startup

Startup runs outside any request, where the storage-backed map of
Classic load balancers sees only the default account. Restoring through
it restarted health checks for the default account's load balancers
alone: after a restart, the instances registered with another account's
load balancers reported OutOfService with reason ELB and were never
checked. Those accounts' region maps also stayed the plain maps read
from disk, although the name check in CreateLoadBalancer and the
certificate scan rely on concurrent ones, and a load balancer stored
with the old fixed hosted zone kept it unless the default account owned
it.

Startup now walks the stored region maps of every account: it makes
them concurrent, gives each load balancer its region's hosted zone, and
starts its health checks. A load balancer stored before load balancers
recorded their account takes the account it is stored under, so its
health state and instance lookups belong to that account.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

* fix(elb): restore the default account's Classic load balancers by their own keys

The every-account restore read the default account from a scan of the
whole store as well, and that scan recognizes only 12-digit account
prefixes. The default account id is configurable, through
FLOCI_DEFAULT_ACCOUNT_ID, and need not be 12 digits. With one such as
local, every restart read the key local/us-west-2 as a region of that
name: the default account's load balancers lost their hosted zone, their
region maps stayed plain maps, and each restart wrote nested copies of
the store that a delete never reached.

The region maps that the storage-backed map shows, which at startup are
the default account's, are read through it again, as they were before
the every-account restore, and written back under their own keys. The
scan now supplies only the other accounts' maps. The javadoc no longer
compares this restore with ELBv2's, which still covers the default
account only.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

* test(elb): run the Classic account isolation checks every second

The account isolation tests set their health check through
ConfigureHealthCheck, whose 5-second minimum interval made the two tests
take about 20 seconds. They now set a check every second on the stored
load balancer and re-arm the checker directly, and take about 4
seconds. Both still fail on the commit before the per-account key.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

* fix(elb): restore each Classic region map under the account in its key

The startup restore read the default account through the storage-backed
map, which shows the account of the current request, and every other
account from a scan that recognizes only 12-digit account prefixes.
Neither holds in general. The service is created on its first use, and
that use can come inside another account's request: an IAM
DeleteServerCertificate reaches it even while Classic ELB is disabled
and its lifecycle restore never runs. Account ids need not be 12 digits
either: FLOCI_DEFAULT_ACCOUNT_ID is free-form, and AssumeRole takes the
account from the role ARN. In those cases the restore again nested
copies of a region map and cleared its hosted zone, or left another
account's load balancers unrestored.

Startup now reads every region map by its raw stored key and takes the
account and the region from it. A region never contains a slash, so the
account is everything before the last one.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

* test(elb): check which load balancer each restored account holds

The restore test for region maps read by their stored keys checked each
account's keys, map type, hosted zone and health checks, but not which
load balancer its map held. A restore that wrote every map back under
the account of the current request still passed, with one account left
holding another account's load balancer. The test now checks that each
account's stored map holds that account's own load balancer, and that
write-back fails it.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

* test(elb): run the Classic isolation checks without waiting on timers

The account isolation tests waited on the real one-second health check
timer, so the class took about 5.6 seconds, 3 of them in the second
case. The checker now keeps the load balancer each periodic check
probes next to its timer, and a package-private runArmedChecks() runs
one tick of every armed check at once. The tests set an interval no
timer reaches during a test, settle each check in one probe, and run
the rounds themselves. The class now takes about 1.8 seconds, most of
it the first case's setup, and the timers keep their schedule.

Running what the armed timers would run, rather than probing one load
balancer directly, keeps the second case meaningful: it is about
another account's balancer taking over the periodic check. With the
account left out of the health checker's key, both cases still fail.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

* test(elb): make the second Classic isolation case independent of rounds

The case where another account creates a load balancer of the same name
caught a health checker keyed without the account only because it ran
exactly one round: the other account's default TCP:80 check needs two
failures, so a second round would have let it report OutOfService as
well. The case now also checks that the instance recovers once its
backend answers 200 again, which only the first account's own check can
report.

The helper that registers the instance no longer runs a round of its
own. The probe that registration schedules already settles a check with
thresholds of one, and a second probe could still be running when the
case moved on. Each periodic check now stores the tick its timer runs,
and runArmedChecks runs that same tick, so the two cannot drift apart.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

* refactor(elb): create the Classic load balancer store in the constructor

The Classic service created its load balancer store and the map over it
in initializeStorage, so neither field could be final, as AGENTS.md asks
of service fields. Both are now created in the constructor, as
CloudFormationService creates its stores, and are final; without a
StorageFactory the map is a plain in-memory map, as before.
initializeStorage keeps the conversion of region maps read from disk, so
the startup order is unchanged: the store is created and loaded during
the bean's construction either way, and nothing in that step calls
another bean. The StorageFactory field, read only there, is removed.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

---------

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
2026-10-26 17:23:04 -04:00
Jackson Price f3f8b42200 feat(cloudformation): support AWS::Route53::RecordSetGroup (#6676)
A RecordSetGroup writes all its record sets into one hosted zone in a
single ChangeResourceRecordSets batch, so a record set that cannot be
written, such as a name another owner already holds, leaves the zone
unchanged and fails the stack. Each record set keeps what a RecordSet
keeps, including the routing-policy fields SetIdentifier, Weight,
Region, Failover and HealthCheckId; entries an Fn::If resolves to
AWS::NoValue are dropped, and two record sets with one name, type and
set identifier are refused. Ref returns the group's logical ID and
Fn::GetAtt Id the change ID that GetChange reads, as AWS documents.

The zone comes from the group's HostedZoneId or HostedZoneName, or from
its record sets when the group names neither. A record set that repeats
the group's HostedZoneId is refused, as AWS documents, and so is one
that names another zone.

An update in the same zone deletes the records the group wrote and
creates the new ones in one batch. HostedZoneId and HostedZoneName are
create-only, so a change set reports a zone change as a replacement:
the records are written into the new zone, and the old ones are deleted
once the update commits, or kept under UpdateReplacePolicy: Retain. A
failed update puts back the records the group had; after a zone change
the group first points at its old records again, then deletes the new
zone's. If that delete fails, ContinueUpdateRollback retries it and
DeleteStack deletes those records while the rollback is unfinished;
anything else leaves them in their zone, since Route 53 cannot tell
them apart from an identical record another writer puts there later.
Deletes name the values the group wrote, so a record changed outside
the stack fails the delete rather than being removed.

The docs say what a record set group's failed rollback leaves behind.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
2026-10-26 17:10:49 -04:00
Jackson Price b280a7764a fix(appconfig): keep environment monitors and report deployment sources (#6665)
CreateEnvironment dropped the Monitors it was sent, and StartDeployment
and GetDeployment never reported the deployed profile's name or
location. AWS documents all three on these operations.

- CreateEnvironment stores Monitors and environment reads return them.
  They are checked against AWS's limits (at most five; AlarmArn of 1 to
  2048 characters; AlarmRoleArn an IAM role ARN in any partition) and
  refused with BadRequestException before anything is stored. An
  environment created without monitors returns no Monitors member, as
  AWS's own example shows.
- StartDeployment records the profile's ConfigurationName and
  ConfigurationLocationUri, and GetDeployment returns them.
- Records stored by earlier builds load unchanged: the new members are
  omitted when absent, so their responses stay byte-identical.

A configuration profile created without Type still reports none: AWS
documents no default, and its CreateConfigurationProfile example returns
a null Type.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
2026-10-26 14:24:27 -04:00
Aniket Shukla 4506645d0f fix(servicecatalog): paginate portfolio listings (#6631)
* fix(servicecatalog): paginate portfolio listings

* refactor(servicecatalog): reuse shared pagination validation
2026-10-26 14:22:00 -04:00
Andre Kurait 07597598b6 fix(cloudformation): relocate SAM schemes without auth defaults (#6656)
* fix(cloudformation): relocate SAM schemes without auth defaults

Follow the separate postprocessing request in upstream #6638. Relocate declared OpenAPI security schemes independently of Auth defaults, preserving Swagger and operation requirements.

Signed-off-by: Andre Kurait <AndreKurait@gmail.com>

* fix(sam): centralize OpenAPI security scheme relocation

Keep the defaults helper responsible only for generating AWS_IAM and api_key definitions. Relocate the security scheme map exclusively in the shared final OpenAPI phase, including documents without Auth defaults.

Signed-off-by: Andre Kurait <AndreKurait@gmail.com>

---------

Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
2026-10-26 13:49:34 -04:00
berce c4ad788e62 fix(bedrock): list guardrails in the tagging api and route its writes (#6646)
* fix(bedrock): list guardrails in the tagging api and route its writes

guardrails were not a ResourceProvider, so GetResources with bedrock:guardrail came back empty, and TagResources had no bedrock handler to forward to. list the draft of each guardrail with its own tags and add a tagging-api-only handler that calls the existing tag methods.

* test(bedrock): cover guardrail discovery and tagging writes with the sdk
2026-10-26 12:05:47 -04:00
Mario Toffia c81cf8a630 fix(iot): deliver data-plane publishes to MQTT subscribers (#6630)
* fix(iot): deliver data-plane publishes to MQTT subscribers

A message sent with the IoT Data Publish API stored its retained copy
and ran the topic rules, but never reached a connected MQTT client. The
data-plane publish now goes through the broker fan-out after the rules,
as an MQTT publish does.

The fan-out delivers at the lower of the message and subscription QoS,
with RETAIN 0, and a retained message sent on subscribe carries RETAIN 1
at the lower of its stored and the subscription QoS, as measured on AWS
IoT Core. Publish refuses a qos other than 0 or 1 with AWS's
InvalidRequestException messages.

Closes floci-io/floci#6627

* fix(iot): allocate packet identifiers for broker publishes

Vert.x draws the packet identifier of an outbound publish from an
unsynchronized per-endpoint counter. With QoS 1 delivery, two threads
fanning out to one client could send two unacknowledged copies under the
same identifier. The broker now allocates them from one atomic counter.

A retained message stored with a negative qos, which Publish accepted
before it validated qos, is sent on subscribe at QoS 0 instead of
aborting the replay.

* fix(iot): keep MQTT packet identifiers per session

One broker-wide counter let copies sent to other clients, QoS 0 included,
wrap a client's identifiers while its QoS 1 copy was unacknowledged. Each
session now draws QoS 1 identifiers from its own counter, and a QoS 0
copy carries none.

* test(iot): share the IoT Data client builder

Both IoT Data integration tests now build their IotDataPlaneClient
through IotDataRequests.iotDataClient(accessKey), as review asked. The
IoT limitations also list that a QoS 1 copy is never retried and has no
in-flight limit, where AWS holds further copies at 100 unacknowledged.

* test(iot): drive the packet identifier isolation test at QoS 1

QoS 0 copies carry no packet identifier, so the other client's 65,534
copies must be QoS 1 for the test to catch a counter shared by every
client. The IoT limitations also say that a data-plane Publish reaches
subscribers in every account and region, as the broker has none.
2026-10-26 11:43:50 -04:00
Vũ Thế Huy f184cce726 feat(redshift): execute automated snapshot schedules (#6536)
* feat(redshift): execute automated snapshot schedules

* fix(redshift): address automated snapshot review findings

Flush snapshot metadata before deleting an expired dump, pause the
snapshot scheduler across emulator reset, run retention even when the
next dump fails, and remove checkpoints of deleted clusters.

* fix(redshift): retake an automated snapshot whose metadata was lost

The checkpoint is a separate store, so it can persist while the snapshot
metadata never reached disk. Skip a completed occurrence only when its
snapshot still exists.

* test(redshift): restore the automated snapshot on the shared interceptor cluster

Run the Docker restore scenario in RedshiftInterceptorIntegrationTest
against the cluster it already starts, so only the restore pays for a
container, and drop the hand-rolled Docker probe.
2026-10-26 11:42:07 -04:00
Jackson Price 986117a45c fix(ec2): keep key pair names unique under concurrent requests (#6635)
* fix(ec2): keep key pair names unique under concurrent requests

CreateKeyPair and ImportKeyPair checked that a name was free and stored
the new key pair as two separate steps, so two requests for one name at
the same moment could both pass the check and both store a key pair.
Both got a key pair back, DescribeKeyPairs listed the name twice, and
RunInstances injected whichever record it found first, so the other
caller's private key did not open the instance. CreateKeyPair generates
its key between the two steps, which keeps that window open for as long
as key generation takes.

Both actions now store through one method that checks the name again
and writes under the EC2 service's striped lock for the region and
name, so the second request is refused with InvalidKeyPair.Duplicate
and the same message as before. The first check stays where it was, so
a single request is answered as before, and a taken name is still
refused before a key is generated for it.

Follow-up to the review of #6112.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

* fix(ec2): keep a tag write from restoring a deleted key pair

A CreateTags on a key pair reads the record and writes it back with its
new tags while holding the key pair's lock, but DeleteKeyPair deleted
without that lock. A delete landing between the read and the write was
undone: the key pair came back, and if a CreateKeyPair had taken the
freed name in between, the name then had two key pairs.

DeleteKeyPair now deletes each matching key pair under the lock tag
writes take on it, as DeleteEgressOnlyInternetGateway does, so a tag
write either finishes before the delete or finds the key pair gone.
The EC2 docs now say what CreateKeyPair and ImportKeyPair do with a
taken name rather than promising one key pair per name outright.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

* test(ec2): pin where the key pair race tests wait, and clean up the SDK test

The race tests now let the held write go early only when the waiting
request is blocked in storeNewKeyPair or deleteKeyPair on a monitor the
held request owns, and otherwise wait for that request to finish, so a
change that made it wait anywhere else fails the test instead of
quietly skipping the check under the lock.

The SDK test waits up to 60 s for its requests to finish before it
deletes the name, so a slow request is not left to store a key pair
after the cleanup, and it checks the refused requests' error code and
status but not their message, which AWS words differently from Floci.
The storeNewKeyPair Javadoc also says that the store's own locks, taken
inside the name lock, never lead back to an EC2 lock.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

* test(ec2): name what the key pair race tests wait for

A race test whose request comes to wait anywhere other than the named
Ec2Service method now fails with a timeout that says what it waited
for, and the helper says why the method is named. The DeleteKeyPair
comment says that scan returns a new list rather than copies, and the
SDK test's cleanup comment says it waits up to 60 s.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

* test(ec2): say what pinning the waiting method guards against

The race tests' helper Javadoc no longer says that a wait elsewhere
always skips the code under the lock: such a wait may not be at the
lock under test, so the tests time out rather than pass without
exercising it, and moving that lock into another method means updating
the name the tests give.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

* test(ec2): park the key pair race tests' writes with ParkingStore

Both race tests held a write on a latch in an anonymous store of their
own. They now wrap the shared testing ParkingStore in
AccountAwareStorageBackend, as the Config tagging tests do, and arm its
next write: before the first request in the name race test, and after
the key pair is created in the delete test, so the write it parks is
the tag write's. The name race test creates ED25519 keys so that key
generation stays well inside ParkingStore's two-second wait. Main code
is unchanged.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

---------

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
2026-10-26 11:20:10 -04:00
TATSUNO “Taz” Yasuhiro ec13eda221 feat(lambdaweb): check the egress network connector as AWS does (#6647) 2026-10-26 10:51:01 -04:00
Aniket Shukla a1ebc10bd1 fix(cloudmap): paginate namespace service and operation lists (#6629)
* fix(cloudmap): paginate namespace service and operation lists

* refactor(core): share bounded pagination validation

* refactor(cloudmap): reuse shared pagination checks for cloud map and bcm
2026-10-26 10:02:04 -04:00
Andre Kurait 9b36aa6980 fix(cloudformation): replace SAM OpenAPI security schemes (#6638)
Follow the separate whole-map replacement requested in upstream #6632. Preserve Swagger, no-default behavior, operation requirements and unrelated OpenAPI components.

Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
2026-10-26 09:44:15 -04:00
Mario Toffia e9c37666c7 fix(apigateway): answer 401 when a Cognito authorizer refuses the scopes (#6636) 2026-10-26 09:36:16 -04:00
Vũ Thế Huy ce0933be9b feat(redshift): rotate managed master passwords (#6505)
* feat(redshift): rotate managed master passwords

* fix(redshift): serialize managed secret rotation

* fix(redshift): address managed secret rotation review

* fix(redshift): keep concurrent rotation retries idempotent

* fix: defer managed secret guard until rotation reservation succeeds

* fix: preserve secret versions saved during rotation reservation

* fix: guarantee required character types in serverless passwords

* revert: defer serverless password character types fix to dedicated PR

* test(secretsmanager): extract blocking reserve helper across rotators
2026-10-26 09:30:08 -04:00
David ec21cf38c7 feat(rds): DescribeCertificates, ModifyCertificates and an instance's CA certificate (#6106)
* feat(rds): DescribeCertificates, ModifyCertificates and an instance's CA certificate

DescribeCertificates lists the Region's RDS certificate authorities with the
thumbprint and validity AWS reports, vendored from the certificate bundles AWS
publishes by tools/aws/regen_rds_ca_certificates.py, and pages them.
ModifyCertificates sets or removes the account's default for new instances.
CreateDBInstance, ModifyDBInstance, the two instance restores and
CreateDBInstanceReadReplica take CACertificateIdentifier, and instances report
it with CertificateDetails. AWS::RDS::DBInstance takes the property and
resolves the two CertificateDetails attributes. The identifier is metadata:
the auth proxy keeps presenting Floci's own CA.

Closes #5806

* fix(rds): follow the user guide on CAs and leave a blank CA alone

- An instance stored without a CA reports rds-ca-rsa2048-g1, since an
  override applies only to instances created after it.
- ap-south-1, ap-southeast-4, ca-west-1, eu-central-2, eu-south-2 and
  il-central-1 offer only rds-ca-rsa2048-g1, as the user guide says.
- A blank CACertificateIdentifier on modify leaves the instance's CA.
- --download skips a Region only on 403 or 404 and exits 1 on other
  failures.
- Reuse regionFromArn, add a createDbInstance stub helper and import
  Executable in the tests.
2026-10-26 09:29:56 -04:00
TATSUNO “Taz” Yasuhiro 3438a00daf feat(lambda): version network connectors as AWS does (#6595)
* feat(lambdamicrovms): version network connectors as AWS does

* fix(lambda): lock connector versions and refresh them after a CFN rollback

Updates, deletes and version reads hold one lock, so two updates cannot
take the same version number.

A CloudFormation rollback restores the connector through an update. On
AWS that makes the next version, and a later Fn::GetAtt returns it. The
resource now keeps that version in LatestVersion and LatestVersionArn.

Read the connector ARN through AwsArnUtils.parse.

AWS refuses LatestVersion, an integer, as a string Output, so the stack
test reads LatestVersionArn only.

* fix(lambda): type the connector LatestVersion attribute as an integer

AWS::Lambda::NetworkConnector declares LatestVersion as an integer. On AWS
a stack whose string Output reads it fails with "Template format error:
Every Value member must be a string.", and Fn::Sub refuses it with
"variable Connector.LatestVersion in Fn::Sub expression does not resolve
to a string".

* chore(lambda): share the connector version ARN and integer attribute helpers
2026-10-26 08:38:47 -04:00
Andre Kurait f32db4fe49 fix(cloudformation): drop undeclared OpenAPI authorizer schemes (#6632) 2026-10-26 08:06:31 -04:00
Robin BaeckmanandRobin Baeckman 7453011c43 feat(eks): associate access policies with access entries (#6427)
AssociateAccessPolicy, ListAssociatedAccessPolicies and
DisassociateAccessPolicy had no route, so their requests fell through to
S3's path-style catch-all and came back as an S3 XML error. Terraform's
aws_eks_access_policy_association could not be created.

The three operations follow access entries: they are management
metadata, stored and returned but not enforced in Kubernetes. Each
association is kept on its access entry, so deleting the entry or the
cluster removes it, and entries persisted before this change load with
no policies. ListAccessEntries now honours associatedPolicyArn.

Validation follows the EKS user guide: only STANDARD entries take access
policies, the scope is cluster (no namespaces) or namespace (one or more
names, wildcards kept, a repeated name stored once), and associating a
policy again replaces its scope and keeps its associatedAt. policyArn
must be an EKS cluster access policy ARN in the cluster's partition; the
name is not checked against AWS's list. Listing pages from 1 to 100,
with tokens bound to the entry they came from. Disassociating a policy
the entry does not hold succeeds, since EKS documents no error for it;
a missing entry is still ResourceNotFoundException, and an ARN that
associate would refuse is InvalidParameterException. ListAccessEntries
now pages through the shared Pagination helper too, so a token issued
before this change is refused.

Under IAM enforcement the list and disassociate routes were checked as
DescribeAccessEntry and DeleteAccessEntry, and all three against a
principal ending in /access-policies, so a grant scoped to the entry
never matched. They are now checked as their own actions, against the
entry's ARN.

A DELETE is a disassociate only when a cluster access policy ARN
follows access-policies, in the route, the IAM rule and the resource,
so an entry whose IAM path holds an access-policies segment can still
be deleted. The router matches the encoded path, so a principal sent
URL-encoded, as the SDKs send it, is never split.

Co-authored-by: Robin Baeckman <27041454+RobinBaeckman@users.noreply.github.com>
2026-10-26 07:54:43 -04:00
Jackson Price bc75edb4c4 fix(cloudwatch): accept the CloudWatchVersion20130116 JSON target (#6586)
* fix(cloudwatch): accept the CloudWatchVersion20130116 JSON target

The CloudWatch console's API sends JSON 1.0 requests to the monitoring
endpoint with X-Amz-Target CloudWatchVersion20130116.<Operation>, signed
for the monitoring service. Floci knew only the GraniteServiceVersion20100801
prefix the SDKs send, so every such request got HTTP 404
UnknownOperationException.

Register the prefix on the monitoring descriptor as a JSON-only target,
the mechanism the DynamoDB_20111205 prefix already uses. A request naming
it now reaches the CloudWatch JSON handler and the same metrics and alarms,
after the same signature validation, unsigned-call refusal and
cloudwatch:<Operation> IAM check as the current prefix. CBOR and Smithy
RPC v2 requests that name it stay unknown, as do other CloudWatchVersion
dates.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

* fix(cloudwatch): serve only shared operations on the console JSON target

The CloudWatch console's API names its operations with the
CloudWatchVersion20130116 target, and several of them take shapes the
current API does not: its GetMetricData takes Defaults and Metrics
instead of MetricDataQueries, and its PutMetricAlarm and DescribeAlarms
describe metric queries with Alias, Namespace and MetricName items
instead of Id and MetricStat. The CloudWatch JSON handler ignores members
it does not know, so through that target a console GetMetricData answered
HTTP 200 with no results, and a console PutMetricAlarm stored an alarm
without its metric.

Route the target through a handleLegacy entry, as DynamoDB_20111205 is
routed, and serve there only the operations whose shapes the two APIs
share: ListMetrics, DescribeAlarms, GetMetricStatistics and DeleteAlarms.
Every other operation, and a request that sets a member only the
console's API defines (CountOnlyRequest, SegmentId, TotalSegments,
ExcludeAutoscalingAlarms, ExcludeManagedAlarms), gets HTTP 400
UnsupportedOperation, the error Floci gives an operation it does not
implement.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

* fix(cloudwatch): refuse unshared members and math alarms on the console target

Two gaps were left on the CloudWatchVersion20130116 target. Its
DescribeAlarms listed a metric math alarm's Metrics as the current API's
Id and MetricStat items, which the console's API does not define, so a
client parsing the answer with that API's model sees metrics with no
namespace, name or statistic. And only the five console-only members
known today were refused, so a member the console's API adds later would
again be ignored.

Refuse a DescribeAlarms answer that would list a metric math alarm, and
check request members against the ones the current API defines for each
served operation, as botocore's cloudwatch 2010-08-01 model lists them,
instead of against a list of console-only names. A null or false value
still counts as unset.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

* fix(cloudwatch): serve only honoured members on the console target

The console target accepted every request member botocore's model
defines for its four operations, but the CloudWatch JSON handler ignores
several of them: StateValue, AlarmTypes, ActionPrefix, ChildrenOfAlarmName
and ParentsOfAlarmName on DescribeAlarms, ExtendedStatistics on
GetMetricStatistics, and RecentlyActive, OwningAccount and
IncludeLinkedAccounts on ListMetrics. A request using one got HTTP 200 as
if the member were unset. A null member also reached the handler, which
read it as the string "null".

Accept on the console target only the members the handler honours, plus
NextToken and MaxRecords, which change nothing because every result comes
back at once. Refuse any other member that is set with HTTP 400
UnsupportedOperation, and drop null members before handling. The four
operations are served under these member checks and the DescribeAlarms
check, which now names an alarm defined with Metrics rather than a metric
math alarm, since it also covers a single metric query.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

* test(cloudwatch): cover presigned console-target calls and align naming

Call the CloudWatchVersion20130116 target the console target in the
tests, as the docs and comments do, and say why handleLegacy keeps the
name of DynamoDB's JSON-only entry point. Cover presigned requests on
both prefixes, and keep the DescribeAlarms rows within what AWS accepts
by sending AlarmNames and AlarmNamePrefix apart. State in the docs that
only the bare prefix over application/x-amz-json-1.0 is accepted, and in
the comments that only top-level null members count as unset.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

* test(cloudwatch): pin the console target's other wire forms as unknown

The docs say only the bare CloudWatchVersion20130116 prefix over
application/x-amz-json-1.0 reaches CloudWatch. Pin that: the bare
prefix over application/json or JSON 1.1, and the fully qualified
com.amazonaws.cloudwatch.v2013_01_16 form, answer HTTP 404
UnknownOperationException. Name the presigned test for what it checks,
a wrong secret, and wrap the new comments at 100 columns.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

* test(cloudwatch): share the signed IAM user setup between signature tests

CloudWatchJsonTargetSignatureIntegrationTest and
CloudWatchQueryGetSignatureIntegrationTest each carried their own copy
of a helper that signs IAM Query calls with the root test key, and of the
setup that creates a user with an access key and an inline policy and
then removes them. Move both into SignedIamUsers under the testing
package and call it from the two classes. It uses real SigV4 signatures,
which the classes need because signature validation is on;
EnforcementFixtures' placeholder signatures would be refused.

The returned user is AutoCloseable, so each test holds it in a
try-with-resources block; if creating the key or the policy fails, the
parts already made are removed. Test behaviour is unchanged: both classes
run the same 13 tests and pass before and after.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

---------

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
2026-10-26 07:49:39 -04:00
Daniël van Ziel f6d67461d2 fix(codepipeline): guard worker polling intervals (#6274) 2026-10-26 07:31:28 -04:00
Mario Toffia e09c0b648f fix(cloudformation): provision a usage plan's throttle, quota and stage throttles (#6419)
* fix(cloudformation): provision a usage plan's throttle, quota and stage throttles

* fix(cloudformation): roll back a usage plan when its stack update fails

* fix(cloudformation): keep a failed usage plan update for its rollback retry

* fix(cloudformation): snapshot a usage plan under its patch lock

* fix(cloudformation): restore a usage plan without a lock-free comparison

* refactor(cloudformation): share the API key and usage plan update rollback through CfnRollback
2026-10-26 06:55:14 -04:00
Matheus Oliveira 0634184f5e fix(ec2): apply TagSpecification on key pair, network ACL and image creates (#6551) 2026-10-26 06:53:52 -04:00
Aniket Shukla 935922933f fix(bcm-data-exports): paginate exports and executions (#6604) 2026-10-26 06:50:32 -04:00
Aniket Shukla 2bab3b5cbe fix(aps): honor workspace idempotency tokens (#6552) 2026-10-26 06:45:35 -04:00
Jimmy Liu Jia 51ce672218 feat(ssm): expose ECS optimized AL2023 AMI parameters (#6583) 2026-10-25 23:31:48 -04:00
Priamo Germosen bb48983b9c feat(iam): read the managed-policy family's constraints from the model (#6580)
The declared constraints on IAM's managed-policy operations are read from the
pinned model rather than from a hand-written check, through the vendored data
tools/aws/regen_iam_shapes.py generates and a Query walk of it. Twelve
operations go first: GetPolicy, DeletePolicy, the four policy-version
operations, and the six attach and detach pairs. The vendored file carries that
wave rather than all 180 operations, as the ECR and Resource Groups files carry
theirs, and grows a wave at a time.

The machinery was already here for the JSON protocols. request_shapes
build_constraints vendors required members, lengths, patterns and enums;
RequestConstraintCheck walks a JSON body against them; SmithyValidationErrors
already writes the awsQuery wording. What was missing is the walk a Query
request needs, which is why QueryConstraintCheck sits beside
RequestConstraintCheck rather than inside it: a JSON body arrives as a tree,
where a Query request arrives as flat parameters named after the members that
carry them, and the violations are collected into one "N validation errors
detected" message in the model's member order instead of the first one being
thrown. A test sends two broken members in the opposite order to the model's
and gets the model's order back, so the ordering is the model's rather than the
wire's.

What changes for a caller is the status, in the direction #6402 settled for this
package: a PolicyArn under arnType's 20 characters, a VersionId outside
policyVersionIdType's pattern or an absent required member used to reach the
store and answer NoSuchEntity 404, where AWS's validation layer runs ahead of
the operation and answers ValidationError 400. AttachRolePolicy's RoleName is
the parity case for every value but one: IamService.validateRoleName already
answered it from the same bounds and the same pattern, and for a name outside
its pattern the message is unchanged by the model taking it over, which a test
pins.

An empty name is that one value, and the one place the wording moves rather
than the status. validateRoleName stops at the first constraint an empty name
breaks and reports the minimum alone, where the model also reports the pattern
it breaks, so these twelve operations answer two violations where they answered
one. That is the reading #6402 merged for a value breaking two of its
constraints, and it makes validateRoleName the drift rather than the
reference. The operations still on the hand-written check keep the single
violation until a later wave takes them over, which a test holds still on
CreateRole so that the wave which does has to settle the wording first.

Two answers are the package's own rather than new. A member breaking two
constraints is reported twice, which is what #6402 merged for a
ServiceSpecificCredentialId that breaks both its length and its pattern, so an
empty PolicyDocument reports its minimum and its pattern. The offending value
stays quoted, as SmithyValidationErrors and validateRoleName already quote it;
whether current IAM quotes it at all is an open question, and reading the
constraints in one place is what would make that one helper to change rather
than every message in the package.

Scalars only so far. An operation whose input shape carries a list or a map is
refused when the vendored file loads rather than passed over with its
constraints unread, since reading one means reading Name.member.N and
Name.entry.N.key and naming each index as the request spelled it. A boolean is
declared and holds no constraint to be read against, so a SetAsDefault that is
neither true nor false still reaches the operation, which reads anything but
true as false. A test pins that rather than changing it, since what AWS answers
for a malformed boolean is unrecorded here.
2026-10-25 22:30:35 -05:00
Priamo Germosen 4b33002784 feat(emr): run Spark steps in containers in a docker runner mode (#6578)
Classic EMR steps never ran: each one completed after
step-duration-seconds, so a step could not fail, a failed step's
ActionOnFailure never applied, and no cluster ever ended
TERMINATED_WITH_ERRORS. A new floci.services.emr.runner-mode, immediate
by default (today's timed lifecycle), runs each step in docker mode:

- One container per step, from when the step goes RUNNING until its
  Spark driver exits, through the runner EMR Serverless's docker mode
  uses: spark-submit in local mode in the release's EMR Serverless image,
  with S3A and Glue pointed at Floci. The cluster gets no container.
- command-runner.jar running spark-submit gets the arguments after it,
  without --master and --deploy-mode; a custom JAR runs its MainClass,
  or its manifest's, with the JAR and its Args. Other steps (Hive, Pig,
  script-runner.jar, other commands) fail without running.
- The step is COMPLETED on exit code 0 and FAILED otherwise, with
  FailureDetails: Reason "Unknown Error", which the API reference says
  EMR gives when it cannot find the root cause, and Floci's message.
- ActionOnFailure as the API reference and the Management Guide give
  it: TERMINATE_CLUSTER ends the cluster unless it waits after its steps
  and is protected; CANCEL_AND_WAIT cancels the pending steps and waits,
  or ends a cluster set to end after its steps; CONTINUE goes on; none
  applies above concurrency level 1, nor CANCEL_AND_WAIT with other
  steps running. A cluster a failure ends is TERMINATED_WITH_ERRORS with
  STEP_FAILURE and "Shut down as step failed".
- Step FAILED (ERROR) and cluster TERMINATED_WITH_ERRORS (CRITICAL)
  events, with the messages of the guide's event tables.
- CancelSteps and TerminateJobFlows stop a running step's driver. A
  driver Floci's shutdown or a reset stops leaves its step as it is, so
  no other step starts once the teardown has passed: a step Floci was
  running is FAILED once Floci is back, and a reset's threads write
  nothing after it. Leftover drivers are removed when the service
  starts, before any step can, unless reconcile-containers-on-startup is
  off.
- The driver runs as the step's ExecutionRoleArn, or else the role of
  the cluster's JobFlowRole instance profile, and gets the spark-defaults
  of the cluster's Configurations.

New settings: runner-mode, docker-network, image-template and
reconcile-containers-on-startup, as EMR Serverless has.

The shared runner now reads Progress.cancelled() at every look at a
running driver, so a driver whose run a reset removed is stopped, and
removeLeftoverDrivers is on SparkJobRunner. EMR Serverless's job run
service counts a RUNNING run as not cancelled accordingly.
2026-10-25 22:30:25 -05:00
Priamo Germosen 5c7c84374b feat(codeartifact): add DeletePackageVersions for every format (#6559)
Permanently removes one or more versions of a package, real assets included.
Confirmed against the wire model: the request shape has no versionRevisions
field at all (unlike UpdatePackageVersionsStatus/DisposePackageVersions), only
a single expectedStatus applied to the whole batch, and expectedStatus itself
accepts the full, unrestricted PackageVersionStatus enum. Deleting is allowed
from every status, Disposed included: the User Guide is explicit that "the
only action that can be taken on a package version that has been disposed is
for it to be deleted."

Unlike DisposePackageVersions, which keeps a tombstone record so
DescribePackageVersion keeps answering Disposed, a deleted version is "no
longer in the repository" at all: the generic record is removed outright and
a container-backed version's status override is cleared rather than
replaced, so DescribePackageVersion/GetPackageVersionAsset 404 on it
afterward and the freed coordinate can be freely republished. Reuses
deleteContainerBackedVersionAssets as-is for the real sidecar deletion, byte
accounting, and Maven metadata.xml cleanup, since those are identical
regardless of which action triggered them.
2026-10-25 22:30:16 -05:00
Matheus Oliveira f1816dbb44 fix(ec2): disable Nagle on both socat sockets of a published port forward (#6572)
socat relayed a client's second small write only after the first was
acknowledged, so delayed ACKs stretched every PostgreSQL statement close
to ~44 ms. Add nodelay (TCP_NODELAY) to both addresses: the listener's
option reaches the accepted socket in the fork child, and the connect
side covers the instance-facing one.

Closes #6176

Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>
2026-10-25 22:43:15 -04:00
Kenshin Okinaka 1e89ae2908 docs(ses): list the missing MEDIUM IsValid among the insights deviations (#6579) 2026-10-25 22:43:05 -04:00
Andre Kurait d903074d75 fix(cloudformation): preserve numeric GetAtt attributes (#6564) 2026-10-25 22:37:26 -04:00
Jackson Price 47226f76d1 fix(stepfunctions): page GetExecutionHistory and honor reverseOrder (#6555)
* fix(stepfunctions): page GetExecutionHistory and honor reverseOrder

GetExecutionHistory read only executionArn and includeExecutionData.
Every call returned the whole history, oldest event first: maxResults
and nextToken were ignored, and reverseOrder=true still listed
ExecutionStarted first, so a caller asking for the newest event with
reverseOrder and maxResults=1 got the oldest one instead. The API
reference pages the history by 100 events unless maxResults says
otherwise, allows at most 1,000, returns a nextToken while events
remain, and lists the newest event first under reverseOrder.

Page the history by event id. Ids rise in the order events are
recorded, so a page starts after the last event the previous page
returned, even while the execution is still recording events. An
omitted or zero maxResults uses 100; a maxResults outside 0 to 1,000
or a nextToken outside 1 to 1,024 characters is a ValidationException,
as for ListActivities. A token names its execution and its
reverseOrder, so it is refused with InvalidToken for any other, while
maxResults and includeExecutionData may change from one page to the
next.

Tokens are signed with SignedMarkers and carry their issue time. An
edited token, one issued before a restart, or one issued more than 24
hours earlier is refused with InvalidToken; the 24-hour expiry is the
one the API reference documents. The execution is named in the token
by the SHA-256 of its ARN, so a token stays under 200 characters
however long the state machine and execution names are.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

* test(stepfunctions): page execution history with the SDK paginator

Run a 60-state execution, whose history of 122 events is longer than
one default page, and read it with the AWS SDK for Java: a plain call
returns 100 events and a nextToken, the paginator at 25 events a page
returns every event once, oldest first or with reverseOrder newest
first, and reverseOrder with maxResults=1 returns ExecutionSucceeded
with a token for the rest.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

* test(stepfunctions): give the ListExecutions filter test a clock

StepFunctionsListExecutionsFilterTest, merged from upstream main, built
the handler with the two-argument constructor. On this branch the
handler takes the application Clock for the lifetime of execution
history tokens, so the merged tree did not compile. Pass the system
clock, which ListExecutions does not read.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

* test(stepfunctions): pin the page-size checks of ListActivities and history

ListActivities and GetExecutionHistory each check maxResults and
nextToken on their own, with the same bounds and messages, and page by
100 when maxResults is omitted or 0. Pin the messages of both and the
ListActivities default before the two move onto one helper.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

* refactor(stepfunctions): share the page-size checks of ListActivities and history

ListActivities and GetExecutionHistory each checked that maxResults is
0 to 1,000 and nextToken 1 to 1,024 characters, with the same messages,
and turned an omitted or zero maxResults into 100. Move that into
StepFunctionsPaging.pageSize, which validates the pair and returns the
page size, so the other Step Functions list operations can use it
later. Behaviour, messages and the order of the checks are unchanged.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

* test(stepfunctions): say why the paginator test ignores cleanup failures

The SDK paginator test deleted its state machine in a catch-all that
neither logged nor explained the failure it ignored. Say why it is
safe: the state machine has a unique name, and a cleanup failure must
not hide the test's own result.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

* test(stepfunctions): pin the page-size bounds and the order of the checks

Pin that ListActivities and GetExecutionHistory accept the bounds
themselves (a 1- or 1,024-character nextToken reaches the token
lookup, and ListActivities takes maxResults=1000), and that both read
maxResults and nextToken before bounding either. The test's cleanup
deletes its activities without asserting, so a failed delete can no
longer hide the test's own failure.

The last check is the one place where the shared helper changed
behaviour, which the commit that added it wrongly said it did not. A
history request with maxResults=1001 and a non-string nextToken used
to report the maxResults bound; it now reports "nextToken must be a
string.", as ListActivities always has. The new test fails that way
on the commit before the helper and passes after it.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

* docs(stepfunctions): describe StepFunctionsPaging by its two callers

The class comment said every Step Functions list operation shares this
page request. Only ListActivities and GetExecutionHistory do;
ListStateMachineAliases still checks its own bounds. Name the two
callers and say that both fields are read before either is bounded.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

* test(stepfunctions): share one request helper between the paging tests

StepFunctionsPageSizeIntegrationTest and
StepFunctionsExecutionHistoryPaginationIntegrationTest each carried
the same private call() and content type. Add StepFunctionsRequests in
the testing package, as CfnRequests and EmrRequests serve their
services, and move both tests onto its sfn(action, body). The requests
they send are unchanged.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

* test(stepfunctions): take the request body of sfn() as a map

sfn() took any Object and said it serializes the body as JSON, which
holds for a map but not for a string, which RestAssured sends as is.
Both callers pass maps, as the private helpers it replaced took, so
type the parameter as Map<String, ?>.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

---------

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
2026-10-25 22:37:10 -04:00
Priamo Germosen c5e873ff84 fix(iam): check ARNs inside structures and EventBridge's resources (#6561)
The table of request resources read only top-level members, so an
operation naming its resource inside a structure was checked on *:
SetRulePriorities' RulePriorities[].RuleArn and a state machine alias's
routingConfiguration[].stateMachineVersionArn. A member ending in Arn or
Arns one level inside a structure, or inside each of a list's
structures, now names a resource as a top-level one does, the value's
format deciding which of the action's types it is. Such a member never
fills a variable, holds a type or names a create's parent. A form's list
is read to the first element without the field, as the ELB handler
loops.

EventBridge joins the table (71 operations). Its rules are named by the
rule's name on the event bus EventBusName names, by name or by ARN, and
on the default bus when it names none ("If you omit this, the default
event bus is used"), whose rules are rule/<name>, with no bus.
Corrections give the eight rule operations the default bus's rule when
EventBusName is default or absent, and the custom bus's otherwise, with
two new keys: unless, the complement of when, and absent, the value a
missing member is read as. DescribeEventBus naming no bus is checked on
event-bus/default ("If you omit this, the default event bus is
displayed"). A member whose botocore pattern takes an ARN before a name,
(arn:...:event-bus/)?<name>, is recorded as arnOf: an ARN given for it
is read as that type's one variable, and the resource is in the ARN's
account and Region, so a bus of another account, its default bus
included, names that account's rule, as DescribeRule's CreatedBy says,
checked as given and as the caller's own, which Floci acts on. An ARN
leaving its account and Region empty, which EventBridge's handler takes
as the caller's bus of that name, names the caller's, and a JSON null
for a member read as a value when absent is absent too, as the handler's
asText(null) reads it, so a null EventBusName is the default bus.
EventBridge V2's client, AWSEventsV2 over Smithy RPC v2 CBOR, which
Floci does not serve, shares the operations' names and is left out
(clientsNotRead), and verify ignores it.

EventBridge mints a connection's ARN as connection/<name>/<id> and an
API destination's as api-destination/<name>/<id>, as botocore's ARN
patterns give them, and checks a connection on it (the user guide grants
events:RetrieveConnectionCredentials on connection/<name>/*), while the
Service Reference's formats stop at the name. MINTED_IDS records those
types (mintedIds), and a request naming one by its name is checked on
the ARN its service stores it under, which a StoredResourceArns the
service registers finds for the caller in the request's Region
(EventBridgeService does), or on <name>/* when there is none yet, a
create's included.

Not in this change: PutEvents, whose entries each name their bus, stays
on *, and UpdateEventBus with no Name, which no document says is the
default bus, stays on * too.
2026-10-25 21:21:53 -05:00
Priamo Germosen 4c55ec6b77 feat(sts): vend a signed web identity token for the calling identity (#6517)
GetWebIdentityToken is the last operation the pinned STS model publishes and
Floci did not dispatch, which takes STS to 11 of 11. It answers "a signed JSON
Web Token (JWT) that represents the calling Amazon Web Services identity",
signed by STS and verifiable against the keys the issuer publishes.

The issuer is IAM's. Outbound web identity federation mints one issuer URL per
account, so the token names it as iss and the operation reads the switch behind
it: while the feature is off the answer is
OutboundWebIdentityFederationDisabledException, not the FeatureDisabled the IAM
getter answers. SessionDurationEscalationException is the other refusal with a
published trigger, for a caller on temporary credentials asking for a token
that would outlive its own session, "beyond what was granted when the session
was originally created". JWTPayloadSizeExceededException is modelled and
nothing published says what the maximum payload is, so no size is invented here
to refuse a request with.

A temporary credential with no live session behind it is refused as expired
rather than read as a caller that cannot be identified. IamEnforcementFilter
answers ExpiredTokenException for one and it never reaches the operation, but
with enforcement off, or in the window between that check and this one, the
session lookup comes back empty and the caller would fall to the account root
ARN this file hands an unresolvable caller, as GetCallerIdentity does. A token
is not a request: its subject is signed and outlives the call, so a session
already gone does not get one that speaks for the account, while an unknown
long-term key keeps the stand-in. The filter's wording is shared rather than
copied a second time.

The declared constraints are read ahead of all of it, as #6402 put them
elsewhere in this package: Audience required and 1 to 10 members of 1 to 1000
characters, SigningAlgorithm required at a fixed length of 5, DurationSeconds
60 to 3600 defaulting to 300, and Tags at most 50 with its keys and values held
to their own lengths and pattern. A member sent empty is a member that is
present, breaking its length rather than reading as absent, and a list member's
violation names the index the request sent rather than the number it reads as,
which is what #6478 settled.

The claim layout is the IAM User Guide's. The standard OIDC claims sit at the
top level, iss, aud, sub, iat, exp and jti, with the caller's ARN as the
subject, and the custom claims are nested under the https://sts.amazonaws.com/
namespace the guide names: aws_account for the account the token was asked for,
source_region for the region it was asked from, and the request's tags under
request_tags. "All these claims may not be present in a token at the same
time", so the organization, principal tag and session context claims the guide
also lists are left out rather than invented, and request_tags is absent from a
token whose request named none. The nesting is also what keeps a tag off a
claim STS sets, a tag named exp being a key under request_tags rather than the
claim that chooses the token's lifetime.

Two answers are readings and docs/services/sts.md says so. The model publishes
no enum for SigningAlgorithm, only the fixed length, so a five-character value
that is neither RS256 nor ES384 is answered with this package's enum violation
over the two values the reference names. The global endpoint refusal borrows
the wording AWS publishes for AssumeRoot, the note for this operation giving
none of its own.

Signing goes through a new core.common helper rather than a third copy of the
assembly: Cognito and EKS each already sign a JWT, and EksOidcService moves
onto it here. ES384 signs through the JDK's P1363 variant, so the signature is
the raw R || S pair JWS defines rather than the DER sequence a default ECDSA
signer returns. Each account's key is minted on first use per algorithm and
stored, so a restart does not invalidate a token already handed out.

Eleven tests over the wire, including the claim set with the namespaced
account and region, both signature shapes by their exact lengths, the tags
arriving under request_tags rather than as claims of their own, the ceiling the
caller's own session puts on a token, the refusal for a session already gone,
and the constraints read while the feature is off.
Beside them, a unit test verifies a minted token against the public half of the
stored key for both algorithms, a length being no evidence of what was signed,
and holds that one token's signature does not verify over another's claims; and
the handler test takes the session ceiling to its own boundary on a fixed clock,
where a token ending exactly with the session is issued, one ending a second
later is refused, and nothing is minted on the refusal.

What is not here is the other half: nothing publishes the verification key yet,
so the discovery documents the issuer URL would host are not served, and the
docs say that plainly.
2026-10-25 21:15:35 -05:00
Matheus Oliveira 56196fec1c fix(s3): report the owner and ACL grantees as a canonical user id (#6549)
* fix(s3): report the owner and ACL grantees as a canonical user id

S3 reported the 12-digit account id where AWS reports the account's
canonical user id: the bucket owner in ListBuckets, the owner and the
multipart initiator in ListParts, and every CanonicalUser grantee and
Owner the ACL responses name. All of them now answer the canonical id,
a 64-character lowercase hex string Floci derives as the SHA-256 of the
account id, so the same account answers the same id across calls,
restarts and storage modes and two accounts never share one. The
account id stays the internal identity; only the emitted value changes,
and ACLs persisted by an older Floci keep serving the form they store.
Owner evaluations, the public-access checks and bucket-policy
CanonicalUser principals accept the canonical id and the account id
alike, so stored policies and scripts written against the old form keep
working.

Closes #6242

Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>

* test(s3): say why the cleanup catches stay silent

The two new compatibility cleanup catches swallowed without a word,
which the guide allows only for a named, explained tolerance. Both now
name the reason: cleanup must not mask the assertion.

Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>

* test(s3): expect the canonical owner in the namespace ACL assertions

The cross-account object metadata test still expected the raw account id
in the ACLs, which the canonical owner id broke, and its ACCOUNT_B
assertFalse checks passed whatever the ACL held. All four assertions now
name the accounts the way the ACLs do, through AwsCanonicalUserId.

Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>

* test(s3): share the compatibility cleanup between the two tests

The explained cleanup catches landed on the wrong method, a helper that
was already on main, leaving the new canonical owner test with bare
catches. One deleteObjectAndBucketQuietly helper now holds the commented
catches and serves both tests.

Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>

---------

Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>
2026-10-25 22:11:19 -04:00
floverfelt 89be5c1742 feat(lambda): make reactive S3 sync toggleable and optionally async (#6548)
* feat(lambda): make reactive S3 sync toggleable and optionally async, reporting LastUpdateStatus while it runs

* fix(lambda): run async reactive S3 syncs as the uploader's account, keep InProgress continuous, and queue the latest source per function

* fix(lambda): clear a failed reactive sync's LastUpdateStatus on UpdateFunctionConfiguration, and test async syncs from a second account

* test(lambda): share LambdaCodeSourcesProfile for the async reactive sync test, reuse LambdaWebZips, and extract the failed-sync setup
2026-10-25 21:55:13 -04:00
Vũ Thế Huy 2a5f734777 feat: support managed credentials in Redshift restore (#6515) 2026-10-25 21:43:14 -04:00
Kenshin Okinaka 7f5f1b554d feat(ses): add SES v2 GetEmailAddressInsights (#6573)
* feat(ses): add SES v2 GetEmailAddressInsights

Answer GetEmailAddressInsights offline with verdicts derived from the
address alone. Malformed and over-long addresses answer 200 with every
verdict LOW, the operation is not gated on Virtual Deliverability
Manager, and only suppressionlist@simulator.amazonses.com reports a
missing mailbox, as real SES does. Domains reserved by RFC 2606 and
RFC 6761 have no valid DNS records; every other domain is taken to
have them.

* docs(ses): scope the non-ASCII insights deviation to unquoted parts

A send does not inspect a quoted local part, so GetEmailAddressInsights
rates "é"@gmail.com like any other address. Say so in the deviation
note and pin it, with the unquoted and domain cases, in unit tests.
2026-10-25 21:41:42 -04:00
Aniket Shukla b29c8f8a60 fix(ecr): paginate image listings (#6544)
* fix(ecr): paginate image listings

* fix(ecr): fetch digests only for the selected page

* fix(test): await ECR tag release after stream reset

* refactor(ecr): remove unused image listing overload
2026-10-25 21:37:26 -04:00
Jimmy Liu Jia 671e4bfb7c fix(ecr): return per-repository scanning batch failures (#6569) 2026-10-25 21:33:27 -04:00
Jimmy Liu Jia 6b21aebdc3 feat(ram): support GetResourceShareAssociations (#6558)
* feat(ram): support GetResourceShareAssociations

* test(ram): cover association listing through Java SDK

* refactor(ram): share association visibility filter
2026-10-25 21:26:20 -04:00
TATSUNO “Taz” Yasuhiro c7b3d04e5b fix(lambdaweb): do not clean up the revision a LatestRevision endpoint leaves (#6565)
AWS deletes it only when the next revision turns Active.
2026-10-25 21:23:21 -04:00
Matheus Oliveira 9b4e27c80a fix(iam): authorize KMS operations against the key named in the request (#6458)
* fix(iam): authorize KMS operations against the key named in the request

KMS is JSON 1.1 posted to /, so the path-based key extraction never
found a key and every action was evaluated against key/*: a policy
allowing kms:Decrypt on one key refused that very key, and a policy
restricted to a key restricted nothing. Enforcement now derives the
request's resources the way the KMS permissions reference gives them:
the key-scoped operations name the key the KeyId member names, resolving
an id, an alias or an ARN to the stored key's own ARN; Decrypt without
a KeyId reads the key out of the CiphertextBlob; the alias operations
name the alias and the keys the alias pages give; CreateKey,
GenerateRandom, ListKeys, ListAliases and ListRetirableGrants stay at *.
A request nothing resolves falls back to key/* so the handler answers
its own NotFoundException. ReEncrypt stays the single action AWS splits
into ReEncryptFrom and ReEncryptTo, evaluated against both keys.

Closes #6256

Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>

* fix(iam): authorize ReEncrypt and the grant operations against the keys they act on

A ReEncrypt without SourceKeyId resolved its source through Decrypt's
reader and trusted a KeyId member ReEncrypt does not even have, so a
caller allowed only on key B could send ciphertext encrypted by a
denied key A, name B everywhere, and get A's data back under B. The
source now resolves the way the handler decrypts: SourceKeyId when the
request names one, otherwise the key the CiphertextBlob itself names.
A RetireGrant carrying only a GrantToken was checked against key/*,
which a key-scoped policy never matches; it now answers the key its
grant belongs to, with the documented key/* fallback for a token nothing
resolves. RevokeGrant and the KeyId-plus-GrantId form of RetireGrant
now name the grant's own key beside the key the request names, so a
pair naming one key while the grant belongs to another can no longer
retire or revoke it.

Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>

* fix(iam): resolve a RevokeGrant target by its GrantId, never a GrantToken

The revoke target lookup preferred a GrantToken the RevokeGrant handler
never reads: a request could name the grant of an allowed key in a token
while its GrantId named the grant of a denied one, pass the check on the
token's key, and have the handler revoke the other grant. The lookup now
passes the GrantId alone, so the checked key is the key of the grant the
handler deletes.

Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>

* fix(iam): fall back when a CiphertextBlob is not a string

A Decrypt or ReEncrypt carrying a CiphertextBlob that is not a string
made binaryValue answer null on the enforcement path and blow up before
the handler could answer its own client error. A blob that is not text
now names every key the account holds, the documented fallback, so the
request is authorized and the handler answers the error AWS answers for
a malformed blob.

Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>

* fix(kms): share the grant token scan and its enforcement lookup

retireGrant scanned the region's grants for a token the same way the
enforcement lookup did; both now go through one findGrantByToken. The
builder's revoke target resolves through the shared grantKeyArn helper
with the members each handler actually reads, the token and the id for
RetireGrant and the id alone for RevokeGrant, whose handler never reads
a token. The two test javadocs that described the enforcement gap as a
review's finding now describe the gap itself.

Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>

---------

Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>
2026-10-25 21:19:18 -04:00
Andre Kurait 74a932bc50 fix(stepfunctions): honor explicit Lambda task qualifiers (#6563)
Use the effective Lambda qualifier for optimized task authorization, target resolution and executor handoff. Keep embedded qualifier conflict validation aligned with Lambda.

Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
2026-10-25 17:53:47 -04:00
Andre Kurait 615e12dcff refactor(concurrency): add bounded work queues and versioned signals (#6547) 2026-10-25 17:33:29 -04:00
Jimmy Liu Jia bcae24f5fc feat(ssm): match parameter path label filters (#6560)
* feat(ssm): match parameter path label filters

* fix(ssm): match labeled version metadata in path filters
2026-10-25 17:29:17 -04:00
jwoa95 5f63ffb761 fix(rds): terminate target sessions during PostgreSQL restore (#6550) 2026-10-25 17:29:09 -04:00