Commit Graph
3769 Commits
Author SHA1 Message Date
Vũ Thế Huy 485ec4e39f chore(redshift): move the remaining Redshift schedulers onto SweepWorker (#6988)
* chore(redshift): move the remaining Redshift schedulers onto SweepWorker

* chore(redshift): share the shutdown priority check across the scheduler tests
2026-10-30 06:55:10 -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
Andre Kurait 02852f0e67 fix(apigateway): retain V2 integration and authorizer credentials (#6795)
Retain credential choices through management, imports, copies and CloudFormation Body parsing. Carry quick-create credentials only for Lambda targets. Reconcile the accepted shared ARN classifier and CloudFormation import rollback on current main.

Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
2026-10-29 23:41:08 -04:00
Allen Sanborn 0a3efd65fe feat(securityhub): standards subscriptions (#6979)
* feat(securityhub): standards subscriptions

BatchEnableStandards, BatchDisableStandards, GetEnabledStandards and
DescribeStandards, so Terraform's aws_securityhub_standards_subscription
(and cloudposse's security-hub module) can enable CIS, AFSBP and NIST
800-53. EnableSecurityHub now subscribes AWS's default standards (AFSBP
and CIS 1.2.0) unless EnableDefaultStandards is false, as AWS does.
Subscriptions are READY at once; controls and findings are not evaluated.

Found applying kthw-on-floci's account-baseline: every standards
subscription failed with UnknownOperationException (POST
/standards/register).

BatchDisableStandards checks every ARN before removing any, so a batch
naming one unknown subscription changes nothing (before, the removals ahead
of it stuck in memory without being saved, and came back after a
restart). GetEnabledStandards reads the subscriptions under the same lock
the writers hold.

* fix(securityhub): reject a non-boolean EnableDefaultStandards

EnableSecurityHub coerced EnableDefaultStandards with asBoolean(true), so a
string "false" skipped the defaults and an object enabled them, and the
hub was enabled either way. The botocore model types the member boolean.
Reject it with InvalidInputException before any state changes, as
UpdateSecurityHubConfiguration does for AutoEnableControls.

* fix(securityhub): offer CIS v5.0.0 and take ARN partitions from the region resolver

Add CIS AWS Foundations Benchmark v5.0.0 (standards/cis-aws-foundations-benchmark/v/5.0.0,
regional, not enabled by default) to the standards Security Hub offers.

Mint every Security Hub ARN through RegionResolver: the global CIS 1.2.0 ARN takes
partitionForRegion and the regional ARNs use buildArn, so a region the catalog cannot
place keeps the deployment's partition instead of falling back to aws.
2026-10-29 23:37:48 -04:00
TATSUNO “Taz” Yasuhiro c8143b9c38 fix(dynamodb): refuse PartiQL requests whose members break their constraints (#6985) 2026-10-29 23:35:01 -04:00
Vũ Thế Huy 80edd853de feat(redshift-serverless): expire snapshots after their retention period (#6966)
* feat(redshift-serverless): expire snapshots after their retention period

* fix(redshift-serverless): stop the snapshot expiration worker before storage closes

* fix(redshift-serverless): mark pending snapshot cleanup DELETED and test the sweep lock without timing

* refactor(redshift-serverless): run snapshot expiration on a shared sweep worker
2026-10-29 23:29:50 -04:00
Jackson Price ec3bd3184f fix(cloudformation): delete the HTTP API whose Body import fails on create (#6982)
AWS::ApiGatewayV2::Api creates the API before it turns its Body into
routes, integrations and authorizers. When the Body cannot be read or
materialized, the Body's own rollback removes what it generated, but the
API stays: the failed resource names it without the rollback-owned
marker, so neither the stack's rollback nor DeleteStack deletes it.

The Body is now read before the API is created or updated, so a document
that cannot be read changes nothing. The materialization after the
create runs through CfnRollback.guarded, as the REST API provisioner's
steps do: an API the provision created is deleted again, or left marked
for the stack's rollback when that delete fails. An API that an update
keeps is handled as before.

Deleting an Api now tolerates one already gone, as the REST API and VPC
link deletes do. Without that, an UpdateStack that adds such an Api
ended UPDATE_ROLLBACK_FAILED: the update rollback deletes the API the
provision had already deleted. It also lets an update remove an Api that
was deleted out of band, and makes Cloud Control DeleteResource answer
SUCCESS for a missing one, as it does for REST APIs.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
2026-10-29 23:08:01 -04:00
TATSUNO “Taz” Yasuhiro 5cfb16a2f5 fix(dynamodb): refuse a PartiQL statement that is missing, empty or over 8192 characters (#6978) 2026-10-29 22:30: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
Hector Ventura 4d3f3b664d refactor: read and check ARNs through AwsArnUtils in IAM, KMS, EC2, SSO and the core condition resolvers (#6969)
The arn-probe, arn-split and arn-concat sites in these files now go through looksLikeArn, isArn, parse, accountOrDefault and regionOrDefault instead of startsWith("arn:") and split(":"). A well-formed ARN reads the same as before. tools/partition/baseline.tsv drops from 24 to 0, the last baselined sites, and AGENTS.md no longer says the arn-* categories have any.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-10-29 22:26:38 -04:00
TATSUNO “Taz” Yasuhiro 433989ba3b feat(lambdaweb): verify SigV4a on IamAuth endpoints (#6956) 2026-10-29 22:00:56 -04:00
Allen Sanborn 8dbcf6bf17 fix(ec2): read RunInstances security groups from the primary interface spec (#6964)
* fix(ec2): read RunInstances security groups from the primary interface spec

RunInstances read security groups only from the top-level
SecurityGroupId.N. With private_ip or associate_public_ip_address set,
Terraform's aws_instance sends them on the primary interface spec
(NetworkInterface.1.SecurityGroupId.N), so the instance landed in the
VPC's default group and the next plan wanted to replace it.

The interface spec's groups apply only when its DeviceIndex is 0 (another
index is a secondary interface), and a request carrying both shapes fails
with InvalidParameterCombination, as on AWS.

* test(ec2): match the capacity reservation argument RunInstances now passes

* test(ec2): fold the interface security group cases into Ec2RunInstancesPublicIpParamTest

Both classes tested what RunInstances takes from the interface spec with
the same handler setup, base params and runInstances stub; only the
captured argument differed. One forward() helper now runs the request and
captures both the security groups and the public-IP override, and the
separate class is gone.
2026-10-29 21:57:16 -04:00
Jimmy Liu Jia 8aa7bc98ad fix(route53): correct health check pagination (#6954) 2026-10-29 21:56:55 -04:00
Hector Ventura 9e7bcc4029 refactor: mint and match ARNs through AwsArnUtils in Step Functions, Route 53 Resolver, SES, AppSync and three more (#6971)
The arn-concat sites in these files now build ARNs with Arn.of, Arn.global and new Arn, and match stored ARNs by their parsed partition, service and region instead of a hand-built prefix. The ARNs they produce are unchanged. tools/partition/baseline.tsv drops from 44 to 34.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-10-29 21:48:21 -04:00
Hector Ventura 5bf89a5061 refactor: read and check ARNs through AwsArnUtils in Bedrock, AgentCore and SageMaker (#6970)
The arn-probe and arn-split sites in these services now go through looksLikeArn, isArn, parse and regionOrDefault. The four AgentCore services share BedrockAgentCoreArns.resource, which reads an ARN's resource without its qualifier. A well-formed ARN reads the same as before. tools/partition/baseline.tsv drops from 44 to 34.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-10-29 21:39:02 -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
Priamo Germosen 00ab75b395 feat(codeartifact): resolve Maven version ranges and dynamic versions through an external connection (#6961)
A bare group/artifact-level maven-metadata.xml request used to be rejected outright,
so a Maven version range or a Gradle dynamic version could never resolve against a
connected repository that had not already retained some other fixed version of the
same package some other way.

This merges the public repository's own maven-metadata.xml release-version list into
the local copy instead: only release versions (never snapshots or versions this
repository already knows are Archived/Disposed) are merged, a version already listed
locally is never duplicated, and an already-existing local latest/release is never
overridden by the external source, since there is no reliable way to compare Maven
version strings for recency. The actual asset bytes for whichever version a resolver
settles on are still only fetched lazily through the existing per-asset import path,
unchanged. A bare metadata request always retries the merge, even once a local copy
already exists, so a public release published after the first import is still
discoverable later; a fixed version's own asset keeps the old miss-only gate, since it
never changes once retained. The merge writes matching .sha1/.md5 checksums alongside
the metadata, repairing them even on an otherwise-no-op retry, and reads any existing
local copy through the confirmed-404 check rather than treating a transient read error
as if no local metadata existed.

The merge itself is fenced at package granularity the same way a per-version write
already is, so a DeletePackage or DeleteRepository that finishes while the real,
public-repository fetch is still in flight can never have its removal undone by a
write that lands afterward: the package fence now also bumps on an origin-config-only
delete, not just one that removed real content, and the merge separately re-checks
that the repository itself still exists under the same lock, since neither case bumps
any individual package's fence on its own.

Also fixes a package-existence check that this surfaced: writing the merged metadata
into the group/artifact directory made the sidecar's own packageExists treat a
metadata-only package as already directly published, permanently blocking every later
retention attempt for it since no claim could ever get recorded to prove otherwise.
packageExists now requires an actual version subdirectory, not just any file, to
consider the package present; a new hasAnyContentToDelete still catches the
metadata-only case for DeletePackage, so a package left in that state is still cleared.

Verified against the real, live public:maven-central connection with a genuine mvn
dependency:resolve run against a version range, not just the mocked test suite.
2026-10-29 20:31:47 -05:00
Vũ Thế Huy e2d65a6378 fix(eventbridge): resolve indexed input paths (#6929) 2026-10-29 21:28:02 -04:00
TATSUNO “Taz” Yasuhiro aecabcb783 fix(dynamodb): report a missing PartiQL term, path or table name as DynamoDB does (#6957)
* fix(dynamodb): report a missing PartiQL term, path or table name as DynamoDB does

* fix(dynamodb): stop a star string or a long run of signs from crashing the PartiQL parser
2026-10-29 21:24:00 -04:00
Jimmy Liu Jia f8d37ded69 fix(s3): return object owners in list responses (#6953)
* fix(s3): return object owners in list responses

* refactor(s3): share effective object owner resolution
2026-10-29 20:39:40 -04:00
jwoa95 4364310b95 fix(ecs): launch task images for the task definition's runtimePlatform architecture (#6952) 2026-10-29 19:38:41 -04:00
Allen Sanborn a5254bdc0c fix(config): a started configuration recorder keeps recording across a restart (#6938)
* fix(config): a started configuration recorder keeps recording across a restart

Whether a recorder was recording, and when it last started and stopped,
lived in memory while the recorder itself was persisted. After a restart
with persistent storage every recorder reported recording=false, so
Terraform's aws_config_configuration_recorder_status planned to start it
again on every refresh, and a deployment that relies on Config looked off.
The three are now persisted alongside the recorders.

docs/services/config.md notes that the recording state persists.

* test(config): assert recorder start and stop times survive a restart

The restart test only checked recording(), so reverting either timestamp
store to memory left it green. It now captures lastStartTime after the
start and lastStopTime after the stop, and asserts each keeps its exact
value through a reload.

* test(config): restart AWS Config persistence tests through files on disk

The restart tests shared one set of in-memory stores between service
instances, so nothing was written or read back and a broken save or load
of the recorder state stayed green. Each simulated restart now builds a
fresh factory whose backends are new PersistentStorage files in a
temporary directory, loaded from disk, including the restart after the
recorder is deleted.

* test(config): drop blank lines left at the top of the persistence tests

* test(config): restart persistence tests through StorageFactories.open
2026-10-29 19:32:06 -04:00
Niels Kootstra de244061cf fix(cloudfront): hold an ACM certificate in use while a distribution serves it (#6946) 2026-10-29 19:14:03 -04:00
Priamo Germosen a03e88b451 feat(codeartifact): retain Maven packages from a public external connection (#6889)
GetAuthorizationToken-authenticated Maven GET/HEAD requests now retain a
missing release version from the repository's own public:maven-* external
connection (Maven Central, Clojars, CommonsWare, Google Android, Gradle
Plugins), the way real CodeArtifact does, instead of always 404ing.

Follows AWS's own documented rules: release versions only (SNAPSHOT is
never imported through an external connection); the standard
pom/jar/-javadoc.jar/-sources.jar set imported together on a standard
request, a non-standard asset name imported individually and only on
demand; a retained version's own origin checked against any later asset
request for it, rejecting one from a different connection; package-level
upstream:BLOCK respected; and a direct mvn deploy of a version already
present in the connection rejected (ConflictException), matching AWS's
documented publish-side behavior.

Retained bytes are counted toward DescribeDomain's assetSizeBytes the
same way a direct deploy already is, gated on the real deploy outcome
rather than merely having fetched the bytes, and never double-counted on
an idempotent-match retry.

Verified against the real, live Maven Central in a Docker-gated
integration test (junit 4.13.2), and manually with a real mvn client
through a wildcard mirror.
2026-10-29 18:04:57 -05:00
Priamo Germosen 743bede481 feat(core): have the JVMs in Lambda, ECS, Batch and Flink containers trust Floci's CA (#6945)
With TLS on, Floci writes its CA bundle as a Java trust store too, but
only EMR's containers got it: a launcher had to copy it in with
ContainerLifecycleManager.copyJavaTrustStore and point its JVMs at it
with a shell line. So a Java Lambda function, ECS task, Batch job or
Flink application calling Floci over HTTPS still failed with "PKIX
path building failed" unless it brought a trust store of its own.

ContainerBuilder now has withJavaTrustStore(). For a container whose
spec asks for it, the lifecycle manager copies the trust store in
beside the CA bundle as it creates the container, and sets
JAVA_TOOL_OPTIONS to Floci's -Djavax.net.ssl.trustStore ahead of the
value the spec gives it, or the image's own when the spec sets none,
so a trust store the workload names itself still replaces Floci's. A
copy that fails creates the container again without any of the trust
variables, as a failed bundle copy already did, so JAVA_TOOL_OPTIONS
never names a file that is not there.

Lambda functions on a Java runtime or from a container image, ECS task
containers, Batch jobs, and Flink's JobManager and TaskManager ask for
it, and so do EMR steps and EMR Serverless job runs, whose
spark-submit starts directly again. The bootstrap actions' container
keeps the separate copy and the shell line, since it is kept as the
steps' image, which would keep a JAVA_TOOL_OPTIONS set at its
creation. Other containers are unchanged.
2026-10-29 18:04:46 -05:00
Jimmy Liu Jia dfefef2437 fix(route53): honor hosted zone pagination markers (#6932)
* fix(route53): honor hosted zone pagination markers

* test(route53): reuse shared SDK client fixture
2026-10-29 16:34:44 -04:00
Jimmy Liu Jia b063f7ff8c fix(lambda): resolve partition for layer lookup and principals (#6947) 2026-10-29 16:32:20 -04:00
Jackson Price b73f643d3f fix(autoscaling): name the group and capitalize health in DescribeAutoScalingInstances (#6940) 2026-10-29 16:30:16 -04:00
Aniket Shukla 8270cc7c41 feat(ecr): support pull time update exclusions (#6856)
* feat(ecr): support pull time update exclusions

* refactor(ecr): remove duplicate exclusion validation
2026-10-29 16:20:51 -04:00
Niels Kootstra d2a5a82ca2 fix(core): repeat a request ID a controller set in every request ID header (#6914)
* fix(core): repeat a request ID a controller set in every request ID header

AwsRequestIdFilter filled the missing request ID headers with a new UUID,
so a Lambda Invoke answered x-amz-request-id with the invocation's ID and
x-amzn-RequestId, which the SDKs read first, with another one. The filter
now reuses the ID already set.

* test(lambda): check the Invoke request ID with the qualifier tests' function fixture
2026-10-29 14:53:37 -04:00
galsuchetzky-act 981b885348 fix(apigateway): authorize management calls against the path ARN they name (#6825) 2026-10-29 14:51:56 -04:00
Jimmy Liu Jia 606ed3cf8b fix(ecs): respect task scale-in protection (#6906)
* fix(ecs): respect task scale-in protection

* fix(ecs): count protected daemon tasks

* fix(ecs): use injected clock for task protection expiry
2026-10-29 14:42:22 -04:00
TATSUNO “Taz” Yasuhiro e37a415f24 feat(dynamodb): support IS with a PartiQL type name (#6930) 2026-10-29 14:40:03 -04:00
Jackson Price fee688bd05 feat(cloudformation): support four AWS::AppConfig resource types (#6791) 2026-10-29 12:59:23 -04:00
Vũ Thế Huy 1a871392b7 feat(redshift): support pausing and resuming provisioned clusters (#6911)
* feat(redshift): support pausing and resuming provisioned clusters

* docs(redshift): sync supported operation count

* fix(redshift): harden pause and resume failure recovery

* fix(redshift): skip unchanged idle integration writes

* fix: consolidate Redshift pause and resume state persistence
2026-10-29 12:55:50 -04:00
Allen Sanborn bfa13dfa5e fix(ec2): repeat the primary interface association on its primary private address in DescribeInstances (#6928) 2026-10-29 12:51:41 -04:00
Daniël van Ziel d7911da436 fix(ec2): derive subnet and EFS zone ids from the zone name (#5580) (#6923)
Subnets, EFS file systems and mount targets persisted before zone ids took
AWS's shape (#5486) still carried the old <region>-az<n> id, so
DescribeSubnets reported an id DescribeAvailabilityZones --zone-ids
rejects. The id is a function of the zone name and region, so the models
now derive it from the stored zone name on read instead of trusting the
stored value.
2026-10-29 10:21:42 -04:00
Hector Ventura 3e8369664e refactor: read and check ARNs through AwsArnUtils in SES, SWF, Verified Permissions, AppSync and five more (#6905)
Twelve startsWith("arn:") probes become AwsArnUtils.looksLikeArn. The SES tenant resource reader, the SWF tag region, the Verified Permissions Cognito user pool check (now AwsArnUtils.isArnFor) and the AppSync data source region read ARN fields with AwsArnUtils.parse and regionOrDefault instead of a split.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-10-29 10:17:45 -04:00
Priamo Germosen 078931597e fix(iam): check five more services on the resources their requests name (#6927)
Under IAM enforcement, Budgets, Cost and Usage Reports, Service Quotas,
Textract and Translate requests were checked on `*`, so a grant scoped
to a budget, a report definition, a quota, an adapter or a terminology
was refused, and a deny scoped to one never applied.

The generated table of the resources requests name now reads them, 103
operations, from AWS's Service Reference and botocore as it reads the
first three batches: their namespaces move from the generator's
NOT_COVERED to NAMESPACES and the table is regenerated, nothing in it
edited by hand; 717 operations over 17 namespaces. Each resource
type's ARN format is the one Floci mints or reads: `budget/<name>` with
no Region (Budgets' tag handler parses it), `definition/<name>`, and
`<service code>/<quota code>` (Service Quotas' QuotaArn).

Three corrections, each with its reason: CreateBudget and UpdateBudget
name their budget by Budget.BudgetName and NewBudget.BudgetName, and
PutReportDefinition its report by ReportDefinition.ReportName, inside a
structure the rule does not read. Without them UpdateBudget and
PutReportDefinition were checked only on their BillingViewArn, a
billing view's ARN by botocore's pattern, so a caller allowed on one
budget or report could give its ARN there and name another.

Verified Permissions minted a policy store's ARN with a Region, where
AWS gives none: its CreatePolicyStore example answers
arn:aws:verifiedpermissions::123456789012:policy-store/PSEXAMPLEabcdefg111111,
the Service Reference's format alike. It now mints it without one, in
the Region's partition.

Not read yet, each with its reason in NOT_COVERED: Verified
Permissions, whose policyStoreId may name a store by its alias, which
AWS authorizes as the action on the store the alias points to and
GetPolicyStoreAlias on the alias, and whose aliasName carries the
`policy-store-alias/` its format already gives; Auto Scaling, whose
group and launch configuration ARNs Floci mints without AWS's id
(`autoScalingGroup:<name>` for
`autoScalingGroup:<id>:autoScalingGroupName/<name>`), which ECS reads
back; SWF, whose domain format the Service Reference gives no Region
while the SWF Developer Guide gives one; and CloudHSM, whose formats
end in names while its requests give ids.
2026-10-29 07:54:58 -05:00
Priamo Germosen 34269655ba feat(sts): read every modelled operation's constraints from the model (#6925)
The seven operations that still answered an absent member from a check of
their own are read against the vendored shapes now, which leaves every STS
operation that models a member reading its constraints from the model:
`AssumeRole`, `AssumeRoleWithSAML`, `AssumeRoleWithWebIdentity`, `AssumeRoot`,
`DecodeAuthorizationMessage`, `GetDelegatedAccessToken` and
`GetFederationToken`. `GetCallerIdentity` carries no member, so there is
nothing to read for it.

Two answers move, both onto the form the model and the rest of this package
give. A member the request leaves out is named as a constraint message spells
it, `roleSessionName` rather than `RoleSessionName`, and every absent member
is reported together in the order the model lists them, where the check it
replaces answered the first it found. A member sent empty is a value the
request carries, so it breaks its own minimum length rather than reading as
absent. That is the reading #6811 settled for the two services and what
`validateRequired` was the last of in this handler.

What the seven gain is every bound beside the required members, none of which
was read at all: `RoleArn` at 20 to 2048 characters, `RoleSessionName` at 2 to
64, `ExternalId`, `SourceIdentity`, `SerialNumber`, `TokenCode`, `Policy`,
`PolicyArns`, `Tags`, `TransitiveTagKeys` and `ProvidedContexts` on
`AssumeRole`, `SAMLAssertion` at 4 to 100000, `WebIdentityToken` at 4 to
20000, `ProviderId` at 4 to 2048, `Name` at 2 to 32, `EncodedMessage` at 1 to
10240, and the `DurationSeconds` and `MinimumSessionTokenSize` ranges each
operation declares. `AssumeRoot`'s own length check on `TargetPrincipal` said
what the model says, so it comes off with the rest.

One reading is this emulator's own, and `docs/services/sts.md` says so.
`TradeInToken` is required and declares no length, so a request sending it
empty carries a value: it reaches the lookup and is answered
`ExpiredTradeInTokenException`, the refusal any token that cannot be redeemed
gets, where the check it replaces called it absent. Nothing published says
what AWS answers an empty trade-in token.

Each operation keeps the refusals it answers ahead of the constraints:
`GetFederationToken` and `GetSessionToken` turn away session credentials
first, and `AssumeRoot` refuses the global endpoint first.

Three test fixtures carried values AWS refuses and now carry values it takes.
A `RoleSessionName` of `s` is one character where the model declares two, and
a `WebIdentityToken` of `jwt` three where it declares four, so the fixtures
that sent them are a character longer, as are the two assertions that read a
session name back out of an assumed-role ARN and a condition key.

The name the shared role-session fixture opens under has one writer now,
`EnforcementFixtures.SESSION_NAME`, read by every test asserting on that session
rather than spelled again in each: an `aws:userid` condition, a `PrincipalArn`
condition, two authorization-denial messages and the ARN two trust-policy cases
read back. Each of those carried the one-character name, which is a 403 where
the case wants a 200, or a prefix match that no longer pins the whole ARN.
2026-10-29 07:54:47 -05:00
Priamo Germosen c9bc1e7cb8 feat(emr): have the JVMs in EMR containers trust Floci's CA (#6926)
With TLS on, every container Floci launches gets the CA bundle and the
SSL_CERT_FILE family of variables, but the JVM reads none of them. So
in the docker runner mode a Spark job's own SDK clients that ignore
AWS_ENDPOINT_URL, the AWS SDK for Java 1.x's or an older 2.x's,
failed with "PKIX path building failed" against Floci's HTTPS, even
with FLOCI_DNS_SPOOF_AWS_ENDPOINTS sending AWS's endpoint names to
Floci. A job could only reach Floci over its HTTP endpoint.

Floci now also writes the bundle's certificates as a PKCS12 trust
store at boot, floci-ca-bundle.p12 beside the bundle. A launcher whose
workload is Java can copy it into a container before the container
starts (ContainerLifecycleManager.copyJavaTrustStore) and point the
container's JVMs at it through JAVA_TOOL_OPTIONS, with a shell line
that does so only when the file is there. The store has no password
and the line gives only its path, so a trust store a job or an image
names itself replaces Floci's, with that store's own type and
password. EMR Serverless job runs and EMR steps copy it into the
driver's container ahead of spark-submit or the step's command, and
the bootstrap actions' container gets it for its actions, then drops
it before the image is kept. Other services' containers are unchanged.

JAVA_TOOL_OPTIONS rather than spark.driver.extraJavaOptions, since
setting that key would replace what the image's spark-defaults.conf
gives it, and a job's own value would drop Floci's. Each JVM prints
"Picked up JAVA_TOOL_OPTIONS: ..." on its standard error, as the docs
now say.
2026-10-29 07:50:46 -05:00
TATSUNO “Taz” Yasuhiro c4ae11c414 feat(cloudformation): expose RegionalEndpoints of a web function endpoint to Fn::GetAtt (#6907) 2026-10-29 08:25:24 -04:00
Mohith 5f89a70095 perf(dynamodb): retain the live item map in memory mode instead of copying the table (#6915)
Keep memory item storage current by retaining the concurrent live map. Preserve snapshots for durable backends and cover writes, reloads, restore, and account-scoped storage.

Refs #1292
2026-10-29 08:07:42 -04:00
Jimmy Liu Jia 479595e6ec fix(lambda): preserve code signing ARN partition (#6913) 2026-10-29 08:02:41 -04:00
Jackson Price 23d815f08b fix(appconfig): serialize tag writes with deletes and write copies (#6912) 2026-10-29 07:58:41 -04:00
Allen Sanborn 146ba44c92 fix(ec2): refuse an explicit CreateNetworkInterface address that is already in use (#6908) 2026-10-29 07:47:55 -04:00
TATSUNO “Taz” Yasuhiro 772b444850 fix(dynamodb): return the item that a PartiQL write's failed condition saw with ALL_OLD (#6910) 2026-10-29 07:44:59 -04:00
Aniket Shukla e24bc36f64 feat(ecr): support account settings (#6855)
* feat(ecr): support account settings

* fix(ecr): validate account settings against request model
2026-10-29 07:36:05 -04:00
Hector Ventura 03da5da997 refactor: read and check ARNs through AwsArnUtils in RAM, Resource Groups, CloudWatch, Service Catalog and four more (#6904)
Seven startsWith("arn:") probes become AwsArnUtils.looksLikeArn. RAM, the Resource Groups Tagging visibility check, the CloudWatch dashboards cross-account ARN and Service Catalog read ARN fields with AwsArnUtils.parse and regionOrDefault instead of a split; the dashboards ARN without its region is rebuilt as an AwsArnUtils.Arn.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-10-29 07:31:03 -04:00
Priamo Germosen 66a5c05037 feat(emr-serverless): retry a failed job run as its retry policy allows (#6894)
In the docker runner mode a job run's retryPolicy was stored and
returned, but a run whose driver failed was never tried again: every
run was its one attempt. Now, on release 7.1.0 or later, "EMR
Serverless releases 7.1.0 and higher include support for job
resiliency", a run whose driver fails is tried again as the user
guide's "Job resiliency" gives it:

- a BATCH run until it has made maxAttempts attempts, "The default is
  1, which means to not rerun the job";
- a STREAMING run, which "EMR Serverless indefinitely retries", until
  it has failed maxFailedAttemptsPerHour times within an hour, "The
  default is five".

The failed attempt ends FAILED with its stateDetails, and the next is
SCHEDULED again and runs its driver from the beginning, "its own set
of logs" under attempts/<n>/ in S3 and CloudWatch Logs. A cancelled
run, one past its timeout ("Cancelling: ... or the job run has timed
out"), one Floci's own shutdown stopped and one whose application is
gone are not tried again; a retry is admitted while its application
cannot be deleted, as the first attempt is.
GetJobRun without attempt returns "the latest attempt", and with one
an earlier attempt as it ended; ListJobRunAttempts lists them all,
oldest first, each with its own createdAt and updatedAt. No source says
whether a run's timeout spans its attempts; Floci applies it to each.
Floci sends no EMR Serverless events, so the job run retry event is
not sent.

StartJobRun holds retryPolicy to "Accepted values are 1 to 10,
inclusive" for both members: outside that range is a
ValidationException in the model's constraint form, and a member that
is not an integer a SerializationException, as Smithy's restJson1
malformed-request tests have it.
2026-10-29 00:34:34 -05:00