Commit Graph
3500 Commits
Author SHA1 Message Date
Andre Kurait f49376f538 fix(cloudwatch): preserve metric alarm state on definition updates (#6464) 2026-10-24 21:02:33 -04:00
Andre Kurait fe9dce4061 fix: reject explicit ports on gateway load balancer listeners (#6462)
Reject explicit gateway listener ports before publication or mutation, preserving listener range validation and omitted-port updates.

Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
2026-10-24 20:57:42 -04:00
Jackson Price fad23ae0b9 fix(route53): fully qualify the default SOA and NS nameservers (#6450) 2026-10-24 20:56:32 -04:00
Andre Kurait 452633fe7d fix: count Unicode code points in Smithy length validation (#6456)
* fix: count Unicode code points in Smithy length validation

Count supplementary characters once, align existing formatter guards, and migrate remaining DynamoDB string messages while preserving validation order and operation-specific errors.

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

* fix: centralize length checks in the Smithy helper

Use the helper null return in CloudWatch, EventBridge and DynamoDB vector-index validation. Preserve null, whitespace and aggregation errors.

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

---------

Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
2026-10-24 20:32:02 -04:00
Andre Kurait f6126964aa fix(elbv2): validate listener port ranges (#6459) 2026-10-24 20:26:48 -04:00
Jackson PriceandPriamo Germosen 2705818ff1 fix(cloudformation): scope SAM REST auth defaults to each operation (#6358)
* fix(cloudformation): leave root security out of SAM REST auth defaults

AWS::Serverless::Api Auth (DefaultAuthorizer: AWS_IAM, ApiKeyRequired)
gave each operation without security of its own a copy of the
document's root security before adding the defaults. SAM reads only
the operation's own security and leaves the root security as written,
and API Gateway does not apply root-level security. As a result:

- a root requirement naming a SigV4 scheme or an authorizer, beside
  the generated AWS_IAM default, failed the import with "Only one
  Authorizer or IAM authorization is allowed per operation", where SAM
  gives the operation the one AWS_IAM requirement;
- other root requirements, such as an API key scheme, were copied into
  every operation and enforced, where AWS does not enforce them.

The defaults now start from the operation's own security. An Auth
that selects no default, such as ApiKeyRequired: false alone, now
leaves the body as written, as SAM does; it used to copy the root
security into every operation.

The docs also say that floci's REST importer still applies root-level
security to an operation that has none of its own, which API Gateway
does not.

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

* fix(cloudformation): add SAM REST auth defaults inside Fn::If branches

An Fn::If written around a path item or an operation in the
DefinitionBody of an AWS::Serverless::Api kept the Auth defaults from
reaching the operation. A conditional path item was skipped, because
its only key is not a method, and a conditional operation got the
default beside the Fn::If, which the template engine drops when it
keeps the chosen branch. Either way the method was imported with
authorizationType NONE and answered unsigned calls, where SAM adds the
default inside each branch.

The defaults are now added inside each branch, skipping an
AWS::NoValue one, as SAM's get_conditional_contents does. When a
default applies, a nested Fn::If, or one whose value is not a list, is
refused with a ValidationError instead of being left without the
defaults.

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

* fix(cloudformation): refuse SAM REST bodies that would lose the defaults

Some DefinitionBody shapes lost the generated AWS_IAM and api_key
schemes or requirements on their way to the REST importer, which then
imported the methods with authorizationType NONE:

- a securityDefinitions, components or securitySchemes map written as
  an intrinsic function such as Fn::If. The generated schemes were
  written beside the function, and the template engine keeps only its
  result;
- a body with an Fn::If key beside its own keys, which the engine
  replaces with the chosen branch;
- an existing AWS_IAM or api_key scheme with the expected fields and
  an Fn::If key, which the engine replaces with a branch that need not
  be that scheme;
- a body declaring both swagger: "2.0" and an openapi version. The
  transform wrote the schemes into securityDefinitions, which the
  importer, reading the body as OpenAPI 3, ignores.

When a default applies, these are now refused with a ValidationError,
as a path item written as a $ref already is.

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

* test(cloudformation): cover SAM REST root security through the SDK

The SDK suite creates a stack whose AWS::Serverless::Api root security
names its own SigV4 scheme, with DefaultAuthorizer: AWS_IAM, in Swagger
2.0 and OpenAPI 3.0. It checks that the stack deploys, that the
processed template keeps the root security and gives the operation the
one AWS_IAM requirement, and that the method is imported as AWS_IAM
without an API key.

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

* test(cloudformation): pin false Fn::If routes and conditional bodies

An Fn::If around a path item or an operation whose condition is false
resolves to AWS::NoValue. The transform adds no default to that
branch, and the REST importer creates no resource or method for it, so
the API has no such route, as on AWS, while the other routes keep the
AWS_IAM default.

A DefinitionBody written as an Fn::If is refused for any non-empty
Auth, ApiKeyRequired: false included. SAM refuses it too: for every
non-empty Auth, _add_auth checks SwaggerEditor.is_valid, which needs a
literal paths object. The docs now say so.

Neither behavior changes here; the tests keep both in place.

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

* docs(cloudformation): say a SAM REST Auth needs a paths object

The sentence added in the previous commit said any non-empty Auth
needs a literal paths object. The transform, like SAM, accepts any
object there, a paths map written as Fn::If included when no default
is selected. What it refuses is a DefinitionBody without one, such as
a body written as Fn::If.

The previous commit's message also said a false Fn::If around an
operation leaves no route. That holds for get, post and the other HTTP
methods. For x-amazon-apigateway-any-method the REST importer fails
the stack instead, with "expected an Operation object", on main too
and without Auth.

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

* fix(cloudformation): check no-default SAM REST bodies as SAM does

An Auth that selects no default, such as ApiKeyRequired: false alone,
returned once the DefinitionBody had a paths object. SAM checks more
for any non-empty Auth before it applies a default:
SwaggerEditor.is_valid wants a truthy swagger or an openapi version
3.x, and the SwaggerEditor constructor wants every paths entry, and
each branch of an Fn::If around one, to be an object. floci therefore
accepted a body without a version, a paths map written as Fn::If, or
a path item that is not an object, all of which SAM refuses. The
previous commit's message said SAM accepts such a paths map; it does
not.

These are now refused with a ValidationError when no default is
selected too. Nothing else is checked in that case, as in SAM: an
OpenAPI 3.1 body, a $ref path item, a nested Fn::If or a malformed
security requirement is left as written. SamTransformProcessor's
isTruthy helper, which already models SAM's truthiness, becomes
package-private so the check can share it.

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

* fix(cloudformation): leave nested Fn::If operations as SAM does

With a default selected, an Fn::If around an operation whose branch
was itself an Fn::If failed the transform with "Auth does not support
a nested Fn::If in paths". SAM does not fail there. Its
iter_on_all_methods_for_path reads one level of Fn::If around an
operation and skips a method definition without an
x-amazon-apigateway-integration. It therefore leaves the nested
branch as written, adds the defaults only to the plain one, and the
template deploys on AWS.

Such a branch is now left as written, without the defaults, and the
plain branches still get them. A nested Fn::If around a path item is
still refused: SAM fails there too, once it reads the methods of the
inner Fn::If.

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

* test(cloudformation): share the SAM REST stack deploy in one helper

Three SamRestApiAuthIntegrationTest cases each created the stack,
waited for it, read its ApiId output and deleted it in a finally
block. withDeployedApi now does that once: it adds the ApiId output,
deploys the template, hands the API id to the assertions once the
stack is CREATE_COMPLETE, and deletes the stack in its finally. The
assertions are unchanged; a failed deploy now reports the stack's own
status reason in all three cases.

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

* test(cloudformation): keep the failed resource's reason in deploy failures

withDeployedApi reported only the stack's status reason when a stack
did not reach CREATE_COMPLETE. For a resource failure that is the
generic "The following resource(s) failed to create", where two of
its callers used to report the failed resource's own reason, such as
the importer's refusal. The helper now appends that reason when the
stack rolled back, and keeps the stack's reason alone for a transform
failure, which has no failed resource. Only failure messages change.

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

---------

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
Co-authored-by: Priamo Germosen <6233424+pgermosen@users.noreply.github.com>
2026-10-24 20:15:07 -04:00
Kenshin Okinaka eb99ea6655 refactor(core): decode base64url text through Base64Url (#6457)
Base64Url had encode but no decode, so 21 places in src/main decoded
base64url text by hand with new String(Base64.getUrlDecoder().decode(...),
UTF_8). Base64Url.decode now does that, and those callers use it. It is the
same JDK decoder, so padded and unpadded input still decode and invalid
input still throws IllegalArgumentException. The byte[] decodes of JWT
segments and keys are left as they are.
2026-10-24 20:04:57 -04:00
Andre Kurait a813720674 fix(elbv2): validate and normalize target ports (#6455)
* fix(elbv2): validate and normalize target ports

Normalize default target ports and validate complete target batches before lookup or mutation. Preserve Lambda explicit-port rejection and shared Smithy error aggregation.

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

* fix(elbv2): preserve portless Lambda target round trips

Restrict default-port normalization to non-Lambda target groups and cover supplied group ports in service and SDK round trips. Use switch expressions for test operation dispatch.

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

---------

Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
2026-10-24 19:57:26 -04:00
Wleeaf 794792c14b fix(s3): match CORS AllowedHeader wildcards such as x-amz-* (#6447) 2026-10-24 19:51:32 -04:00
Isak Lindbeck bc18cbbdaa feat(msk): scheduled reconcile for SCRAM secret changes (#6384)
* feat(msk): scheduled reconcile for SCRAM secret changes

* fix(msk): match AWS error for SCRAM secrets scheduled for deletion

* fix(msk): suppress repeated SCRAM reconciliation warnings

* feat(msk): make SCRAM reconciliation interval configurable

* docs(msk): clarify SCRAM user revocation and restoration

* fix(msk): reconcile clusters independently with threaded workers

* docs(msk): correct the docs after reconcile multi-threading changes

* fix(msk): reuse Secrets Manager scheduled deletion error message

* fix(msk): start SCRAM reconciliation at application startup
2026-10-24 19:49:40 -04:00
Aniket Shukla 381ad1f00b fix(cognito): match custom message trigger event fields (#6445) 2026-10-24 19:17:35 -04:00
Andre Kurait f1101e4edc refactor(dynamodb): reuse shared length validation (#6454) 2026-10-24 19:11:03 -04:00
Andre Kurait 60ef203fa8 fix(ec2): launch instances into capacity reservation groups (#6404) 2026-10-24 18:45:19 -04:00
Andre Kurait a16478cd91 refactor(core): share Smithy length validation messages (#6449) 2026-10-24 18:31:10 -04:00
TATSUNO “Taz” Yasuhiro ed21e67cd4 feat(dynamodb): export tables in the ION format (#6429)
* feat(dynamodb): export tables in the ION format

* chore(dynamodb): check the ION export file without polling

* chore(dynamodb): share the export file reader in the compatibility test
2026-10-24 18:25:41 -04:00
TATSUNO “Taz” Yasuhiro 72bbc809b4 feat(lambdaweb): serve each region of a PerRegion endpoint in that region (#6423)
* feat(lambdaweb): serve each region of a PerRegion endpoint in that region

A request to the regional domain of another region now runs in an
environment of that region. It gets that region in AWS_REGION and from
the metadata endpoint, and maxEnvironments and rateLimit count per region.
Its .local logs and its metrics go to that region. The centralized logs
and AWS/Lambda/Web also go to the home region, as on AWS. SigV4 and
aws:RequestedRegion use the region of the domain. The regional domains
share one id, as on AWS. The MultiRegion global domain stays in the home
region.

* test(lambdaweb): wait for the logs once and cover the mirror region deny

The Docker test now waits only for the centralized stream, since each
batch reaches the .local group first. The Authorization headers come from
EnforcementFixtures.auth. The RequestedRegion test also denies us-east-1
and checks that the west domain is still allowed.
2026-10-24 18:23:19 -04:00
Andre Kurait 01b388eca9 fix(lambda): reject provisioned concurrency for SnapStart versions (#6433)
* fix(lambda): reject provisioned concurrency for SnapStart versions

Reject provisioned concurrency admission and configured alias retargeting for published SnapStart versions before mutation. Preserve older version snapshots and unconfigured alias behavior.

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

* test(lambda): remove redundant SnapStart SDK fixture

Retain the pool regressions and existing alias retarget SDK coverage as requested in review. Remove the duplicate SDK case and its custom zip construction.

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

---------

Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
2026-10-24 17:54:59 -04:00
Andre Kurait 922e36a472 feat(cloudwatch): support composite alarm lifecycle (#6408) 2026-10-24 17:54:21 -04:00
Jackson Price 9c6d6a0ce8 fix(cloudformation): append AutoPublishCodeSha256 to a SAM function's Description (#6364) 2026-10-24 17:44:13 -04:00
Priamo Germosen 998276b8f5 refactor: build every not-null violation with SmithyValidationErrors.notNull (#6439)
Twenty-six files in 19 services, and TagDispatcher, spelled out AWS's
framework sentence for a missing required member, "Value null at
'<path>' failed to satisfy constraint: Member must not be null", which
SmithyValidationErrors.notNull has built since #6261. They now call it.
The three that also wrote the "1 validation error detected: " count in
front, Auto Scaling's missing granularity, STS's required parameters
and SWF's missingRequired, build the whole message with
SmithyValidationErrors.message, and EMR Serverless's private copy of
notNull is gone. Every message stays as it was.

Left as they are, being other wordings: "Value at '...'" without
"null" (Cognito's accessToken, SES, KMS's sensitive members), the
variants ending in a period in Cost Explorer, CUR, BCM Data Exports and
Pricing, Lambda's "Value 'null'", sentences that go on ("when
S3BackupMode is Enabled", "or a value must be specified for"), nested
constraints, and local helpers that take any constraint's text.
2026-10-24 15:24:27 -05:00
Priamo Germosen b36fd2f0be fix(iam): authorize Budgets operations as ModifyBudget and ViewBudget (#6436)
Under IAM enforcement a Budgets operation other than a budget action was
authorized as its own name, budgets:CreateBudget and the like, which is
no IAM action. A policy granting budgets:ModifyBudget was denied
CreateBudget, and one granting budgets:ViewBudget was denied
DescribeBudgets, while a policy naming the operation, which grants
nothing on AWS, let it through.

AWS's Service Reference authorizes these operations as
budgets:ModifyBudget or budgets:ViewBudget. Beside that action it lists
the aws-portal Billing console permissions and, for CreateBudget, the
tag-on-create budgets:TagResource, so the authorized-action generator
counted two or three actions and left them out. It now counts neither:
the aws-portal actions gate the Billing console, and the Billing and
Cost Management user guide says programmatic requests to AWS Budgets
are not affected by them; a namespace's tagging action beside exactly
one other is the tag-on-create permission. That adds the 15 Budgets
operations and IoT FleetWise BatchCreateVehicle, which Floci does not
serve, to the vendored map.

Not checked: budgets:TagResource when CreateBudget or CreateBudgetAction
carries tags.
2026-10-24 14:58:08 -05:00
Jimmy Liu Jia 4a95c1bb95 feat(ec2): support DHCP options lifecycle (#6428)
* feat(ec2): support DHCP options lifecycle

* fix(ec2): validate DHCP options lifecycle edge cases

* fix(ec2): reuse region-aware private DNS domain for DHCP defaults

* fix(ec2): isolate DHCP options review regressions
2026-10-24 15:39:22 -04:00
Matheus Oliveira 781a68b6cb fix(s3): store object key segments past the file-name limit (#6438)
A disk-backed storage mode lays an object body out as the bucket
directory, the key, and a data suffix, so a single key segment longer
than the 255-byte file-name limit made every write of the object fail
with FileSystemException, where AWS takes keys up to 1024 bytes and
memory mode always did.

A segment that fits its byte budget is stored as written, so every path
an earlier Floci could create is still found. A longer one, and a segment
shaped like an encoded one so a crafted short key cannot land on it,
becomes a readable prefix, a separator, and the SHA-256 of the whole
segment: deterministic, so a key always resolves to one file, and
injective, so two keys never share one. The object index keeps the key,
so listing answers with the key the client used.

The temporary file a write stages beside its target no longer derives
from the target's name either: at the limit that name ran 41 bytes past
it. A constant-length name does not.

Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>
2026-10-24 15:03:52 -04:00
Allen SanbornandPriamo 25a63eef9e fix(ssm): page GetParametersByPath and GetParameterHistory with MaxResults and NextToken (#6268)
* fix(ssm): page GetParametersByPath and GetParameterHistory with MaxResults and NextToken

Both actions ignored MaxResults and NextToken and returned every item.
Page them with Pagination.paginate, as DescribeParameters already does.

MaxResults is validated against the SSM model: 1-10 for
GetParametersByPath and 1-50 for GetParameterHistory, rejected with
ValidationException like DescribeParameters. A bad NextToken is
InvalidNextToken. Omitting MaxResults still returns everything, so
callers that never follow NextToken keep working.

History is paged by a zero-padded version cursor so version 10 sorts
after version 9.

Closes #6254

* fix(ssm): reject wrongly typed MaxResults and NextToken when paging parameters

A string MaxResults or a numeric NextToken was coerced instead of failing
to deserialize. Read both through the SSM deserialization helpers so they
fail with SerializationException, as other SSM fields do.

* fix(ssm): refuse a parameter page token minted for another listing

GetParametersByPath and GetParameterHistory tokens were bare cursors, so a
token from another operation, path or parameter was read as a position
in this listing and could skip results or return an empty page. Bind
each token to its operation, region and selection (path and Recursive,
or parameter name) and answer a mismatch with InvalidNextToken.

* test(ssm): follow GetParametersByPath and GetParameterHistory pages with SDK paginators

* fix(ssm): read pagination fields before listing parameters or their history

GetParameterHistory looked the parameter up before reading MaxResults and
NextToken, so a missing parameter answered ParameterNotFound for a request
whose pagination fields failed to deserialize or validate. Read and
validate both fields first in GetParameterHistory and GetParametersByPath.

* fix(ssm): refuse path and history page tokens in DescribeParameters

DescribeParameters decodes its token as a bare name cursor, so a
GetParametersByPath or GetParameterHistory token was read as a name and
could return a truncated or empty page. Refuse a token that decodes to
either namespace with InvalidNextToken. Its own tokens are unaffected:
the namespaces contain a colon, which AWS does not allow in a name.

* fix(ssm): bind parameter page tokens to the requesting account

Parameter storage is partitioned by account, but GetParametersByPath and
GetParameterHistory tokens named only the region and selection, so a token
minted in one account was accepted in another and skipped its entries.
Add the request account to both token namespaces.

* style(ssm): keep each javadoc on the method it describes

* fix(ssm): page DescribeParameters through the shared paging helpers

DescribeParameters repeated the MaxResults range check word for word and
decoded its token a second time to refuse GetParametersByPath and
GetParameterHistory tokens. Route it through pageRequest and page under a
namespace of its own, keeping its default page of 50. Its tokens are now
bound to the account and region like the other two listings, and a
wrongly typed MaxResults or NextToken fails to deserialize as theirs do.

Also cover resuming GetParametersByPath after the parameter that ended
the previous page is deleted.

---------

Co-authored-by: Priamo <pgermosen@gmail.com>
2026-10-24 14:27:22 -04:00
Matheus Oliveira 8d25cd91a6 fix(cloudfront): honor the origin completion and keep-alive timeouts (#6198) 2026-10-24 14:17:34 -04:00
Aniket Shukla c5ab54d49c fix(cognito): omit absent authentication message metadata (#6440) 2026-10-24 14:10:26 -04:00
Aniket Shukla 9e12547978 fix(eventbridge): default and validate ECS target settings (#6420)
* fix(eventbridge): default and validate ECS target settings

Apply ECS target defaults when storing PutTargets and reject invalid task counts or malformed role and dead-letter ARN shapes before storing the batch. Add SDK read-back and wire-error regressions.

Closes #6188

* fix(eventbridge): validate target ARN components

Reject incomplete IAM role and SQS dead-letter ARN shapes before storing PutTargets batches. Preserve partition support and existing model length errors, with regression controls for all published partitions and IAM role paths.

* fix(core): share IAM role and SQS queue shape checks

Use shared resource-shape helpers from EventBridge, Step Functions, Lake Formation, AppSync, and S3 while preserving caller-specific errors and account/partition rules. Apply the existing SQS 80-character name limit to EventBridge dead-letter targets.
2026-10-24 14:08:08 -04:00
Renald Dubus 5116b3c578 feat(kms): add GenerateDataKeyPair and GenerateDataKeyPairWithoutPlaintext (#6359) 2026-10-24 14:01:40 -04:00
Jimmy Liu Jia be7b0ed62b fix(s3): expose bucket policy status (#6397)
* fix(s3): expose bucket policy status

* fix(s3): align bucket policy status response

* test(s3): verify policy status through SDK and IAM

* refactor(s3): reuse bucket policy lookup for status
2026-10-24 13:49:10 -04:00
Kenshin Okinaka 8ef9e1ddbf refactor(core): share the token decode in Pagination (#6431)
tokenStartsWith and decodeCursor each decoded the base64url token and
caught the IllegalArgumentException of an unreadable one. Both now use a
private decodeToken that returns the decoded cursor, or null for an absent
or unreadable token. Behaviour is unchanged; PaginationTest now covers
tokenStartsWith directly.
2026-10-24 13:36:01 -04:00
Kenshin Okinaka e1796b33b1 fix(ses): refuse more than 50 bulk destinations the way SES does (#6430)
* fix(ses): refuse more than 50 bulk destinations the way SES does

SendBulkEmail and SendBulkTemplatedEmail answered MessageRejected
"Number of destinations (N) exceeds the maximum of 50." after resolving
the stored template, configuration set and tenant. SES answers "You must
specify at least 1 destination, and no more than 50 destinations"
(BadRequestException on v2, InvalidParameterValue on v1) before those
lookups, and v2 answers an empty BulkEmailEntries the same way. An
absent v2 BulkEmailEntries is now the Smithy not-null violation.

* fix(ses): keep a null bulk entry list on the count error
2026-10-24 13:35:47 -04:00
Wleeaf c854046523 fix(s3): reject an aws-chunked upload whose non-final chunk is under 8 KiB (#6413)
S3 answers 403 InvalidChunkSizeError when a chunk other than the last
carries fewer than 8,192 bytes; Floci decoded and stored such bodies.

Fixes #6225

Signed-off-by: Wleeaf <179125857+wleeaf@users.noreply.github.com>
2026-10-24 12:18:48 -04:00
Stuart Lang f22231a8a5 fix(kinesis): return StreamSummaries from ListStreams (#6425)
ListStreams now sends a StreamSummaries entry for every stream name on
the page, and an empty list when there are none, matching AWS. The
handler was the last caller of KinesisService.listStreams, so that
method goes too.
2026-10-24 12:08:46 -04:00
Aniket Shukla fb08a5ca55 fix(glue): default missing required column statistics counts (#6366)
Extend the shared read-time defaults to long, double, decimal, date, and boolean statistics so primitive-count readers receive zeros. Preserve supplied values, optional bounds, and stored records.
2026-10-24 11:44:26 -04:00
Priamo Germosen 62c202f073 fix(iam): read declared constraints before the lookup they precede (#6402)
The validation AWS runs ahead of an operation never reaches its store, so a
request that breaks a declared constraint is refused whether or not the thing it
names exists. Four places here had the order the other way round, and each one
answered a 404 for a request AWS answers with a 400.

The three Access Advisor and Organizations report readers looked the job up
before reading JobId, MaxItems and Marker, so an unknown job carrying a
MaxItems of 0 answered NoSuchEntity, and a JobId of the wrong length was never
held to its shape at all. jobIDType is min 36 and max 36, and the fixed length
reports as one constraint, "Member must have length equal to 36", which is the
form lifecycleActionToken already uses for the same shape in Auto Scaling. The
MaxItems check moves out of paginate so a reader can run it early, and paginate
still runs it, being reached from readers that look nothing up.

GenerateServiceLastAccessedDetails had the same order on its Granularity enum,
reading it inside the generate that sits behind the ARN resolution, so a
granularity AWS refuses answered NoSuchEntity for an ARN that named nothing.
The check is its own method now and the handler runs it first.

PolicySourceArn is arnType, min 20, and the simulators resolved the entity out
of whatever followed the last slash, so ":user/bob" simulated against a user
named bob. A value too short to be any ARN is now the length ValidationError
IAM answers for a short ARN member. A value that clears 20 characters and still
parses as no ARN is left alone: the member publishes no pattern, and no source
records what AWS answers for one.

The service-specific credential id reported both of its length bounds in one
violation, so a short id was told about a 128-character ceiling it was nowhere
near. Each message names the one bound the value broke, which is how every
recorded IAM length violation reads: "Member must have length less than or
equal to 64" for a user name over 64, and "Member must have length greater than
or equal to 20" for an ARN under 20.

Seven tests. Four over the wire on the readers: a JobId of the wrong length
refused before any lookup on both the last-accessed reader and the entities
reader, the same on the Organizations reader with no organization built at all,
and an unknown job carrying a bad MaxItems, a bad Marker and then nothing wrong,
which pins the 400s and the surviving 404. One on the generator, where the
granularity is refused for an ARN that names nothing. One on both simulators for
a PolicySourceArn under 20. And the credential id's two bounds, each asserting
the other bound is absent from the message, with the credential itself still
listed once the refusals are done: a validation error that deleted something on
its way out would read the same from the response alone.
2026-10-24 08:38:33 -05:00
Priamo Germosen 1174922522 feat(emr): publish aws.emr cluster and step events to EventBridge (#6403)
EMR now sends the "EMR Cluster State Change" and "EMR Step Status
Change" events AWS sends to the default EventBridge bus, so a rule can
start a Lambda function or a state machine when a cluster is ready or
ends, or when a step completes. Nothing published an aws.emr event
before.

Each event carries the detail of the EMR Management Guide's examples,
with the severity and message its "Monitoring Amazon EMR events" tables
give the state, times to the minute in UTC, and no resources, as in the
examples and in an event recorded from AWS. Since steps complete at
once, RunJobFlow sends the cluster STARTING, each step PENDING and then
each COMPLETED, and then the cluster WAITING, or TERMINATED with
ALL_STEPS_COMPLETED when it ends after its steps. AddJobFlowSteps sends
its steps' events and that TERMINATED. TerminateJobFlows sends
TERMINATED with USER_REQUEST for each cluster it ends, also when a
protected cluster fails the call, and CancelSteps CANCELLED for each
step it cancels. The tables have no row for BOOTSTRAPPING, RUNNING or
TERMINATING, which send nothing.

A request's steps are now all created PENDING before the first one
completes, as the guide's "Running steps to process data" describes;
each step was created only after the one before it had completed.

EmrService queues a call's events while it holds the service, so they
keep the order the changes were made in, and publishes the queue once
it has let go, so a rule's target that calls EMR back never waits on
the call that made the change. One call publishes at a time: a call
made while an event is delivered queues its events behind the rest, and
the call already publishing sends them after. Each event goes to the
account and Region of the call that queued it. The events go through a
new EventBridgeService.publishServiceEvent, which logs an entry the bus
rejects, or any failure publishing it, instead of failing the change
the event reports. The integration test reads them through a new shared
EventRuleQueue, an SQS queue an EventBridge rule routes them to, which
deletes what it reads and removes the rule and queue when closed.

Part of #6046 (part 5).
2026-10-24 08:38:24 -05:00
Priamo Germosen 1276a8857f fix(iam): check iam:PassRole from a table generated from the Service Reference (#6422)
Under IAM enforcement a request that names a role is checked for
iam:PassRole only where PassedRoles has a case for its operation, so most
of the operations AWS's Service Reference lists with iam:PassRole went
through without it: a caller allowed to create a CodeBuild project, a
Firehose stream, a Glue job or an SSM association could hand it any role
in the account. Adding a case per operation took one pull request per few
services.

The Service Reference names, for each operation, the services its role
goes to, but not the request member that names it; botocore's models give
the members. tools/aws/regen_iam_passed_roles.py joins the two into
src/main/resources/aws/iam-passed-roles.json: every operation listing
iam:PassRole in the namespaces Floci serves over JSON, Query and Smithy
RPC v2 CBOR, and in the REST services whose routes are authorized as
operations, each either read from the table, read by hand in PassedRoles,
or not read with a reason. Generation fails on an operation in none of
the three.

A member names a role when its name ends in Role, RoleArn or RoleName (a
plural, or one followed by Update or Override) and it holds a string or a
list or map of them, not an enum. A member whose documentation says it
takes a role by name is checked on the ARN IAM holds the role under. A
role the Service Reference passes to no named service, as it does
Cognito's, is checked with no iam:PassedToService. The generator records
its corrections with their reasons: members that pass no role (the roles
a Budgets action attaches a policy to, a CodePipeline action's role,
which the pipeline's role assumes, SSM target accounts' execution roles,
the roles a Glue job's generated nodes assume with STS, Firehose's
Snowflake role), members the rule does not see (a Cognito user pool's SMS
caller roles, a Glue connection's ROLE_ARN property and a view's definer,
Service Catalog's AssumeRole and LAUNCH_ROLE keys), and which service a
member's role goes to where the reference names several.

PassedRoles reads a table member from a JSON or CBOR body, or from Query
form parameters in either list form. Its own cases now return null for an
operation they do not read, and the table covers the rest. New cases read
SNS's role attributes (a topic's delivery status roles, a platform
application's, a Firehose subscription's and the SMS one, as the SNS
handlers read the map; an attribute with no value names none), a
CloudWatch Logs subscription filter policy's RoleArn, a Service Catalog
launch constraint's role, by the type Service Catalog holds for the
constraint on an update and in any case, since Floci keeps the type as
given, and an SWF decision's Lambda role from the attributes its type
names.

Not read: requests that name no role, roles that are a runbook's
parameter, operations whose roles go to several services without the
reference saying which member goes where (EMR RunJobFlow, EKS
UpdateClusterConfig, CloudWatch Logs CreateImportTask, SageMaker
CreateTrainingSession), XML bodies (S3 PutBucketReplication), EC2's
RequestSpotFleet, and REST services whose routes no rule maps yet.

make iam-passed-roles-check, part of aws-data-check, re-derives every
member from the pinned botocore; make iam-passed-roles-verify, part of
iam-data-verify, checks every operation against AWS; the IAM data drift
workflow now also runs on a change to the table or its generator.
PassedRoleNamespacesIntegrationTest fails for a namespace Floci serves
that the table neither reads nor names as not read yet.
2026-10-24 08:38:14 -05:00
Priamo Germosen cc1ce89ac0 fix(codeartifact): bracket the sidecar container id resolution race in listPackageVersions (#6388)
CodeArtifactService.listPackageVersions resolves a pypiserver repository's
container id and only later calls into the sidecar client that registers use
of it (SidecarConcurrency.beginUse), leaving a window where a concurrent
repository delete's cleanup can run to completion first and orphan a freshly
recreated permit, the same shape of race #6337 closed one layer down for the
HTTP-fetch-versus-mapBounded window inside that client.

RepositorySidecarManager gets new default no-op beginUse/endUse methods;
PypiserverSidecarClient overrides them to delegate to SidecarConcurrency.
Resolving the container id and registering its use now happen under the
same synchronized monitor deleteRepository holds for its own sidecar
cleanup, so the two can never interleave, closing the window outright
rather than just narrowing it.
2026-10-24 08:38:03 -05:00
jwoa95 346a7f4526 fix(elasticache): terminate required TLS at cache proxies (#6227) 2026-10-24 09:31:10 -04:00
Robin BaeckmanandRobin Baeckman b4c71b9e25 fix(iam): authorize sts:AssumeRole against the role it names (#6334)
IAM enforcement evaluated every STS action against resource *, so a
policy allowing sts:AssumeRole on specific role ARNs never matched and
the call was denied. sts:AssumeRole is now authorized against the
request's RoleArn, as on AWS. Every other STS action stays at *: like
Logs and Secrets Manager, the resource follows the serving operation,
so a RoleArn added to a call that never reads it, such as
GetFederationToken, cannot make a role-scoped Allow grant that call.

Query-protocol parameters were only read from the URL, never from the
form body the SDKs and CLI POST, so SQS and SNS resource ARNs fell back
to a wildcard the same way. For a form POST they are now read from the
body alone: AwsQueryController dispatches on the body and never sees the
URL query, so authorizing a URL value would check one resource and act
on another. SQS preferred a QueueUrl in the URL over the body's, so it
now reads the body first as well.

A resource field with an invalid percent escape is read as absent, so
the check falls back to the default resource instead of throwing out of
the filter; the request then fails in the form reader exactly as it does
without the resource check. The RoleArn is checked untrimmed, as the
handler uses it. docs/services/sts.md no longer lists the * check as a
known limitation.

Co-authored-by: Robin Baeckman <27041454+RobinBaeckman@users.noreply.github.com>
2026-10-24 08:55:41 -04:00
Robin BaeckmanandRobin Baeckman 1476b0e219 feat(eks): advertise a configurable endpoint host (#6331)
endpoint-mode=host always returned https://localhost:<port>, so a cluster
was only usable from the machine running Floci. The new
floci.services.eks.endpoint-host (FLOCI_SERVICES_EKS_ENDPOINT_HOST) is
advertised instead, and added to the k3s certificate as a SAN so the
endpoint still verifies against the cluster CA. It follows rds.endpoint-host.

The value must be a DNS name, a dotted IPv4 address or an IPv6 address;
an IPv6 literal is bracketed in the endpoint URL. A scheme, port, path or
list stops Floci at startup, before persisted clusters are restored, so a
typo cannot leave every restored cluster FAILED.
Network mode inside a container advertises the container name, so it
ignores the setting.

The SAN is fixed when the container is created, so the container carries
the host it was made for as a label, and an adopted container advertises
that host rather than the configured one. When the two differ on restore,
the surviving container is replaced (data volume and port kept), as a
node-capacity change already does; if the replacement fails, the old
container stays and keeps advertising the host its certificate carries.
Unset, nothing changes: no label is added and existing containers are
adopted as before.

Co-authored-by: Robin Baeckman <27041454+RobinBaeckman@users.noreply.github.com>
2026-10-24 08:55:24 -04:00
TiM 39f37c21ff fix(kinesis): stop routing records to closed shards (#6414)
* fix(kinesis): stop routing records to closed shards

Repeated resharding can leave a selected shard and both of its direct children closed. `selectShard` currently falls back to that closed parent, so a successful write can append after the shard's ending sequence number.

- Follow both parent links through closed intermediate shards to an open descendant, with deterministic breadth-first order and visited shard IDs.
- Reject an unreachable open destination before appending. Keep the producer lock, ordinary-key hash selection, ExplicitHashKey routing, and actual returned ShardId.
- Cover repeated splits, split/merge lineage, malformed graphs, handler success/failure results, and Java SDK writes after resharding.

* test(kinesis): protect breadth-first descendant preference

Add a mixed-depth split topology so routing to the still-open direct child is distinguished from depth-first traversal through its closed sibling.

* test(kinesis): cover both mixed-depth shard layouts

Parameterize the split child so the direct-child preference regression rejects depth-first traversal under either child ordering.

* fix(kinesis): preserve the open-shard routing fast path

Delay the lineage snapshot until the selected shard is closed, avoiding a shard-list copy on ordinary open-shard writes. Name expected descendant destinations in routing fixtures and cover an unrelated open shard preceding the reachable child.
2026-10-24 08:51:07 -04:00
Attila Kis bb32ba06eb fix(lambda): honor MaximumRetryAttempts and DestinationConfig.OnFailure for Kinesis ESM (#6133) 2026-10-24 08:38:22 -04:00
TATSUNO “Taz” Yasuhiro 023cb8341b feat(dynamodb): write export files and descriptions as AWS does (#6400)
* feat(dynamodb): write export files and descriptions as AWS does

* fix(dynamodb): check export prefixes as AWS does

* fix(dynamodb): abort the upload of an export file that fails

* chore(dynamodb): share the timed id of backups and exports

* chore(dynamodb): let tests run exports on the calling thread
2026-10-24 08:38:15 -04:00
TATSUNO “Taz” Yasuhiro 4e0bf080ed fix(lambdaweb): refuse a function name another region already has (#6409)
* fix(lambdaweb): refuse a function name another region already has

AWS keeps web function names unique across the regions of an account.
CreateWebFunction with a name another region has is 409
ConflictException "A function named <name> already exists in the
account. Function names must be unique across all regions in an
account.", at the same point as the same-region conflict.

* fix(lambdaweb): key the function name lock by account

* perf(lambdaweb): find a name in other regions without copying every key
2026-10-24 08:37:19 -04:00
lex00 3b4589645b fix(sns): TagResource and UntagResource return their Result element (#6411)
The AWS SDKs decode both responses through TagResourceResult and
UntagResourceResult, so Terraform's aws_sns_topic tag updates now succeed.
2026-10-24 08:30:04 -04:00
Matt Van HornandMatt Van Horn 6256805c33 fix: allow Cognito custom authentication without CreateAuthChallenge (#6410)
createAuthChallenge now returns an empty map when the trigger is absent,
matching a no-op trigger response. Configured triggers still follow the
existing invocation and error handling. Added coverage compares absent
and no-op triggers, checks required decisions and configured-trigger
failures, and exercises multiple challenge rounds through both admin and
non-admin APIs, including session reuse rejection and token issuance.

Fixes #6345

Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
2026-10-24 08:27:54 -04:00
Jimmy Liu Jia 2a1d3f3cec fix(application-autoscaling): paginate describe operations (#6398)
* fix(application-autoscaling): paginate describe operations

* fix(application-autoscaling): harden pagination tokens
2026-10-24 08:22:31 -04:00
Kenshin Okinaka 5a9f9cbbd6 feat(ses): add the v2 reputation entity operations (#6407)
* feat(ses): add the v2 reputation entity operations

Implement ListReputationEntities, GetReputationEntity,
UpdateReputationEntityPolicy and UpdateReputationEntityCustomerManagedStatus.
Every tenant is a reputation entity referenced by its full ARN. The policy
and the customer-managed status live on the tenant record, and the status
is the tenant's aggregate SendingStatus. A tenant whose status is DISABLED
is now refused on SendEmail and SendBulkEmail with MessageRejected.

Shapes, messages and validation order follow probes against real SES.

* test(ses): surface unexpected tenant cleanup failures in the reputation compat test
2026-10-24 08:16:23 -04:00
Vũ Thế Huy 4c70d6b1a2 feat(cloudformation): support Redshift snapshot restores (#6395)
* feat(cloudformation): support Redshift snapshot restores

* fix(cloudformation): address Redshift snapshot restore review findings

- Reconcile ManageMasterPassword and KMS key on in-place cluster update
- Avoid overriding inherited snapshot passwords on unrelated template changes
- Reconcile tags by deleting removed tags on update
- Mint ARN for parameter group tags to prevent invalid parameter errors
- Scope mutate locking during snapshot restore to prevent stalling writes

* fix(cloudformation): narrow Redshift snapshot restore scope

* fix(cloudformation): use shared rollback for Redshift state
2026-10-24 08:01:26 -04:00