Commit Graph
792 Commits
Author SHA1 Message Date
Andre Kurait faa9ff2365 fix(elbv2): reject missing listeners in describe requests (#7152)
Promote the complete retained fork #235 listener lookup validation and affected SDK and CloudFormation regressions on the qualified main base. Preserve the original compatibility fixture and JUnit SDK adapter.

Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
2026-10-31 20:15:05 -04:00
Andre Kurait f77d032818 fix(ec2): include r5.large in the instance type catalog (#7146)
* fix(ec2): include r5.large in the instance type catalog

Promote the complete retained fork #234 catalog entry and SDK regression on current main. Keep catalog metadata and offerings consistent.

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

* test(ec2): use JUnit and Hamcrest for R5 catalog assertions

Preserve all 18 metadata and offering assertions while following the src/test assertion conventions requested in review.

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

---------

Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
2026-10-31 19:01:54 -04:00
Jackson Price be315bf160 feat(cloudformation): provision AWS::EC2::KeyPair with its private key in Parameter Store (#7128)
* feat(cloudformation): provision AWS::EC2::KeyPair with its private key in Parameter Store

AWS::EC2::KeyPair had no provisioner, so a stack stubbed it: the stack
reached CREATE_COMPLETE without creating a key, Ref returned a made-up
id and Fn::GetAtt returned the literal "Key.KeyPairId". A template that
creates a key pair for an instance, as the AWS::EC2::KeyPair reference
shows, got nothing to log in with.

The new provisioner does what that reference describes:

- Without PublicKeyMaterial it calls CreateKeyPair with the template's
  KeyType and KeyFormat, so rsa and ed25519 keys and pem and ppk files
  all work, and stores the private key in the SecureString parameter
  /ec2/keypair/<KeyPairId>. With PublicKeyMaterial it imports the key,
  takes the key's type from the material (KeyType is ignored, as
  documented) and writes no parameter.
- Ref is the key name; Fn::GetAtt KeyPairId and KeyFingerprint are the
  key's own.
- Tags are applied once the key exists and the parameter is written
  last, so a step that fails leaves only the key to undo. Deleting a
  created key deletes its parameter first, on stack delete, rollback
  and replacement cleanup alike; a key or parameter already gone counts
  as deleted. A key is deleted by its name, as Cloud Control's
  DeleteResource names it; a key deleted outside the stack still has
  its parameter deleted with the stack.
- Only AWS::NoValue leaves a property out; an empty string a parameter
  supplies is a value, as the same string written literally is. An
  empty PublicKeyMaterial fails with the MissingParameter error
  ImportKeyPair gives for it.
- Every property is create-only (the registry schema has no update
  handler) and KeyName is required. An update that changes another
  property under the same name is refused with CloudFormation's
  custom-named replacement error. A rename creates the new key, then
  deletes the old one with its parameter once the update commits, or
  deletes the new one if the update rolls back.

The create-only list is added to create-only-properties.json, so a
change set reports a changed name or type as a replacement, and the
generated resource-type table lists KeyPair.

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

* fix(cloudformation): delete orphaned key pair parameters on cleanup

Replacement cleanup and rollback delete a displaced or rolled-back
AWS::EC2::KeyPair by name only. When that key had already been deleted
outside the stack, its /ec2/keypair/<KeyPairId> SecureString parameter
was left behind.

Record the id of each created key the resource still owes a delete,
keyed by name, so the cleanup, the rollback and a rollback retry also
delete that key's parameter. Imported keys have no parameter and are
not recorded.

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

* fix(cloudformation): end a key pair's rollback retry when an update starts

A rollback that could not delete a renamed key pair's replacement leaves
it owed for ContinueUpdateRollback. Once that skipped the resource, a
later update that failed before creating anything rolled back by
retrying that old delete instead of undoing itself, and could end in
UPDATE_ROLLBACK_FAILED.

Call ReplacementCleanup.endRollbackRetry as an update starts, as the
other replacing provisioners do. The replacement stays listed, so the
next committed update or the stack delete still removes it.

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

* test(cloudformation): say the rollback retry test pins a helper contract

The test added with the endRollbackRetry call rolls back the same
resource whose update failed. The engine does not do that for a key
pair today: it restores the previous resource and skips its rollback,
so the earlier commit's UPDATE_ROLLBACK_FAILED scenario is not
reachable yet. Say that the test pins the ReplacementCleanup contract
instead.

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

* fix(cloudformation): clean up partial KeyPair parameter writes

* refactor(cloudformation): share KeyPair create-only tracking

---------

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
2026-10-31 18:03:31 -04:00
Andre Kurait 81e1dbc573 fix(sts): cap account-root token durations at one hour (#7125)
* fix(sts): cap account-root token durations at one hour

Cap GetSessionToken and GetFederationToken credentials issued to the account-root identity at one hour, preserving IAM user durations and validation ordering.

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

* test(sts): bound root token expiry by request time

Check the one-hour default using timestamps captured before the request and after the response, allowing millisecond wire precision. Preserve the root duration cap.

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

---------

Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
2026-10-31 17:01:47 -04:00
Jackson Price d173d65eb4 fix(ec2): honor CopyImageTags on CopyImage (#7097)
* fix(ec2): tag an AMI with the tags RegisterImage is given

RegisterImage never read TagSpecification, so an AMI registered with
image tags came back from DescribeImages untagged: its tag filters
matched nothing and DescribeTags listed nothing for it. A tag
specification for another resource type was accepted as well, although
AWS fails that request.

RegisterImage now reads its image tag specifications and refuses any
other resource type with InvalidParameterValue. It checks the tags as
CreateTags does (no aws: prefix, the key and value lengths, at most 50
tags) before registering anything, so a refused request leaves no AMI
behind. The tags are stored before the AMI is, so DescribeImages never
lists it without them, and a key given twice keeps its last value, as
Floci's CreateTags keeps it.

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

* fix(ec2): copy an AMI's tags when CopyImage sets CopyImageTags

CopyImage never read CopyImageTags, so a copy asked to carry its
source's tags came out untagged, and DescribeImages could not find it
by them.

With CopyImageTags=true the copy now gets the caller's tags on the
source, read in the source region, less the aws: system tags, which
AWS does not copy either. Without it, or with false, no tags are
copied, which is AWS's default. The source keeps its tags, and the
copy's are stored in the destination region only. The tags are read
under the source AMI's own id, so a catalog AMI's tags on that id are
copied too, while tags put on one of its aliases are not. Floci keeps
each account's tags apart, so another account's tags never reach the
copy.

CopyImage still neither checks nor applies TagSpecification, and the
docs now say so.

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

* test(ec2): stub the CopyImage overload the handler calls

Upstream's handler test for CopyImage tag specifications stubbed the
five-argument copyImage. On this branch the handler passes
CopyImageTags as well, so the stub never matched, the mock returned
null and the test failed with a NullPointerException. It now stubs the
six-argument call with CopyImageTags false, which is what a request
without it sends.

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

* refactor(ec2): leave RegisterImage tag specifications to upstream's handling

Upstream now reads RegisterImage's TagSpecification in the Query
handler, refuses other resource types and checks the tags before the
AMI is registered, so this branch's own path for the same thing is a
duplicate. The seven-argument registerImage overload and the tag code
in registerImageLocked are removed, and RegisterImage goes back to
upstream's code. CopyImage stores the tags it copies straight after it
registers the copy instead.

The branch's RegisterImage tests go too: upstream's
Ec2CreateTagSpecificationIntegrationTest and Ec2QueryHandlerTest cover
the same behaviour. What the branch adds is CopyImageTags alone.

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

* test(ec2): pin a TagSpecification tag over a copied tag of the same key

With CopyImageTags=true and an image TagSpecification on the same
request, the copy carries both sets. When both name the same key, the
TagSpecification value is the one the copy keeps, since the handler
applies the specification after the service copies the source's tags.
The docs row says so; this test holds it.

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

* fix(ec2): refuse a CopyImage over the tag limit before creating the copy

With CopyImageTags=true and an image TagSpecification, the copied and
the specified tags were each checked against the 50-tag limit on their
own. The service then created the AMI and its snapshots and stored the
copied tags, and only the handler's CreateTags of the specification saw
the combined set: past 50 it answered TagLimitExceeded while the copy
it had just made stayed behind, so a retry under the same Name failed
with InvalidAMIName.Duplicate.

The handler now passes the requested image tags to the service, which
checks the union of copied and requested keys before it registers
anything. The upstream handler test stubs the new signature.

The docs and the test of a key given both ways now say that the
TagSpecification value winning is Floci's behaviour: the public
CopyImage reference does not say how AWS settles that.

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

* refactor(ec2): keep one CopyImage service signature

---------

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
2026-10-31 15:02:38 -04:00
Mario Toffia 7cf516a14d fix(cloudformation): honor retained resources on stack deletion (#6723)
* fix(cloudformation): honor retained resources on stack deletion

* test(cloudformation): assert the unretained sibling bucket is removed

* fix(cloudformation): skip every retained resource, whatever its status

A DELETE_FAILED stack can hold a CREATE_FAILED resource that the delete
never touches, because floci only deletes a failed resource it owns for
rollback. Naming it in RetainResources was accepted but left it
CREATE_FAILED with no DELETE_SKIPPED event. AWS reports every retained
resource DELETE_SKIPPED, so the retain check now runs before the
deletability guard.

* test(cloudformation): build the retain integration test on the shared CFN helpers

Use CfnStackWaits.awaitStatus, which also fails at once on another
terminal status, instead of a private poll, and CfnRequests.cfn for the
Query requests.
2026-10-31 12:15:25 -04:00
Suja Shaj dcf8ec7430 fix(ec2): report NAT gateways as zonal and honor PrivateIpAddress (#7059)
* fix(ec2): report NAT gateways as zonal and honor PrivateIpAddress

The Terraform AWS provider reads network_interface_id, private_ip and
public_ip from a NAT gateway only when it is reported with
availabilityMode zonal. Floci never sent availabilityMode, so all three
stayed null. Every gateway Floci creates sits in one subnet, so the
responses now say zonal.

Floci has no regional NAT gateways. A regional request that named only
its VPC failed on the missing subnet, and one that also named a subnet
got a zonal gateway, through both CreateNatGateway and
AWS::EC2::NatGateway. Both now refuse AvailabilityMode regional with
UnsupportedOperation. Any other value except zonal, such as Regional,
fails with InvalidParameterValue instead of creating a zonal gateway.

Once Terraform reads private_ip back, the gateway has to hold the
address it was asked for. private_ip forces a new gateway, and
CreateNatGateway ignored PrivateIpAddress, so a config that set it
would plan a replacement on every run. CreateNatGateway and
AWS::EC2::NatGateway now give the gateway's interface the requested
address, checked by the same rules as RunInstances: inside the subnet,
not reserved and not in use. A changed PrivateIpAddress replaces the
CloudFormation resource, as it is createOnly. A gateway has its primary
address only, so SecondaryAllocationIds, SecondaryPrivateIpAddresses
and SecondaryPrivateIpAddressCount are refused with
UnsupportedOperation instead of being dropped.

AWS::EC2::NatGateway also sets EniId, the gateway's primary interface,
which Fn::GetAtt resolved to the literal "Nat.EniId" although the
gateway has had a real interface since #5622.

Closes #6767

* fix(ec2): take no VPC network lease for a NAT gateway's requested address

DeleteNatGateway never returns a lease, so the one CreateNatGateway took
for its PrivateIpAddress kept the address from automatic allocation
after the gateway was gone. Check that the address is free the way
CreateNetworkInterface does, without the lease; automatic allocation
already steps around addresses a stored NAT gateway holds.

Ec2NatGatewayAddressIntegrationTest now sends its requests through the
shared Ec2Requests.ec2 instead of its own copy.
2026-10-31 05:32:32 -04:00
Vũ Thế Huy 76b7eed371 fix(s3): enforce the default Block Public Access on buckets nobody configured (#7036) 2026-10-31 05:20:19 -04:00
Andre Kurait 9f0856c691 fix(appconfig): default omitted configuration profile type (#7037) 2026-10-31 05:09:39 -04:00
DavidandPriamo Germosen 6db78b8ef4 feat(glue): data quality rulesets (#7035)
* feat(glue): data quality rulesets

CreateDataQualityRuleset, GetDataQualityRuleset, UpdateDataQualityRuleset
and DeleteDataQualityRuleset answered InvalidAction, and
ListDataQualityRulesets always returned an empty list, so Terraform's
aws_glue_data_quality_ruleset failed at its first apply.

Rulesets are now stored per account and Region by name, with their
description, DQDL text, target table, security configuration and created
and last modified times, and tagged through the shared tag store by their
dataQualityRuleset ARN. Update replaces only the members the request sets.
List returns them in name order with RuleCount, filtered by name,
description, target table, created and last modified times and tags, and
paged by MaxResults and NextToken. Errors follow the model:
AlreadyExistsException for a duplicate, EntityNotFoundException for an
unknown name, InvalidInputException for a missing or oversized member.

Rulesets are stored, not evaluated.

Closes #6830

* fix(glue): match a ruleset's catalog and take its store from the caller

The ListDataQualityRulesets target table filter compared only TableName and
DatabaseName, so filtering for one catalog also returned a ruleset on the
same table in another. A CatalogId in the filter now has to match too, with
a target table that names no catalog in the account's own.

The package-private GlueService constructor built the ruleset store itself;
it now takes it as an argument, as it does every other store.

* fix(glue): reuse hasTags and AwsJsonTimestamp for ruleset listing

The ruleset tag filter now goes through hasTags, as jobs, crawlers and
triggers do, and the list filter's timestamps through
AwsJsonTimestamp.epochSeconds, so a timestamp sent as a string is refused
with InvalidInputException as the SDKs never send one.

---------

Co-authored-by: Priamo Germosen <6233424+pgermosen@users.noreply.github.com>
2026-10-30 22:36:13 -04:00
Matheus Oliveira 955a935bad fix(cloudfront): return the decoded function code from GetFunction (#6798)
* fix(cloudfront): return the decoded function code from GetFunction

GetFunction wrote the stored base64 text into the response body where
AWS returns the code the request carried, so reading back what you sent
gave different bytes. The body is the decoded code now, with the
octet-stream content type and the ETag header unchanged; the
CloudFormation provisioner base64-encodes the template's plain code so
the stored form stays the wire form, and GetFunction is the single
decode point.

Closes #6749

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

* fix(cloudfront): read a plain-code record persisted by an older Floci version

GetFunction served a 400 for a stored code that was not base64, and an
upgrade over persistent storage kept the records older Floci writes
wrote the CloudFormation provisioner as plain text, so those functions
stopped serving their code. A non-base64 record now reads back as its
stored bytes, and the next UpdateFunction rewrites it into the uniform
base64 form. The compat round-trip test captures the updated etag
before asserting so a failed assertion cannot hijack the cleanup's
delete.

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

* test(cloudfront): read the ETag update header the model names and rebase the decoded-code management tests

The decoded-code round trip asserts UpdateFunction answers the version
in the ETag header the SDK models name, so it reads the value it was
extracted from instead of null. The compat round-trip test uses AssertJ
like the rest of the compatibility module.

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

---------

Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>
2026-10-30 14:57:30 -04:00
Vũ Thế Huy 9b69b3dac3 feat(redshift-serverless): copy snapshots into the configured destination region (#7024)
* feat(redshift-serverless): copy snapshots into the configured destination region

A SnapshotCopyConfiguration used to be stored and echoed, with nothing copied.
A background sweep now carries each AVAILABLE snapshot of the namespace, taken
at or after the configuration was created, into the destination Region with its
dump and metadata. The copy is an ordinary snapshot there, so describe, restore,
delete and expiration work on it unchanged.

- The source records the Regions it has been copied to, so a deleted or expired
  copy is not made again and a retry or restart after a crash makes no second
  copy. A copy made for an earlier snapshot of the same name is replaced.
- Retention and KMS key come from the configuration. A name already taken by
  an unrelated snapshot in the destination is kept and logged.
- Rules carry the account and namespace id, so accounts never collide and a
  recreated namespace does not inherit its predecessor's configuration.
- The destination must be a known Region in the namespace's partition.
- ResetAll now removes every snapshot dump, which it used to leak.
- New switches: snapshot-copy-enabled and snapshot-copy-sweep-interval-seconds.

* fix(redshift-serverless): keep the earlier snapshot copy restorable when a replacement fails

Each copy now gets its own dump file and the replaced copy's dump is removed
only after the new record is saved. Drop the slow, partition-bound
compatibility test; the in-repo engine and integration tests cover the copy.

* fix(redshift-serverless): name a snapshot copy's dump by id so long snapshot names still copy
2026-10-30 14:44:26 -04:00
David e29b1d884c feat(rds): automated backups, kept after a delete and restored from (#6996)
* feat(rds): automated backups, kept after a delete and restored from

DescribeDBInstanceAutomatedBackups, DeleteDBInstanceAutomatedBackup,
DescribeDBClusterAutomatedBackups, DeleteDBClusterAutomatedBackup,
StartDBInstanceAutomatedBackupsReplication and
StopDBInstanceAutomatedBackupsReplication answered UnsupportedOperation, and
DeleteDBInstance and DeleteDBCluster ignored DeleteAutomatedBackups, so a
deleted database could not be restored to a point in time.

A live standalone instance with backups on now reports an active automated
backup. A delete with DeleteAutomatedBackups=false keeps a retained one, with
the PostgreSQL data saved outside mock mode, and RestoreDBInstanceToPointInTime
(by DbiResourceId or backups ARN) and RestoreDBClusterToPointInTime (by
DbClusterResourceId) restore from it. Replication to another Region is
metadata only: the replica is listed as replicating, the source lists it under
DBInstanceAutomatedBackupsReplications, and a stop or the source's delete keeps
it as retained.

Closes #6828

* fix(rds): restart stopped replication, use the replica's window, match the source ARN

A stopped replica kept as retained refused a second start of replication to
its Region; only a replica that is still replicating refuses it now, and a
retained one is replaced. A restore from a replicating backup checked the
time against the live source's window; it checks the replica's own window
now and still copies the live source. A replication source ARN naming
another account or service found this account's instance by identifier; the
whole ARN must now match the instance's.

The RDS count in the docs service matrix is 117, for the six new actions.
2026-10-30 11:07:13 -04:00
Jackson Price 7b9f747fff fix(cloudwatch): filter DescribeAlarms by state, action, children and parents (#6862)
DescribeAlarms read only AlarmNames, AlarmNamePrefix and AlarmTypes. It
ignored StateValue, ActionPrefix, ChildrenOfAlarmName and
ParentsOfAlarmName, so each of them answered every alarm of the
requested types, and combining them was never refused.

StateValue and ActionPrefix now narrow metric and composite alarms
alike. ActionPrefix matches an alarm, OK or insufficient-data action,
since the API reference calls it a prefix for any action.
ChildrenOfAlarmName lists the alarms a composite alarm's rule names, by
name or ARN, and ParentsOfAlarmName the composite alarms whose rules
name an alarm. Neither lists the alarm it names, and both return only
the members the API reference lists: name, ARN, StateValue and
StateUpdatedTimestamp for children, name and ARN for parents.

As the API reference says, either one combined with any member except
MaxRecords and NextToken is refused with ValidationError. A StateValue
outside the enum and an empty or over-long ActionPrefix or alarm name
are refused with Smithy's validation messages, reported together with
an invalid AlarmTypes. Both handlers pass the request's filters to the
service as one AlarmFilter, so Query, JSON and CBOR answer alike, and a
JSON null member counts as left out, AlarmNamePrefix included, which
read as the prefix "null" before.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
2026-10-30 09:37:12 -04:00
Tomas KislanandPriamo Germosen 55c33d7ad3 fix(s3): keep Content-Encoding and Cache-Control on multipart uploads (#7000)
* fix(s3): keep Content-Encoding and Cache-Control on multipart uploads

CreateMultipartUpload ignored both headers, so an object completed from a
multipart upload came back from HeadObject and GetObject without them while a
single PutObject kept them. A client that decodes by Content-Encoding (a
browser, curl --compressed) then received raw gzip bytes for any object large
enough to be uploaded in parts.

The controller now reads both headers on the ?uploads branch, stripping the
aws-chunked token as PutObject does. S3Service records them on the
MultipartUpload and applies them to the object when the upload completes.
An upload created without either header still produces an object with neither.

* test(s3): use .bin keys and text/plain in the multipart encoding tests

Match the neighbouring tests, which name objects *.bin; the behaviour under
test is not specific to YAML. The content type is text/plain rather than
application/octet-stream because MultipartUpload falls back to
application/octet-stream when CreateMultipartUpload carries no Content-Type,
so asserting that value could not catch a dropped header.

---------

Co-authored-by: Priamo Germosen <6233424+pgermosen@users.noreply.github.com>
2026-10-30 08:52:53 -04:00
jwoa95 57c4a20dde feat(secretsmanager): publish secret write events through CloudTrail (#6623) 2026-10-30 07:27:51 -04:00
Mohith 628beeef85 fix(rds): report the RDS hosted zone id on clusters and instances (#6826)
* fix(rds): report the RDS hosted zone id on clusters and instances

DescribeDBClusters omitted HostedZoneId and DB instance endpoints omitted
Endpoint.HostedZoneId, so Terraform's aws_rds_cluster.hosted_zone_id was
empty and Route 53 alias records pointing at RDS endpoints failed.

Add a per-region rdsHostedZoneId fact to region-facts.json through the
generator, with the us-east-1 value from the AWS CLI RDS documentation,
and read it through AwsRegionFacts.rdsHostedZoneId. Regions without a
captured value fall back to the us-east-1 zone; Floci's Route 53 resolves
alias targets by DNS name, so the fallback does not affect resolution.
The value is looked up when the response is built, so existing clusters
and instances report it too.

Closes #6778

* fix(rds): read the RDS hosted zone from the CLI example and keep the fallback in RDS

AwsRegionFacts.rdsHostedZoneId now returns an Optional like every other
accessor there, and RdsQueryHandler owns the fallback zone for regions with
no captured value, the way API Gateway keeps its own placeholder. A missing
us-east-1 entry can no longer break a describe call.

The generator reads the us-east-1 zone from a snapshot of the AWS CLI
describe-db-instances example under aws-docs/partition-guides, as the
GovCloud API Gateway zones come from the GovCloud guide, instead of a
typed-in constant. The parse is required and fails on a missing,
wrong-region or ambiguous example. Adding another region is now a data
change.
2026-10-30 07:05:41 -04:00
Jackson Price 6acadc3404 fix(cloudwatch): evaluate composite alarms with CloudWatch's reasons and refusals (#6987)
* fix(cloudwatch): evaluate composite alarms with CloudWatch's reasons and refusals

Composite alarms recorded "AlarmRule evaluated to <state>" with no
StateReasonData, were evaluated only when created, accepted a rule
naming an alarm that does not exist, and let DeleteAlarms remove an
alarm a composite alarm still names. Published CloudWatch captures
show each one differently.

- A change of state records the StateReason CloudWatch writes: "<arn>
  was created and its alarm rule evaluates to OK", "<arn> was updated
  and its new alarm rule evaluates to ALARM", or "<child arn>
  transitioned to ALARM at Monday 14 September, 2026 06:29:58 UTC".
- StateReasonData lists triggeringAlarms: the children whose state
  agrees with the new one, most recently changed first. After a child's
  change only the children that changed since the composite alarm last
  did are listed; the alarm history orders those changes.
- PutCompositeAlarm evaluates an alarm it updates, and its parents
  follow the change.
- A rule naming a missing alarm is refused with "Could not save the
  composite alarm as alarms [<arn>] in the alarm rule do not exist".
- DeleteAlarms deletes nothing when it names an alarm a composite alarm
  references ("Cannot delete <name> as there are composite alarm(s)
  depending on it.", or "a,b ... depending on them."), or more than one
  composite alarm ("Cannot delete [2] Composite Alarms as only one
  composite alarm delete is allowed in single request").

The new service, Query, JSON and SDK tests fail on main.

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

* test(cloudformation): cover a composite alarm over its stack's metric alarm

A stack whose composite alarm names the stack's own metric alarm is
created child first and deleted parent first, so neither the new
refusal of unknown children nor the refusal to delete a referenced
alarm fails it. A stack whose rule names a missing alarm rolls back
with CloudWatch's message; that test fails on main.

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

* fix(cloudwatch): evaluate composite alarms only when a child changes state

Review follow-ups to the composite alarm evaluation change.

- A child's PutMetricAlarm update, or a SetAlarmState to the state it
  already has, no longer re-evaluates its parents. CloudWatch documents
  that a composite alarm set with SetAlarmState "returns to its actual
  state only once any of its children alarms change state"; such a
  parent used to flip back with a reason naming an old transition.
- Application Auto Scaling deletes a policy's alarms one at a time, so
  when a composite alarm names one of them only that one stays.
- A changed child that no longer resolves leaves its parent as it is
  instead of failing the request.
- The docs say that an update closing a cycle is not evaluated, where
  CloudWatch evaluates it.
- Tests: the wire and SDK tests ignore missing data so the alarm
  evaluator cannot reset the states they set, one pins the reason when
  two children change together, and the self-reference and cross-region
  assertions, which pinned texts CloudWatch does not use, are gone.

The new manual-state and Application Auto Scaling tests fail without
this change.

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

* fix(cloudwatch): evaluate composite alarms above a cycle

A composite alarm on a cycle stayed pending, which blocked every
composite alarm above it: one whose other child changed state was never
evaluated. Alarms on the cycle are still not evaluated, but they no
longer hold up the ones above them.

Also from the second review: the docs say only a metric alarm child's
update is not a change of state, and that alarms above a cycle are
evaluated; a test covers a rule stored before missing children were
refused, whose child is created later; a test docstring links the
SetAlarmState reference.

The test for an alarm above a cycle fails without this change.

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

* chore(cloudwatch): log a composite evaluation that stops with alarms pending

The third review found one way the evaluation can still stop with
alarms pending: an alarm named like another alarm's ARN makes the cycle
check follow the wrong rule. The debug line removed in the previous
commit is back, so that case is visible again; the name lookup itself
predates this branch. The docs say an alarm above a cycle is evaluated
when one of its children changes state.

No behaviour change.

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

* fix(cloudwatch): count composite StateReasonData in code points

triggeringAlarms stopped adding children once the serialized JSON
passed 4000 UTF-16 units, while the StateReasonData length check
counts Unicode code points, as Smithy's length constraint counts
Unicode scalar values. An emoji is two units but one code point, so
children whose entries still fit were dropped. The cap now counts code
points, shares its constant with SetAlarmState's length check, and the
docs say so.

The new test names fifteen children with emoji and a newest one with a
short name, so that twelve entries come to exactly 4000 code points. It
lists 7 of them before this change and all 12 after; an exclusive cap
would list 11.

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

* test(cloudwatch): keep the composite alarm SDK test on Java 17 APIs

CloudWatchCompositeAlarmTest called List.getFirst(), which Java 21
added. compatibility-tests/sdk-test-java compiles for Java 17, and CI
builds it in maven:3.9-eclipse-temurin-17, so its test-compile failed
and took the sdk-test-java and ec2-containers jobs with it. The three
calls use get(0) now.

A test-compile of sdk-test-java with --release 17 fails on those three
lines before this change and passes after it. No other file of the
branch is outside the root module, which builds for Java 25.

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

---------

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
2026-10-30 07:02:47 -04:00
TATSUNO “Taz” Yasuhiro 83ed905253 test(compat): pick a home region check region other than the run's own in LambdaWebTest (#6990) 2026-10-30 06:54:57 -04:00
Allen Sanborn 5ad2f64840 fix(cloudtrail): keep a trail's KMS key and CloudWatch Logs delivery (#6989) 2026-10-30 06:54:42 -04:00
Jackson Price ead5d4a3fe feat(autoscaling): support EnterStandby and ExitStandby (#6955)
* feat(autoscaling): support EnterStandby and ExitStandby

Both actions were routed to Auto Scaling but answered
UnsupportedOperation, so a client taking a node out of service could
lower MinSize and then fail to put the instance in standby.

EnterStandby moves InService instances to EnteringStandby, optionally
lowering desired capacity (refused below MinSize), and returns one
InProgress activity per instance. The reconciler then deregisters them
from the group's target groups and Classic load balancers and sets
Standby. ExitStandby moves Standby instances to Pending, raises desired
capacity (refused above MaxSize) and returns one PreInService activity
per instance; the reconciler registers them again and sets InService.
Descriptions, causes, status codes and progress follow the EC2 Auto
Scaling API reference, user guide and botocore examples. Error texts
follow real AWS responses quoted in public issue reports where one was
found; the others (an instance outside the group, ExitStandby above
MaxSize) are modelled on AWS's texts for similar errors.

Standby members do not count toward desired capacity, including when
AttachInstances raises it, are never scaled in or refreshed, and stay
in the group when their EC2 instance stops. Each member records the
activity of its move in a new optional standbyActivityId field, so a
move interrupted by a restart finishes after it; groups stored without
the field load unchanged. A move whose instance is terminated,
detached, deleted with its group or not running when it leaves standby
is cancelled.

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

* test(autoscaling): check EnterStandby and ExitStandby through the Java SDK

The AWS SDK for Java parses both responses into InProgress and
PreInService activities with AWS's descriptions, causes and progress,
the instance reaches Standby and then InService again, desired capacity
follows it, and ExitStandby on an instance in service is a
ValidationError.

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

* fix(autoscaling): health-check standby returns and lock capacity changes

Review fixes for EnterStandby and ExitStandby:

- An instance whose EC2 instance stopped or terminated while in standby
  now fails the health check AWS runs when it exits standby: Floci
  terminates it if EC2 still has it, records AWS's "Terminating EC2
  instance" activity with the EC2 health check cause, and the group
  launches a replacement. Before, it was dropped from the group as a
  stale reference, and a stopped instance was left behind in EC2, still
  tagged with the group name.
- An instance returning from standby keeps its health status instead
  of being reset to Healthy, so a SetInstanceHealth mark made while it
  waited survives its return.
- SetDesiredCapacity and UpdateAutoScalingGroup now change the group
  under its lock, so they no longer race the capacity changes
  EnterStandby, ExitStandby and the reconciler make under it.
- DetachInstances refuses an instance still in EnteringStandby with
  AWS's "is not in InService or Standby" error. Other states Floci
  still detaches, as before.
- The docs say that instance refresh leaves standby members alone
  whatever its StandbyInstances preference says.

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

* fix(autoscaling): refuse detaching an instance mid standby move

DetachInstances now refuses any instance whose standby move is still in
progress, with AWS's "The instance <id> is not in InService or
Standby." error: one in EnteringStandby, one on its way back from
standby (Pending), and one marked for termination before the
reconciler ended its move. The detach path therefore no longer cancels
a move. Pending launches and Terminating members without a move are
still detached, as before.

Tests now also cover a refused termination of an instance that failed
its health check on return (retried on the next pass, nothing launched
meanwhile), that return across a restart in every storage mode, and an
instance refresh cancelling the move of an instance on its way back.
The docs list that refresh among the reasons a move is cancelled.

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

* fix(autoscaling): treat an instance EC2 has no record of as missing

The reconciler's stale check asked DescribeInstances for the one
instance and kept the member on any error. EC2 answers an id it has no
record of with InvalidInstanceID.NotFound rather than an empty list, so
a member whose EC2 record was gone was kept forever:

- an instance leaving standby stayed Pending with its PreInService
  activity and kept counting toward desired capacity, so no
  replacement was launched;
- a Pending launch was never pruned either;
- a Terminating member was never pruned and was reported as a failed
  termination.

That error now reads as a missing instance, both when deciding whether
a member is stale and whether it still needs terminating. Other errors
keep the member, as before. The standby tests' EC2 mock now answers a
missing id the way Ec2Service does.

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

* fix(autoscaling): keep a missing instance out of a termination batch

EC2 terminates the ids of a TerminateInstances batch in order and
stops at the first one it has no record of. The reconciler sent every
Terminating member in one batch, so a member whose EC2 record was gone
kept the members after it from being terminated that pass and had a
failed termination recorded for them.

A member EC2 has no record of now stays out of the batch, since it is
pruned as a stale reference in the same pass. The standby tests' EC2
mock terminates in order as Ec2Service does, and a reconciler test
covers a batch with one missing and one live member.

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

* docs(autoscaling): say which EC2 errors still count as an instance record

hasNoEc2Record treats only InvalidInstanceID.NotFound (or an empty
answer) as a missing record; any other EC2 error keeps the instance in
the termination batch. The Javadoc now says so.

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

* test(autoscaling): use StorageFactories in the standby storage test

storedService built its StorageFactory from hand-stubbed EmulatorConfig
and ServiceConfigAccess mocks, which is what StorageFactories.open in
io.github.hectorvent.floci.testing already provides. Its flush and
compaction intervals are an hour instead of a minute; neither timer
fires during the test either way.

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

---------

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
2026-10-29 22:28:16 -04:00
Priamo Germosen 98a3d2a346 feat(iam): read every modelled operation's constraints from the model (#6965)
The vendored file carried 52 of IAM's operations and carries 162 now, which
is every one of the 164 that declares a required member, a length, a pattern,
an enum or a range, bar the two account alias operations: those answer their
single member in AWS's own wording, so there is nothing left for the walk to
read on them.

What takes the last of them in is a walk that reads a Query map and anything
nested under one. A map arrives as entries numbered under its own name,
`ReplacementValues.entry.1.key` and `.entry.1.value`, and an entry's value is
named under the key that entry carried, `replacementValues.Department.values`,
which is how both maps this service answered by hand already named one and how
the JSON protocols name a map's value here. An entry is read off its key, so
one numbered with a value and no key is not an entry the map could hold. A
structure's field may be a list, a list's member may hold a list of its own
and a map's value may be a structure, so `AcquireRole`,
`PutAccountProperties`, `CreateDelegationRequest` and both simulators are read
with the rest, and the file refuses to load only for a shape of a type the
walk would pass over unread.

The two hand-written map checks come off with that. `AcquireRole`'s answers do
not move at all: the count of 30, each entry's required `Values` and the 20
values one entry admits read exactly as its own check read them, named by the
key the entry was sent under, which is what the tests it already had pin.
`PutAccountProperties` keeps the set it answered for a key, `Map keys must
satisfy constraint: [...]`, with the minimum length of 1 the model declares
now inside it where the hand-written set listed the maximum and the pattern
alone, and a value outside its bounds is answered in the words every other
member carries rather than the `must have length between 1 and 1024` that
check wrote. The `Namespace/PropertyName` rule stays exactly where it was,
being a rule the service applies after the format is good rather than a
constraint the model declares.

Two reductions keep an answer that is AWS's own rather than rewording it, both
through the hook the shared driver already takes. Eight operations answer a
member the request leaves out with "The request must contain the parameter
CertificateBody.", the wording this emulator answers for a missing Query
parameter in several services, so their shapes are vendored without the
model's required list and keep that refusal while their lengths and patterns
are read. Seventeen more are vendored without a member they answer in a
wording of their own: a service-linked role's principal and suffix, an empty
`ServiceNamespaces`, `statusType` on all four operations that take it,
`Encoding` on `GetSSHPublicKey`, the simulators' empty `ActionNames`,
`PolicyInputList` and `PolicySourceArn`, and `TagKeys` on the eight untag
operations.

Nine wordings this service wrote for itself go with the checks that wrote
them: the three password-policy ranges, the name refusal that spelled out its
own bounds and the group, server certificate and instance profile names beside
it, the path refusal, the authentication code, the virtual MFA device name and
the serial number. Each is answered by the model's own violation now, through
the one writer this package already had.

A member whose shape fixes one length is answered for that length rather than
for a bound it sits under, `Member must have length equal to 6`. That is the
wording a report's 36-character job id already answered by hand, which is why
the three report readers can be read from the model at all, and it reaches
STS through the same writer, whose `TokenCode` and `SigningAlgorithm` each fix
one length too.

Two test fixtures carried values AWS refuses and now carry values it takes.
`SignedIamUsers` named a user with a prefix plus a whole UUID, which reaches
66 characters where `userNameType` declares 64, and the two sibling fixtures
that named one the same way follow it onto the shorter suffix. The SDK suite
registered a SAML provider with a 375-character metadata document where AWS
declares 1000, so each of its two documents is padded to that bound on its
own.

`docs/services/iam.md` carries each reading, the maps among them.
2026-10-29 20:32:48 -05:00
Jackson Price b73f643d3f fix(autoscaling): name the group and capitalize health in DescribeAutoScalingInstances (#6940) 2026-10-29 16:30:16 -04:00
Jackson Price fee688bd05 feat(cloudformation): support four AWS::AppConfig resource types (#6791) 2026-10-29 12:59:23 -04:00
Matheus Oliveira 9ce1b1755e fix(ecr): delete only the named tag in BatchDeleteImage (#6597) 2026-10-29 00:06:36 -04:00
Vũ Thế Huy da8e22744b feat(redshift-data): implement ListSessions (#6892) 2026-10-28 23:49:07 -04:00
Jimmy Liu Jia 5ffe6d1123 fix(lambda): attach code signing configs to functions (#6857)
* feat(lambda): attach code signing configs to functions

* fix(lambda): align code-signing IAM function names

* fix(lambda): preserve code-signing config on CreateFunction

* fix(lambda): align code-signing attachment response paths
2026-10-28 23:00:50 -04:00
Kenshin Okinaka 4dbe3731a9 feat(ses): add SES v2 ListRecommendations (#6817) 2026-10-28 21:55:19 -04:00
Vũ Thế Huy e820414f22 feat(redshift-serverless): execute scheduled actions on cron and at schedules (#6851) 2026-10-28 21:05:15 -04:00
Matheus Oliveira 347e8f63a9 fix(opensearch): scope domains to the request's region (#6682)
* fix(opensearch): scope domains to the request's region

Domain records were keyed by the bare name, so a domain created in one
region could be described, updated and deleted from another, and the
same name conflicted across regions. Key the store by region and name,
resolve every operation inside the region the request is signed for,
and migrate pre-scoping records onto the scoped key taking the region
from their ARN. Region-scope the legacy host-path data directory per
account and region, keeping the bare directory for records that predate
the region marker while it still exists.

Closes #6081

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

* fix(opensearch): reject a tag ARN naming another account as not found

findByArn resolved the account named in the ARN, where every fixed
lookup only reached the caller's account through the account-aware
storage backend, so a caller could read and change another account's
domain tags under the default settings. An ARN naming a foreign account
now answers ResourceNotFoundException the way Lambda layers, EventBridge
and Redshift answer theirs, and the RegionScoping suite pins it for the
three tag operations.

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

---------

Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>
2026-10-28 20:09:22 -04:00
Priamo Germosen 096d336fab fix(iam): check five more services on the resources their requests name (#6810)
Under IAM enforcement, Amazon Data Firehose, Cognito identity pools,
Cloud Map, ACM and CodePipeline requests were checked on `*`, so a
grant scoped to a delivery stream, an identity pool, a namespace or a
service, a certificate, a pipeline or a webhook was refused, and a deny
scoped to one never applied.

The generated table of the resources requests name now reads them, 149
operations, from AWS's Service Reference and botocore as it reads the
first batch: their namespaces move from the generator's NOT_COVERED to
NAMESPACES, and the table is regenerated, nothing in it edited by hand.
Each resource type's ARN format is the one Floci's handler mints, which
the tests check against the ARN each create returns:

- `deliverystream/<name>`, `identitypool/<id>`, `namespace/<id>`,
  `service/<id>`, `certificate/<id>` and a pipeline's bare name.
- A CodePipeline webhook: AWS's is `webhook:<name>` (the Service
  Reference's format, and the CodePipeline User Guide's
  "arn:aws:codepipeline:eu-central-1:ACCOUNT_ID:webhook:my-webhook"),
  where Floci minted `webhook/<name>`; it now mints AWS's.

Corrections, each with its reason:

- StartPipelineExecution and GetPipelineState name their pipeline by a
  bare `name` ("The name of the pipeline to start"), which the rule
  reads only for an operation named after the type, as Step Functions'
  StartExecution names its execution, not its state machine, by `name`.
- CreatePipeline and UpdatePipeline name it by `pipeline.name`, and
  PutWebhook the webhook by `webhook.name` and the pipeline it connects
  to by `webhook.targetPipeline`. `pipeline.roleArn` holds the role
  CodePipeline assumes, an IAM role's ARN by botocore's pattern, and
  names no pipeline: read as one, a pipeline-shaped value there was the
  only resource an UpdatePipeline was checked on, so a grant on one
  pipeline let a request change another.
- CreateCustomActionType and DeleteCustomActionType are checked on
  `actiontype:Custom/<category>/<provider>/<version>`: a custom action
  type's owner is Custom, which the request does not give, and AWS's
  CreateCustomActionType example answers "owner": "Custom".
- Cloud Map's CreateService names its namespace by NamespaceId or,
  when it gives none or a JSON null, by DnsConfig.NamespaceId, which
  botocore keeps ("Use NamespaceId in Service instead") and the handler
  reads then; read by NamespaceId alone, a deny on the namespace did
  not hold for a request giving it in DnsConfig. A member given a JSON
  null now counts as absent in a resource's `when` and `unless`, as a
  handler reading it with asText(null) takes it, unless the table reads
  it as a value through `absent` (EventBridge's bus, `default`).

For those, the table may fill a variable from a structure's field
(`pipeline.name`), and give a variable no member gives the one value
its handler uses (`fixed`), in the generator, the loader and the
reader.

A create that names another resource beside the one it makes has its
tags checked on the one it makes alone, which the table marks `made`:
the resource of the type, or with an ARN format's leading resource
word, related to the operation's name past its verb. PutWebhook's tags
go on the webhook, not the pipeline it connects to, and CreateService's
on `service/*`, not the namespace; no other operation in the table is
marked.

Application Auto Scaling stays unread, its reason in NOT_COVERED: a
scalable target's ARN ends in an id the service mints, while requests
name the target by ServiceNamespace, ResourceId and ScalableDimension,
and read as a member ResourceId would fill that id.

RequestResourceMembersTest's test of every resource in the table now
expects, with the resource a request names, the resources of its
operation that every request names: Cloud Map's CreateService names
the service it creates with every variable open.
2026-10-28 17:18:11 -05:00
Jackson Price d7763fff8e fix(ec2): honor DryRun when creating VPCs, subnets and security groups (#6823)
* fix(ec2): honor DryRun when creating VPCs, subnets and security groups

CreateVpc, CreateSubnet and CreateSecurityGroup never read DryRun, so a
dry run created the resource it asked about. A real CreateVpc that
followed left a second VPC, and the real create of a subnet or group
failed: InvalidSubnet.Conflict for the subnet's CIDR block,
InvalidGroup.Duplicate for the group name.

Each handler now answers DryRunOperation (HTTP 412) and creates
nothing. It answers after parsing the tag specifications and, for
CreateSecurityGroup, reading the required GroupName and
GroupDescription. Ec2Service makes every other check, so a dry run is
answered before the VPC id, the VPC, the CIDR block, the tenancy,
overlap with other subnets or a taken group name are checked. AWS
documents no order for those checks.

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

* fix(ec2): look up the VPC before answering a subnet or group dry run

A DryRun CreateSubnet or CreateSecurityGroup naming a VPC that does not
exist answered DryRunOperation, "would have succeeded", while the real
create fails with InvalidVpcID.NotFound. CreateSubnet without a VpcId
answered DryRunOperation too, where the real create gives
MissingParameter.

The handlers now require the VpcId and look up the VPC, the default one
for a security group without a VpcId, before they answer the dry run.
A RunInstances dry run already keeps the error of a missing subnet or
group, and the Service Authorization Reference lists the VPC, with its
tags and tenancy, in both actions' permissions.

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

* fix(ec2): share the security group VPC lookup with its dry run

The CreateSecurityGroup handler and Ec2Service each picked the group's
VPC, the named one or the region's default, so the two copies could
drift. Ec2Service.requireSecurityGroupVpc now does it for both, and the
CreateSubnet handler looks up the VpcId it has just required.

New tests cover a group dry run with an absent or empty VpcId, which is
answered for the default VPC, and a group dry run in a missing VPC
through the SDK. The comments and docs now name every check a dry run
skips, the zone and the IPv6 block included, and link the Service
Authorization Reference.

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

* docs(ec2): list the errors a create dry run still returns

The CreateVpc, CreateSubnet and CreateSecurityGroup rows said which
checks a dry run skips but not which errors it keeps. They now say that
a tag specification error, and a missing VpcId, GroupName,
GroupDescription or VPC, comes back on a dry run too, and that an empty
VpcId also puts a security group in the default VPC.

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

* test(ec2): keep tag errors ahead of the create dry-run answer

CreateVpc, CreateSubnet and CreateSecurityGroup read their tag
specifications before they answer DryRun, so a reserved aws: key is
still rejected on a dry run, as the EC2 docs page says. A handler test
now pins that for all three actions; it fails if the dry-run answer is
moved ahead of the tag parsing.

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

* test(ec2): use the shared EC2 request helper in the dry-run test

Ec2CreateDryRunIntegrationTest now calls Ec2Requests.ec2 with "test"
and "us-east-1" instead of its own copy of that helper. The comments
in the CreateSubnet and CreateSecurityGroup handlers shrink to one
line each; docs/services/ec2.md already explains the order.

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

---------

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
2026-10-28 16:26:07 -04:00
Mohith ad2089e662 fix(bedrock-agentcore): check tag ARNs against the request account (#6802)
ListTagsForResource, TagResource and UntagResource compared the ARN's
account with the configured default account, while the create calls mint
ARNs with the request's account. Any caller outside the default account
was answered ResourceNotFoundException for its own resources.

Compare with the request account instead. An ARN naming another account
or region is still answered ResourceNotFoundException.

Closes #6008
2026-10-28 07:13:41 -04:00
Vũ Thế Huy 5bd4bd481a feat(redshift): publish CloudWatch cluster metrics (#6740)
* feat(redshift): publish CloudWatch cluster metrics

* fix(redshift): skip duplicate CloudWatch publication minutes

* test(redshift): isolate metrics publisher between integration tests

* fix(test): use Java 17 list access in Redshift metrics compatibility test

* fix(metrics): share minute publishing and prevent duplicate SQS samples

Centralize daemon scheduling, minute claims, per-target failures, retention and shutdown for SQS and Redshift. Carry the Redshift proxy key in metric targets and use the shared compatibility await fixture.

* docs(metrics): restore publisher class docs after the shared publisher move

Keep the SQS sample shape on SqsMetricsPublisher and document minute stamping, 15-day retention and the nothing-may-escape rule on MinuteMetricsPublisher.
2026-10-27 22:03:23 -04:00
Priamo Germosen 32cbf73adc fix(eventbridge): answer PutEvents to a missing event bus as AWS does (#6748)
A PutEvents entry naming an event bus that does not exist failed with
InvalidArgument "EventBus not found" and counted in FailedEntryCount.
The EventBridge User Guide, on handling PutEvents failures: "If you use
PutEvents to publish an event to an event bus that does not exist,
EventBridge event matching will not find a corresponding rule and will
drop the event. Although EventBridge will send a 200 response, it will
not fail the request or include the event in the FailedEntryCount value
of the request response." botocore models no not-found error for
PutEvents, only InternalException, and the API Reference lists none.

Such an entry is now answered as published, with an event id and not
counted as failed, and dropped: it reaches no rule and no archive.
Floci logs the drop at INFO. An entry that is not valid, missing a
required field or with a Detail that is no JSON object, still fails as
before, whichever bus it names.

Only the PutEvents action changes. Floci's own deliveries to a bus, for
a rule's event bus target, a pipe, a schedule, a Lambda destination or
a replay, still fail an entry for a bus that does not exist: the
guide's sentence is about the action, and no document says how AWS
answers those deliveries.

Step Functions' optimized events:putEvents integration calls the
action, so a task publishing to a missing bus no longer fails with
EventBridge.FailedEntry; step-functions.md listed that as a deviation,
which is gone. Its two tests that used a missing bus to have an entry
rejected now leave out the entry's Source instead, and a third checks
that a task publishing to a missing bus succeeds.
2026-10-27 17:34:34 -05:00
Jackson Price c2482e2844 fix(appconfig): list deployments with the settings they started with (#6759)
ListDeployments built each deployment's summary from the deployment
strategy as it is now: once a strategy that one of an environment's
deployments used was deleted, ListDeployments on that environment
answered 404 "Deployment strategy not found", while GetDeployment
still returned the deployment. The summary also took the profile's
current name over the one the deployment recorded. AWS documents these
values as the deployment's own (GetDeployment's
DeploymentDurationInMinutes is "Total amount of time the deployment
lasted"), and DeleteDeploymentStrategy, unlike DeleteEnvironment and
DeleteConfigurationProfile, has no ConflictException for a resource
in use.

- StartDeployment records the strategy's DeploymentDurationInMinutes,
  FinalBakeTimeInMinutes, GrowthFactor and GrowthType on the
  deployment, and StartDeployment and GetDeployment return them, as
  AWS documents for both.
- ListDeployments reports the recorded profile name and strategy
  settings, so deleting the strategy leaves earlier deployments as
  they started. Floci serves no UpdateDeploymentStrategy or
  UpdateConfigurationProfile yet; the recorded values also keep
  earlier deployments as they were once anything changes a strategy
  or renames a profile in place.
- Deployments stored by earlier builds load unchanged: GetDeployment
  still omits the settings they never recorded, and ListDeployments
  reads them from the strategy while it exists and reports them as
  null once it is gone, instead of failing.

Type is unchanged: it is still read from the profile.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
2026-10-27 16:44:29 -04:00
Jackson Price 65df465fc3 fix(ec2): create the EBS volumes a launch's block device mappings describe (#6734)
* fix(ec2): create the EBS volumes a launch's block device mappings describe

RunInstances gave every instance one 8 GiB root at /dev/xvda and took
only the root's VolumeType from its block device mappings. Launches now
plan their volumes before anything is stored: the AMI's mappings, or an
8 GiB root when it maps none, with the launch's own entries merged over
them field by field, under either spelling of a device. The instance is
rooted at the AMI's RootDeviceName. NoDevice removes an AMI device and a
VirtualName entry takes one over, never the root. Snapshot sizes apply,
a smaller size, a missing snapshot, a missing or invalid device name and
a device named twice are refused with nothing stored, and IOPS and
throughput are kept only for the types that take them.

DescribeInstances lists every attached volume with its own state and
DeleteOnTermination, and termination treats the root like any other
volume. Volume reads settle attachments to an instance that ended
terminated without TerminateInstances, as a failed container launch does.

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

* fix(ec2): delete every volume of a launch that is rolled back

A launch undone after its instances were stored, an instant CreateFleet
whose later launch fails or a RunInstances whose capacity reservation
was taken in the meantime, terminated its instances. Termination keeps
the volumes whose DeleteOnTermination is false, so the refused launch
left them behind as available.

Each launch now records the volumes it creates on its reservation, and
the rollback deletes those termination left unattached. The ids do not
depend on attachments, which a read can end first when a failed
container's volumes are settled. DeleteOnTermination is never changed,
so an instance whose termination fails keeps its volumes as they were,
and a volume attached to another instance since stays.

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

* fix(ec2): size a snapshot-only root from its snapshot

For an AMI that maps no root device, the launch gave the root a fallback
8 GiB size before merging the launch's own entries, so a root entry
naming only Ebs.SnapshotId kept that size and a larger snapshot was
refused with InvalidBlockDeviceMapping. The fallback size now applies
only after the merge, when the root names neither a size nor a
snapshot.

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

* perf(ec2): read volume attachments once per DescribeInstances

Listing an instance's block device mapping scanned the whole volume
store, once for every instance in a RunInstances or DescribeInstances
response. The attachments of all the response's instances are now
gathered in one scan per region and looked up per instance.

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

---------

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
2026-10-27 16:13:37 -04:00
Kenshin Okinaka afdd4b46ec fix(ses): answer invalid v1 bulk destination entries on their own (#6742)
SendBulkTemplatedEmail rejected the whole call for an entry with more
than 50 recipients, for template data that is not a JSON object, and
for a tag with an empty name. AWS answers each of these with a 200 and
that entry's InvalidParameterValue ("Recipient count exceeds 50.",
"The template data is invalid", "The tag name must be specified."),
while the other entries still send. DefaultTemplateData that is not a
JSON object, or a DefaultTags tag with an empty name, fails every
entry. Within one entry an address syntax error wins over an empty tag
name, which wins over invalid template data, which wins over the
recipient count.

A DefaultTags or ReplacementTags tag without a Name or a Value is a
model violation, and a skipped tag index is a tag with neither, listed
in the 400 ValidationError after the top-level members. A missing or
empty DefaultTemplateData is a 400 InvalidParameterValue, "The default
template data does not exist".

The handler marks such an entry with its message, and the send answers
it in the per-entry loop after the address syntax. The recipient limit
stays in the service: per entry for v1, whole call for v2 SendBulkEmail,
which was not probed.
2026-10-27 11:43:25 -04:00
TATSUNO “Taz” Yasuhiro 33e74f7728 chore(style): remove var and inline qualified names from files no open PR touches (#6710)
* chore(style): remove var and inline qualified names from files no open PR touches

Each var now names the type javac inferred for it, and each fully qualified type name is
imported instead. The suppression list keeps only the files that open pull requests edit.

* chore(style): catch qualified names before a member, a nested type or .class, and on annotations

UnnecessaryFullyQualifiedType does not report those. A MatchXpath rule under the same id now
does, with the same exemption for a simple name that another type in the file uses. The files
no open PR touches import them instead.
2026-10-27 11:38:32 -04:00
Vũ Thế Huy 3d30bbcf7a feat(redshift): add event subscriptions with SNS delivery (#6705)
* feat(redshift): add event subscriptions with SNS delivery

Add Create, Modify, Delete and DescribeEventSubscriptions, subscription tagging, and publication of matching events to the subscription's SNS topic, honouring the topic policy.

* fix(redshift): deliver events from a consistent subscription snapshot and reject nameless subscription ARNs

Delivery copied no state under the lock modifySubscription holds, so a concurrent
update could change the topic between matching and publishing. Match and publish
from a snapshot taken under that lock.

A tag ARN ending in eventsubscription: passed an empty name to
describeSubscriptions, which lists all subscriptions. Reject it up front.
2026-10-27 11:34:38 -04:00
TiM 77f2477641 fix(kinesis): signal closed shard exhaustion and return child shards (#6716)
Return a terminal iterator and direct child metadata from coherent shard snapshots. Preserve final-batch delivery and prevent replay in Pipes and Firehose without changing checkpoint commit boundaries.
2026-10-27 10:24:57 -04:00
Tony Nguyen 58ce60b06e test(rds): connect to Aurora PostgreSQL through the AWS Advanced JDBC Wrapper (#6213)
* test(rds): connect to Aurora PostgreSQL through the AWS Advanced JDBC Wrapper

* test(rds): fail on wrapper setup errors and share the JDBC retry loop

Gate RdsAwsAdvancedJdbcWrapperTest on TestFixtures.isRealAws() and let other
setup errors fail the class instead of skipping it.

Move the 60-second JDBC connection retry into TestFixtures.awaitJdbcConnection
and use it from RdsAwsAdvancedJdbcWrapperTest, RdsJdbcCompatTest and
RdsIamTokenCompatTest.

Use JBoss Logging with parameterized warnv calls for cleanup warnings.
2026-10-27 00:32:48 -04:00
Mario Toffia 989f714c21 feat(cloudwatch): record alarm history and serve DescribeAlarmHistory (#6670) 2026-10-26 23:50:59 -04:00
Vũ Thế Huy e9e2b38da6 feat(redshift): add event history and DescribeEvents (#6663) 2026-10-26 21:25:14 -04:00
Priamo Germosen 7c0ee92480 fix(iam): refuse SNS requests with AuthorizationError (#6621)
Under IAM enforcement a refused SNS request answered `AccessDenied`, the
code Floci gives every Query service. SNS models no such error. Every
one of its 42 operations lists `AuthorizationError`, HTTP 403, a sender
fault ("Indicates that the user has been denied access to the requested
resource"), which SDKs raise as `AuthorizationErrorException`; the SNS
Developer Guide's own sample reads that code as an IAM permission
failure ("Authorization error listing topics - check IAM permissions").
An SDK caller catching `AuthorizationErrorException` therefore missed
Floci's refusal, which surfaced as a bare `SnsException`.

A Query denial now takes its code from the service that serves the
request: `AuthorizationError` for SNS, whichever action is denied (a
role it is passed as much as its own action), and `AccessDenied` for
every other Query service, as before. The status, the `Sender` type and
the message are unchanged.

Not in this change: Floci's SNS JSON surface (`SNS_20100331.*`
targets), which botocore does not model, keeps `AccessDeniedException`.
2026-10-26 19:16:56 -05:00
Jackson Price 322a6a0977 fix(logs): refuse FilterLogEvents requests that name no log group (#6693) 2026-10-26 19:56:51 -04:00
David d10db3ce9b feat(ecr): repository creation templates (#5955)
* feat(ecr): repository creation templates

CreateRepositoryCreationTemplate, DescribeRepositoryCreationTemplates,
UpdateRepositoryCreationTemplate and DeleteRepositoryCreationTemplate store
templates per account and Region, keyed by prefix, with each field checked
against the service model. An update replaces the fields it sets, and an
empty string or list clears one. Templates are recorded, not applied, as
nothing in Floci creates repositories through replication, pull through
cache or create-on-push.

Closes #5804

* refactor(ecr): check repository creation templates against the vendored model

The four template actions join the registry settings in
ecr-request-shapes.json, so the handler checks their requests against the ECR
model's types, lengths, patterns and enums and answers in ECR's
"failed to satisfy constraint" form. The handwritten copies of those rules
go. What the model can't state stays in the service: appliedFor naming at
least one value, and policy text being a JSON object.

The model gives imageTagMutabilityExclusionFilters at least one entry, so an
update sending an empty list is now refused rather than clearing the filters.
Terraform omits the member when the filters are removed and moves to a mode
without exclusions, so an update that leaves the template in such a mode now
drops the filters. Before, they stayed, and every plan showed them again.

* fix(ecr): lock creation template writes, share one JSON object check and fold a trailing slash

Create, update and delete each read a template and then wrote it without a
lock, so two creates of one prefix could both succeed and an update racing a
delete wrote the deleted template back. They now take the registry lock the
registry settings use. The template policies and the registry policy share one
JSON object check that also refuses text after the object, such as {}{}.
ECR assumes a / after every prefix, so prod and prod/ are now one template.
The test helper imports Executable.

* fix(ecr): describe each template once when prefixes differ only by a slash

Describe removed duplicate prefixes before folding the trailing slash, so
prefixes prod and prod/ returned the template twice, and with maxResults 1 a
token followed by an empty page. It now removes duplicates by template key.
The lock tests use the shared testing ParkingStore instead of their own copy.
2026-10-26 19:36:42 -04:00
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
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
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