Commit Graph
2058 Commits
Author SHA1 Message Date
Niels Kootstra 43eace4e02 fix(transfer): isolate servers and users by account and region (#3403)
* fix(transfer): isolate servers and users by account and region

* ci: retrigger transfer checks

* fix(transfer): migrate legacy resources by scope

* test(transfer): cover unscoped legacy tags
2026-09-11 16:21:24 -04:00
Franklin G. Mendoza 901b83cb8e fix(test): relax S3 concurrent write stress timeout (#3396) 2026-09-11 15:44:17 -04:00
Niels Kootstra d92211d1c1 fix(storage): migrate legacy entries by exact key (#3408)
* fix(storage): migrate legacy entries by exact key

* fix(storage): use legacy migrator for bulk scans

* chore: retrigger CI
2026-09-11 14:20:28 -04:00
Ovidiu ebe9cf2264 fix(athena): project the column names the Glue table declares (#3414)
Views built from the Glue catalog selected *, so the column names came from
whatever the underlying files happened to spell rather than from the table.
For a JSON table whose bodies use camelCase keys, a view over a table
declaring lowercase columns still reported camelCase, and a client reading
the declared names found nothing.

Athena reports a table's declared column names: the catalog owns the schema
and the SerDe maps the data onto it. A client written against that contract
reads `tenantid` where the file says `tenantId`, gets no match, and sees an
empty result with no error anywhere - the query succeeds, the rows are
there, and every field is blank.

Project the declared columns explicitly instead. Identifier resolution is
case-insensitive here, so a declared name still binds to an inferred one
differing from it only by case. Partition keys are projected alongside the
data columns: they are part of the table's schema and are what partition
predicates filter on. A partition key repeating a data column is projected
once, since binding it twice would make the view ambiguous.

A table that declares no columns keeps *, leaving inference in charge, so
catalogs that never declared a schema are unaffected.
2026-09-11 14:04:22 -04:00
Olamide Kosile c48e81d956 fix(cognito): delete a pool's users and resource servers on DeleteUserPool (#3419)
Fixes #2864. DeleteUserPool cascaded to groups and (since #2858) identity
providers, but left userStore and resourceServerStore untouched. A pool id
can be pinned with the floci:override-id tag, so unlike real AWS (where a
pool id is never reused) a pool recreated on the same id inherited the
deleted pool's users, password hashes included, and resource servers.

Adds the same prefix-scan cascade already used for groups/identity
providers to users and resource servers, and adds regression tests for
both cases mirroring the identity-provider orphan-reuse test from #2858.
Verified by disabling the new cascade and confirming both new tests fail
with the exact expected count mismatch before restoring it. Full cognito
package regression (368 tests) passes clean.
2026-09-11 13:59:49 -04:00
Niels Kootstra 70176d6287 fix(neptune): isolate resources by account and region (#3401)
* fix(neptune): isolate resources by account and region

* fix(neptune): migrate legacy resources by request scope

* fix(neptune): preserve region filtering in query listings

* chore: retrigger pull request checks
2026-09-11 13:57:17 -04:00
Ovidiu 62abde805a fix(lambda): recover a DynamoDB Streams ESM from a trimmed checkpoint (#3412)
A DynamoDB Streams ESM stores the sequence number of the last record it
delivered and resumes with AFTER_SEQUENCE_NUMBER on the next poll. The
stream retains a bounded window (MAX_RECORDS), so a burst of writes that
outruns the consumer can push that checkpoint out of the window. getRecords
then raises TrimmedDataAccessException, which the poll loop caught only as a
generic Exception: it logged a warning and left the checkpoint untouched.

The next poll re-derived the same cursor and failed the same way, so the ESM
wedged permanently. Every later write still reached the stream and none was
ever delivered, with nothing surfaced to the client beyond a warning line
repeating once per poll interval. Seen in the wild as a data pipeline that
stopped dead after a bulk import and stayed dead for hours, the emulator
logging the same warning several thousand times.

Treat a trimmed checkpoint as what it is - a cursor that can never succeed -
and resume from the oldest record the stream still holds, as AWS does when a
consumer is overtaken by the trim horizon. Records written between the lost
checkpoint and the trim horizon are gone from the stream and are not
delivered; the warning says so. Any other stream failure keeps the previous
behaviour and retries the same window.
2026-09-11 13:48:21 -04:00
Niels Kootstra c4ff42b800 fix(transcribe): isolate jobs and vocabularies by account and region (#3402)
* fix(transcribe): isolate jobs and vocabularies by account and region

* fix(transcribe): migrate legacy vocabularies by scope
2026-09-11 13:34:20 -04:00
Matheus André 8d011cb983 fix(apigateway): implement MOCK integration response selection based on status code (#3327)
Signed-off-by: Matheus André <matheusandr2@gmail.com>
2026-09-11 12:11:12 -04:00
Kenshin Okinaka e219ea409f feat(ses): support v2 dedicated IP (IP-level) and scaling/warmup APIs (#3420)
Add the remaining SES v2 dedicated-IP operations on top of pool management:
GetDedicatedIps, GetDedicatedIp, PutDedicatedIpInPool,
PutDedicatedIpWarmupAttributes, PutDedicatedIpPoolScalingAttributes, and
PutAccountDedicatedIpWarmupAttributes.

SES has no API to create a dedicated IP (they are leased out-of-band or
auto-provisioned), so Floci models an account with no dedicated IPs:
GetDedicatedIps is empty and any IP-targeted operation returns NotFoundException
'Could not find dedicated IP <ip> under this account.', matching real AWS for an
account with no leased IPs (verified 2026-06-21). PutDedicatedIpPoolScalingAttributes
updates the pool's scaling mode, and PutAccountDedicatedIpWarmupAttributes stores
the account-level flag now reflected by GetAccount.

Add integration and AWS SDK v2 compatibility tests.
2026-09-11 12:01:13 -04:00
Kenshin Okinaka d96516dc70 feat(firehose): apply the Lambda transform to buffered records (#3393)
* feat(firehose): apply the Lambda transform to buffered records

A flushed buffer now goes to the Lambda processor's function as a single
invocation, and what the function returns is what reaches the destination.
Ok delivers the returned data, Dropped leaves no trace, and every other
outcome routes that record to the error output while the rest of the batch
still delivers: ProcessingFailed, a record the function did not return, a
record id returned twice, and an Ok carrying no data.

A function-level error is retried NumberOfRetries more times and then fails
the whole batch as Lambda.FunctionError; a response the function returned
successfully is final however malformed it is, matching what AWS reports for
a response naming no records at all.

The transformation runs ahead of data format conversion, so a stream
configured for both converts what the function returned, and the
"not applied yet" warning the configuration used to log is gone.

* fix(firehose): clamp a NumberOfRetries wider than a long, and heal a stored Enabled

Long.parseLong threw for a NumberOfRetries too wide for a long, which the
catch treated as "not a number" and answered with the default 3. A larger
retry count than one that clamps therefore got fewer attempts: 2147483648
delivered 101 attempts where 999999999999999999999 delivered 4. Reading it
as a BigInteger keeps the clamp meaningful at any magnitude.

A ProcessingConfiguration persisted before Enabled was defaulted never
passes canonicalizeProcessors again, so the describe path now fills it, the
way that path already self-heals partial BufferingHints. Only Enabled: the
parameters AWS defaults include RoleArn, which a read must not inject from
whatever role is current by then.
2026-09-11 11:45:03 -04:00
Niels Kootstra c6e64a0977 fix(mwaa): isolate environments by account and region (#3400)
* fix(mwaa): isolate environments by account and region

* fix(mwaa): migrate legacy environment records safely
2026-09-11 10:25:21 -04:00
XuJianandxujiantop-crypto 5bf8075d52 fix(sfn): support advanced JSONPath expressions (#3398)
Co-authored-by: xujiantop-crypto <265865031+xujiantop-crypto@users.noreply.github.com>
2026-09-11 10:21:19 -04:00
Matan Baruch 485b7c5047 feat(rds): accept AWS IAM DB auth users on MySQL (#3395) 2026-09-11 10:10:26 -04:00
Franklin G. Mendoza efcbc4d993 feat(marketplace-metering): emulate AWS Marketplace Metering API (#3344) 2026-09-11 10:06:04 -04:00
Rafael Sierra f9f90cfc98 feat(s3): add object annotations support (#3324)
* feat(s3): add object annotations support

PutObjectAnnotation, GetObjectAnnotation, ListObjectAnnotations, DeleteObjectAnnotation
via the ?annotation subresource, with per-version storage, x-amz-annotation-directive
on CopyObject, s3:ObjectAnnotation:* notifications, and x-amz-object-if-match.

* fix(s3): serialize annotation restore with copy publication and sweep payloads on reset

* fix(s3): lock cross-account copy buckets via resolveBucket and log compat test cleanup
2026-09-11 10:00:16 -04:00
TATSUNO “Taz” Yasuhiro dffe34e133 fix(dynamodb): match AWS wording and order for Select rejections (#3410)
* fix(dynamodb): match AWS wording and order for Select rejections

Query and Scan share one Select validator. It reported Floci wording and
checked the rules in the wrong order, so a request breaking both the
ProjectionExpression rule and the IndexName rule named the wrong one.

The ProjectionExpression conflict is now reported first, and each message
names the Select value the way AWS does. The SPECIFIC_ATTRIBUTES message
without a projection also matches AWS, which prefixes the error count on
Query but not on Scan.

Closes 8 TIER 1 and 2 TIER 3 cases in the dynamodb-conformance suite.

* test(dynamodb): cover the bare Select message on Scan

Scan returns the message without the validation count prefix, Query keeps it.
Only the Query side had a handler-level test.
2026-09-11 09:53:13 -04:00
TATSUNO “Taz” Yasuhiro be578ac13f fix(mwaa): probe the metadata database over TCP before starting Airflow (#3406)
The official postgres image serves first-boot init through a temporary
server that listens only on the Unix socket, then restarts it. The
readiness probe ran pg_isready over that socket, so it could pass
against the temporary server before the final server accepted TCP
connections from the Airflow container. Probe TCP loopback instead.
2026-09-11 09:26:48 -04:00
TATSUNO “Taz” Yasuhiro 14b0875a27 fix(rds): wait for the final PostgreSQL server before reporting the instance ready (#3405)
The official postgres image serves first-boot init through a temporary
server that listens only on the Unix socket, then restarts it. The
readiness probe ran psql over that socket, so it passed against the
temporary server and CreateDBInstance returned while the container was
still restarting. A CreateDBSnapshot sent right after then failed
pg_dumpall and returned InvalidDBInstanceState.

Run the rds_iam role setup over TCP loopback instead, as the Redshift
readiness check already does. The temporary server never listens on
TCP, so the command only succeeds once the final server is up. Loopback
connections are trusted by the generated pg_hba.conf, so no password is
needed. Log the cause when a snapshot fails. The round-trip container
test waits the same way.

Fixes #3384
2026-09-11 09:20:01 -04:00
Franklin G. Mendoza 3c080e1ea6 feat(marketplace-reporting): emulate AWS Marketplace Reporting API (#3343) 2026-09-11 09:15:23 -04:00
luiseterc ee23e26bc3 feat(ec2): implement DescribeSpotPriceHistory (#3359)
* feat(ec2): implement DescribeSpotPriceHistory

* test(ec2): verify DescribeSpotPriceHistory with SDK

* fix(ec2): honor spot price history dry run
2026-09-11 08:29:06 -04:00
Hector Ventura 7c08b35f1d fix(core): read ARN resource segments by structure, not by position (#3392)
AwsArnUtils parses an ARN's five top-level fields and hands the resource back
whole, because its structure is service-specific. Five services then split that
resource by counting from an end, and each is wrong on input AWS accepts.

SNS took the segment after the last colon as a Lambda function name, so a
subscription to a qualified ARN (...:function:order-processor:PROD) invoked a
function named PROD. The message was accepted, reported as published, and
delivered nowhere. S3 and Step Functions already cut after ":function:"; SNS
was the outlier and now matches them.

Step Functions decided between a state machine ARN and a version ARN by asking
whether the last segment was all digits. Digits are legal in a state machine
name, so a machine named 2024 was taken apart into version 2024 of a nameless
ARN, and validation then refused it: DescribeStateMachine returned InvalidArn
for a state machine that exists. The rule is now the resource's segment count,
stateMachine:<name> against stateMachine:<name>:<version>, and the two inline
copies of the old rule route through it so all three sites agree.

AppSync read the API id as the segment after the last slash, so tagging a data
source looked up an API by the data source's id and answered NotFound. The
model anchors AppSync's ResourceArn to apis/<26 chars> with nothing after it,
so a sub-resource ARN is not taggable at all and the answer is 400. That shape
is adopted verbatim except for the partition: the model spells it aws, but this
emulator mints API ARNs with the region's own partition and has to accept the
ARN it just returned.

Two are hardening rather than live failures, and neither is reachable through
the public API today, so neither carries a test: the microVM controller used a
bare split where a guarded regionOf sits in the same class, and S3 Tables
guarded on ":" + prefix while cutting on the prefix alone, which only diverges
for a name containing the prefix that the name charset already blocks.

Each behavioural fix was checked by reverting its source file and confirming
the new tests fail without it.
2026-09-11 08:07:58 -04:00
BingEdward 862e4a1c77 fix(dynamodb): reject out-of-bound query cursors (#3389)
Signed-off-by: 7487 <1042653432@qq.com>
2026-09-11 00:24:49 -04:00
XuJianandxujiantop-crypto ce073930b9 fix(sfn): resolve context reference paths (#3390)
Co-authored-by: xujiantop-crypto <265865031+xujiantop-crypto@users.noreply.github.com>
2026-09-11 00:17:28 -04:00
TATSUNO “Taz” Yasuhiro fbe92aa411 fix(dynamodb): more request validations in Query and Scan (#3360)
* fix(dynamodb): accept and report Query key conditions the way AWS does

Three gaps in KeyConditionExpression validation.

A sort-key comparison with the value on the left, such as ":lo <= sk",
is valid on AWS and means "sk >= :lo". Floci rejected it because it only
looked for the attribute on the left. The operands are now normalised
before the key checks run.

A nested path on a key attribute now reports that it cannot carry a
condition, instead of the generic unsupported message.

A condition on a non-key attribute now reports the partition key it left
unconditioned, which is what AWS answers.

Closes 2 TIER 1 and 1 TIER 3 case in the dynamodb-conformance suite.

* fix(dynamodb): bound Segment and TotalSegments on Scan

A parallel Scan accepted a negative Segment. A TotalSegments of 0 was
rejected, but with the zero-based wording instead of the AWS constraint
wording. Both are now rejected with the AWS constraint wording, before
the required-parameter checks run. The TotalSegments upper bound from
#3287 moves into the same block, so several violations are reported in
one message.

Closes 1 TIER 3 case in the dynamodb-conformance suite.

* fix(dynamodb): report TotalSegments before Segment on Scan and test the lower bound
2026-09-11 00:08:03 -04:00
Vũ Thế Huy 6b17ef2b1c feat(redshift): emulate GetClusterCredentials and GetClusterCredentialsWithIAM (#3273)
* feat(redshift): add RedshiftCredentialBroker for short-lived Db credentials

* refactor(rds-proxy): widen PasswordValidator to a three-value AuthResult

The wire-level password check the PostgreSQL/MySQL proxy handlers take now
returns REJECT / PASSTHROUGH / MASTER_EQUIVALENT instead of a boolean, so a
caller can tell the proxy to open the backend leg as the cluster master for a
client it has vouched for. RdsAuthProxy keeps its own boolean master-password
callback, renamed MasterPasswordCheck to free the PasswordValidator name, and
adapts it at the handler boundary (non-master stays PASSTHROUGH).

* feat(redshift): auth proxy accepts live GetClusterCredentials credentials

passwordValidatorFor now returns AuthResult and consults RedshiftCredentialBroker:
the master pair and any live minted credential resolve to MASTER_EQUIVALENT, a
known broker user with a stale password is REJECTed, everyone else PASSTHROUGH.

* feat(redshift): add default-credential-duration-seconds config

* feat(redshift): implement GetClusterCredentials action

Mints a short-lived DbUser/DbPassword pair via RedshiftCredentialBroker and
returns it as Query-protocol XML. AutoCreate prefixes IAM: on the DbUser,
DbGroups are echoed, DurationSeconds is validated to 900-3600 (default from
the new config key), and an unknown ClusterIdentifier propagates ClusterNotFound.
The two credential actions are registered in AwsQueryController.REDSHIFT_ACTIONS
and the Query dispatch now forwards the Authorization header to the handler.

* feat(redshift): implement GetClusterCredentialsWithIAM action

Derives the DbUser from the caller's IAM identity resolved via the Authorization
header: an IAM user maps to IAM:<name>, an assumed role to IAMR:<role>, and an
unresolvable caller to the IAMR:floci fallback with a WARN so local and CI flows
are not blocked. Any DbUser request parameter is ignored.

* feat(redshift-data): resolve non-master DbUser via GetClusterCredentials

resolveViaDbUser now accepts a DbUser that has a live credential in
RedshiftCredentialBroker, connecting to the container as the cluster master
(the minted DbUser is nominal). An unknown non-master DbUser still fails with
ValidationException.

* test(redshift): end-to-end GetClusterCredentials + Data API non-master DbUser

Docker-gated: mints a credential for a non-master DbUser via GetClusterCredentials
then runs SELECT 1 through the Data API as that DbUser, asserting the result.

* test(compat): SDK coverage for Redshift GetClusterCredentials

Adds getClusterCredentials and getClusterCredentialsWithIAM assertions to the
AWS SDK Redshift compatibility test.

* docs(redshift): document GetClusterCredentials and GetClusterCredentialsWithIAM

Regenerates the redshift.md action table (excluding the DbGroups member-name
switch label), fills the two new descriptions, updates the wire-auth and
redshift-data.md DbUser notes, and bumps the Service Matrix count to 23.

* fix(redshift): reject a wrong master password instead of passing it through

passwordValidatorFor only treated the master pair as MASTER_EQUIVALENT and let
everything else fall to the broker. A request with the master username but a
wrong password is unknown to the broker, so it classified as PASSTHROUGH; the
wire proxy then opened the backend leg as master (isMaster is username-only) and
the client authenticated with the wrong password. Now the master username is
decided on its own password: match to MASTER_EQUIVALENT, mismatch to REJECT.

* fix(redshift): reject proxy logins when the cluster row is gone; strip IAM user path

passwordValidatorFor fell through to the broker when the cluster was absent from
the account partition, classifying an unknown user as PASSTHROUGH; the wire proxy
reads isMaster from its own start-time config, so that still opened the backend
as master for the master username with any password. Return REJECT when there is
no cluster row to validate against.

RedshiftIamDbUserResolver now strips an IAM path prefix from a user ARN
(user/team/alice -> alice), matching how AWS names the DbUser.

* fix(redshift): keep concurrent credentials, revoke on delete, bound the config default

Addresses PR review (greptile):
- RedshiftCredentialBroker now holds every unexpired credential per DbUser instead
  of one slot, so a reissue no longer invalidates a still-live password (matches
  AWS, which keeps each issued credential valid to its own expiry).
- Add revokeCluster(); RedshiftService calls it on deleteCluster and at the start
  of createCluster, so a cluster recreated with the same identifier does not
  inherit master-equivalent access from a stale credential.
- resolveDurationSeconds now holds the YAML default to the same 900-3600 bounds as
  a request value, falling back to 900 with a WARN instead of minting a credential
  that is already expired or over-range.

* fix(redshift): revoke temp credentials on createCluster rollback too

The greptile review asked for revocation on 'relevant rollback paths'. Both
createCluster failure branches that delete the cluster row now also call
credentialBroker.revokeCluster, so a credential issued by a concurrent
GetClusterCredentials while the row briefly existed cannot outlive it.

* fix(redshift): correct GetClusterCredentials AutoCreate prefix

AWS prefixes the returned DbUser with IAM: when AutoCreate is false and
IAMA: when it is true. The handler returned IAM: when true and no prefix
when false, so a client using the returned name could not authenticate
and the value diverged from GetClusterCredentialsWithIAM, which already
issues prefixed identities.

The broker keys on the returned name, so the proxy and Data API now
expect the prefixed DbUser. Tests and the redshift docs are updated to
match.

* test(redshift): give compat GetClusterCredentials tests distinct @Order

Three methods shared @Order(2), leaving their relative order undefined.
Number the two credential tests 3 and 4 and move testDeleteCluster to 5.
2026-09-10 23:58:33 -04:00
TATSUNO “Taz” Yasuhiro d9cc2a09d0 fix(rds): map Aurora MySQL engine versions to the MySQL image tag (#3382)
CreateDBCluster with Engine aurora-mysql and an Aurora version such as
8.0.mysql_aurora.3.08.0 used the version literally as the container
image tag. Docker has no such tag, leading the pull to 404.

Take the MySQL version in front of the Aurora suffix, so that example
runs mysql:8.0. Plain mysql versions still map to their own tag.

The Go compatibility tests for the RDS Data API on aurora-mysql skip
when the cluster cannot be created, so this failure never showed in
CI. They now run with the mapping fixed.
2026-09-10 23:50:55 -04:00
TATSUNO “Taz” Yasuhiro 22bae1fcd2 fix(lifecycle): clear storage before services clear on state reset (#3388)
performReset ran every Resettable.clear() first and storageFactory
.clearAll() last. Services that re-create bootstrap state in clear()
lost it again right away. IAM Identity Center is one: after a
/_floci/state/reset its bootstrap identity store was gone, so every
SCIM call answered 401 until a restart.

This is what broke ScimIntegrationTest in CI shard 3 since #3331.
EmulatorInfoControllerIntegrationTest runs in the same test
application before it and posts the reset endpoints.

Clear storage first, then let services clear and re-seed. The clear()
implementations that iterate state to stop timers or sockets read
in-memory maps, not storage, so the order change does not affect them.
2026-09-10 23:47:17 -04:00
Franklin G. Mendoza 48d2928061 feat(marketplace-deployment): emulate AWS Marketplace Deployment API (#3341) 2026-09-10 23:43:12 -04:00
Kenshin Okinaka debf9fb0dc feat(firehose): validate and persist ProcessingConfiguration (#3375)
* feat(firehose): validate and persist ProcessingConfiguration

A stream configured with a record transformation was accepted with a 200,
the member dropped by ignoreUnknown, and nothing echoed back. It is now
modelled, validated and stored, so a caller sees what it configured. The
transformation itself is not applied yet: records are still delivered
untransformed, and create and update say so in a warning.

The behavior follows what real AWS does, probed in us-west-2:

- A Lambda processor requires a LambdaArn, which must be a well-formed
  function ARN, and BufferSizeInMBs and BufferIntervalInSeconds are
  all-or-nothing.
- Processor types and parameter names are checked against AWS's enums,
  reproducing the order those sets are printed in and the 1-based member
  paths of the constraint messages.
- UpdateDestination replaces the whole block rather than merging it
  member-wise, the opposite of DataFormatConversionConfiguration: an update
  carrying only {"Enabled": false} leaves no processors behind, and an
  update is validated against its own content.
- A stored Lambda processor gains NumberOfRetries 3 and the stream's
  RoleArn, echoed in AWS's own parameter order.

Two checks AWS does not make are deliberately absent: NumberOfRetries is
not range-checked, accepted as 0 or 9 despite the documented 1 to 8, and the
function a LambdaArn names is not required to exist, unlike the Glue table a
conversion schema names.

* docs(firehose): record what AWS does with a null processor list member

Probed: real AWS answers InternalFailure for "Processors": [null] and for
"Parameters": [null], a fault of its own rather than a validation error.
Reproducing that helps nobody, so the entry stays ignored, which leaves the
configuration a caller would have had by omitting it, and the deviation is
written down instead. A test pins the choice so it reads as a decision.

The review also asked for a maximum of 3 on the processor list. Probing found
no such bound: three, four and five processors all pass validation and reach
the role check, so nothing is enforced here.
2026-09-10 23:25:18 -04:00
Hector Ventura 1726c6a8a3 fix(core): accept ARNs from every AWS partition (#3376)
* fix(core): accept ARNs from every AWS partition

Now that ARNs are minted with the region's real partition, the code that reads
them back has to accept them, or Floci emits names it then refuses. Fifteen
sites across eleven services anchored a pattern, a prefix check or a store scan
on a literal arn:aws:.

Two shapes, and the second is the serious one.

Client-supplied ARNs that were rejected as malformed: the KMS key-ARN branch in
resolveKey, the four service probes in ResourceArnBuilder, DynamoDB's
TagResource validation, and SsoAdminService, which now takes the model's
ManagedPolicyArn pattern. That fixes the pinned partition and tightens a .+ tail
that accepted policy names AWS rejects, while still refusing customer-managed
policies, which is correct for that operation.

Values written partition-aware and read back with a literal. These are not
rejections of foreign input, they are the emulator failing to find its own
resources, so in GovCloud or China they are live functional breaks:

  - ListStateMachines and ListActivities returned empty. Step Functions is the
    only service keying its stores by the full ARN, so its list prefix has to
    carry the partition. The prefix deliberately stops before the account
    segment, because the store holds more than one account.
  - SQS DLQ redrive stopped silently. queueUrlFromArn resolved a
    deadLetterTargetArn read back from GetQueueAttributes to null, the move
    block was skipped, and nothing was logged.
  - An EventBridge bus ARN was taken as a literal bus name, so DescribeEventBus
    reported not-found for a bus it had just created.
  - A Secrets Manager partial ARN, which AWS lets clients write without the
    random suffix, resolved to nothing.
  - An ECS task could not read its own configuration: a Secrets Manager
    valueFrom fell through to the SSM branch and a parameter ARN was passed
    along whole as a parameter name, killing the task at launch.
  - AppSync IAM authorisation built its policy resource with a pinned
    partition, so a policy naming its own API never matched and the request was
    denied.

The IAM trust-policy path failed the same way and needed the regex and the
construction changed together: resolving an STS assumed-role ARN back to its
IAM role rebuilt the role ARN with a hardcoded partition, so widening the
pattern alone would have denied AssumeRole to a caller who is entitled.

Two spellings are deliberate rather than an oversight. EventBridge matches an
ARN prefix instead of a whole ARN, so a truncated arn:aws:events: is still
reported as malformed rather than taken as a bus name. Secrets Manager reads
the name off the parsed resource without splitting it again, because a secret
name may contain colons.

API Gateway is not a widening. ACTION_URI_PATTERN and PATH_URI_PATTERN were
declared and referenced nowhere, so the real gate was a startsWith inside
parseIntegrationUri. The dead patterns are removed and the guard fixed.

Left alone, and not fixable here: IAM SAML providers and the SSO instance ARN
build a region-less arn:aws: ARN by concatenation, store under it, then look it
up by the string given. Widening those turns one miss into a different miss.
They need a deployment-level partition, which nothing in a request supplies.
The Amazon States Language service-integration ids are arn:aws:states::: in
every partition and stay as they are.

Each behavioural fix was checked by reverting its source file and confirming
the new tests fail without it.

* chore(stepfunctions): drop the duplicate AwsArnUtils import

StepFunctionsService imported AwsArnUtils twice. The duplicate arrived with
#2485 and javac accepts it silently, so nothing surfaced it until this branch
added an AwsRegions import above it and a diff view made it look new.

It is the only duplicate import in src/main/java, so there is nothing else of
this shape to sweep up.
2026-09-10 23:10:55 -04:00
lex00 cb6b4d8a88 feat(athena): create, update and delete data catalogs (#3381)
Adds CreateDataCatalog, UpdateDataCatalog and DeleteDataCatalog to the Athena
JSON 1.1 handler, backed by a data-catalogs.json store obtained through
StorageFactory. Catalogs accept the four modelled types (LAMBDA, GLUE, HIVE,
FEDERATED) and a FEDERATED catalog reports the ConnectionType carried in its
connection-type parameter.

TagResource and UntagResource are new, and ListTagsForResource now also serves a
datacatalog ARN. Tags live on the record they belong to, so a workgroup keeps
storing its own tags exactly as before.

The built-in AwsDataCatalog keeps the shape it had: it is still listed first and
still resolves as a GLUE catalog, and it is reserved against create, update,
delete and tagging the way the primary workgroup already is.
2026-09-10 23:07:42 -04:00
Franklin G. Mendoza 2d51259120 feat(verifiedpermissions): add full service emulation (#3128)
* feat(verifiedpermissions): add full service emulation

* fix(verifiedpermissions): harden OIDC and schema validation

* test(verifiedpermissions): add service layer coverage

* fix(verifiedpermissions): support native Cedar runtime

* fix(verifiedpermissions): package Cedar native FFI

* fix(verifiedpermissions): register Cedar deserializers for native

* fix(verifiedpermissions): bound JWKS refreshes

* fix(verifiedpermissions): avoid Cedar entity reflection

* fix(verifiedpermissions): register Cedar native reflection

* fix(verifiedpermissions): refresh rotated OIDC keys safely

* fix(verifiedpermissions): retry failed JWKS refreshes

* refactor(verifiedpermissions): isolate Cedar in sidecar

* fix(verifiedpermissions): harden Cedar sidecar runtime

* fix(verifiedpermissions): build cedar sidecar in compatibility CI

* fix(verifiedpermissions): remove stale cedar jni config

* fix(verifiedpermissions): recover cedar sidecar

* fix(verifiedpermissions): bound OIDC document responses

* fix(verifiedpermissions): start cedar sidecar in native sdk CI
2026-09-10 22:25:50 -04:00
Hector Ventura 7a7531a6b9 fix(acm): stop hex-shaped names becoming bogus IP address SANs (#3335)
* fix(acm): stop hex-shaped names becoming bogus IP address SANs

The SAN type check matched any string of hex digits and colons, which is far
looser than an address. Two things followed, both silent.

A label like 1234 or 0 matched, and InetAddress.getByName decoded it rather than
failing: 1234 became 0.0.4.210. The certificate carried an address nobody asked
for, and the name the caller wanted covered was not in the certificate at all.

Worse, a colon-free label was handed to the resolver, so certificate generation
performed a blocking name-service lookup. If the name happened to resolve, the
resolved address was written as an iPAddress SAN in place of the literal name.

Detection is now a range-checked dotted quad, plus a colon test for IPv6
literals. A colon cannot appear in a hostname, so a colon-bearing value is parsed
as a literal or rejected outright, never looked up. Only values already known to
be literals reach the resolver, which is what keeps generation off the network.

The DNS-name fallback stays. With detection this tight only a malformed IPv6
literal can reach it, and covering the name is the safer failure: dropping it
would stop the server serving that host with nothing to point at, whereas an
unmatched dNSName entry is simply ignored by clients.

Tests cover what was silently wrong: hex-shaped labels stay DNS names, an octet
above 255 is not an address, a malformed IPv6 literal is still covered, and no
colon-free label is ever treated as an address.

* fix(acm): stop a colon-bearing hostname reaching the resolver

The SAN type check treated any value containing a colon as an IPv6 literal, on
the reasoning that a hostname cannot contain one. The JDK does not agree, and
the value was still handed to InetAddress.getByName.

getAllByName only attempts a literal parse when the FIRST character is an ASCII
hex digit or a colon; everything else it resolves. So z:1 has a colon, is not
literal-shaped, and is looked up. Measured on JDK 25: getByName("z:1") takes
tens of milliseconds and fails with the resolver's "nodename nor servname
provided", while getByName("fffff::1") fails in under a millisecond with
"invalid IPv6 address literal". Only the second never left the JVM.

That is the same bug this branch set out to fix, reopened for a narrower shape,
and the method's own javadoc asserted the opposite. Detection now matches the
JDK's dispatch: a colon AND a literal-shaped first character.

Both halves are load-bearing. Inside the JDK's literal branch a failed IPv6
parse only throws when the value contains a colon; without one it falls through
to a lookup. Neither condition alone fails closed.

The leading-character test is spelled out rather than delegated to
Character.digit(c, 16). IPAddressUtil.digit resolves to an ASCII-only parser
unless jdk.net.allowAmbiguousIPAddressLiterals is set, and its own comment gives
the set as [0-9,A-F,a-f], but Character.digit answers 1 for the Arabic-Indic
digit one. The convenient spelling would classify U+0661 followed by a colon as
a literal, hand it to the resolver, and have the JDK decline to parse it and
look it up. Being stricter than the JDK is safe in both directions: if that
property is ever set, this only routes the value to the dNSName fallback.

Tests cover both shapes and were mutation-checked: restoring the colon-anywhere
rule fails the z:1 cases, and switching to Character.digit fails the non-ASCII
digit case.

Reported by pgermosen in review, including the observation that the malformed
IPv6 literal the existing tests cover is genuinely safe.
2026-09-10 22:18:22 -04:00
Priamo Germosen b87ee5bd4a fix(identitystore): self-heal the bootstrap identity store on hasIdentityStore (#3387)
EmulatorInfoController.performReset() runs every Resettable.clear() (which
re-seeds SsoAdminService's default d-9067f2a3c1 instance) before calling
StorageFactory.clearAll(), which wipes the `instances` backend again right
after. Once any test in the same JVM fork hits /state/reset or /state/nuke,
the default identity store never comes back, so every later SCIM request's
hasIdentityStore check 401s for the rest of that fork — this is why
ScimIntegrationTest passes in isolation but fails in the full suite (#3386).

hasIdentityStore now self-heals the same way listInstances() already does,
by ensuring the bootstrap instance exists before checking.
2026-09-10 21:07:00 -04:00
Niels Kootstra 051a2f09db fix(github-actions): continue Docker compatibility tests after failures (#3351)
* fix: report compatibility suite failures

* test: cover all compatibility suites after build failure

* test: run Docker failure aggregation in CI
2026-09-10 16:56:50 -04:00
luiseterc 19f410d6b0 fix(ec2): include supported usage classes in DescribeInstanceTypes (#3347)
* fix(ec2): include supported usage classes in DescribeInstanceTypes

* test(stepfunctions): document executor fixture dependencies

* test(ec2): document usage class regression coverage
2026-09-10 16:50:41 -04:00
Wu Shuwenanddajiaohuang 084ac87fc4 docs: name the pinned Quarkus version in AGENTS.md (#3369)
The stack list said Quarkus 3.32.3. The build pins
quarkus.platform.version to 3.39.2 since the dependency bump in #3175, and
that bump did not touch this line, so the canonical agent instructions
named a platform seven minor releases behind the one the build resolves.

The neighbouring entries in the same list were checked against their
source of truth and are correct: port 4566 in application.yml, Java 25 in
maven.compiler.release, and Java 25 across the workflows. AGENTS.md is the
only file in the tree that states a Quarkus version.

No behaviour changes, so no test accompanies this; the existing suite is
unaffected.

Co-authored-by: dajiaohuang <dajiaohuang@users.noreply.github.com>
2026-09-10 16:46:26 -04:00
Niels Kootstra 713a166a7c fix(opensearch): keep readiness polling after errors (#3373)
* fix(opensearch): keep readiness polling after errors

* test(opensearch): remove readiness timing dependency
2026-09-10 16:42:08 -04:00
Kenshin Okinaka 3669c8e84c fix(test): disable the GuardDuty organization admin GuardDutyMembersIntegrationTest enables (#3348)
* fix(test): disable the GuardDuty organization admin GuardDutyMembersIntegrationTest enables

GuardDutyMembersIntegrationTest enables account 444444444444 as a GuardDuty
organization admin and never disables it. Those admin accounts are shared by
every @QuarkusTest class in the same Surefire fork, and Macie answers the same
/admin route, so MacieOrganizationIntegrationTest.sharedAdminRouteKeepsGuardDutyBehavior
fails whenever it runs after this class: it asks for an empty admin list on the
GuardDuty credential scope and gets 444444444444 back.

Disable the admin in @AfterEach, guarded by a flag so the teardown only runs for
the test that enabled one and a single-method run of the class still works.

* test(guardduty): reset the teardown flag after the admin is disabled

The flag survives the disable, so a switch to PER_CLASS instance lifecycle would
have the next test's teardown issue a second /admin/disable and fail on the
expected 400.
2026-09-10 16:37:15 -04:00
Franklin G. Mendoza cbfa034470 feat(identity-center): complete IAM Identity Center emulation (#3331)
* feat(ssoadmin): add region operation

* feat(ssoadmin): attach customer managed policies

* feat(ssoadmin): create applications

* feat(ssoadmin): create application assignments

* feat(ssoadmin): create account instances

* feat(ssoadmin): create ABAC configuration

* feat(ssoadmin): create trusted token issuers

* feat(ssoadmin): delete account assignments

* feat(ssoadmin): delete applications

* feat(ssoadmin): delete application access scopes

* feat(ssoadmin): delete application assignments

* feat(ssoadmin): delete application authentication methods

* feat(ssoadmin): delete application grants

* feat(ssoadmin): delete identity center instances

* feat(ssoadmin): list principal account assignments

* feat(ssoadmin): provision permission sets

* feat(ssoadmin): list provisioned permission sets

* feat(ssoadmin): list accounts for provisioned permission set

* feat(ssoadmin): describe permission set provisioning status

* feat(ssoadmin): list permission set provisioning status

* feat(ssoadmin): describe account assignment deletion status

* feat(ssoadmin): list account assignment creation status

* feat(ssoadmin): list account assignment deletion status

* feat(ssoadmin): delete permission sets

* feat(ssoadmin): detach customer managed policy references

* feat(ssoadmin): list customer managed policy references

* feat(ssoadmin): get inline permission set policies

* feat(ssoadmin): put permission set boundaries

* feat(ssoadmin): get permission set boundaries

* feat(ssoadmin): delete permission set boundaries

* feat(scim): create groups

* feat(scim): create users

* feat(scim): delete groups

* feat(scim): delete users

* feat(scim): get groups

* feat(scim): get users

* feat(scim): list groups

* feat(scim): list users

* feat(scim): get schemas

* feat(scim): list schemas

* feat(scim): list resource types

* feat(scim): add service provider config

* feat(scim): patch groups

* feat(scim): patch users

* feat(scim): put users

* feat(ssoadmin): delete ABAC configuration

* feat(ssoadmin): delete trusted token issuers

* feat(ssoadmin): describe applications

* feat(ssoadmin): describe application assignments

* feat(ssoadmin): describe instances

* feat(ssoadmin): describe ABAC configuration

* feat(ssoadmin): describe regions

* feat(ssoadmin): describe trusted token issuers

* feat(ssoadmin): describe application providers

* feat(ssoadmin): list application assignments

* feat(ssoadmin): list principal application assignments

* feat(ssoadmin): list applications

* feat(ssoadmin): list application providers

* feat(ssoadmin): list regions

* feat(ssoadmin): list trusted token issuers

* feat(ssoadmin): put application access scopes

* feat(ssoadmin): get application access scopes

* feat: support listing application access scopes

* feat(ssoadmin): get application assignment configuration

* feat(ssoadmin): put application assignment configuration

* feat(ssoadmin): get application authentication methods

* feat(ssoadmin): put application authentication methods

* feat(ssoadmin): list application authentication methods

* feat(ssoadmin): get application grants

* feat(ssoadmin): put application grants

* feat(ssoadmin): list application grants

* feat(ssoadmin): get application session configuration

* feat(ssoadmin): put application session configuration

* feat(ssoadmin): list resource tags

* feat(ssoadmin): tag resources

* feat(ssoadmin): untag resources

* feat(ssoadmin): remove regions

* feat(ssoadmin): update applications

* feat(ssoadmin): update instances

* feat(ssoadmin): update ABAC configuration

* feat(ssoadmin): update trusted token issuers

* feat(ssooidc): register clients

* feat(ssooidc): start device authorization

* feat(ssooidc): create public client tokens

* feat(ssooidc): create IAM-authenticated tokens

* feat(ssoportal): list assigned accounts

* feat(ssoportal): list assigned account roles

* feat(ssoportal): issue assigned role credentials

* feat(ssoportal): invalidate portal sessions

* docs(ssoadmin): report complete operation count

* fix(identity-center): repair CI validation

* fix(identity-center): harden auth and native build

* fix(ssooidc): disambiguate RestAssured query parameter

* fix(identity-center): resolve CI compatibility failures

* fix(identity-center): address maintainer review

* fix(ssoadmin): preserve application provider partition

* fix(identity-center): repair Java compatibility tests

* fix(identity-center): trust local TLS in browser flows

* fix(identity-center): register refresh token grant in SDK test
2026-09-10 16:34:41 -04:00
Hyun Lee 8624ccce83 fix(dynamodb): enforce primary key size limits (#3354)
* fix(dynamodb): enforce primary key size limits

* test(dynamodb): align key size test name with service convention
2026-09-10 15:44:20 -04:00
Niels Kootstra c5e1a7f7ac fix(cdk): parse CDK endpoint URLs safely (#3352)
* fix: parse compatibility test endpoints safely

* fix(compat): parse CDK endpoint URLs safely

* test(compat): run endpoint regression coverage
2026-09-10 15:29:24 -04:00
Franklin G. Mendoza 87f2c2d1a8 feat(marketplace-entitlement): emulate AWS Marketplace Entitlement API (#3340) 2026-09-10 15:26:16 -04:00
XuJianandxujiantop-crypto 3090e333d4 fix(sfn): return empty objects for null state paths (#3371)
Co-authored-by: xujiantop-crypto <265865031+xujiantop-crypto@users.noreply.github.com>
2026-09-10 15:22:07 -04:00
Niels Kootstra d99f162eb6 fix(init-hooks): terminate hook process trees on timeout (#3372) 2026-09-10 15:09:37 -04:00
Niels Kootstra 970cd301d1 fix(msk): isolate MSK resources by account and region (#3353)
* fix: isolate MSK clusters by region

* fix(msk): scope broker resources by account and region

* fix(msk): preserve legacy cluster data during identity migration

* fix(msk): restrict legacy storage fallback to old clusters

* ci: retrigger PR checks after unrelated test flake
2026-09-10 14:42:12 -04:00
Aniket Shukla 5198cf29ec fix(kms): support SM2 signing in China regions (#3046)
* fix(kms): report SM2 as region unsupported

* fix(kms): support SM2 in China regions

* fix(kms): enable SM2 signing in China regions

* fix(kms): restrict SM2 to China regions

* fix(kms): accept the SM2DSA wire algorithm

* test(kms): cover SM2 signing validation errors
2026-09-10 14:16:38 -04:00
Niels Kootstra 2fd55b53df fix(tls): fail startup when public listener cannot bind (#3362) 2026-09-10 14:08:20 -04:00
Franklin G. Mendoza c99ecea0da feat(marketplace-agreement): emulate AWS Marketplace Agreement API (#3339) 2026-09-10 13:05:23 -04:00