Commit Graph
4302 Commits
Author SHA1 Message Date
Mario Toffia f37afdad81 fix(logs): support or in Logs Insights filters (#7924)
* fix(logs): support or in Logs Insights filters

A filter or where stage now keeps rows matching any or-joined comparison, case-insensitive, with parenthesized and nested groups. Syntax the engine does not model (and, not, ||, escapes, backtick fields, expressions in place of a field, empty stages) fails the query instead of returning a silently wrong result set.

Closes #7907

* fix(logs): limit Insights bare filter values to numbers and enforce the queryString length

An unquoted filter value is now a number compared by value, as on AWS (n = 2 matches 2 and 2.0).
Other unquoted values, such as a word or 1+1, fail the query instead of being read as text.
StartQuery rejects a queryString over 10,000 characters with InvalidParameterException, which
also bounds the nesting the or parser walks.

* fix(logs): keep Insights field parsing stack-safe and count queryString in code points

A long dotted field such as a.a.a... overflowed the stack in the field regex, which repeated a
group recursively; the repetition is now possessive and runs in a loop. The queryString limit
uses the shared Smithy length check, which counts code points as AWS does, so a query of
emoji under 10,000 code points is no longer rejected.

* refactor(logs): share one quote-skipping scanner across the Insights parser
2026-11-10 16:18:56 -04:00
Andre Kurait 0e244e5724 feat(ec2): delete launch template versions without reusing numbers (#7910)
Preserve default versions and the highest issued version across deletion, persistence and CloudFormation rollback.

Reject invalid DryRun values before deletion, tolerate only already-deleted versions during CloudFormation rollback, and preserve the resolution race fixture without reflective field mutation.

Reuse presence checks to retain name-specific disappearance errors and existing service-test factories.

Reuse existing EC2 test factories and the shared blocked-or-done wait while preserving all race assertions.

Signed-off-by: Andre Kurait <akurait@amazon.com>
2026-11-10 15:50:33 -04:00
Matheus Oliveira 5b7468af43 fix(backup): add pagination to ListBackupJobs and ListRecoveryPointsByBackupVault (#7541) 2026-11-10 15:29:53 -04:00
Niels Kootstra 1da8982950 fix(athena): report each result column's SQL type in GetQueryResults (#7926)
* fix(athena): report each result column's SQL type in GetQueryResults

GetQueryResults read the result CSV back and reported every column as varchar,
so clients that build typed results from ColumnInfo got strings for numbers,
booleans and dates. After the query runs, ask floci-duck to DESCRIBE it, map
the DuckDB types to Athena type names, keep them with the query execution and
use them when the result set is built. A statement DuckDB cannot describe
keeps varchar.

Closes #7897

* fix(athena): report decimal precision and scale and time types in GetQueryResults

Keep the type DuckDB describes and map it when the result set is built, so a
decimal column reports its precision and scale in their own fields. Time and
the timestamp variants map to their Athena names, and a failed DESCRIBE is
logged at warn with its cause.
2026-11-10 14:04:34 -04:00
Koushik Dutta d97574207b feat(s3vectors): support vector bucket policy operations (#7825)
* feat(s3vectors): implement vector bucket policy management (create, get, delete)

* fix(s3vectors): validate bucket name length and ARN account in policy operations

* refactor(s3vectors): share bucket selector validation and use partitionForRegion
2026-11-10 13:58:19 -04:00
Charles Swanberg a5ab677d6b fix(pipes): apply an enrichment on a DynamoDB stream source and deliver its events as AWS does (#7055)
* fix(pipes): apply an enrichment on a DynamoDB stream source and deliver its events as AWS does

A pipe with a DynamoDB stream source, a Lambda enrichment and an event bus target put nothing on the
bus a rule could use: the stream path skipped the enrichment, an array answer reached the target as
one payload, Source and DetailType written as JSON paths went out as the literal text, and a template
of one placeholder naming a string put that string on the bus in quotes.

- The stream path runs the enrichment through the SQS path's step, once per filtered batch. Disposal
  stays each source's: SQS deletes its messages, a stream commits its position.
- An array answer reaches an event bus, SQS queue or SNS topic one element at a time. A Lambda or a
  state machine takes it whole. EventBridge User Guide, "Amazon EventBridge Pipes batching and
  concurrency": "Input transformers are applied separately on each individual JSON record in the
  array", and a target with no batch API, "such as Lambda and Step Functions", gets "the entire JSON
  array". https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-batching-concurrency.html
- An event bus target's Source and DetailType, written as a JSON path, are read off the event before
  the template renders. "Amazon EventBridge Pipes event bus target": they "support dynamic JSON path
  syntax" and "can't reference new or transformed values resulting from input transformation". A path
  naming nothing fails the delivery, so no event reaches a rule under a literal or empty type.
  https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-event-target.html
- A template of exactly one placeholder renders a string verbatim, which is what AWS does with
  <$.Detail> naming a serialized object; quotes added here made PutEvents refuse it as MalformedDetail.
  A placeholder inside a larger template renders as before.

Kinesis and Kafka sources still deliver straight to the target, as docs/services/pipes.md says.

Test: PipesStreamEnrichmentDockerIntegrationTest runs a real function behind a table's stream, with a
filter, and a rule on the bus matching a field of the detail reaches a queue. Without the fix it times
out with no event on the queue. PipesPollerTest and PipesTargetInvokerTest pin each rule.

* fix(pipes): fail an enrichment batch past the target's limit, and share the dynamic parameter resolver

An enrichment answering more than 10 events for an event bus, queue or topic
fails the batch without invoking the target, as AWS does, since 10 is what
those targets take in one request; the batch goes to the dead-letter queue
or is read again. The event bus Source and DetailType resolve through the
same method as a Redshift parameter, so a value counts as a path only when
the whole of it is one. pollSqs deletes a delivered batch's messages in one
place, and the Docker test uses SqsTestQueue and DynamoDbRequests.

* fix(pipes): deliver an enrichment array to Redshift whole, and skip the target on an empty string

Redshift has no batch API, so an enrichment's array reaches it in one BatchExecuteStatement as
before; only an event bus, queue or topic takes one event per element under the limit of 10. An
enrichment Lambda answering "" is an empty response, as AWS lists it, and invokes no target.
2026-11-10 13:49:49 -04:00
galsuchetzky-act 6038fe7fc9 refactor(rds): share numeric record paging (#7915) 2026-11-10 12:22:06 -04:00
Saim Zaib 9f94fcc974 feat(eventbridge): trust extra CAs from FLOCI_TLS_EXTRA_CA_PATH for API destinations (#7850)
Add floci.tls.extra-ca-path (FLOCI_TLS_EXTRA_CA_PATH): a PEM file of CA
certificates that Floci's own outbound HTTPS clients trust on top of the
JVM's default roots, and Floci's CA when TLS is on. It applies whether or
not TLS is enabled.

ContainerCaBundle.sslContext(config) merges the extra CAs and is now also
built with TLS off. floci-ca-bundle.pem and its .p12 are unchanged, so
containers Floci launches are unaffected in both modes. EventBridge API
destination delivery uses the context, and JwtSignatureVerifier already
shares it, so HTTP API JWT authorizers and AppSync OIDC providers trust
the extra CAs too.

TlsExtraCaStartupValidator refuses to start when the file is missing,
unreadable, or holds no certificate, from any config source. A private
key in the file is ignored.

Closes #5259

With floci.tls.extra-ca-path set and TLS on, a bundle that could not be
read or parsed made outboundTrustAnchors throw. sslContext(config) then
logged the extra CA file as the unreadable one, fell back to the bundle
alone, failed on it again and returned empty, so the valid extra CAs
were dropped.

The bundle is now read on its own: on failure Floci warns with the
bundle's path and trusts the JVM roots plus the extra CAs, as the
sslContext(config) Javadoc already describes.

ContainerCaBundle builds every SSL context and trust manager array from a
KeyStore, so sslContext(Path), trustManagers(Path) and the extra-CA
context no longer repeat the JCA calls.

Tests share LocalHttpsServer in testing for the localhost HTTPS server
issued by a CA, the two JWT issuer-trust cases share one helper, and the
JVM roots check in ContainerCaBundleTest is written once.

outboundTrustAnchors and trustStore(Path) now read a certificate file
through one method, which also refuses a file with no certificate.

In the tests added for the extra CA file, the certificate-and-key file
comes from one helper in TlsTestSupport, the two missing-file cases are
one parameterized test, and the refused EventBridge delivery is checked
by one helper.

TlsExtraCaStartupValidator now calls ContainerCaBundle.certificates
instead of reading the file and checking for a certificate on its own.
outboundTrustAnchors reads the bundle through the same method, and
ContainerCaBundle.extraCaFile is the one place that decides whether the
setting is set, for both the SSL context and the startup check. The
startup message still names the path and gives the reason.

Both EventBridgeInvoker constructors now get the API destination
HttpClient from one method, which adds Floci's outbound SSL context
when there is one.
2026-11-10 11:56:34 -04:00
Niels Kootstra 65b09d0aac fix(lambda): stream the body of a RESPONSE_STREAM function URL (#7885)
* fix(lambda): return the streamed body from a RESPONSE_STREAM function URL

A function URL in RESPONSE_STREAM mode parsed only the HttpResponseStream
prelude and dropped the body written after its eight NUL bytes, so callers got
the status and headers with an empty body. Split the stream at the delimiter
and return the rest as the body; a stream without a prelude is a 200
application/octet-stream, as on AWS. The stream is still buffered.

Closes #7837

* fix(lambda): stream the body of a RESPONSE_STREAM function URL as it is written

The runtime API now hands a streamed response to the invocation chunk by chunk,
ahead of the BodyHandler that buffers every other response, and completes the
invocation only when the stream ends, so the timeout, the concurrency permit
and the container stay held for the whole stream. The function URL answers as
soon as the head is known and writes each chunk as it arrives. The prelude is
read only when the stream's content type is
application/vnd.awslambda.http-integration-response; any other stream keeps
the content type the handler set.

* fix(lambda): check the streamed function URL response without timing it

The runtime API and controller tests pin chunk-by-chunk delivery, so the
end-to-end test only checks the status, content type and body.
2026-11-10 11:54:40 -04:00
Matheus Oliveira 8d95688eec fix(pipes): build flat Kinesis record shape with correct field values (#7554)
buildKinesisRecordNodes previously used valueToTree + PascalCase key
reads, losing all values and producing a nested kinesis object. Now
reads KinesisRecord getters directly and builds the flat Pipes shape,
with eventVersion, kinesisSchemaVersion, invokeIdentityArn and a
shardId-000000000000:<sequence> eventID.

- Fix PipesTargetInvoker base64 decoding for flat shape
- Decode base64 Kinesis data in PipesFilterMatcher before JSON parsing,
  through a helper shared with PipesTargetInvoker

Refs #7481

Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>
2026-11-10 11:48:03 -04:00
TATSUNO “Taz” Yasuhiro 77242aaceb fix(dynamodb): put UpdateItem expression errors in the validation envelope (#7882)
DynamoDB gives an empty UpdateExpression, a reserved word in it, and
AttributeUpdates with an UpdateExpression in the
"1 validation error detected: " envelope, before the table lookup. It
checks the ConditionExpression before the first two.
2026-11-10 11:04:11 -04:00
Nikola Genčić 43ad134107 fix(cognito): fire PreTokenGeneration for client_credentials tokens (#7891)
* fix(cognito): fire PreTokenGeneration for client_credentials tokens

The token endpoint issued client_credentials access tokens without ever
invoking the pool's pre token generation trigger, so claims and scopes a
V3_0 function returned never reached M2M tokens.

As on AWS, the trigger now fires with triggerSource
TokenGeneration_ClientCredentials when PreTokenGenerationConfig's
LambdaVersion is V3_0, and is skipped for V1_0 and V2_0. The event
matches the one AWS documents for the token endpoint: userName
ClientCredentials, the granted scopes, empty userAttributes, a null
groupConfiguration, the request's aws_client_metadata, and a response
whose claimsAndScopeOverrideDetails is null. Only accessTokenGeneration
applies to the token; claims that identify the client (sub, client_id,
token_use, version, iss, exp, iat, jti and the cognito: namespace)
cannot be changed, and an added aud must equal the client ID.

Fixes #7792

* fix(cognito): protect username and scope in client-credentials tokens

Addresses review feedback on the client-credentials pre token generation
trigger.

A V3_0 trigger could add a username claim to a machine access token, and
could replace or suppress the granted scope through claimsToAddOrOverride
and claimsToSuppress. As on AWS, username (along with device_key and
at_hash) is now protected in machine tokens, and scope changes only
through scopesToAdd and scopesToSuppress.

aws_client_metadata with a null value is now refused with
invalid_request, like any other value that is not a string.

* fix(cognito): send version 3 and accept only string metadata for client credentials

The client-credentials pre token generation event now carries version "3",
as in the AWS token endpoint example. aws_client_metadata is read as a JSON
tree and refused unless it is an object whose values are all JSON strings,
so numbers and booleans are no longer coerced to strings.
2026-11-10 11:01:14 -04:00
Vũ Thế Huy 2964140717 feat(redshift): prune Spectrum partitions for bind parameters (#7758) (#7863)
A prepared statement with a predicate on a bound value (WHERE day = $1) loaded every Glue partition, because the pruner read only literals. The Bind message now carries its text-format values, and the pruner reads each $n as the value bound to it.

A statement that is only being parsed has no values yet, so it loads no partition, enough for PostgreSQL to plan it; each Bind loads the partitions its values select. A NULL, binary-format or unreadable value leaves its predicate out and the query loads every partition. A malformed Bind parameter section leaves the values unknown instead of failing the connection.

Parse of a parameterized Spectrum statement no longer deletes partitions by cast key,
which could remove rows of overlapping partitions that stay recorded as loaded; the
Bind reconciles the table. Bind parameters are decoded only when a Spectrum statement
needs them, and binary values are skipped instead of copied.
2026-11-10 10:57:23 -04:00
Andre Kurait ef1e00fba7 fix(controltower): generate IAM routes and request resources (#7872) 2026-11-10 10:46:59 -04:00
galsuchetzky-act c2aba45553 refactor(bedrock): reuse guardrail profile resource prefix (#7902) 2026-11-10 10:44:21 -04:00
TATSUNO “Taz” Yasuhiro 2e158f7d1d fix(dynamodb): refuse a nested or repeated key condition attribute before the table lookup (#7883)
* fix(dynamodb): refuse a nested or repeated key condition attribute before the table lookup

DynamoDB reports a KeyConditionExpression condition on a nested attribute,
or a second condition on the same attribute, with the
"Invalid KeyConditionExpression: " prefix. It checks both after the
expression walk and before the Select enum, the table lookup and the key
schema checks.

* fix(dynamodb): read key conditions grouped in parentheses as one list

DynamoDB reads AND groups in parentheses in a KeyConditionExpression as
if the parentheses were not there. This holds for the nested and
repeated attribute checks and for the key schema checks.

* fix(dynamodb): read grouped key conditions as one list for dynamodb:LeadingKeys

The IAM condition key reader now flattens AND groups the same way as the
key condition checks. A grouped condition like
"(h1 = :a AND h2 = :b) AND r1 = :c" on a multi-attribute index gave no
leading key, and a ForAllValues condition passes when that key is absent.
2026-11-10 09:33:07 -04:00
Andre Kurait 4512de1402 fix(rds): omit empty terminal pagination markers (#7900) 2026-11-10 09:16:40 -04:00
jwoa95 9c989d7457 fix(eventbridge): match numeric comparison patterns (#7695) (#7700)
Add numeric comparisons to the shared matcher used by TestEventPattern and PutEvents. Validate all numeric filters before testing events or mutating rules, including nested patterns and every $or branch. Match numeric and literal filters against event array elements without splitting range bounds across different values.

Add service and AWS SDK success/error regressions.

Validation: 293 focused tests pass; zero Checkstyle violations.

Fixes #7695

The validator accepted arbitrary operator/number pairs, allowing repeated bounds, equality mixed with bounds, and unordered ranges. Restrict filters to a single comparison or a lower bound followed by a strictly greater upper bound.

Add SDK rejection and rule-preservation regressions and valid range boundary controls. All 386 focused tests, Checkstyle, docs-check, and partition-check pass.

Keep the new range boundary cases aligned with the surrounding parameter tables. This also requests fresh CI checks on the verified PR history.

Use one testing fixture for valid comparisons and invalid patterns in both the service and SDK suites. Preserve the union of existing cases, including nested and matching alternative branches, so both layers exercise the same matrix.

Validation: 402 focused EventBridge tests pass with no skips and zero Checkstyle violations.

Expose PipesFilterMatcher.matchesNumeric and use it from EventBridge instead of maintaining a second comparison loop. Retain the null and numeric-form guards.

Use AwsTestClients.create directly in the EventBridge SDK tests and remove the custom SDK client builder and injected endpoint.

Validation: all 463 EventBridge service, EventBridge SDK, and Pipes matcher tests pass, with no skips and zero Checkstyle violations.
2026-11-10 09:08:43 -04:00
galsuchetzky-act 09ac552cf7 feat(cloudformation): provision AWS::CloudFormation::StackSet (#7244)
Create, update and delete StackSet resources and their instances through the existing StackSet service. Preserve current main's asynchronous automatic deployment and stable tag reads while reconciling the resource's declared account and organizational-unit targets and Regions.

Return StackSetId for Ref and Fn::GetAtt and cover the provisioner lifecycle with integration tests. OperationPreferences, CallAs and ParameterOverrides remain unsupported.
2026-11-10 08:54:32 -04:00
Tyler Webb e607b1a790 fix(eventbridge): match nested patterns against arrays of objects (#7849)
Narrow the change to the two array cases that element-by-element matching
of scalar arrays does not cover, and drop the scalar handling in
matchesSingleElement.

A nested pattern such as {"detail":{"items":{"id":["a"]}}} never matched
{"items":[{"id":"a"}]}, because matchesDetailNode looked the field up on
the array itself. A nested pattern now matches an array when any element
matches it, as PipesFilterMatcher.matchesNested does.

An empty array is treated as an absent field, so {"exists":false} matches
it and {"exists":true} does not.

The per-case TestEventPattern requests are replaced by one parameterized
test in EventBridgeServiceTest.
2026-11-10 08:51:06 -04:00
Priamo Germosen 8e4c1994b7 feat(codeartifact): retain pypi packages from the public:pypi external connection (#7741)
Adds the public:pypi external connection: a repository configured with it now
lists and, on a real download miss, retains packages from the live pypi.org
registry, the same promise-now/fetch-later miss-then-fetch behavior
CodeArtifact already has for npm's, NuGet's and Maven's own external
connections.

AWS documents Python's own retention as importing every asset of a resolved
version together ("CodeArtifact will import all the assets in that package
version", "some contain over 100 assets"), unlike npm/NuGet's one asset per
version; CodeArtifactPypiExternalConnectionImporter#tryImportAsset mirrors
that, fetching every real file the registry lists for the resolved version in
one claim episode, not just the one requested.

PypiExternalConnectionClient speaks the registry's real PEP 691 JSON Simple
API. A real PyPI file's download URL is not deterministic from its
coordinate (files.pythonhosted.org serves it under an opaque per-file hash
path, unlike NuGet's flat-container route), so the URL is read directly off
the trusted index response rather than built, with an explicit host
allowlist so this client never follows a URL to a host it does not actually
trust for that connection.

CodeArtifactPypiController#packageIndex merges in unretained external
filenames (listing-only, fetched lazily on an actual download miss), the
same split every other format's own importer here already uses, and now
also lists a package pypiserver has never heard of at all, as long as the
external connection does.

A file's version is resolved by checking its filename against the real
index's own versions list, reusing the existing
PypiserverSidecarClient#filenameEmbedsVersion rather than re-deriving it.
ensureRetainedPackageOriginDefaultIfCurrentRepository is used rather than
the plain variant, matching the stricter check
CodeArtifactNuGetExternalConnectionImporter already uses.

Deliberately out of scope, noted in the importer's own javadoc: refreshing a
retained version's yanked metadata on every later install (also
AWS-documented) -- pypiserver has no such concept in its wire protocol at
all.
2026-11-10 06:37:43 -06:00
Niels Kootstra 14c3004240 fix(s3): return every bucket when ListBuckets has no max-buckets (#7886)
Paging ListBuckets capped a request without max-buckets at 10000 buckets with
a continuation token, so a caller that reads only the first response, like
the Floci UI, lost every bucket after that. Without max-buckets, return the
whole list on one page again.
2026-11-10 08:26:24 -04:00
Andre Kurait 6565225234 perf(rds): wake PostgreSQL initialization on startup logs (#7877) 2026-11-10 08:25:25 -04:00
Mario Toffia 8b48aafd44 fix(cloudformation): update the tags of an AWS::Events::EventBus in place (#7799)
* fix(cloudformation): update the tags of an AWS::Events::EventBus in place

A tag-only UpdateStack of an event bus was refused with "Updating
AWS::Events::EventBus Description, Tags, or Policy is not supported until
transactional rollback is available." and rolled back, so a template that
bumps a version tag could not be deployed.

The bus the stack already owns now takes the template's tags: a key the
stack set and the template dropped is untagged, a tag added outside the
stack stays, as measured on AWS. The tags of the keys the update touches
are snapshotted first, and rollbackUpdate puts them and the tracked keys
back when a later resource fails the update. Description and Policy
changes are still refused.

Closes #7796

* fix(cloudformation): keep a failed event bus tag update for its rollback

A tag call that fails after the bus's tags started changing left the
engine restoring the previous resource and marking it rolled back, so
the half-applied tags stayed. retainsFailedUpdateState now keeps an
attempt that carries the tag snapshot, and the rollback walker restores
it through rollbackUpdate, as the SSM parameter provisioner does.

* test(cloudformation): read EventBridge answers through callEventBridge

* refactor(cloudformation): share the tag snapshot of an update with SSM

The event bus recorded and read back the tags of an update the same way
the SSM parameter does. CfnRollback now holds that pair, putTagSnapshot,
snapshotTagKeys and snapshotTags, in the same tagKeys and tags fields, so
a snapshot an SSM update already stored still reads. The bus reconciles
its tags from the managed keys and the desired tags, as SSM's
reconcileTags does, so its update and rollback no longer each work out
the keys to remove.

* fix(cloudformation): read a null tag value back as null from a tag snapshot

* refactor(cloudformation): read the event bus update snapshot through CfnRollback

rollbackEventBusUpdate parsed its snapshot by hand, which is what
CfnRollback.updateSnapshot does; it now uses that and still reports
false when the bus carries no snapshot. The CloudFormation docs say
event bus tags now update in place on UpdateStack, keeping tags added
outside the stack, and go back when a later resource fails the update.
2026-11-10 08:17:17 -04:00
Tyler Webb aff365d1e5 fix(apigateway): register the $foreach loop scope for native VTL (#7859)
In the native image every $foreach property of a VTL mapping template
resolved to null: #if($foreach.hasNext) was always false, so the usual
comma-between-items pattern rendered invalid JSON, and $foreach.index,
$foreach.count and $foreach.hasNext printed as literal text. Velocity
binds $foreach to a ForeachScope and reads its getters through
reflection, but only the Foreach directive was registered, not the scope
it creates. Velocity then fell back to reading the scope as a map, which
holds none of those keys.

ForeachScope and its parent Scope are now registered alongside the
directive. Reflection registration covers the whole image, so AppSync
resolver templates, which loop through the same directive, get the
scope too.
2026-11-10 08:06:42 -04:00
Jimmy Liu Jia 82603f19b8 fix(appconfig): paginate remaining list operations (#7835) 2026-11-10 07:40:11 -04:00
Andre Kurait 834e2ab9ae chore(lambdaweb): share endpoint domain ID length (#7873) 2026-11-09 23:21:09 -04:00
James McMahon fb4d82548c fix(ec2): paginate instance type offerings (#7861) 2026-11-09 23:10:10 -04:00
Andre Kurait 184f99490b fix(backup): retain deleted plans for IncludeDeleted listings (#7871)
* fix(backup): retain deleted plans for IncludeDeleted listings

Retain deleted backup-plan listing metadata while excluding deleted plans from active operations. Serialize selection creation with deletion using the existing plan lock.

Signed-off-by: Andre Kurait <akurait@amazon.com>

* perf(backup): resolve plan tags by stored plan identity

Avoid scanning retained backup plans for tag operations. Require the exact stored ARN and active state before retaining the existing locked mutation checks.

Signed-off-by: Andre Kurait <akurait@amazon.com>

---------

Signed-off-by: Andre Kurait <akurait@amazon.com>
2026-11-09 22:36:59 -04:00
TATSUNO “Taz” Yasuhiro 6100784e3f fix(dynamodb): check each expression condition in written order, its names and values first (#7870) 2026-11-09 22:16:54 -04:00
jwoa95 99f9a49ebe fix(ssm): normalize retained legacy parameter ARNs (#7698) (#7702)
Retained flat-name parameters still exposed the pre-fix ARN stored on disk. Normalize only the exact legacy SSM resource suffix when reading the ARN, retaining its stored partition, region and account. All metadata consumers and serialized responses then use the canonical resource without overwriting the parameter or incrementing its version.

Cover retained persistent JSON, version and label reads, metadata and history preservation, all eight partitions, canonical flush/reload, unrelated ARN preservation, and AWS SDK exact-resource IAM policy consumption. Malformed policy ARNs remain denied.

Validation: 298 focused SSM and partition tests passed; Checkstyle reports zero violations; docs-check and partition-check passed.

Fixes #7698
2026-11-09 22:16:10 -04:00
Jackson PriceandAndre Kurait 9a01e92ab7 fix(neptune): reserve cluster identity while provisioning (#7851)
Claim the account, region and cluster identifier before starting the backend.
Concurrent retries receive the modeled duplicate-cluster fault before they can
start or roll back the owning request's container. Release the claim on every
exit so a failed create can be retried.

Port the Neptune commit 1c24af0a250c from AndreKurait/floci#473.

Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
Co-authored-by: Andre Kurait <AndreKurait@gmail.com>
2026-11-09 22:05:47 -04:00
Vũ Thế Huy d1205c34a2 feat(redshift): prune Spectrum partitions in Extended Query and transaction blocks (#7758) (#7778)
Stage partitions loaded by a load that may roll back per client connection and publish them when the transaction commits, guarded by a per-table generation, instead of loading every partition.

ensurePartitions waited on the per-table Java lock without a timeout even when the session held PostgreSQL locks. A transaction holding a table lock while another connection held the Java lock to load that table formed a cycle PostgreSQL cannot detect. It now uses the same transaction-aware acquisition as the full-load path.

Pruning also applies to the Data API outside a transaction block, a predicate on a bind parameter is left out while literal predicates in the same statement still prune, and a session in a transaction block now waits at most 30 seconds for another load of the same table.
2026-11-09 22:00:56 -04:00
Jackson Price 37adf31f6a fix(sts): preserve IAM role IDs in federated sessions (#7839) 2026-11-09 21:46:25 -04:00
TATSUNO “Taz” Yasuhiro fef0497cde perf(lambda-web): skip the host pattern on other services' requests (#7856) 2026-11-09 21:29:46 -04:00
James McMahon faf9c4e64d fix(cognito): honour case-insensitive sign-in configuration (#7831) 2026-11-09 21:13:31 -04:00
TATSUNO “Taz” Yasuhiro 7748d2b51f fix(dynamodb): refuse an ordering comparison or BETWEEN operand with no ordering (#7841)
* fix(dynamodb): refuse an ordering comparison or BETWEEN operand with no ordering

* test(dynamodb): pin the SearchVectors ordering operand error before the comparator error
2026-11-09 21:08:46 -04:00
Charles Swanberg 2a3dbb1aa4 fix(cloudformation): send a stack's status changes to the default bus, with their request token (#7053)
Floci sent no event as a stack's status changed, so a rule on `CloudFormation Stack Status Change`
never fired, and whatever starts on one, a deploy waiting for its stack to finish among them, never
started. It also dropped `ClientRequestToken`, which is how a consumer ties an event to the
operation that caused it.

- CloudFormation User Guide, "Using Amazon EventBridge with CloudFormation": events go to the
  default bus, "guaranteed to be delivered, and they might be delivered out of order".
  https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/eventbridge-integration.html
- CloudFormation User Guide, "CloudFormation stack status change event detail": the envelope,
  `stack-id`, `status-details`, and "All events that are initiated by a given stack operation are
  assigned the same client request token".
  https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/event-detail-stack-status-change.html

The pages say nothing of nested stacks, and their sample shows an empty token. Rules read on a real
account on 2026-10-30, for a root nesting one stack, showed one event per status. Through a create
change set, an update change set and DeleteStack, each with its own token, the root's events carried
their operation's token but for REVIEW_IN_PROGRESS, which had no key, and the nested stack's had no
key at all. Through a create and an update that failed in the nested stack, the root's rollback
statuses carried the create's or the update's token, the nested stack's again had no key, neither the
root's CREATE_FAILED nor any UPDATE_FAILED reached the bus, and the nested stack's failed create was
CREATE_FAILED and then DELETE_IN_PROGRESS and DELETE_COMPLETE, with no ROLLBACK_* status. Floci now
records and sends that: a nested stack records CREATE_IN_PROGRESS or UPDATE_IN_PROGRESS as its
operation starts, its failed create ends in CREATE_FAILED for its parent's rollback to delete, without
the "Rollback requested by user." CloudFormation's reason did not carry, and an update's first rollback
passes through UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS. An operation given no token leaves the key
out too.

Two cases were not read and no test asserts them: a failure in the root's own resource with the
nested stack healthy, and a delete that fails. They send CloudFormation's documented statuses from the
same code. UPDATE_COMPLETE_CLEANUP_IN_PROGRESS stays where Floci has cleanup to do, though
CloudFormation sent it on every update. A template Floci cannot execute at all still ends a root in
CREATE_FAILED and sends it, so that stack's end is not silent; the reading has no such path.

CloudFormationService.addEvent is the one place a status is recorded, so it queues an event for a
stack's own record, and CloudFormationEventPublisher delivers them in order on one daemon thread. A
status can be recorded under the stack's lock in stacks.compute and delivery calls a rule's targets
before it returns, so delivering in place would hold that lock and the operation for as long as the
targets take. A failed path records its event before it writes the status, so delivery waits a
moment for that write. The queue is in memory: an event still in it when Floci stops is dropped and
counted in the log, and is not sent on the next start.

The query handler hands each operation's token to the service, which sets it on the stack before the
operation's first record and clears it where the operation has none. It is not persisted.

test(cloudformation): an update failing outside a resource sends no UPDATE_FAILED

An update that fails before any resource, on an SSM parameter or a template that fails at execute,
goes straight to its rollback, and CloudFormation sends no UPDATE_FAILED, as for a failure in a
resource. On 2.4.0 the failed-execute path already sends none, so this commit carries the test alone
that keeps it so: the bus hears UPDATE_IN_PROGRESS, the rollback's statuses and nothing else, each
with the operation's request token.

(test cherry picked from commit 9314dad130116c5d4c809072800c787a4d640446, whose code change 2.4.0
makes moot)

fix(cloudformation): roll back a failed nested create's RetainExceptOnCreate, and send a start only once it runs

A nested stack's failed create is deleted by its parent's rollback through the
ordinary delete path, which kept what RetainExceptOnCreate marks. The delete of
a child in CREATE_FAILED now carries the create-rollback flag, so those
resources go as they did when the child rolled itself back, and a nested case
in CloudFormationDeletionPolicyIntegrationTest keeps it so.

The status an operation starts with is recorded under the stack's lock but
sent by the operation as its first act, so an operation the executor refuses
sends nothing. A successful create or update records its completion before
the terminal status is exposed, as the failed paths do, so the event carries
the operation's own token and not a later request's.

The publisher test waits for the worker to be sleeping or stopped instead of a
fixed 200 ms, and the status events test has one wait loop for the root's and
the nested stack's events.

fix(cloudformation): a delete deferred behind a running create sends its own token

A DeleteStack accepted while an execution runs waits for it, and until now
only its retain list waited: when the execution ended and the delete began,
the stack still held the execution's token, so DELETE_IN_PROGRESS and
DELETE_COMPLETE went out with it. The deferred delete now keeps its token
beside what it retains, and the stack takes it as the delete starts.
aDeleteLandingMidCreateCarriesItsOwnToken holds a custom resource's Create
open, lands the delete, and reads the tokens on the bus; it was red before.

The stale Javadoc above awaitEvents goes.

The mid-create test stubbed the ServiceToken Lambda and PUT the response itself,
which CustomResourceProbe already does. The probe takes a hold: the requests a
predicate matches wait before they are answered until the test releases them,
and the test reads when one has arrived. The status events test holds the
Create that way.
2026-11-09 20:58:07 -04:00
Niels Kootstra 6710ce4d46 fix(s3): page ListBuckets with max-buckets and continuation-token (#7846)
ListBuckets returned every bucket in one response and ignored both
pagination parameters. Buckets now come back in name order, at most
max-buckets per page (1 to 10000), with a ContinuationToken on every page
but the last. A max-buckets out of range, or a continuation token that
is unreadable or was issued to another account, is refused with
InvalidArgument. Without max-buckets the whole list is still returned.

Fixes #7618
2026-11-09 20:57:28 -04:00
Priamo Germosen 69da60d07f docs(iam): settle a distribution's IAM certificate on what AWS publishes (#7740)
CloudFront resolves ViewerCertificate.IAMCertificateId by id alone, and two
questions about that have sat open. A server certificate meant for CloudFront
must be uploaded under /cloudfront, which nothing here enforces, and a blank
value is read as naming no certificate at all.

The blank is settled by AWS's own text, twice over. The member is declared with
a minimum length of 0, so an empty string breaks no bound it carries, and the
ViewerCertificate entry tells a caller on the CloudFront domain name to set
CloudFrontDefaultCertificate and leave all other fields empty. An element left
empty arrives as a blank on this REST XML protocol, so reading it as an id
would refuse the very request the reference asks for.

The path is a published obligation on the caller, in IAM's
UploadServerCertificate note and again in CloudFront's own procedure for
uploading a third-party certificate to IAM, and this emulator does not hold
callers to it. That is a deliberate divergence rather than a reading of what
AWS accepts. What is published is the obligation on the upload rather than a
refusal on the write: the Developer Guide's InvalidViewerCertificate page
enumerates what CloudFront verifies when an alternate domain name is added, in
the order it verifies them, and the certificate's path is not among those
checks. Holding a distribution to the path would refuse a write on a rule
published for the upload, so the id alone decides until something records
otherwise, and a capture of such a refusal moves the reader, the page and the
test.

The reasoning lives in docs/services/iam.md, with the CloudFront page and the
reader's javadoc pointing at it, and two tests pin what each case does: a
distribution created through the API with an empty IAMCertificateId element is
accepted and holds no certificate, and a certificate uploaded outside
/cloudfront serves a distribution and cannot be deleted while it does.
2026-11-09 16:50:23 -06:00
Priamo Germosen 16ce8261eb fix(iam): check an object's tags apart from its members on create (#7739)
The tag-on-create check reads a body's tags under any spelling a handler
might read, so that no tag a handler applies goes unchecked. An object at
the tags member was read both ways into one set: its structures as tags
and its members as a map's tags. A member named as a structure's key then
replaced that structure's tag, so KMS's CreateKey with
{"Tags":{"team":{"TagKey":"team","TagValue":"red"}}} was checked as
team="" while its handler, which iterates Tags whatever it holds, stored
team=red: a deny on aws:RequestTag/team held on neither kms:CreateKey nor
kms:TagResource.

The two readings are now sets of their own, each checked, so the tag the
handler applies is checked whatever the members are named.

OpenSearch's creates refuse such an object as a TagList, but a deny on a
tag in its structure now refuses it first, as it does a list.
2026-11-09 16:50:11 -06:00
Priamo Germosen 943efbbcc4 fix(emr): keep a primary node running on an emr-6.x image (#7800)
Once a cluster's HDFS was up, the primary node's script ran wait -n to
end the container when a daemon exited. The bash of an emr-6.x image,
4.2, does not have wait -n, so the call failed at once and the node
exited as soon as it was ready: every step of an emr-6.x cluster failed
with "The HDFS of EMR cluster ... stopped before it was ready".

The script now watches the count of daemons it started, as it already
does while they start.
2026-11-09 16:49:59 -06:00
luiseterc 3c398103ed fix(iam): resolve missing roles and EC2 tagging targets (#7596) 2026-11-09 18:28:31 -04:00
Jackson PriceandAndre Kurait 69cc889552 fix(autoscaling): honor scaling activity ID filters (#7832)
Port the independent ActivityIds filter from AndreKurait/floci#599,
commit ffb5ce8e4008a4e5ad89a1c1741eca22d267fd92. Preserve the existing
account, region, group and ordering behavior. Cover the Query boundary
with signed SDK requests and sparse member indices.

Keep the Query handler responsible for parsing IDs and rendering XML.
Preserve the unfiltered service interface for reconciliation callers and
cover the filtered service path directly. Share SDK activity ID extraction.

Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
Co-authored-by: Andre Kurait <AndreKurait@gmail.com>
2026-11-09 17:56:59 -04:00
Niels Kootstra ac39d83ce0 fix(eks): page ListClusters with maxResults and nextToken (#7769)
* fix(eks): page ListClusters with maxResults and nextToken

ListClusters returned every cluster in one response and ignored both
pagination parameters. It now returns cluster names in a stable order,
at most maxResults per page (default and maximum 100), with a nextToken
on every page but the last. A maxResults outside 1 to 100 or an
unreadable nextToken is refused with InvalidParameterException, as EKS
does.

Fixes #7625

* fix(eks): bind ListClusters tokens to the calling account

A nextToken issued in one account was accepted in another and skipped
the cluster names that sort before its cursor. The token now carries the
account it was issued to, and another account refuses it with
InvalidParameterException. The pagination tests also get distinct
@Order values.

* fix(eks): reuse the access entries page-size check in ListClusters

ListClusters repeated the 1 to 100 maxResults check that
EksAccessEntryService.pageSize already makes. That method is now
package-private and ListClusters calls it.
2026-11-09 14:54:40 -04:00
Mario Toffia 64b0977c45 fix(iot): forward MQTT 5 user properties to subscribers (#7798)
The broker fanned a live publish out without its MQTT 5 properties, so an
MQTT 5 subscriber received none of the user properties the publisher sent,
over 1883, 8883 and /mqtt alike. AWS IoT forwards them unchanged and in the
order sent, a repeated name included. The broker now copies the publish's
user properties onto each live copy; Netty encodes them only for an MQTT 5
subscriber, so an MQTT 3.1.1 subscriber gets the message without them.
2026-11-09 14:28:25 -04:00
Vũ Thế Huy 92eff0aca5 feat(redshift): support ModifyClusterSnapshot API action (#7755) (#7756)
* feat(redshift): support ModifyClusterSnapshot API action (#7755)

* docs(redshift): update operation count after merging CopyClusterSnapshot

* fix(redshift): enforce ModifyClusterSnapshot retention, Force, and expiry of manual snapshots (#7755)

* fix(redshift): address snapshot retention review feedback
2026-11-09 13:18:19 -04:00
Jackson PriceandAndre Kurait 068740794a fix(ec2): select the subnet VPC default security group (#7762)
Use the existing VPC-specific default-group lookup for instance launch, with
service and SDK placement regressions and documentation.

Source: AndreKurait/floci#524 (94f76eae34e46dc1e740b6349bbaed578a15e372).

Remove the obsolete regional resolver and its dedicated test assertions now
that instance launch uses the VPC-specific lookup. Keep legacy VPC resolution
coverage and remove its unused security-group fixture.

Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
Co-authored-by: Andre Kurait <AndreKurait@gmail.com>
2026-11-09 13:11:06 -04:00
David 9f77c736e9 feat(securityhub): add member account operations and DisableOrganizationAdminAccount (#7791)
Add CreateMembers, ListMembers, GetMembers, DisassociateMembers, DeleteMembers and
DisableOrganizationAdminAccount, the operations Landing Zone Accelerator and Terraform's
aws_securityhub_member use to manage Security Hub members.

Organization accounts added by the delegated administrator become Enabled members and have
Security Hub and its default standards enabled for them; other accounts are Created. Organization
members can be disassociated but not deleted. Disabling the delegated administrator marks its
organization members Removed.

Macie already served POST /members and GET /members, so Security Hub calls on those paths were
answered by Macie. Both routes now dispatch on the SigV4 credential scope in
SecurityAdminController, as GET /admin already does; unsigned requests still reach Macie.

Closes #2197
2026-11-09 11:37:23 -04:00
TATSUNO “Taz” Yasuhiro d9a258ae44 perf(core): build the signed service route prefixes once (#7802)
Five route filters test the path of every request of every service.
Each test built the root path plus a slash, and each filter built its
internal prefix test again on every request. That was about 350 bytes
per request.
2026-11-09 11:26:44 -04:00