Commit Graph
3406 Commits
Author SHA1 Message Date
lex00 6cd1bb3794 feat(rds): add and remove a subscription's source identifiers (#4363)
* feat(rds): add and remove a subscription's source identifiers

SourceIds was write-once. CreateEventSubscription accepts the list and
ModifyEventSubscription has no SourceIds member, so
AddSourceIdentifierToSubscription and RemoveSourceIdentifierFromSubscription
are the only way to change it and neither existed.

Adding an id the subscription already carries is a no-op. The model declares
only SourceNotFoundFault and SubscriptionNotFoundFault for these operations,
so no fault fits a duplicate. Removing an id the subscription does not carry is
SourceNotFound, which is the fault that does fit.

* fix(rds): refuse a missing SubscriptionName as a parameter error

SubscriptionName and SourceIdentifier are both required by the model, and only
the identifier was checked. A missing name fell through to the subscription
lookup and came back as SubscriptionNotFound, telling the caller the
subscription does not exist when the request simply did not name one. The two
required members now fail the same way on both operations.

Also imports assertEquals in the new test rather than qualifying it inline.
2026-09-25 07:08:02 -04:00
Kenshin Okinaka 08c6ce0768 feat(ses): add v2 export jobs (#4327)
* feat(ses): add v2 export jobs

CreateExportJob, GetExportJob, ListExportJobs and CancelExportJob render the
per-recipient timelines already stored at send time as CSV or JSON, through
the same aggregation BatchGetMetricData serves, so an export and a query of
one window cannot disagree.

Real SES writes the file into a bucket it owns and refuses a caller-chosen
S3Url, so Floci does the same and writes into its own S3 emulation, which is
what the presigned URL on a finished job resolves against.

The VDM gate answers BadRequestException here where message insights and
metric data answer NotFoundException, so SesAccountService takes the caller's
error shape and keeps one copy of the probed sentence.

* fix(ses): use the published concurrent-export quota and prove the reset test parks

* fix(ses): scope the export bucket per account and fix two row-count bugs

* fix(ses): make the reset drain test deterministic and document the presigner limit

* test(ses): assert the reset thread finished, since join returns on timeout too
2026-09-24 22:54:36 -04:00
Mario Toffia 88a992757e feat(lambda): bisect failing DynamoDB stream batches and keep refused failures (#4337)
BisectBatchOnFunctionError now splits a batch that fails with a function
error in half, keyed by checkpoint, until the poison record is isolated.
Splits do not consume the retry quota; throttles and partial batch
responses do not split.

A discarded batch whose OnFailure destination refuses the send is parked
at the persisted checkpoint and only the send is retried with backoff,
instead of checkpointing past a batch that was never delivered.
2026-09-24 21:18:00 -04:00
Niels Kootstra 3096a3cf7c fix(secretsmanager): bound rotation threads and lock storage (#4344)
* fix(secretsmanager): bound rotation threads and lock storage

* fix(secretsmanager): keep rotation threads non-daemon and drop the lock count test

* chore: rerun CI

* fix: set rotation thread flags explicitly and pin the test to the pool size
2026-09-24 21:15:29 -04:00
TATSUNO “Taz” Yasuhiro 8f606c3587 fix(dynamodb): match AWS error messages for item calls and projections (#4315)
* fix(dynamodb): drop the table name from ResourceNotFound on item calls

AWS answers a data-plane call on a missing table with the bare message
"Requested resource not found". Floci named the table there, which only
control-plane calls such as DescribeTable do.

* fix(dynamodb): reject overlapping and undefined ProjectionExpression paths

AWS rejects a read whose ProjectionExpression names the same document path
twice, or names a path that covers another one, and it does so before the
read, so a request that matches nothing still fails. An undefined #alias in
a projection path is rejected the same way. Floci accepted both and only
trimmed the item afterwards.

The check runs on GetItem, Query, Scan, BatchGetItem and TransactGetItems.

* test(dynamodb): pin the ResourceNotFound message every item call returns

Covers the missing-table half next to the existing CREATING-table case, and
records that DescribeTable still names the table.

* fix(dynamodb): reject BatchGetItem mixing AttributesToGet and ProjectionExpression

AWS weighs the two projection styles across the whole request. One table
entry carrying both, or one entry naming AttributesToGet while another names
ProjectionExpression, fails with the expression conflict message. Floci
accepted both shapes.

* fix(dynamodb): reject DeleteItem carrying both Expected and ConditionExpression

PutItem and UpdateItem already rejected the mix. DeleteItem ran the legacy
Expected block alongside the condition instead.

* fix(dynamodb): answer an empty BatchGetItem RequestItems the way AWS does

AWS moved BatchGetItem to the validation framework message for an empty
RequestItems map. BatchWriteItem still answers with its own sentence, so
only the read side changes.

* fix(dynamodb): match AWS wording for a StreamViewType with streams disabled

CreateTable answers "Table is being created with a stream disabled,
UpdateViewType should not be specified".

* fix(dynamodb): name the set type when a binary set has duplicates

AWS answers a BS duplicate with "Input collection [, ]of type BS contains
duplicates.", with no space before "of". String and number sets keep the
plain wording.

* refactor(dynamodb): read each projection path once per loop in validatePaths

* refactor(dynamodb): compare projection path prefixes with subList

* fix(dynamodb): reject overlapping and undefined ProjectionExpression paths on SearchVectors

* refactor(dynamodb): declare the BatchWriteItem cost table with its type

* test(dynamodb): pin the overlapping projection rejection on reads that match nothing
2026-09-24 21:13:18 -04:00
Simone Primarosa 922402210f feat(ec2): attach volumes as real block devices (#4354)
* feat(ec2): attach volumes as real block devices

* fix(ec2): address review feedback on volume block device attachments

* fix(ec2,eks): handle volume deletion failures and node volume re-attachment on restore

* test(eks): verify cluster node instance registration and listener callback

* fix(ec2,eks): address review comments on loop device detachment and config

* fix(ec2): support both util-linux and busybox losetup in volume loop lookup
2026-09-24 21:10:55 -04:00
Mario Toffia 4abba5a218 fix(lambda): preserve CloudFormation event source mapping options (#4316)
AWS::Lambda::EventSourceMapping now forwards MaximumBatchingWindowInSeconds,
MaximumRetryAttempts, MaximumRecordAgeInSeconds, BisectBatchOnFunctionError,
FilterCriteria, DestinationConfig and ScalingConfig to LambdaService, so a
stack-created mapping matches an API-created one. On UpdateStack each of
these that the template omits is sent as null, which clears it.

ParallelizationFactor and TumblingWindowInSeconds are not modeled and remain
ignored; the resource-type table notes this.

Fixes #4313
2026-09-24 21:05:00 -04:00
Hector Ventura eb2872f578 fix(core): read ARNs and Step Functions integration ids in every partition (#4358)
P2 of the multi-partition initiative (#4272), the parse side. StatesIntegration
replaces the literal arn:aws:states::: integration ids the ASL executor and the
definition validator compared against: the CDK builds them as
arn:${Aws.PARTITION}:states:::, so a China or GovCloud state machine never
matched (aws-cdk task-utils.ts:36). Only AWS's three suffixes (.sync, .sync:2,
.waitForTaskToken) parse, and a dispatch that does not read the suffix accepts
none, so sqs:sendMessage.bogus stays unsupported as it was. AwsArnUtils
.resourceIfArnFor replaces the 16 startsWith("arn:aws") probes, so bucket
policies, S3 resource paths, assumed-role principals, SAML role pairs, EKS
instance profiles, Security Hub, OAM and CloudTrail selectors recognise China,
GovCloud and ISO ARNs, and an assumed role's underlying role is rebuilt in the
session's own partition. Where a check used to pin arn:aws: and thereby the
commercial partition, it now pins the partition explicitly: a root principal
matches only a caller of the same partition and account, and a Security Hub
resource ARN must carry the request's partition. The 25 hand-rolled partition
alternations in regexes collapse onto AwsArnUtils.PARTITION_REGEX. The
partition-literal baseline drops from 270 to 195 gated occurrences.

Part of #4272
2026-09-24 21:03:38 -04:00
Niels Kootstra 6ed4726f52 fix(appsync): bound the Lambda authorizer result cache (#4345)
* fix(appsync): bound the Lambda authorizer result cache

* fix: keep the authorizer cache cap under concurrent inserts
2026-09-24 20:55:27 -04:00
lex00 09dcbabe2b feat(rds): manage event notification subscriptions (#4332)
* feat(rds): manage event notification subscriptions

CreateEventSubscription, DescribeEventSubscriptions, ModifyEventSubscription
and DeleteEventSubscription were all missing, so the subscription resource
could not be created.

Constraints come from the model. A SubscriptionName under 255 characters, a
required SnsTopicArn, SourceType limited to the documented valid values, and a
SourceIds list that may only be supplied alongside the SourceType its ids
belong to. An omitted Enabled activates the subscription, which the model
describes only in the negative: a subscription that is not activated is
created but not active. Modify applies only the members the request names.

Nothing is published to the topic. A subscription is stored and reported back
and no RDS event reaches SNS through it. The docs say so.

* fix(rds): synchronize the event subscription methods and cite the SourceIds constraint

createEventSubscription checked for a duplicate name and then stored, so two
concurrent creates of the same name both passed the check and the second
overwrote the first with neither caller seeing SubscriptionAlreadyExist. The
four methods are synchronized now, matching the 48 other public synchronized
methods in this file and the find-then-throw-then-store shape of
createDbSnapshot.

The comment on the SourceIds coupling said only that the model states it,
which sent a reviewer to the operation documentation where it is absent. It
now quotes the constraint and says it lives on
CreateEventSubscriptionMessage.SourceIds rather than on the operation.

* fix(rds): keep a rejected modify inert, carry subscription tags, and page the describe

Four findings from the automated review, all confirmed against the model.

ModifyEventSubscription wrote SnsTopicArn before validating SourceType, so a
request carrying a new topic and an unmodelled source type answered 400 with
the topic already changed. The store returns the live instance, so a later
describe reported it. This is the same shape as the Lambda code signing bug in
#4286 and I did not carry the lesson across.

CreateEventSubscriptionMessage has a Tags member that was dropped on the
floor, and resolveTagHandle had no arm for an es: ARN, so a subscription could
neither be created with tags nor tagged afterwards.

DescribeEventSubscriptionsMessage has MaxRecords and Marker, and its output
shape has Marker. None were read or emitted, so a bounded page returned
everything with no way to continue.

The new test used var, which AGENTS.md prohibits, the same thing flagged on
#4286.

* fix(rds): bound MaxRecords and resume paging past a deleted marker

Two defects I introduced in the pagination added last round.

MaxRecords was unbounded. Zero built an empty page and then read its last
element, throwing IndexOutOfBoundsException, and a negative value produced
invalid bounds. The model documents minimum 20, maximum 100, default 100, and
handleDescribeEvents a few hundred lines up already enforces that range. An
omitted value now defaults to 100 rather than returning everything.

The marker resumed by looking for its own name, so a subscription deleted
between calls left the offset at zero and handed back the first page again.
Resuming at the first name strictly greater than the marker is stable under
deletion.

The test used MaxRecords 1, a value the model rejects, so it exercised a page
size real RDS never serves. It now creates 21 subscriptions and pages with 20.

* fix(rds): validate MaxRecords before the named-subscription shortcut

The range check sat after the early return for a named subscription, so a
request naming one alongside an out-of-range MaxRecords succeeded. Request
validation should not depend on which branch serves the read.
2026-09-24 20:51:09 -04:00
Priamo Germosen dd05c533e5 fix(iam): emit State before Description in GenerateCredentialReport (#4329)
GenerateCredentialReportResponse's member order in the wire model, and the
order AWS's own documented example emits them in, is State then
Description. The handler had them reversed. Query-protocol XML parsers
match by element name, not position, so nothing was actually broken by
this; it's a fidelity fix, not a behavior fix.

Follow-up from #4298's review.
2026-09-24 17:38:07 -05:00
Priamo Germosen 70df224189 test(codepipeline): make the S3 source poll interval configurable so the negative tests wait less (#4236) 2026-09-24 17:37:36 -05:00
Abhigya 76cc27f2f1 fix(ecs): retry teardown of redeployed task containers (#4280)
* fix(ecs): retry teardown of redeployed task containers

* test(ecs): wait for explicit task stop in SDK compatibility test

* fix(ecs): serialize teardown and align stop compatibility test

* test(ecs): observe blocked concurrent stop without delay

* fix(ecs): preserve unknown exits and serialize startup transition
2026-09-24 15:51:05 -04:00
XuJian b658c5f020 feat(ecr): update and validate pull-through cache rules (#4342) 2026-09-24 15:38:19 -04:00
Simone Primarosa 077b65df5c feat(ec2): implement ModifyVolume and volume modification state (#4320) 2026-09-24 15:14:59 -04:00
XuJian 4a51c0e814 feat(dlm): manage lifecycle policies (#4335)
* feat(dlm): manage lifecycle policies

* fix(dlm): use shared partition regex
2026-09-24 15:08:34 -04:00
Simone Primarosa 6de5e40f54 feat(eks): label cluster nodes with their topology zone and region (#4308) 2026-09-24 15:06:57 -04:00
Niels Kootstra 06ec4b563a fix(ec2): validate and expire IMDSv2 session tokens (#4303)
* fix(ec2): validate and expire IMDSv2 session tokens

PUT /latest/api/token accepted any TTL and tokens never expired. Require an
integer X-aws-ec2-metadata-token-ttl-seconds between 1 and 21600 (400
otherwise) and reject an expired or unknown token with 401, as IMDS does.
Requests without a token still use IMDSv1.

* test(ec2): use the shared MutableClock in Ec2MetadataTokenTest

Drop the test's private clock in favour of
io.github.hectorvent.floci.testing.MutableClock, which other tests
already share and which starts at the same instant.

* fix(ec2): reject an IMDSv2 token presented from another instance

A valid token won over the caller's IP, so container B presenting
container A's token received A's metadata, credentials included. The
docs say a token is not valid on other instances. Answer 401 when the
caller's IP maps to a different instance than the token's; an
unregistered IP still defers to the token.
2026-09-24 15:04:24 -04:00
Vũ Thế Huy 4e3bbe539c fix(s3): validate checksum passed via presigned url query parameters (#4254)
* fix(s3): validate checksum passed via presigned url query parameters (#4188)

* fix(s3): support checksum algorithm in query on presigned copy and drop unused overloads
2026-09-24 14:57:34 -04:00
Hyun Lee bdbc7e93d3 fix(apigatewayv2): reject an out-of-range AuthorizerResultTtlInSeconds (#4294)
CreateAuthorizer and UpdateAuthorizer read AuthorizerResultTtlInSeconds with a bare Number cast and stored any integer, so -1 or 99999 was accepted and returned by GetAuthorizer. The API Gateway v2 model constrains the member to 0-3600 (IntegerWithLengthBetween0And3600) and lists BadRequestException (HTTP 400) as the error for invalid input, which is what the service now throws.

UpdateAuthorizer checks the value before changing any field, because the store hands back the live authorizer and a rejected request must not leave half of the patch applied. ImportApi and ReimportApi check the x-amazon-apigateway-authorizer TTL while planning, so a rejected reimport keeps the previous definition. AWS::ApiGatewayV2::Authorizer goes through the same service call, so an out-of-range value now fails the resource.

Closes #4072
2026-09-24 14:41:18 -04:00
Franklin G. Mendoza 02ad6aa768 fix(codepipeline): resolve effective source revisions (#3514) 2026-09-24 13:30:42 -04:00
Aniket Shukla 243797c2c6 fix(apigateway): provision CloudFormation MOCK CORS responses (#4324)
Preserve method response headers, integration request templates, and integration responses when creating AWS::ApiGateway::Method resources. This lets Serverless-style OPTIONS MOCK methods emit their configured CORS headers.
2026-09-24 12:27:25 -04:00
Aniket Shukla c595792795 fix(ec2): report instance platform details (#4322) 2026-09-24 12:14:36 -04:00
TATSUNO “Taz” Yasuhiro 9454ceed21 fix(dynamodb): filter an unkeyed PartiQL index read on the index view (#4319) 2026-09-24 12:10:00 -04:00
lex00 41ceed4dba feat(lambda): manage code signing configurations (#4286)
* feat(lambda): manage code signing configurations

CreateCodeSigningConfig and its Get, Update, Delete and List siblings were
missing, so aws_lambda_code_signing_config and anything else that manages the
resource had nothing to call.

Adds the five, backed by a store. Constraints come from the model: an id of
csc- plus 17 characters, AllowedPublishers required with one to twenty signing
profile ARNs, a Description of at most 256 characters, and Warn as the default
UntrustedArtifactOnDeployment.

ListFunctionsByCodeSigningConfig now resolves the configuration instead of
answering every well-formed ARN with a 404. That answer was correct only while
no configuration could exist. A known one reports no functions, since
PutFunctionCodeSigningConfig is still not wired.

Nothing verifies a signature, so a configuration never gates a deployment. The
docs say so.

* fix(lambda): register the code signing config model for reflection

PersistedModelReflectionTest flagged it: a type reachable from persisted
storage needs @RegisterForReflection or native-image persistence breaks on
restart. The two nested shapes need it too.

* docs(lambda): name the ARN pattern as the reason the id alphabet is lowercase

The comment credited the id pattern, which is the looser of the two.
CodeSigningConfigId allows csc-[a-zA-Z0-9-_\.]{17} and CodeSigningConfigArn
ends in csc-[a-z0-9]{17}, so the ARN is what binds the alphabet. Anyone
reconciling the code against the old comment could widen it, still satisfy the
id pattern, and start emitting ARNs that do not conform.

Also imports List in the new test instead of writing java.util.List.of inline.

* fix(lambda): mint the code signing config ARN through AwsArnUtils

The ARN was assembled from a hardcoded arn:aws: prefix, so it named the
commercial partition whatever region the request carried. AwsArnUtils resolves
the partition from the region, which is what the partition-literals gate asks
for.

* fix(lambda): validate every member of an update before applying any

The store hands back the live instance, so validating and setting in turn left
an earlier member written when a later one was rejected. An update carrying a
valid Description and an empty AllowedPublishers answered 400 with the
description already changed, visible to the next GetCodeSigningConfig and
saved by the persistent and hybrid stores on their next write.

aRejectedUpdateChangesNothing sends that combination, and the same shape with
the policy as the rejected member, and asserts the description is unchanged
after each. It fails without the reordering.
2026-09-24 12:05:29 -04:00
lex00 db07c56704 fix(opensearch): report an endpoint for a domain with no container behind it (#4284)
* fix(opensearch): report an endpoint for a domain with no container behind it

A domain reports Processing false as soon as it is created, but Endpoint stays
blank whenever there is no container: the service is mocked, or the container
could not be started. SDK waiters poll DescribeDomain until the domain is
active and names an endpoint, so neither exit is ever reached and a create
hangs until the caller's own deadline instead of failing.

Both paths now synthesize an AWS-shaped endpoint,
search-<domain>-<suffix>.<region>.es.amazonaws.com, with the suffix derived
from the domain name so it survives a restart. The container path is
unchanged.

* docs(opensearch): say which cases the synthesized endpoint covers

The javadoc claimed SDK waiters poll DescribeDomain until the domain names an
endpoint. botocore ships no waiters for opensearch or es, and Terraform's
create wait only checks that Endpoint is non-nil, which "" already satisfies.

It also claimed the fallback covers a container that could not be started.
tryStartDomain rethrows whenever Docker is reachable, so it returns false only
when no daemon is reachable at all.

Both now say what they actually cover: mock mode and an unreachable Docker
daemon, reporting an AWS-shaped endpoint in place of a blank one. The test's
class comment carried the same two claims.

* fix(opensearch): take the synthesized endpoint's DNS suffix from the partition

The endpoint hardcoded .es.amazonaws.com, so a cn or gov region reported a
commercial hostname. AwsRegions.dnsSuffixFor resolves it from the region, which
is what the partition-literals gate asks for.

theEndpointTakesItsDnsSuffixFromThePartition creates a domain in cn-north-1 and
asserts the endpoint ends in .amazonaws.com.cn.
2026-09-24 12:04:44 -04:00
Mario Toffia ec40bcf5f4 fix(iot): accept MQTT packets up to the AWS 128 KB payload limit (#4307)
* test(iot): 128 KB MQTT payloads on every transport, failing

* fix(iot): accept MQTT packets up to the AWS 128 KB payload limit

* test(iot): pin the 146 KB MQTT 5 packet limit with AWS maximum properties
2026-09-24 11:53:07 -04:00
Hector Ventura 0dd080a46f feat(core): partition foundation from botocore's published partition data (#4317)
P1 of the multi-partition initiative (#4272). tools/aws/regen_partitions.py
vendors botocore's partitions.json and endpoints.json (8 partitions, 46 regions,
the partition-wide endpoints with their signing regions) plus the CDK's opt-in
and S3 website rules into src/main/resources/aws/partitions.json, checked by
make aws-data-check. AwsPartition and AwsPartitions replace the hand-typed rules
behind AwsRegions; RequestContext carries the request's partition from its
SigV4 signing region; RegionResolver mints global ARNs in that partition and
buildArn routes a blank region there; floci.partitions.id pins the deployment's
partition behind a startup validator that refuses a contradiction with the
default region.

Behaviour a reviewer will see, all AWS-faithful: DescribeRegions follows the
request's partition and the opt-in model (17 commercial regions by default, all
34 with AllRegions=true, RegionName.N filters, endpoints on the partition's DNS
suffix); TLS SANs cover every published region; the EKS registry mirrors follow
the deployment partition's regions. The partition-literal baseline drops by two.

Part of #4272
2026-09-24 10:33:05 -04:00
Hector Ventura e73b80d5ee fix: bring the partition literals that merged past the gate back under it (#4314)
Three pull requests merged after the partition-literal gate (#4270) without ever
running it, because their CI started before the gate existed on their base, so
main has failed the gate for every pull request since: CostAnomalyService
(#4221) spelled its own partition alternation in the SNS topic ARN pattern,
EcrService (#4304) did the same in the pull-through-cache credential ARN pattern
and compared a host against public.ecr.aws, and IamService (#4298) built the
credential report's root ARN with a literal arn:aws:. The two patterns now use
AwsArnUtils.PARTITION_REGEX, the root ARN is minted through AwsArnUtils like
every other IAM ARN in the file, and the ECR Public host carries the gate's
escape comment: it is that registry's fixed name and the service exists only in
the commercial partition.
2026-09-24 10:17:30 -04:00
Priamo Germosen 910f0922c9 feat(iam): add GenerateCredentialReport and GetCredentialReport (#4298)
Generates and downloads the account's credential report, the 23 columns
AWS documents for it, in CSV, Base64-encoded per the wire model. The
report is a single value per account, stored the same way accountAliases
and passwordPolicies already are, and regenerated only once the previous
one is older than 4 hours, matching AWS's documented caching window.

CSV content: every IAM user gets real password_enabled, password_last_used,
password_last_changed and access_key_1/2_active/last_rotated where Floci
already tracks that state, plus the documented placeholder values for what
it does not model (MFA devices, X.509 signing certificates, access-key
last-used date/region/service, and password_last_used itself, since
nothing in the codebase ever sets IamUser's passwordLastUsed field). The
root account row is present, as AWS always includes it, but is placeholder
throughout: Floci does not model root account credentials at all, the same
reason GetAccountSummary's AccountPasswordPresent and
AccountAccessKeysPresent are always zero.

password_last_changed needed a new LoginProfile field: UpdateLoginProfile
changes the password without touching LoginProfile's own createDate (its
meaning stays 'profile created'), so reading createDate for this column
would have kept reporting the original creation time after a password
change. passwordLastChanged is set alongside createDate initially and
updated whenever UpdateLoginProfile actually changes the password, falling
back to createDate for a profile persisted before this field existed.

additional_credentials_info is Floci's own wording, since AWS does not
document the exact text; in practice it is unreachable, since
CreateAccessKey already enforces the real 2-key-per-user quota.

Generating a report is effectively instant here, so GenerateCredentialReport
never actually returns INPROGRESS; a GetCredentialReport call right after
it always finds the report ready. The STARTED state and its description
for the no-report-exists case match AWS's own documented example response
verbatim; the report-expired case's wording is Floci's own, since AWS does
not document it.
2026-09-24 07:45:24 -05:00
XuJian 1952ba4052 feat(ecr): manage pull through cache rules (#4304)
Signed-off-by: XuJian <265865031+xujiantop-crypto@users.noreply.github.com>
2026-09-24 08:36:06 -04:00
Kenshin Okinaka 34be03b334 feat(ses): add v2 BatchGetMetricData (#4302)
Aggregates the per-recipient timelines already stored at send time, so the
batch metrics and GetMessageInsights cannot disagree about what a send
produced. Buckets are whole UTC days, the series is sparse rather than zero
filled, the end of the range is exclusive, and counting is per recipient.

SentEmail gains the configuration set the send resolved to, which the
CONFIGURATION_SET dimension filters on. The VDM gate moves into a shared
SesVdmGate so the two gated operations keep one copy of the probed message.

Metrics that need a real mailbox to act stay empty, as does TRANSIENT_BOUNCE,
since every bounce Floci derives is permanent.
2026-09-24 08:34:15 -04:00
Aniket Shukla 55f9ff5a8b fix(ec2): honor dry run for replace route (#4300) 2026-09-24 08:31:11 -04:00
Simone Primarosa 876ddc7422 feat(ec2): expose synthesized cluster node instances to the EC2 service (#4262)
* feat(ec2): expose synthesized cluster node instances to the EC2 service

* fix(ec2): enforce account isolation and tag persistence for cluster node instances

* fix(ec2): scope findInstanceById to caller account for external instances

Scope findInstanceById to the caller account when falling back to
external instances instead of matching across all accounts. Thread
the account identifier into SSM direct command execution, ELBv2 target
resolution, and classic ELB health checking so external cluster nodes
remain strictly account-isolated across all instance lookup paths.

* fix(ssm,eks): update test stubs for account-scoped direct execution and harden cluster provider
2026-09-24 08:27:52 -04:00
Abhigya bae7e0316a feat(s3): enforce Block Public Access on the data plane (#4253)
* feat(s3): enforce Block Public Access on the data plane

The four Block Public Access flags were stored and returned but never read
by any authorization path, so put-public-access-block was accepted and
changed nothing: a bucket left public by a policy or an ACL stayed readable.

Enforce all four, combining a bucket's configuration with its owner
account's and taking the most restrictive of the two, as AWS does.

BlockPublicPolicy and BlockPublicAcls reject the write that would introduce
public access, which AWS applies whoever the caller is, so they do not sit
behind enforce-auth. RestrictPublicBuckets and IgnorePublicAcls suppress
access an existing policy or ACL grants, which only has meaning once
anonymous authorization runs, so they take effect under enforce-auth.

Deciding what counts as public follows the documented AWS rules: an ACL is
public when it grants any permission to AllUsers or AuthenticatedUsers, and
a policy is assumed public unless a wildcard-principal statement pins a
recognised condition key to a fixed value. A single public statement makes
the whole policy public, so RestrictPublicBuckets also withholds the
cross-account delegation a separate non-public statement grants.

Enabling a setting never rewrites stored state; an existing public policy
or ACL is left exactly as written.

* test(s3): pin the Block Public Access contract at the wire

Cover the write-time flags under the default configuration and the
read-time flags under enforce-auth, including the reproduction that
motivated the fix: put-public-access-block followed by an anonymous
GetObject on a bucket whose policy is public.

Each enforcing assertion is paired with a negative control that must keep
passing without the fix, so a test cannot pass vacuously: the without-BPA
case still returns 200, and the owner's signed access is never affected.
Reverting the S3Service change fails the 11 enforcing assertions and leaves
the 10 controls green.

Unit tests cover the settings record's parsing and most-restrictive merge,
the ACL public-status rule, and the policy public-status rule against the
examples in the AWS documentation.

* test(s3): validate Block Public Access through the AWS SDK

Drives BlockPublicPolicy and BlockPublicAcls with S3Client so the rejection
is seen the way an SDK caller sees it: a 403 carrying the AccessDenied error
code, not just a status line. Both apply without enforce-auth, which is the
configuration this suite runs against.

* test(s3): drop the em-dash from the Block Public Access display name

* fix(s3): recognize scoped access point ARN in bucket policies

* fix(s3): honor ForAnyValue in public policy checks
2026-09-24 08:23:12 -04:00
lex00 72231c09cf feat(dynamodb): add the legacy global table operations (#4288)
* feat(dynamodb): add the 2017.11.29 global table operations

CreateGlobalTable, DescribeGlobalTable, UpdateGlobalTable and ListGlobalTables
were all UnknownOperationException, so a legacy global table could not be
created at all. The 2019.11.21 path through UpdateTable ReplicaUpdates already
worked, and these four now run on the same replica metadata.

Constraints come from the model. CreateGlobalTable builds on a table that
already exists, so an absent one is TableNotFoundException rather than the
item operations' ResourceNotFoundException, and a second create is
GlobalTableAlreadyExistsException. The one replica precondition a
single-process emulator can test is the stream, so a table joins only with
DynamoDB Streams enabled and a view type of NEW_AND_OLD_IMAGES.

DynamoDbIntegrationTest used CreateGlobalTable as its example of an
unsupported operation. It now uses DescribeGlobalTableSettings, which is still
unimplemented.

* fix(dynamodb): use the model's fault shapes on the global table surface

Two gaps on the new operations.

requireStreamWithBothImages raised InvalidParameterValue, which is not a
DynamoDB shape at all. Every other rejection in this file raises
ValidationException, seventy-six of them, so a client catching that one missed
this rejection alone. The test asserted only the status, never the code, which
is why nothing caught it.

UpdateGlobalTable delegated straight to applyReplicaUpdates, and that helper is
deliberately idempotent for UpdateTable and CloudFormation re-applies: a
duplicate add is skipped and an absent removal is a no-op. The model declares
ReplicaAlreadyExistsException and ReplicaNotFoundException for
UpdateGlobalTable and declares neither for UpdateTable, so sharing the path
dropped both. The membership check now lives in updateGlobalTable and the
helper keeps its idempotence.

Tests assert the codes rather than the status, cover both replica faults
including a re-add of the home region, and pin that UpdateTable still accepts
the same re-add.
2026-09-24 08:22:20 -04:00
XuJian 7cf8ab7d85 feat(ce): manage anomaly monitors and subscriptions (#4221)
* feat(ce): manage anomaly monitors and subscriptions

* fix(ce): return JSON objects for empty responses
2026-09-24 08:20:17 -04:00
Niels Kootstra db73026a35 docs(ssm): match BoundedOutputCollector Javadoc to its write path (#4297)
The class Javadoc said bytes after the cap are decoded and discarded,
but write returns before decoding once the cap is reached. Describe
what the code does.
2026-09-24 07:35:17 -04:00
c3m2r4 babb43ac3d fix(cloudwatch): return storedBytes on DescribeLogGroups (#4202)
* fix(cloudwatch): return storedBytes on DescribeLogGroups

AWS reports log-group storedBytes as the sum of stream sizes. Floci
always returned 0, which breaks SDK clients that read the field.

* style(cloudwatch): import collection test helpers
2026-09-24 07:30:14 -04:00
Hector Ventura 35605937c8 fix(cloudformation): answer DescribeStackEvents on a missing stack with AWS's wording (#4301)
DescribeStackEvents reported a missing stack as "Stack with id <name> does not
exist", the DescribeStacks wording; AWS says "Stack [<name>] does not exist" for
this operation, and clients tell the two apart by text. The CDK's stack-event
poller swallows exactly the bracketed form once the stack it watches has been
deleted, so Floci's wording escaped as an error from the monitor's final poll and
cdk destroy --all stopped after its first stack (exit 1, remaining stacks left
in place). With the wording alone corrected, the same two-stack destroy --all
destroys both and exits 0; the by-name ValidationError after a delete stays,
as on AWS.

Closes #4235
2026-09-24 07:25:26 -04:00
TATSUNO “Taz” Yasuhiro 6d95dfe3e1 fix(lambda): invoke the version or alias that a qualified function reference names (#4231)
* fix(lambda): invoke the version or alias an event source mapping names

An event source mapping created with a qualified FunctionName, such as
my-fn:1 or my-fn:prod, always invoked $LATEST. The SQS, Kinesis and
DynamoDB Streams pollers now read the qualifier from the mapping's function
ARN. They invoke that version, or the version the alias points to.

* fix(sns): invoke the version or alias a Lambda subscription names

A Lambda subscription to a qualified ARN, such as my-fn:PROD, always invoked
$LATEST because the qualifier was cut off before the invoke. The full
endpoint ARN now goes to the Lambda invoke, which resolves the qualifier.

* fix(s3): invoke the version or alias a Lambda notification names

A bucket notification to a qualified function ARN, such as my-fn:PROD,
always invoked $LATEST because the qualifier was cut off before the invoke.
The qualifier now stays on the function reference passed to Lambda.

* fix(pipes): invoke the version or alias a Lambda target or enrichment names

A pipe whose target or enrichment is a qualified function ARN, such as
my-fn:PROD, always invoked $LATEST because the qualifier was cut off before
the invoke. The qualifier now stays on the function reference passed to
Lambda.

* fix(stepfunctions): invoke the version or alias a Lambda task names

A Lambda task whose Resource or FunctionName is qualified, such as my-fn:1 or
my-fn:PROD, always invoked $LATEST because the qualifier was cut off before
the function lookup. The task now invokes that version, or the version the
alias points to.

* test(lambda): run an SQS event source mapping on an alias through a real function

The alias points to version 1, which succeeds. $LATEST throws. The message
leaves the queue only when the mapping invokes the alias version.

* fix(lambda): resolve a qualified function in one place

LambdaService, the event source mapping pollers and the Step Functions
executor each had their own copy of the qualifier rule. The rule now lives in
LambdaTargetResolver, which all of them use. Mappings and Step Functions
tasks on an alias with AdditionalVersionWeights now follow the weights, as
a direct invoke already did.

* test(lambda): drop the Docker SQS alias mapping test

It starts a real function and waits on the queue on every CI run with
Docker. LambdaServiceTest and the poller unit tests already cover a mapping
on an alias through the shared resolver.
2026-09-24 07:24:32 -04:00
Franklin G. Mendoza 196d1586da fix(codepipeline): retry failed stages in place (#3513) 2026-09-24 07:17:04 -04:00
Aniket Shukla 179835f835 fix(s3): reject unknown bucket location constraints (#4259) 2026-09-24 07:08:50 -04:00
Hector Ventura 836161e1ff feat(docker): own the floci-aws- container and volume prefix (#4273)
Every container and volume Floci creates was named floci-<service>-<id>. Every
Floci emulator shared that prefix, so two of them on one Docker daemon collided
on names, and docker volume prune --filter label=floci=true reached all of them
at once. Each emulator now owns a prefix of its own; this one uses floci-aws-,
and labels its resources floci_emulator=floci-aws.

Existing data is neither moved nor lost. Resources with a record (RDS, MSK,
OpenSearch, Amazon MQ, Kinesis Analytics savepoints, Timestream InfluxDB)
persist the volume name they were created with; records from before the field
existed are backfilled with the frozen legacy name so their data keeps
resolving. Volumes with no record (the ECR registry, EFS-backed task and Lambda
volumes) are found by probing the legacy name first. Containers are disposable
and always take the current name; the UI console and the ECR registry, which
survive shutdown and are adopted by name, are looked up under both prefixes so
an upgrade does not orphan one that still holds its host port. Stale-container
cleanup clears both names.

Scripts that name containers (docker exec floci-rds-<id>) must be updated, and
downgrading does not migrate back: a record written after the upgrade carries a
floci-aws- name an older build will not look for. Documented in storage.md.
2026-09-24 07:04:59 -04:00
Hector Ventura bfedf6c679 feat(batch): tag actions and one-lock teardown, wired into the CloudFormation provisioner (#4268)
Batch gains ListTagsForResource, TagResource and UntagResource (rest-json on
/v1/tags/{arn}, served by a BatchTagHandler under the shared V1Tags controller,
200 on success as the model declares no responseCode), and the compute
environment, job queue and job definition each get a teardown that deletes
under one lock and reports false when the resource is already gone (an
INACTIVE job definition revision counts as gone).

BatchCfnProvisioner deletes through those teardowns so DeleteStack and rollback
remove the backing resources instead of only forgetting them, and a JobQueue
update reconciles its tags in place. ProvisionContext.resolveTags now reads the
object form of Tags as well as the list form: Batch templates declare tags as a
map, which was silently dropped at create time.

Refs #2861
2026-09-24 07:04:27 -04:00
Priamo Germosen 94fc4c45bb feat(codeartifact): release a deleted repository's Maven storage (#4210)
DeleteRepository never cleaned up the Reposilite-side storage of a deleted
repository; it was left behind, wasting space over a long-running process.
Reposilite has no bulk-delete endpoint, but DELETE on a path recursively
removes everything under it in one call, so this deletes each of the
repository's top-level entries before removing it from the shared settings
list, verified against a live instance. Order matters: the repository must
stay registered while its files are deleted, since Reposilite 404s every
path, including DELETE, for an id absent from its settings.

Release is best-effort: the CodeArtifact-side metadata delete already
committed by the time it runs, matching real CodeArtifact's own
DeleteRepository (synchronous, always succeeds once the repository exists).
A sidecar that is unreachable must not turn an already-successful delete
into a 500, and must not leave the repository stuck, since a retry would
just 404 against the already-deleted record.

Introduces RepositorySidecarManager, a small interface every per-format
sidecar can implement, and CodeArtifactSidecarRegistry, which discovers
implementations via CDI. CodeArtifactService.deleteRepository releases
storage generically over whatever formats a repository has sidecar ids
for, so a future format's sidecar needs no change here. Reposilite is the
first and only implementation for now; CodeArtifactRepository's
mavenRepositoryId field becomes a sidecarContainerIds map for the same
reason.
2026-09-23 22:48:03 -05:00
XuJian b986b95074 fix(s3): reject reserved storage bucket names (#4289) 2026-09-23 23:41:20 -04:00
Vũ Thế Huy a450cdc9b0 feat(redshift): support Redshift Spectrum phase one (#4184)
* feat: add Redshift Spectrum metadata catalog

* feat: parse Redshift Spectrum DDL

* feat: read Redshift Spectrum CSV data from S3

* feat: classify and rewrite Redshift Spectrum queries

* feat: materialize Spectrum rows into PostgreSQL

* feat: intercept Redshift Spectrum queries

* test: cover Redshift Spectrum wire integration

* docs: document Redshift Spectrum phase one

* fix: handle Spectrum extended queries

* fix: preserve Spectrum query protocol state

* fix: resolve Spectrum cursor paging and extended query race condition

- Await prior backend queries before streaming local Spectrum Extended Query frames
- Drop synthetic Spectrum Parse/Bind/Describe/Close frames from coordinator pending queue
- Support server-side cursor pagination with PortalSuspended across multiple Execute cycles
- Add cascade cleanup for unexhausted portal cursors when prepared statement is closed

* fix(redshift): register SpectrumMaterializer for GraalVM runtime initialization

* fix(redshift): forward non-Spectrum queries and register storage models for reflection

* docs(redshift): clarify Spectrum temp table lifecycle across protocols

* docs(redshift): note that Simple Query Spectrum creates a temp table per query

---------

Signed-off-by: Vũ Thế Huy <31652864+vuthehuyht@users.noreply.github.com>
2026-09-23 23:34:03 -04:00
Vũ Thế Huy 5f1f80b496 refactor(redshift): align Redshift code with AGENTS.md style rules (#3992)
* refactor(redshift): align main sources with AGENTS.md style rules

Import Matcher instead of qualifying it inline, replace a var with its
explicit type, and order the RedshiftService imports (java.* last).
Remove em-dashes from comments and a log message.

Two swallowed IOExceptions now log with context (snapshot dump deletion
and exec output capture), and the remaining intentionally ignored one
says why it is safe.

* refactor(redshift): replace var and inline qualified names in tests

Use explicit types instead of var and import the classes that were
written fully qualified inline, as AGENTS.md requires.

* refactor(redshift): drop the test prefix from test method names

AGENTS.md prefers camelCase sentences over testX names, which are common
in older tests but not the pattern to copy. Rename the 99 remaining
testX methods in the Redshift tests. No assertions changed.

* refactor(redshift): remove remaining em-dashes from test comments

* refactor(redshift): log warning when temp dump cleanup fails on aborted reboot
2026-09-23 23:12:21 -04:00
Matheus Oliveira fc81cdedd9 fix(lambda): bound a destination cycle that re-enters through SNS or EventBridge (#4279)
The 16-hop bound only advanced when a destination named a Lambda function, so a
cycle closed through an SNS topic or an EventBridge bus restarted at zero on every
lap and ran forever. The chain position now rides the calling thread, which both
services already deliver their Lambda targets on, and the asynchronous invoke drops
the event once the chain is exhausted instead of running it.

Closes #4267

Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>
2026-09-23 23:11:06 -04:00