Commit Graph
925 Commits
Author SHA1 Message Date
Jackson Price fee688bd05 feat(cloudformation): support four AWS::AppConfig resource types (#6791) 2026-10-29 12:59:23 -04:00
Matheus Oliveira 9ce1b1755e fix(ecr): delete only the named tag in BatchDeleteImage (#6597) 2026-10-29 00:06:36 -04:00
Vũ Thế Huy da8e22744b feat(redshift-data): implement ListSessions (#6892) 2026-10-28 23:49:07 -04:00
Jimmy Liu Jia 5ffe6d1123 fix(lambda): attach code signing configs to functions (#6857)
* feat(lambda): attach code signing configs to functions

* fix(lambda): align code-signing IAM function names

* fix(lambda): preserve code-signing config on CreateFunction

* fix(lambda): align code-signing attachment response paths
2026-10-28 23:00:50 -04:00
Kenshin Okinaka 4dbe3731a9 feat(ses): add SES v2 ListRecommendations (#6817) 2026-10-28 21:55:19 -04:00
Vũ Thế Huy e820414f22 feat(redshift-serverless): execute scheduled actions on cron and at schedules (#6851) 2026-10-28 21:05:15 -04:00
Matheus Oliveira 347e8f63a9 fix(opensearch): scope domains to the request's region (#6682)
* fix(opensearch): scope domains to the request's region

Domain records were keyed by the bare name, so a domain created in one
region could be described, updated and deleted from another, and the
same name conflicted across regions. Key the store by region and name,
resolve every operation inside the region the request is signed for,
and migrate pre-scoping records onto the scoped key taking the region
from their ARN. Region-scope the legacy host-path data directory per
account and region, keeping the bare directory for records that predate
the region marker while it still exists.

Closes #6081

Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>

* fix(opensearch): reject a tag ARN naming another account as not found

findByArn resolved the account named in the ARN, where every fixed
lookup only reached the caller's account through the account-aware
storage backend, so a caller could read and change another account's
domain tags under the default settings. An ARN naming a foreign account
now answers ResourceNotFoundException the way Lambda layers, EventBridge
and Redshift answer theirs, and the RegionScoping suite pins it for the
three tag operations.

Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>

---------

Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>
2026-10-28 20:09:22 -04:00
Priamo Germosen 096d336fab fix(iam): check five more services on the resources their requests name (#6810)
Under IAM enforcement, Amazon Data Firehose, Cognito identity pools,
Cloud Map, ACM and CodePipeline requests were checked on `*`, so a
grant scoped to a delivery stream, an identity pool, a namespace or a
service, a certificate, a pipeline or a webhook was refused, and a deny
scoped to one never applied.

The generated table of the resources requests name now reads them, 149
operations, from AWS's Service Reference and botocore as it reads the
first batch: their namespaces move from the generator's NOT_COVERED to
NAMESPACES, and the table is regenerated, nothing in it edited by hand.
Each resource type's ARN format is the one Floci's handler mints, which
the tests check against the ARN each create returns:

- `deliverystream/<name>`, `identitypool/<id>`, `namespace/<id>`,
  `service/<id>`, `certificate/<id>` and a pipeline's bare name.
- A CodePipeline webhook: AWS's is `webhook:<name>` (the Service
  Reference's format, and the CodePipeline User Guide's
  "arn:aws:codepipeline:eu-central-1:ACCOUNT_ID:webhook:my-webhook"),
  where Floci minted `webhook/<name>`; it now mints AWS's.

Corrections, each with its reason:

- StartPipelineExecution and GetPipelineState name their pipeline by a
  bare `name` ("The name of the pipeline to start"), which the rule
  reads only for an operation named after the type, as Step Functions'
  StartExecution names its execution, not its state machine, by `name`.
- CreatePipeline and UpdatePipeline name it by `pipeline.name`, and
  PutWebhook the webhook by `webhook.name` and the pipeline it connects
  to by `webhook.targetPipeline`. `pipeline.roleArn` holds the role
  CodePipeline assumes, an IAM role's ARN by botocore's pattern, and
  names no pipeline: read as one, a pipeline-shaped value there was the
  only resource an UpdatePipeline was checked on, so a grant on one
  pipeline let a request change another.
- CreateCustomActionType and DeleteCustomActionType are checked on
  `actiontype:Custom/<category>/<provider>/<version>`: a custom action
  type's owner is Custom, which the request does not give, and AWS's
  CreateCustomActionType example answers "owner": "Custom".
- Cloud Map's CreateService names its namespace by NamespaceId or,
  when it gives none or a JSON null, by DnsConfig.NamespaceId, which
  botocore keeps ("Use NamespaceId in Service instead") and the handler
  reads then; read by NamespaceId alone, a deny on the namespace did
  not hold for a request giving it in DnsConfig. A member given a JSON
  null now counts as absent in a resource's `when` and `unless`, as a
  handler reading it with asText(null) takes it, unless the table reads
  it as a value through `absent` (EventBridge's bus, `default`).

For those, the table may fill a variable from a structure's field
(`pipeline.name`), and give a variable no member gives the one value
its handler uses (`fixed`), in the generator, the loader and the
reader.

A create that names another resource beside the one it makes has its
tags checked on the one it makes alone, which the table marks `made`:
the resource of the type, or with an ARN format's leading resource
word, related to the operation's name past its verb. PutWebhook's tags
go on the webhook, not the pipeline it connects to, and CreateService's
on `service/*`, not the namespace; no other operation in the table is
marked.

Application Auto Scaling stays unread, its reason in NOT_COVERED: a
scalable target's ARN ends in an id the service mints, while requests
name the target by ServiceNamespace, ResourceId and ScalableDimension,
and read as a member ResourceId would fill that id.

RequestResourceMembersTest's test of every resource in the table now
expects, with the resource a request names, the resources of its
operation that every request names: Cloud Map's CreateService names
the service it creates with every variable open.
2026-10-28 17:18:11 -05:00
Jackson Price d7763fff8e fix(ec2): honor DryRun when creating VPCs, subnets and security groups (#6823)
* fix(ec2): honor DryRun when creating VPCs, subnets and security groups

CreateVpc, CreateSubnet and CreateSecurityGroup never read DryRun, so a
dry run created the resource it asked about. A real CreateVpc that
followed left a second VPC, and the real create of a subnet or group
failed: InvalidSubnet.Conflict for the subnet's CIDR block,
InvalidGroup.Duplicate for the group name.

Each handler now answers DryRunOperation (HTTP 412) and creates
nothing. It answers after parsing the tag specifications and, for
CreateSecurityGroup, reading the required GroupName and
GroupDescription. Ec2Service makes every other check, so a dry run is
answered before the VPC id, the VPC, the CIDR block, the tenancy,
overlap with other subnets or a taken group name are checked. AWS
documents no order for those checks.

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

* fix(ec2): look up the VPC before answering a subnet or group dry run

A DryRun CreateSubnet or CreateSecurityGroup naming a VPC that does not
exist answered DryRunOperation, "would have succeeded", while the real
create fails with InvalidVpcID.NotFound. CreateSubnet without a VpcId
answered DryRunOperation too, where the real create gives
MissingParameter.

The handlers now require the VpcId and look up the VPC, the default one
for a security group without a VpcId, before they answer the dry run.
A RunInstances dry run already keeps the error of a missing subnet or
group, and the Service Authorization Reference lists the VPC, with its
tags and tenancy, in both actions' permissions.

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

* fix(ec2): share the security group VPC lookup with its dry run

The CreateSecurityGroup handler and Ec2Service each picked the group's
VPC, the named one or the region's default, so the two copies could
drift. Ec2Service.requireSecurityGroupVpc now does it for both, and the
CreateSubnet handler looks up the VpcId it has just required.

New tests cover a group dry run with an absent or empty VpcId, which is
answered for the default VPC, and a group dry run in a missing VPC
through the SDK. The comments and docs now name every check a dry run
skips, the zone and the IPv6 block included, and link the Service
Authorization Reference.

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

* docs(ec2): list the errors a create dry run still returns

The CreateVpc, CreateSubnet and CreateSecurityGroup rows said which
checks a dry run skips but not which errors it keeps. They now say that
a tag specification error, and a missing VpcId, GroupName,
GroupDescription or VPC, comes back on a dry run too, and that an empty
VpcId also puts a security group in the default VPC.

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

* test(ec2): keep tag errors ahead of the create dry-run answer

CreateVpc, CreateSubnet and CreateSecurityGroup read their tag
specifications before they answer DryRun, so a reserved aws: key is
still rejected on a dry run, as the EC2 docs page says. A handler test
now pins that for all three actions; it fails if the dry-run answer is
moved ahead of the tag parsing.

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

* test(ec2): use the shared EC2 request helper in the dry-run test

Ec2CreateDryRunIntegrationTest now calls Ec2Requests.ec2 with "test"
and "us-east-1" instead of its own copy of that helper. The comments
in the CreateSubnet and CreateSecurityGroup handlers shrink to one
line each; docs/services/ec2.md already explains the order.

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

---------

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
2026-10-28 16:26:07 -04:00
Mohith ad2089e662 fix(bedrock-agentcore): check tag ARNs against the request account (#6802)
ListTagsForResource, TagResource and UntagResource compared the ARN's
account with the configured default account, while the create calls mint
ARNs with the request's account. Any caller outside the default account
was answered ResourceNotFoundException for its own resources.

Compare with the request account instead. An ARN naming another account
or region is still answered ResourceNotFoundException.

Closes #6008
2026-10-28 07:13:41 -04:00
Andre Kurait 80dbdbc0f8 fix(elb): default omitted classic listener instance protocols (#6785) 2026-10-27 23:55:13 -04:00
Andre Kurait 5c20d54646 fix(appconfig): reject ambiguous configuration names (#6783) 2026-10-27 23:17:05 -04:00
Andre Kurait b5033e970d fix(ec2): model scheduled capacity reservations (#6764)
* fix(ec2): reject unsupported future capacity reservations

Reject StartDate before capacity reservation creation or client-token replay. Preserve immediate reservation behavior.

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

* fix(ec2): model scheduled capacity reservations

Retain future start and commitment metadata, activate through capacity reconciliation, and preserve client-token replay.

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

* fix(ec2): preserve activation membership and replay tags

Reuse open-reservation instance matching during activation, persist creation tag identity, and keep replay from overwriting later tag edits.

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

* fix(ec2): validate future reservation matching and capacity

Require targeted matching, supported instance families and at least 32 vCPUs before future reservation publication. Preserve scheduling, tag replay and immediate reservation behavior.

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

---------

Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
2026-10-27 23:15:52 -04:00
Vũ Thế Huy 5bd4bd481a feat(redshift): publish CloudWatch cluster metrics (#6740)
* feat(redshift): publish CloudWatch cluster metrics

* fix(redshift): skip duplicate CloudWatch publication minutes

* test(redshift): isolate metrics publisher between integration tests

* fix(test): use Java 17 list access in Redshift metrics compatibility test

* fix(metrics): share minute publishing and prevent duplicate SQS samples

Centralize daemon scheduling, minute claims, per-target failures, retention and shutdown for SQS and Redshift. Carry the Redshift proxy key in metric targets and use the shared compatibility await fixture.

* docs(metrics): restore publisher class docs after the shared publisher move

Keep the SQS sample shape on SqsMetricsPublisher and document minute stamping, 15-day retention and the nothing-may-escape rule on MinuteMetricsPublisher.
2026-10-27 22:03:23 -04:00
Andre Kurait f4ace9ebbe fix(appconfig): return no content for cached configurations (#6777) 2026-10-27 22:00:37 -04:00
Jackson Price a6cf29ea86 fix(cloudformation): copy a SAM function's VersionDescription to its version (#6770)
With AutoPublishAlias, SAM passes a function's VersionDescription to the
Description of the AWS::Lambda::Version it generates. The transform
dropped it, so a version published from a SAM template never had the
description the template gave it.

The version now takes it as written, leaving an intrinsic function for
CloudFormation to resolve. As in SAM, it stays out of the hash that
names the version, and Globals cannot set it: the transform refuses it
there, as it already refuses AutoPublishCodeSha256.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
2026-10-27 19:13:02 -04:00
Andre Kurait 1a5decbb4a fix(ec2): honor default subnet filters (#6772)
Handle both documented default-subnet filter aliases and preserve safe asynchronous ENI cleanup.

Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
2026-10-27 19:09:11 -04:00
Priamo Germosen 32cbf73adc fix(eventbridge): answer PutEvents to a missing event bus as AWS does (#6748)
A PutEvents entry naming an event bus that does not exist failed with
InvalidArgument "EventBus not found" and counted in FailedEntryCount.
The EventBridge User Guide, on handling PutEvents failures: "If you use
PutEvents to publish an event to an event bus that does not exist,
EventBridge event matching will not find a corresponding rule and will
drop the event. Although EventBridge will send a 200 response, it will
not fail the request or include the event in the FailedEntryCount value
of the request response." botocore models no not-found error for
PutEvents, only InternalException, and the API Reference lists none.

Such an entry is now answered as published, with an event id and not
counted as failed, and dropped: it reaches no rule and no archive.
Floci logs the drop at INFO. An entry that is not valid, missing a
required field or with a Detail that is no JSON object, still fails as
before, whichever bus it names.

Only the PutEvents action changes. Floci's own deliveries to a bus, for
a rule's event bus target, a pipe, a schedule, a Lambda destination or
a replay, still fail an entry for a bus that does not exist: the
guide's sentence is about the action, and no document says how AWS
answers those deliveries.

Step Functions' optimized events:putEvents integration calls the
action, so a task publishing to a missing bus no longer fails with
EventBridge.FailedEntry; step-functions.md listed that as a deviation,
which is gone. Its two tests that used a missing bus to have an entry
rejected now leave out the entry's Source instead, and a third checks
that a task publishing to a missing bus succeeds.
2026-10-27 17:34:34 -05:00
Andre Kurait b6d9e4c7a4 feat(lambda): list provisioned concurrency configurations (#6758)
* feat(lambda): list provisioned concurrency configurations

Dispatch List=ALL to a paginated view of existing provisioned concurrency allocations. Preserve qualified ARNs, current status and existing pool lifecycle.

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

* fix(lambda): share function ARN region resolution

Share the existing Lambda region validation and error message across function resolution and provisioned-concurrency lookup/listing.

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

---------

Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
2026-10-27 18:13:24 -04:00
Jackson Price c2482e2844 fix(appconfig): list deployments with the settings they started with (#6759)
ListDeployments built each deployment's summary from the deployment
strategy as it is now: once a strategy that one of an environment's
deployments used was deleted, ListDeployments on that environment
answered 404 "Deployment strategy not found", while GetDeployment
still returned the deployment. The summary also took the profile's
current name over the one the deployment recorded. AWS documents these
values as the deployment's own (GetDeployment's
DeploymentDurationInMinutes is "Total amount of time the deployment
lasted"), and DeleteDeploymentStrategy, unlike DeleteEnvironment and
DeleteConfigurationProfile, has no ConflictException for a resource
in use.

- StartDeployment records the strategy's DeploymentDurationInMinutes,
  FinalBakeTimeInMinutes, GrowthFactor and GrowthType on the
  deployment, and StartDeployment and GetDeployment return them, as
  AWS documents for both.
- ListDeployments reports the recorded profile name and strategy
  settings, so deleting the strategy leaves earlier deployments as
  they started. Floci serves no UpdateDeploymentStrategy or
  UpdateConfigurationProfile yet; the recorded values also keep
  earlier deployments as they were once anything changes a strategy
  or renames a profile in place.
- Deployments stored by earlier builds load unchanged: GetDeployment
  still omits the settings they never recorded, and ListDeployments
  reads them from the strategy while it exists and reports them as
  null once it is gone, instead of failing.

Type is unchanged: it is still read from the profile.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
2026-10-27 16:44:29 -04:00
Andre Kurait 0332b5cc24 fix(lambda): preserve alias identity in qualified reads (#6757)
Preserve the requested alias ARN while returning the resolved published version configuration. Retain snapshot-versus-latest regressions for both read APIs.

Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
2026-10-27 16:24:36 -04:00
Jackson Price 65df465fc3 fix(ec2): create the EBS volumes a launch's block device mappings describe (#6734)
* fix(ec2): create the EBS volumes a launch's block device mappings describe

RunInstances gave every instance one 8 GiB root at /dev/xvda and took
only the root's VolumeType from its block device mappings. Launches now
plan their volumes before anything is stored: the AMI's mappings, or an
8 GiB root when it maps none, with the launch's own entries merged over
them field by field, under either spelling of a device. The instance is
rooted at the AMI's RootDeviceName. NoDevice removes an AMI device and a
VirtualName entry takes one over, never the root. Snapshot sizes apply,
a smaller size, a missing snapshot, a missing or invalid device name and
a device named twice are refused with nothing stored, and IOPS and
throughput are kept only for the types that take them.

DescribeInstances lists every attached volume with its own state and
DeleteOnTermination, and termination treats the root like any other
volume. Volume reads settle attachments to an instance that ended
terminated without TerminateInstances, as a failed container launch does.

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

* fix(ec2): delete every volume of a launch that is rolled back

A launch undone after its instances were stored, an instant CreateFleet
whose later launch fails or a RunInstances whose capacity reservation
was taken in the meantime, terminated its instances. Termination keeps
the volumes whose DeleteOnTermination is false, so the refused launch
left them behind as available.

Each launch now records the volumes it creates on its reservation, and
the rollback deletes those termination left unattached. The ids do not
depend on attachments, which a read can end first when a failed
container's volumes are settled. DeleteOnTermination is never changed,
so an instance whose termination fails keeps its volumes as they were,
and a volume attached to another instance since stays.

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

* fix(ec2): size a snapshot-only root from its snapshot

For an AMI that maps no root device, the launch gave the root a fallback
8 GiB size before merging the launch's own entries, so a root entry
naming only Ebs.SnapshotId kept that size and a larger snapshot was
refused with InvalidBlockDeviceMapping. The fallback size now applies
only after the merge, when the root names neither a size nor a
snapshot.

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

* perf(ec2): read volume attachments once per DescribeInstances

Listing an instance's block device mapping scanned the whole volume
store, once for every instance in a RunInstances or DescribeInstances
response. The attachments of all the response's instances are now
gathered in one scan per region and looked up per instance.

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

---------

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
2026-10-27 16:13:37 -04:00
Kenshin Okinaka afdd4b46ec fix(ses): answer invalid v1 bulk destination entries on their own (#6742)
SendBulkTemplatedEmail rejected the whole call for an entry with more
than 50 recipients, for template data that is not a JSON object, and
for a tag with an empty name. AWS answers each of these with a 200 and
that entry's InvalidParameterValue ("Recipient count exceeds 50.",
"The template data is invalid", "The tag name must be specified."),
while the other entries still send. DefaultTemplateData that is not a
JSON object, or a DefaultTags tag with an empty name, fails every
entry. Within one entry an address syntax error wins over an empty tag
name, which wins over invalid template data, which wins over the
recipient count.

A DefaultTags or ReplacementTags tag without a Name or a Value is a
model violation, and a skipped tag index is a tag with neither, listed
in the 400 ValidationError after the top-level members. A missing or
empty DefaultTemplateData is a 400 InvalidParameterValue, "The default
template data does not exist".

The handler marks such an entry with its message, and the send answers
it in the per-entry loop after the address syntax. The recipient limit
stays in the service: per entry for v1, whole call for v2 SendBulkEmail,
which was not probed.
2026-10-27 11:43:25 -04:00
TATSUNO “Taz” Yasuhiro 33e74f7728 chore(style): remove var and inline qualified names from files no open PR touches (#6710)
* chore(style): remove var and inline qualified names from files no open PR touches

Each var now names the type javac inferred for it, and each fully qualified type name is
imported instead. The suppression list keeps only the files that open pull requests edit.

* chore(style): catch qualified names before a member, a nested type or .class, and on annotations

UnnecessaryFullyQualifiedType does not report those. A MatchXpath rule under the same id now
does, with the same exemption for a simple name that another type in the file uses. The files
no open PR touches import them instead.
2026-10-27 11:38:32 -04:00
Vũ Thế Huy 3d30bbcf7a feat(redshift): add event subscriptions with SNS delivery (#6705)
* feat(redshift): add event subscriptions with SNS delivery

Add Create, Modify, Delete and DescribeEventSubscriptions, subscription tagging, and publication of matching events to the subscription's SNS topic, honouring the topic policy.

* fix(redshift): deliver events from a consistent subscription snapshot and reject nameless subscription ARNs

Delivery copied no state under the lock modifySubscription holds, so a concurrent
update could change the topic between matching and publishing. Match and publish
from a snapshot taken under that lock.

A tag ARN ending in eventsubscription: passed an empty name to
describeSubscriptions, which lists all subscriptions. Reject it up front.
2026-10-27 11:34:38 -04:00
TiM 77f2477641 fix(kinesis): signal closed shard exhaustion and return child shards (#6716)
Return a terminal iterator and direct child metadata from coherent shard snapshots. Preserve final-batch delivery and prevent replay in Pipes and Firehose without changing checkpoint commit boundaries.
2026-10-27 10:24:57 -04:00
Andre Kurait 52c9c51a7b fix(dynamodb): enforce the default Select for IAM (#6702)
* fix(dynamodb): enforce effective read selection in IAM policies

Preserve generated action and request-member coverage, effective read projections, PartiQL attributes and independent BatchGetItem contexts. Rebase on current main and scope condition data verification to its vendored file, generator, tests and imported modules, retaining all existing IAM data gates.

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

* fix(dynamodb): derive transaction read conditions from modeled members

Use the generated transaction Get member paths before GetItem IAM extraction, so ignored legacy projection members cannot authorize whole-item reads.

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

---------

Signed-off-by: Andre Kurait <akurait@amazon.com>
2026-10-27 10:05:55 -04:00
Tony Nguyen 58ce60b06e test(rds): connect to Aurora PostgreSQL through the AWS Advanced JDBC Wrapper (#6213)
* test(rds): connect to Aurora PostgreSQL through the AWS Advanced JDBC Wrapper

* test(rds): fail on wrapper setup errors and share the JDBC retry loop

Gate RdsAwsAdvancedJdbcWrapperTest on TestFixtures.isRealAws() and let other
setup errors fail the class instead of skipping it.

Move the 60-second JDBC connection retry into TestFixtures.awaitJdbcConnection
and use it from RdsAwsAdvancedJdbcWrapperTest, RdsJdbcCompatTest and
RdsIamTokenCompatTest.

Use JBoss Logging with parameterized warnv calls for cleanup warnings.
2026-10-27 00:32:48 -04:00
Mario Toffia 989f714c21 feat(cloudwatch): record alarm history and serve DescribeAlarmHistory (#6670) 2026-10-26 23:50:59 -04:00
Vũ Thế Huy e9e2b38da6 feat(redshift): add event history and DescribeEvents (#6663) 2026-10-26 21:25:14 -04:00
Priamo Germosen 7c0ee92480 fix(iam): refuse SNS requests with AuthorizationError (#6621)
Under IAM enforcement a refused SNS request answered `AccessDenied`, the
code Floci gives every Query service. SNS models no such error. Every
one of its 42 operations lists `AuthorizationError`, HTTP 403, a sender
fault ("Indicates that the user has been denied access to the requested
resource"), which SDKs raise as `AuthorizationErrorException`; the SNS
Developer Guide's own sample reads that code as an IAM permission
failure ("Authorization error listing topics - check IAM permissions").
An SDK caller catching `AuthorizationErrorException` therefore missed
Floci's refusal, which surfaced as a bare `SnsException`.

A Query denial now takes its code from the service that serves the
request: `AuthorizationError` for SNS, whichever action is denied (a
role it is passed as much as its own action), and `AccessDenied` for
every other Query service, as before. The status, the `Sender` type and
the message are unchanged.

Not in this change: Floci's SNS JSON surface (`SNS_20100331.*`
targets), which botocore does not model, keeps `AccessDeniedException`.
2026-10-26 19:16:56 -05:00
Jackson Price 322a6a0977 fix(logs): refuse FilterLogEvents requests that name no log group (#6693) 2026-10-26 19:56:51 -04:00
David d10db3ce9b feat(ecr): repository creation templates (#5955)
* feat(ecr): repository creation templates

CreateRepositoryCreationTemplate, DescribeRepositoryCreationTemplates,
UpdateRepositoryCreationTemplate and DeleteRepositoryCreationTemplate store
templates per account and Region, keyed by prefix, with each field checked
against the service model. An update replaces the fields it sets, and an
empty string or list clears one. Templates are recorded, not applied, as
nothing in Floci creates repositories through replication, pull through
cache or create-on-push.

Closes #5804

* refactor(ecr): check repository creation templates against the vendored model

The four template actions join the registry settings in
ecr-request-shapes.json, so the handler checks their requests against the ECR
model's types, lengths, patterns and enums and answers in ECR's
"failed to satisfy constraint" form. The handwritten copies of those rules
go. What the model can't state stays in the service: appliedFor naming at
least one value, and policy text being a JSON object.

The model gives imageTagMutabilityExclusionFilters at least one entry, so an
update sending an empty list is now refused rather than clearing the filters.
Terraform omits the member when the filters are removed and moves to a mode
without exclusions, so an update that leaves the template in such a mode now
drops the filters. Before, they stayed, and every plan showed them again.

* fix(ecr): lock creation template writes, share one JSON object check and fold a trailing slash

Create, update and delete each read a template and then wrote it without a
lock, so two creates of one prefix could both succeed and an update racing a
delete wrote the deleted template back. They now take the registry lock the
registry settings use. The template policies and the registry policy share one
JSON object check that also refuses text after the object, such as {}{}.
ECR assumes a / after every prefix, so prod and prod/ are now one template.
The test helper imports Executable.

* fix(ecr): describe each template once when prefixes differ only by a slash

Describe removed duplicate prefixes before folding the trailing slash, so
prefixes prod and prod/ returned the template twice, and with maxResults 1 a
token followed by an empty page. It now removes duplicates by template key.
The lock tests use the shared testing ParkingStore instead of their own copy.
2026-10-26 19:36:42 -04:00
Andre Kurait 6ff4700a22 fix(dynamodb): enforce the aggregate batch write limit (#6633) 2026-10-26 19:36:27 -04:00
Mario Toffia c6505c9144 fix(iot): honour attributePayload.merge, thingTypeName and expectedVersion on things (#6657)
* fix(iot): honour attributePayload.merge, thingTypeName and expectedVersion on things

UpdateThing replaced the attributes with whatever the request carried, so a
merge update dropped the stored attributes and a type-only update wiped them.
It now merges when attributePayload.merge is true, removes an attribute given
an empty value, leaves the attributes alone when the request has none, sets or
removes the thing type, and rejects a missing or deprecated type and a
removeThingType that also names a type. DeleteThing now honours
expectedVersion, and a stale version reports AWS's message.

Closes floci-io/floci#6655

* fix(iot): serialize UpdateThing and DeleteThing, reject a malformed thingTypeName

A merge is a read-modify-write and expectedVersion is a compare-and-set,
so both now run under one thing write lock. An empty or malformed
thingTypeName on UpdateThing is an InvalidRequestException, as in AWS,
instead of being treated as absent.

* test(iot): race versioned thing updates and deletes, rerun the SDK test on AWS

A race test holds the thing write lock to one winner per expected
version. On AWS the SDK test borrows an active test thing type, as
fleetIndexSearch does, since a deprecated type cannot be deleted for
five minutes and a rerun would fail.

* fix(iot): answer a malformed thingTypeName with AWS's validation message

UpdateThing now builds the refusal with SmithyValidationErrors, listing
the length violation before the pattern one, as measured on AWS.
2026-10-26 18:58:11 -04:00
Jackson Price b280a7764a fix(appconfig): keep environment monitors and report deployment sources (#6665)
CreateEnvironment dropped the Monitors it was sent, and StartDeployment
and GetDeployment never reported the deployed profile's name or
location. AWS documents all three on these operations.

- CreateEnvironment stores Monitors and environment reads return them.
  They are checked against AWS's limits (at most five; AlarmArn of 1 to
  2048 characters; AlarmRoleArn an IAM role ARN in any partition) and
  refused with BadRequestException before anything is stored. An
  environment created without monitors returns no Monitors member, as
  AWS's own example shows.
- StartDeployment records the profile's ConfigurationName and
  ConfigurationLocationUri, and GetDeployment returns them.
- Records stored by earlier builds load unchanged: the new members are
  omitted when absent, so their responses stay byte-identical.

A configuration profile created without Type still reports none: AWS
documents no default, and its CreateConfigurationProfile example returns
a null Type.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
2026-10-26 14:24:27 -04:00
berce c4ad788e62 fix(bedrock): list guardrails in the tagging api and route its writes (#6646)
* fix(bedrock): list guardrails in the tagging api and route its writes

guardrails were not a ResourceProvider, so GetResources with bedrock:guardrail came back empty, and TagResources had no bedrock handler to forward to. list the draft of each guardrail with its own tags and add a tagging-api-only handler that calls the existing tag methods.

* test(bedrock): cover guardrail discovery and tagging writes with the sdk
2026-10-26 12:05:47 -04:00
Jackson Price 986117a45c fix(ec2): keep key pair names unique under concurrent requests (#6635)
* fix(ec2): keep key pair names unique under concurrent requests

CreateKeyPair and ImportKeyPair checked that a name was free and stored
the new key pair as two separate steps, so two requests for one name at
the same moment could both pass the check and both store a key pair.
Both got a key pair back, DescribeKeyPairs listed the name twice, and
RunInstances injected whichever record it found first, so the other
caller's private key did not open the instance. CreateKeyPair generates
its key between the two steps, which keeps that window open for as long
as key generation takes.

Both actions now store through one method that checks the name again
and writes under the EC2 service's striped lock for the region and
name, so the second request is refused with InvalidKeyPair.Duplicate
and the same message as before. The first check stays where it was, so
a single request is answered as before, and a taken name is still
refused before a key is generated for it.

Follow-up to the review of #6112.

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

* fix(ec2): keep a tag write from restoring a deleted key pair

A CreateTags on a key pair reads the record and writes it back with its
new tags while holding the key pair's lock, but DeleteKeyPair deleted
without that lock. A delete landing between the read and the write was
undone: the key pair came back, and if a CreateKeyPair had taken the
freed name in between, the name then had two key pairs.

DeleteKeyPair now deletes each matching key pair under the lock tag
writes take on it, as DeleteEgressOnlyInternetGateway does, so a tag
write either finishes before the delete or finds the key pair gone.
The EC2 docs now say what CreateKeyPair and ImportKeyPair do with a
taken name rather than promising one key pair per name outright.

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

* test(ec2): pin where the key pair race tests wait, and clean up the SDK test

The race tests now let the held write go early only when the waiting
request is blocked in storeNewKeyPair or deleteKeyPair on a monitor the
held request owns, and otherwise wait for that request to finish, so a
change that made it wait anywhere else fails the test instead of
quietly skipping the check under the lock.

The SDK test waits up to 60 s for its requests to finish before it
deletes the name, so a slow request is not left to store a key pair
after the cleanup, and it checks the refused requests' error code and
status but not their message, which AWS words differently from Floci.
The storeNewKeyPair Javadoc also says that the store's own locks, taken
inside the name lock, never lead back to an EC2 lock.

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

* test(ec2): name what the key pair race tests wait for

A race test whose request comes to wait anywhere other than the named
Ec2Service method now fails with a timeout that says what it waited
for, and the helper says why the method is named. The DeleteKeyPair
comment says that scan returns a new list rather than copies, and the
SDK test's cleanup comment says it waits up to 60 s.

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

* test(ec2): say what pinning the waiting method guards against

The race tests' helper Javadoc no longer says that a wait elsewhere
always skips the code under the lock: such a wait may not be at the
lock under test, so the tests time out rather than pass without
exercising it, and moving that lock into another method means updating
the name the tests give.

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

* test(ec2): park the key pair race tests' writes with ParkingStore

Both race tests held a write on a latch in an anonymous store of their
own. They now wrap the shared testing ParkingStore in
AccountAwareStorageBackend, as the Config tagging tests do, and arm its
next write: before the first request in the name race test, and after
the key pair is created in the delete test, so the write it parks is
the tag write's. The name race test creates ED25519 keys so that key
generation stays well inside ParkingStore's two-second wait. Main code
is unchanged.

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

---------

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
2026-10-26 11:20:10 -04:00
David ec21cf38c7 feat(rds): DescribeCertificates, ModifyCertificates and an instance's CA certificate (#6106)
* feat(rds): DescribeCertificates, ModifyCertificates and an instance's CA certificate

DescribeCertificates lists the Region's RDS certificate authorities with the
thumbprint and validity AWS reports, vendored from the certificate bundles AWS
publishes by tools/aws/regen_rds_ca_certificates.py, and pages them.
ModifyCertificates sets or removes the account's default for new instances.
CreateDBInstance, ModifyDBInstance, the two instance restores and
CreateDBInstanceReadReplica take CACertificateIdentifier, and instances report
it with CertificateDetails. AWS::RDS::DBInstance takes the property and
resolves the two CertificateDetails attributes. The identifier is metadata:
the auth proxy keeps presenting Floci's own CA.

Closes #5806

* fix(rds): follow the user guide on CAs and leave a blank CA alone

- An instance stored without a CA reports rds-ca-rsa2048-g1, since an
  override applies only to instances created after it.
- ap-south-1, ap-southeast-4, ca-west-1, eu-central-2, eu-south-2 and
  il-central-1 offer only rds-ca-rsa2048-g1, as the user guide says.
- A blank CACertificateIdentifier on modify leaves the instance's CA.
- --download skips a Region only on 403 or 404 and exits 1 on other
  failures.
- Reuse regionFromArn, add a createDbInstance stub helper and import
  Executable in the tests.
2026-10-26 09:29:56 -04:00
TATSUNO “Taz” Yasuhiro 3438a00daf feat(lambda): version network connectors as AWS does (#6595)
* feat(lambdamicrovms): version network connectors as AWS does

* fix(lambda): lock connector versions and refresh them after a CFN rollback

Updates, deletes and version reads hold one lock, so two updates cannot
take the same version number.

A CloudFormation rollback restores the connector through an update. On
AWS that makes the next version, and a later Fn::GetAtt returns it. The
resource now keeps that version in LatestVersion and LatestVersionArn.

Read the connector ARN through AwsArnUtils.parse.

AWS refuses LatestVersion, an integer, as a string Output, so the stack
test reads LatestVersionArn only.

* fix(lambda): type the connector LatestVersion attribute as an integer

AWS::Lambda::NetworkConnector declares LatestVersion as an integer. On AWS
a stack whose string Output reads it fails with "Template format error:
Every Value member must be a string.", and Fn::Sub refuses it with
"variable Connector.LatestVersion in Fn::Sub expression does not resolve
to a string".

* chore(lambda): share the connector version ARN and integer attribute helpers
2026-10-26 08:38:47 -04:00
Robin BaeckmanandRobin Baeckman 7453011c43 feat(eks): associate access policies with access entries (#6427)
AssociateAccessPolicy, ListAssociatedAccessPolicies and
DisassociateAccessPolicy had no route, so their requests fell through to
S3's path-style catch-all and came back as an S3 XML error. Terraform's
aws_eks_access_policy_association could not be created.

The three operations follow access entries: they are management
metadata, stored and returned but not enforced in Kubernetes. Each
association is kept on its access entry, so deleting the entry or the
cluster removes it, and entries persisted before this change load with
no policies. ListAccessEntries now honours associatedPolicyArn.

Validation follows the EKS user guide: only STANDARD entries take access
policies, the scope is cluster (no namespaces) or namespace (one or more
names, wildcards kept, a repeated name stored once), and associating a
policy again replaces its scope and keeps its associatedAt. policyArn
must be an EKS cluster access policy ARN in the cluster's partition; the
name is not checked against AWS's list. Listing pages from 1 to 100,
with tokens bound to the entry they came from. Disassociating a policy
the entry does not hold succeeds, since EKS documents no error for it;
a missing entry is still ResourceNotFoundException, and an ARN that
associate would refuse is InvalidParameterException. ListAccessEntries
now pages through the shared Pagination helper too, so a token issued
before this change is refused.

Under IAM enforcement the list and disassociate routes were checked as
DescribeAccessEntry and DeleteAccessEntry, and all three against a
principal ending in /access-policies, so a grant scoped to the entry
never matched. They are now checked as their own actions, against the
entry's ARN.

A DELETE is a disassociate only when a cluster access policy ARN
follows access-policies, in the route, the IAM rule and the resource,
so an entry whose IAM path holds an access-policies segment can still
be deleted. The router matches the encoded path, so a principal sent
URL-encoded, as the SDKs send it, is never split.

Co-authored-by: Robin Baeckman <27041454+RobinBaeckman@users.noreply.github.com>
2026-10-26 07:54:43 -04:00
Matheus Oliveira 0634184f5e fix(ec2): apply TagSpecification on key pair, network ACL and image creates (#6551) 2026-10-26 06:53:52 -04:00
Jackson Price 47226f76d1 fix(stepfunctions): page GetExecutionHistory and honor reverseOrder (#6555)
* fix(stepfunctions): page GetExecutionHistory and honor reverseOrder

GetExecutionHistory read only executionArn and includeExecutionData.
Every call returned the whole history, oldest event first: maxResults
and nextToken were ignored, and reverseOrder=true still listed
ExecutionStarted first, so a caller asking for the newest event with
reverseOrder and maxResults=1 got the oldest one instead. The API
reference pages the history by 100 events unless maxResults says
otherwise, allows at most 1,000, returns a nextToken while events
remain, and lists the newest event first under reverseOrder.

Page the history by event id. Ids rise in the order events are
recorded, so a page starts after the last event the previous page
returned, even while the execution is still recording events. An
omitted or zero maxResults uses 100; a maxResults outside 0 to 1,000
or a nextToken outside 1 to 1,024 characters is a ValidationException,
as for ListActivities. A token names its execution and its
reverseOrder, so it is refused with InvalidToken for any other, while
maxResults and includeExecutionData may change from one page to the
next.

Tokens are signed with SignedMarkers and carry their issue time. An
edited token, one issued before a restart, or one issued more than 24
hours earlier is refused with InvalidToken; the 24-hour expiry is the
one the API reference documents. The execution is named in the token
by the SHA-256 of its ARN, so a token stays under 200 characters
however long the state machine and execution names are.

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

* test(stepfunctions): page execution history with the SDK paginator

Run a 60-state execution, whose history of 122 events is longer than
one default page, and read it with the AWS SDK for Java: a plain call
returns 100 events and a nextToken, the paginator at 25 events a page
returns every event once, oldest first or with reverseOrder newest
first, and reverseOrder with maxResults=1 returns ExecutionSucceeded
with a token for the rest.

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

* test(stepfunctions): give the ListExecutions filter test a clock

StepFunctionsListExecutionsFilterTest, merged from upstream main, built
the handler with the two-argument constructor. On this branch the
handler takes the application Clock for the lifetime of execution
history tokens, so the merged tree did not compile. Pass the system
clock, which ListExecutions does not read.

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

* test(stepfunctions): pin the page-size checks of ListActivities and history

ListActivities and GetExecutionHistory each check maxResults and
nextToken on their own, with the same bounds and messages, and page by
100 when maxResults is omitted or 0. Pin the messages of both and the
ListActivities default before the two move onto one helper.

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

* refactor(stepfunctions): share the page-size checks of ListActivities and history

ListActivities and GetExecutionHistory each checked that maxResults is
0 to 1,000 and nextToken 1 to 1,024 characters, with the same messages,
and turned an omitted or zero maxResults into 100. Move that into
StepFunctionsPaging.pageSize, which validates the pair and returns the
page size, so the other Step Functions list operations can use it
later. Behaviour, messages and the order of the checks are unchanged.

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

* test(stepfunctions): say why the paginator test ignores cleanup failures

The SDK paginator test deleted its state machine in a catch-all that
neither logged nor explained the failure it ignored. Say why it is
safe: the state machine has a unique name, and a cleanup failure must
not hide the test's own result.

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

* test(stepfunctions): pin the page-size bounds and the order of the checks

Pin that ListActivities and GetExecutionHistory accept the bounds
themselves (a 1- or 1,024-character nextToken reaches the token
lookup, and ListActivities takes maxResults=1000), and that both read
maxResults and nextToken before bounding either. The test's cleanup
deletes its activities without asserting, so a failed delete can no
longer hide the test's own failure.

The last check is the one place where the shared helper changed
behaviour, which the commit that added it wrongly said it did not. A
history request with maxResults=1001 and a non-string nextToken used
to report the maxResults bound; it now reports "nextToken must be a
string.", as ListActivities always has. The new test fails that way
on the commit before the helper and passes after it.

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

* docs(stepfunctions): describe StepFunctionsPaging by its two callers

The class comment said every Step Functions list operation shares this
page request. Only ListActivities and GetExecutionHistory do;
ListStateMachineAliases still checks its own bounds. Name the two
callers and say that both fields are read before either is bounded.

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

* test(stepfunctions): share one request helper between the paging tests

StepFunctionsPageSizeIntegrationTest and
StepFunctionsExecutionHistoryPaginationIntegrationTest each carried
the same private call() and content type. Add StepFunctionsRequests in
the testing package, as CfnRequests and EmrRequests serve their
services, and move both tests onto its sfn(action, body). The requests
they send are unchanged.

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

* test(stepfunctions): take the request body of sfn() as a map

sfn() took any Object and said it serializes the body as JSON, which
holds for a map but not for a string, which RestAssured sends as is.
Both callers pass maps, as the private helpers it replaced took, so
type the parameter as Map<String, ?>.

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

---------

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
2026-10-25 22:37:10 -04:00
Matheus Oliveira 56196fec1c fix(s3): report the owner and ACL grantees as a canonical user id (#6549)
* fix(s3): report the owner and ACL grantees as a canonical user id

S3 reported the 12-digit account id where AWS reports the account's
canonical user id: the bucket owner in ListBuckets, the owner and the
multipart initiator in ListParts, and every CanonicalUser grantee and
Owner the ACL responses name. All of them now answer the canonical id,
a 64-character lowercase hex string Floci derives as the SHA-256 of the
account id, so the same account answers the same id across calls,
restarts and storage modes and two accounts never share one. The
account id stays the internal identity; only the emitted value changes,
and ACLs persisted by an older Floci keep serving the form they store.
Owner evaluations, the public-access checks and bucket-policy
CanonicalUser principals accept the canonical id and the account id
alike, so stored policies and scripts written against the old form keep
working.

Closes #6242

Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>

* test(s3): say why the cleanup catches stay silent

The two new compatibility cleanup catches swallowed without a word,
which the guide allows only for a named, explained tolerance. Both now
name the reason: cleanup must not mask the assertion.

Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>

* test(s3): expect the canonical owner in the namespace ACL assertions

The cross-account object metadata test still expected the raw account id
in the ACLs, which the canonical owner id broke, and its ACCOUNT_B
assertFalse checks passed whatever the ACL held. All four assertions now
name the accounts the way the ACLs do, through AwsCanonicalUserId.

Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>

* test(s3): share the compatibility cleanup between the two tests

The explained cleanup catches landed on the wrong method, a helper that
was already on main, leaving the new canonical owner test with bare
catches. One deleteObjectAndBucketQuietly helper now holds the commented
catches and serves both tests.

Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>

---------

Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>
2026-10-25 22:11:19 -04:00
Kenshin Okinaka 7f5f1b554d feat(ses): add SES v2 GetEmailAddressInsights (#6573)
* feat(ses): add SES v2 GetEmailAddressInsights

Answer GetEmailAddressInsights offline with verdicts derived from the
address alone. Malformed and over-long addresses answer 200 with every
verdict LOW, the operation is not gated on Virtual Deliverability
Manager, and only suppressionlist@simulator.amazonses.com reports a
missing mailbox, as real SES does. Domains reserved by RFC 2606 and
RFC 6761 have no valid DNS records; every other domain is taken to
have them.

* docs(ses): scope the non-ASCII insights deviation to unquoted parts

A send does not inspect a quoted local part, so GetEmailAddressInsights
rates "é"@gmail.com like any other address. Say so in the deviation
note and pin it, with the unquoted and domain cases, in unit tests.
2026-10-25 21:41:42 -04:00
Jimmy Liu Jia 671e4bfb7c fix(ecr): return per-repository scanning batch failures (#6569) 2026-10-25 21:33:27 -04:00
Jimmy Liu Jia 6b21aebdc3 feat(ram): support GetResourceShareAssociations (#6558)
* feat(ram): support GetResourceShareAssociations

* test(ram): cover association listing through Java SDK

* refactor(ram): share association visibility filter
2026-10-25 21:26:20 -04:00
Jimmy Liu Jia bcae24f5fc feat(ssm): match parameter path label filters (#6560)
* feat(ssm): match parameter path label filters

* fix(ssm): match labeled version metadata in path filters
2026-10-25 17:29:17 -04:00
Jackson Price 6acd90640d feat(cloudformation): provision AWS::EC2::PrefixList (#6481)
* feat(cloudformation): provision AWS::EC2::PrefixList

An AWS::EC2::PrefixList was stubbed: Ref returned "<LogicalId>-<8 hex>",
Fn::GetAtt the literal "<LogicalId>.<Attribute>", and EC2 held no list, so
a route given its Ref pointed at nothing. Ec2NetworkCfnProvisioner now
creates the customer-managed list through Ec2Service. Ref is its pl- id,
and Fn::GetAtt serves PrefixListId, Arn, OwnerId and Version, the
attributes the registry schema declares.

The schema has no create-only property, and create-only-properties.json
now says so. Without the entry, the engine's name heuristic took
PrefixListName for create-only, so a rename was planned as a replacement
of the list and of the routes and rules that reference it. An update
changes the list in place: its name, capacity, entries and tags. Adding or
removing entries makes a new version and a rename does not, as the EC2 API
reference says. EC2 refuses a request that removes and adds the same CIDR,
which is how a description changes (Terraform's
aws_ec2_managed_prefix_list records the error), so such an entry is added
back by a second ModifyManagedPrefixList call. The first call carries
everything EC2 could refuse, and the capacity the second needs is checked
before the first, so a change EC2 refuses leaves the list as it was. A
rollback puts the prior name, capacity, entries and tags back, and Version
follows the list.

Two updates fail before anything changes: another AddressFamily, which no
EC2 call can change on an existing list, and a new MaxEntries together
with changed Entries, which the CloudFormation and EC2 references both say
cannot change at once. MaxEntries is required to create a list, as the
CloudFormation reference says (aws/aws-cdk#35360 reports the deploy
failing without it); an update that leaves it out keeps the capacity.
Entries and Tags are brought to the template when it, or the previous one,
declares them, so entries or tags no template declared stay. Tags go
through CreateTags after the create, as on the other types in the
provisioner, so EC2 checks them; a tag it refuses fails the create and
removes the new list. A list gone out of band, or a stub an older Floci
left, is replaced by a new one, and a stack delete tolerates only
InvalidPrefixListID.NotFound.

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

* test(cloudformation): cover AWS::EC2::PrefixList through boto3

A stack's prefix list is created, resized, given new entries and deleted
through the CloudFormation and EC2 clients of the pinned boto3: Ref and
Fn::GetAtt name the list EC2 describes, a resize keeps the version, new
entries make version 2 of the same list, dropping Tags removes them, and
the list is gone after the stack delete.

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

* refactor(cloudformation): share optionalInt through ProvisionContext

Ec2NetworkCfnProvisioner and ElbV2CfnProvisioner each carried the same
private optionalInt. An absent, null or AWS::NoValue property stays unset;
a value written into the template, a literal blank included, has to be an
integer; anything else fails with ValidationError "Value of property
<name> must be an integer." It is now ProvisionContext.resolveOptionalInt,
beside resolveOptional, and all seven callers use it: the prefix list's
MaxEntries, the target group's Port and four health check settings, and
the gateway listener's Port.

The two copies differed only in Integer.parseInt against Integer.valueOf
and in building the error through a helper, so neither provisioner
changes behaviour. ProvisionContextTest covers the method directly.

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

---------

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
2026-10-25 17:16:19 -04:00
Matheus Oliveira f4cd3110e7 fix(elasticache): honor SecurityGroupIds on ModifyReplicationGroup (#6467)
* fix(elasticache): honor SecurityGroupIds on ModifyReplicationGroup

A modify that names SecurityGroupIds now replaces the whole stored list
on the replication group, so DescribeCacheClusters reports the new
groups on every member with Status=active; a modify that names none
leaves the memberships untouched, which the Query protocol cannot
distinguish from an empty list anyway.

Closes #6463

Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>

* fix(elasticache): read the modify security groups through the shared parse

optionalSecurityGroupIds walked the two Query spellings a second time;
it now reuses parseSecurityGroupIds with the same isEmpty-to-null check
the user group lists use, and the new compatibility test declares its
responses with explicit types.

Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>

---------

Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>
2026-10-25 16:55:00 -04:00