Commit Graph
640 Commits
Author SHA1 Message Date
David 7dc514b52f feat(emr): ListReleaseLabels, DescribeReleaseLabel and ListSupportedInstanceTypes (#5748)
* feat(emr): ListReleaseLabels, DescribeReleaseLabel and ListSupportedInstanceTypes

None was served, so Terraform's aws_emr_release_labels and
aws_emr_supported_instance_types data sources failed against Floci.

A curated catalogue of EMR releases (emr-7.5.0, Floci's default, and
emr-7.4.0, emr-6.15.0, emr-6.14.0 and emr-5.36.2) carries each
release's applications and versions from the EMR Release Guide and its
recent Amazon Linux releases, with common instance types and their EC2
sizes. The three actions filter and page it as the API documents, and
answer InvalidRequestException for an unknown release, a bad token or
an out-of-range MaxResults. A configured default release outside the
catalogue is still listed.

Closes #5734

* fix(emr): report EMR architecture values and match application versions without regard to case

ListSupportedInstanceTypes returned the EC2 spellings x86_64 and arm64; the EMR model gives X86_64 and AARCH64 for Architecture. The ListReleaseLabels application filter matched the name without regard to case but not the version, so phoenix@4.14.3-hbase-1.4 missed emr-5.36.2.

* refactor(emr): page the release catalogue with the shared Pagination

ListReleaseLabels and ListSupportedInstanceTypes now page through
core.common.Pagination, with the filters in the token namespace so a token
replayed with other filters, or altered, is refused. DescribeReleaseLabel
answers every application, as AWS reserves its MaxResults and NextToken.
The EMR integration tests share one request helper.
2026-10-18 15:11:42 -04:00
Alessandro Lattao 1f4a46804c fix(cloudformation): refuse a list property that a parameter or an intrinsic makes a string (#5949)
* fix(cloudformation): refuse a list property that a parameter or an intrinsic makes a string

The follow-up asked on #5923. The engine kept parameter values but not
their types, so the Lambda provisioner's list readers could not tell a
Ref to a CommaDelimitedList parameter, which the engine resolves to the
comma-joined text, from a Ref to a String parameter: both read as lists,
where CloudFormation refuses the second.

Measured on CloudFormation (eu-west-1, 2026-10-18), Layers and
Architectures of AWS::Lambda::Function:
- a Ref to a CommaDelimitedList, AWS::SSM::Parameter::Value<List<String>>
  or AWS::SSM::Parameter::Value<CommaDelimitedList> parameter, Fn::Split,
  an Fn::If choosing a Ref to a list, and Ref AWS::NotificationARNs are
  lists;
- a Ref to a String or Number parameter, Ref AWS::Region, Fn::Select,
  Fn::Join, Fn::Sub and an Fn::If choosing a literal string fail the
  template's validation with "Property [Architectures] expected type:
  JSONArray, found: String";
- a resource's Ref and Fn::GetAtt fail only when the resource is
  provisioned, with "Properties validation failed for resource Fn with
  message: #/Architectures: expected type: JSONArray, found: String".

CloudFormationTemplateEngine now takes the declared parameter types, which
executeTemplate reads from the template (stacks, change sets, stack sets
and nested stacks all deploy through it), and yieldsString tells the
forms of the second group. The list readers refuse such an intrinsic
with the validation message, as they refuse a literal of the wrong type.
The third group is left as it was: the engine cannot tell a list-valued
attribute from a string one before provisioning, and a resource's own
message format is not modelled.

parameterType gives a declaration's Type, String when it is left out, for
the new reader and for GetTemplateSummary, which had its own copy.

Tests: CloudFormationTemplateEngineTest for yieldsString over every
measured form; CloudFormationLambdaObjectPropertyIntegrationTest for each
refused form, an Fn::If choosing a list, and a nested stack whose own
parameter types decide; CloudFormationLambdaObjectPropertyTest in
sdk-test-java for a String parameter through the SDK. The integration and
SDK tests fail on main.

* fix(cloudformation): take Fn::Base64 as a string where a list is expected

Review of #5949 (Qodo). Measured on CloudFormation (eu-west-1,
2026-10-18): Architectures: {"Fn::Base64": "x86_64"} fails validation with
"Property [Architectures] expected type: JSONArray, found: String", like
Fn::Sub. yieldsString left it out, so the Lambda reader split the encoded
text into a list and the function got an invalid architecture instead.

Tests: CloudFormationTemplateEngineTest and
CloudFormationLambdaObjectPropertyIntegrationTest gain the case; both fail
on the previous head.
2026-10-18 14:32:04 -04:00
David Phillips 7ce4b6bd23 feat(autoscaling): describe suspended process reasons (#5941)
* feat(autoscaling): describe suspended process reasons

* fix(autoscaling): record suspended process dates
2026-10-18 14:24:58 -04:00
Alessandro Lattao dd832b45dc fix(apigatewayv2): apply an HTTP API's CORS configuration to its actual responses (#5935)
* fix(apigatewayv2): apply an HTTP API's CORS configuration to its actual responses

An HTTP API with a CorsConfiguration answered the preflight from it, but the
responses of its integrations went out with no Access-Control-Allow-Origin, so
a browser refused to hand the page any answer of the API. AWS documents both
halves ("Configuring CORS for an HTTP API"): for a CORS request API Gateway
adds the configured headers to the integration's response, and once an API
has a CORS configuration it ignores the CORS headers the integration returns.

Measured on HTTP APIs (eu-west-1, 2026-10-16 and 2026-10-18):
- API Gateway's own refusals on a matched route get the same headers: a JWT
  authorizer's 401 and its 403 for a missing scope, an unsigned call to an
  AWS_IAM route's 403, a Lambda authorizer's 401 (no identity) and 403
  (isAuthorized false); so does a function that is gone, which answers 500
  Internal Server Error (Floci answered 404 "Function not found" without
  them).
- A preflight a route matches (an OPTIONS or ANY route, $default) goes
  through that route, its authorizer and its integration, and gets the
  preflight headers on whatever answers; only a preflight no route matches
  is answered 204 by API Gateway. Floci answered every preflight itself, so
  a route behind an authorizer looked open to a browser's preflight.
- A preflight gets the preflight headers only when its origin, its method
  and every header it asks for are allowed, and never the exposed headers;
  otherwise, or for an OPTIONS without Access-Control-Request-Method, no CORS
  header at all. An actual request gets them whatever its method. Lists are
  joined with a bare comma.
- A preflight that gets the headers always carries
  Access-Control-Allow-Headers, empty when none are configured, and
  Vary: origin unless AllowOrigins is a single exact origin or "*" (two
  origins, the "https://*" prefix, and "*" beside an exact origin all
  vary). No other response gets a Vary; an integration's own is kept.
  Floci sent no Allow-Headers when none were configured, and Vary: Origin
  on every preflight that echoed the origin.
- A route without a target answers 404 Not Found with no CORS header, as an
  unmatched route does (Floci answered 500).

The configuration is now applied once, by withHttpApiCors, on whatever the
matched route answers, so no response path can miss it: it drops the six
headers the configuration owns from the response and, when the Origin is
allowed (exactly, by "*", or by a prefix wildcard such as https://*), adds
Access-Control-Allow-Origin, plus Credentials and Expose-Headers when
configured, or the preflight's set for a preflight. An API without a
configuration still leaves CORS to its integrations.

Tests: ApiGatewayExecuteControllerTest for the headers withHttpApiCors
sets and when a preflight varies, HttpApiCorsIntegrationTest for the
routing, the refusals and the custom domain;
HttpApiJwtAuthorizerScopesTest and HttpApiRequestAuthorizerTest for the
measured refusals of a JWT scope and of a Lambda authorizer, on their own
fixtures; ApiGatewayV2CorsTest in sdk-test-java for the refusals, an
unmatched preflight and a two-origin API's Vary through the SDK;
ApiGatewayV2UnsignedAccountRoutingTest now tells a route found in its
account by AWS's 500 instead of Floci's "Function not found".

* fix(apigatewayv2): answer a failed invocation with API Gateway's own status and CORS headers

Review of #5935 (Qodo). Measured on an HTTP API with a CORS configuration
(eu-west-1, 2026-10-18), with an allowed Origin:
- a Lambda integration API Gateway may not invoke, and a function that
  raises, answer 500 {"message":"Internal Server Error"}; a function Lambda
  throttles (reserved concurrency 0) answers 503 {"message":"Service
  Unavailable"}; each carries Access-Control-Allow-Origin and
  Access-Control-Expose-Headers;
- an OPTIONS request no route matches is answered 204 with no CORS header
  whether or not it carries Origin or Access-Control-Request-Method, so the
  unmatched OPTIONS answer stays as it is, now pinned by a test.

Any AwsException from the invocation now becomes API Gateway's answer
inside the matched route, so the CORS configuration reaches it: 503 for
Lambda's throttling, 500 otherwise. Only the function that is gone did
before; the others escaped to the exception mapper without the headers.

A configured list with a null entry no longer fails a preflight: the
entry matches nothing and is left out of the header.

Tests: HttpApiCorsIntegrationTest gains a throttled function's 503 and an
unmatched OPTIONS that is not a preflight, ApiGatewayExecuteControllerTest
a null entry, and ApiGatewayV2CorsTest in sdk-test-java both new cases
through the SDK; the throttled and null cases fail on the previous head.

* test(apigatewayv2): share the HTTP_PROXY API fixture and the Lambda zip helper

Review of #5935. HttpApiCorsIntegrationTest.createProxyApi repeated the
API, stage, HTTP_PROXY integration and route sequence of
HttpApiHttpProxyMultiValueIntegrationTest.createProxyApi: both now call
HttpProxyApiFixtures.createProxyApi, which takes the API's extra fields,
the stage, the backend port and the path. The stage is auto-deployed for
both, as an API needs to be served on AWS.

The throttled function is a Node.js one built with
WebSocketTestSupport.createLambdaZip; it never runs, so its runtime does
not matter.
2026-10-18 12:05:07 -04:00
David Phillips 356c79e78e fix(ssm): parse and bound command delivery timeouts (#5908)
* fix(ssm): limit public command delivery time

* docs(ssm): describe command delivery timeouts

* fix(ssm): deserialize delivery timeouts before checking bounds

Handle numeric delivery timeouts consistently without bypassing limits.

* fix(ssm): report member-specific deserialization errors

Name the expected scalar type and explain malformed structures.

* refactor(ssm): keep delivery timeout errors consistent
2026-10-18 11:03:48 -04:00
David Phillips 1a80884f40 feat(servicequotas): configure applied EC2 vCPU quota (#5926)
* feat(servicequotas): configure applied EC2 vCPU quota

Report configured EC2 vCPU quotas separately from AWS defaults.

* fix(servicequotas): reject negative applied quota settings

Reject invalid quota settings before serving local requests.

* docs(servicequotas): clarify negative quota settings

* fix(servicequotas): reject invalid settings at startup
2026-10-18 11:03:06 -04:00
Alessandro Lattao 8db159761c fix(cloudformation): refuse every Lambda property of the wrong type (#5923)
* fix(cloudformation): refuse every Lambda property of the wrong type

The follow-up asked on #5912. Environment, ImageConfig, Layers,
Architectures and FileSystemConfigs, and a layer's CompatibleRuntimes
and CompatibleArchitectures, went through readers that took a value of
the wrong JSON type as absent, so a malformed property reset the
function's setting instead of failing; FileSystemConfigs alone refused
one, with a message of Floci's own, and also refused an AWS::NoValue
chosen by Fn::If, which AWS accepts.

Measured on CloudFormation (eu-west-1, 2026-10-18): each fails the stack
before the resource is touched, "Property [Layers] expected type:
JSONArray, found: JSONObject", "Property [Environment] expected type:
JSONObject, found: JSONArray", "Property [Variables] expected type:
JSONObject, found: String" for Environment's Variables, a number or a
boolean reading as a String; and Ref AWS::NoValue, directly or through
Fn::If, leaves any of them out.

Every reader of the provisioner now resolves through one resolveTyped,
which omits AWS::NoValue and refuses another type with that message.

Tests: every measured case on create, AWS::NoValue on the list
properties and through Fn::If, and through the SDK a Layers object; the
FileSystemConfigs test reads the measured message. They fail on main.

* fix(cloudformation): read a list property from a CommaDelimitedList Ref as a list

Review of #5923. Layers: !Ref LayerArns, with LayerArns a
CommaDelimitedList, was refused with "Property [Layers] expected type:
JSONArray, found: String", because the engine resolves that Ref to the
comma-joined text; AWS reads it as a list.

Measured on CloudFormation (eu-west-1, 2026-10-18), Layers and
Architectures of AWS::Lambda::Function:
- a Ref to a CommaDelimitedList parameter, and Fn::Split over a String
  parameter, create the stack with the list;
- a Ref to a String parameter, and Fn::If choosing a literal string, fail
  validation with "expected type: JSONArray, found: String".

The string-list readers (Layers, Architectures, and a layer's
CompatibleRuntimes and CompatibleArchitectures) now go through one
resolveStringList: a literal of another type is still refused, and an
intrinsic is read through engine.resolveStringList, which splits the
comma-joined text and expands Fn::Split, Fn::GetAZs and Fn::If. The
engine keeps parameter values, not their types, so a Ref to a String
parameter reads as a list too, where AWS refuses it.

Tests: CloudFormationLambdaObjectPropertyIntegrationTest creates a
function with Layers and Architectures from CommaDelimitedList Refs and
with Layers from Fn::Split; CloudFormationLambdaObjectPropertyTest in
sdk-test-java does the CommaDelimitedList case through the SDK. Both
fail on the previous head.
2026-10-18 09:25:59 -04:00
Vũ Thế Huy e38dba5f11 feat(cognito): support Google identity provider federation (#5868)
* feat(cognito): support Google identity provider federation

* fix(cognito): synchronize federated provisioning, support linked users and retain discovery endpoints

* fix(cognito): preserve stored provider identity for standard OIDC federation

* fix(cognito): refuse disabled users during federated sign-in
2026-10-18 09:20:48 -04:00
Alessandro Lattao d425e2d884 fix(lambda): refuse a log level under Text as Lambda does (#5920)
Floci accepted ApplicationLogLevel and SystemLogLevel under Text and
dropped them, which a test pinned and the docs described as Floci's own
call rather than probed behaviour. Measured on Lambda (eu-west-1,
2026-10-18): CreateFunction and UpdateFunctionConfiguration refuse either
level under Text, whether LogFormat names Text or is left to that
default, with InvalidParameterValueException "LogLevel is not supported
when LogFormat is set to "Text". Remove LogLevel from your request or
change the LogFormat to "JSON" and try again." In a stack, a valid level
under Text passes the template's validation and fails the resource with
Lambda's message. Floci now refuses it in validateLoggingConfig, so the
API and the CloudFormation update check, which validates through
loggingSettings, both do; and its enum errors list the levels in Lambda's
order: [FATAL, TRACE, WARN, ERROR, INFO, DEBUG] and [WARN, INFO, DEBUG].

The default format is worked out in one place, logFormat, for the
validation and for loggingSettings.

Tests: a level under Text refused on create and on update through the API
(LambdaVpcSnapStartLoggingIntegrationTest, replacing the test that pinned
the old behaviour) and through the SDK (LambdaFunctionConfigTest), by
loggingSettings (LambdaServiceTest), and by a stack update
(CloudFormationLambdaLoggingConfigIntegrationTest); the enum messages'
order. They fail on main.
2026-10-18 08:10:40 -04:00
Alessandro Lattao 30d2bf03d9 fix(cloudformation): refuse a Lambda function property that is not an object (#5912)
* fix(cloudformation): refuse a Lambda function property that is not an object

The AWS::Lambda::Function provisioner read an object property that
resolved to a scalar or a list as absent, so a malformed VpcConfig,
DeadLetterConfig, TracingConfig or EphemeralStorage reset the function's
setting to its default instead of failing. Measured on CloudFormation
(eu-west-1, 2026-10-18): such a value fails the stack before the function
is touched, on create and on update, with "Property [VpcConfig] expected
type: JSONObject, found: String"; a list reads "found: JSONArray", and a
number or a boolean reads "found: String" too.

resolveMapOrDefault, which reads every object property of the function,
now refuses such a value with that message. AWS reports it from its
pre-deployment validation, with the detail in DescribeEvents, which Floci
does not model; the message is on the resource's failed event.

Tests: CloudFormationLambdaObjectPropertyIntegrationTest (a number VpcConfig
and a list DeadLetterConfig on create, a string TracingConfig on update that
keeps the setting) and, through the SDK, CloudFormationLambdaObjectPropertyTest;
both fail on main. The compatibility suite gains TestFixtures.awaitStackTerminal,
the same helper #5902 adds.

* fix(cloudformation): leave out a Lambda property that resolves to AWS::NoValue

Floci's template engine resolves Ref AWS::NoValue to an empty text node,
which the new type check refused as a String, so a valid template that
leaves VpcConfig, TracingConfig, DeadLetterConfig or EphemeralStorage out
through AWS::NoValue, directly or chosen by Fn::If, failed. Measured on
CloudFormation (eu-west-1, 2026-10-18): both stacks are created.
resolveMapOrDefault now resolves with resolveNodeOmittingNoValue, as other
provisioners do for optional properties, and reads what it leaves out as
the default.

Test: a direct Ref AWS::NoValue on VpcConfig and TracingConfig, and an
Fn::If choosing it for DeadLetterConfig, each create the stack; it fails
on the previous head.
2026-10-18 00:56:25 -04:00
Alessandro Lattao 63af5cd299 fix(cloudformation): pass a function's LoggingConfig to Lambda (#5902)
* fix(cloudformation): pass a function's LoggingConfig to Lambda

The AWS::Lambda::Function provisioner never read LoggingConfig, so every
function a stack created logged in Text to /aws/lambda/<name>, whatever
the template said, and an update to it was never applied.

Measured on AWS (eu-west-1, 2026-10-16): the function reads back the
LogGroup the template names; a change to JSON with an ApplicationLogLevel
updates it in place, SystemLogLevel reading back INFO; and removing the
property from the template puts the function back on Text and
/aws/lambda/<name>, again in place. So the provisioner always sends a
LoggingConfig, empty when the template has none, which Lambda resolves to
the function's defaults (JSON for a durable function, which refuses
Text).

The update check compares what Lambda would store, through the same
LambdaService.loggingSettings that UpdateFunctionConfiguration applies,
so an unchanged LoggingConfig is still a no-op redeploy and the two
cannot drift apart.

Tests: the stack lifecycle in CloudFormationLambdaLoggingConfigIntegrationTest
and, through the SDK clients, CloudFormationLambdaLoggingConfigTest, both
failing on main; the normaliser in LambdaServiceTest. The compatibility
suite gains TestFixtures.awaitStackTerminal for the new test rather than
another private copy of the stack wait.

* fix(cloudformation): refuse an invalid log level before comparing LoggingConfig

The update check compared normalised logging settings, and the normaliser
dropped both log levels under Text before anything validated them. An
update whose only change was an invalid level, ApplicationLogLevel VERBOSE
on a Text function, then looked unchanged, never reached
UpdateFunctionConfiguration, and the stack went UPDATE_COMPLETE where
AWS fails the update. LambdaService.loggingSettings now runs
validateLoggingConfig before it normalises, so the comparison refuses
what Lambda refuses, and applyLoggingConfig validates once, through it.

The integration test registers its stacks' deletion with PartitionCleanup,
and the compatibility test's cleanup no longer swallows a failed
DeleteStack, which succeeds for a stack that is already gone.
2026-10-18 00:47:18 -04:00
Alessandro Lattao 964756145e fix(cloudwatch): match FilterLogEvents with the filter pattern syntax (#5903)
FilterLogEvents kept an event when its message contained filterPattern as
a substring. A JSON pattern such as { $.template = "sign-in-code" } then
never matched, and terms matched where AWS does not: an unquoted
sign-in-code, which AWS reads with its own term rules, matched every
message containing those characters.

Measured on AWS (eu-west-1, 2026-10-16) on five events, JSON, plain and
mixed: JSON patterns over nested paths and numbers, case-sensitive terms,
quoted phrases, ?alternatives and -exclusions each matched exactly the
events the parser Floci already uses for metric and subscription filters
matches. So FilterLogEvents now parses its pattern with it, once, before
the scan, and an invalid one is refused with InvalidParameterException
whatever the group holds.

The error text is the parser's own, as for PutMetricFilter and
TestMetricFilter; AWS words these differently per action, which is left
for a change of its own.

Tests: the measured events and patterns in CloudWatchLogsServiceTest and,
through the SDK, CloudWatchLogsFilterPatternTest, which fails on main.
2026-10-17 20:17:59 -04:00
Vũ Thế Huy c33823bd48 feat(redshift): complete Glue external table lifecycle (#5866)
* feat(redshift): complete Glue external table lifecycle

* fix(test): use existing frame helper in Spectrum bridge test

* fix(redshift): safeguard external catalog lifecycle operations

* fix(redshift): shorten spectrum catalog lock waits and reuse test helper
2026-10-17 13:59:29 -04:00
David Phillips 23edd58992 fix(ssm): separate shell execution and delivery timeouts (#5865)
* fix(ssm): separate shell execution and delivery timeouts

* fix(ssm): require a command list for public shell requests

* test(ssm): share command request and cleanup fixtures
2026-10-17 13:43:37 -04:00
David Phillips 043b919e85 fix(rds): require headroom for enabled storage autoscaling (#5863)
* fix(rds): require headroom for enabled storage autoscaling

* fix(rds): retain autoscaling headroom during storage growth

* fix(rds): check thresholds against current storage
2026-10-17 12:40:31 -04:00
Kenshin Okinaka 043daa5da6 feat(ses): validate v2 tracking configuration overrides (#5871)
* feat(ses): validate v2 tracking configuration overrides

SendEmail and SendBulkEmail now check ConfigurationOverrides.Tracking's
values the way SES v2 does: a value outside ENABLED/DISABLED is a
validation error, both values reported together with the click one first,
ahead of the tags and the configuration set. The shapes pre-check already
refuses a wrong JSON type. Floci has no open or click tracking, so a valid
override is accepted and has no effect.

* test(ses): check a refused tracking override records no message

* refactor(core): share the Smithy validation-error message

The "N validation error(s) detected: a; b" message is Smithy's, not SES's, yet
SES built it in eight places, plus five helpers that wrote the single-violation
form by hand. They now all go through core.common.SmithyValidationErrors,
which takes the protocol's error code. No message changes.
2026-10-17 12:23:02 -04:00
Jackson Price 0be4581d4e fix(ec2): preserve IAM instance profile identity (#5671)
* fix(ec2): preserve IAM instance profile identity

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

* fix(ec2): probe metadata readiness with IMDSv2

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

* fix(autoscaling): preserve launch profiles and metadata options

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

* fix(ec2): preserve automatic public addresses across launch paths

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

* fix(ec2): honor metadata token requirements and profile identity

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

* fix(ec2): keep synthesized node identity and mock addresses consistent

- IMDS iam/info serves the instance profile identity EKS synthesizes for
  its cluster nodes while IAM holds no such profile. The node carries a
  stable IAM-shaped profile id, which DescribeInstances now copies too.
- Mock instances get their automatic public address however the launch
  completes, DescribeInstanceStatus included. An associated Elastic IP
  replaces it, disassociating gives a running instance a new one, and
  termination leaves none.
- CreateFleet forwards the launch template's metadata options and its
  primary interface AssociatePublicIpAddress.
- Launch templates store a profile name and ARN pair as given and the
  launch from them rejects it, since AWS does not fully validate
  template parameters at creation.
- CloudFormation launch-configuration MetadataOptions resolve Fn::If and
  AWS::NoValue.

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

* fix(ec2): refuse profile pairs for groups and keep Elastic IPs exclusive

- Auto Scaling refuses a group whose launch template, directly or
  through its mixed instances policy, names both an instance profile
  name and an ARN, with ValidationError, instead of accepting a group
  that can never launch.
- AssociateAddress disassociates the Elastic IP an instance already
  has, as AWS documents. In mock mode a terminated instance takes no
  address, and an unchanged address is not written again.
- IMDS iam/info falls back to a cluster node's synthesized identity
  only while IAM holds no profile at that ARN; a held profile without a
  role answers 404.
- CreateFleet takes the subnet of the device-index-0 interface first,
  as RunInstances does.

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

* test(ec2): assert profile ids and launch configuration metadata via the SDK

Ec2InstanceProfilePathTest now checks that direct, template, override
and fleet launches report IAM's InstanceProfileId, and AutoScalingTest
round-trips launch configuration MetadataOptions through the AWS SDK for
Java v2, including the absent structure and a rejected hop limit.

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

* fix(ec2): displace an Elastic IP a retained interface carries

- AssociateAddress also disassociates an Elastic IP held by the
  instance's primary interface, which a retained network interface
  carries from an earlier instance, so one instance never holds two.
- Mock stop and terminate change the instance's state and public
  address under its lock, like the launch and Elastic IP writes.
- Docs and comments say where the profile pair fails and when
  CreateFleet falls back to another interface's subnet.
- Tests cover the retained-interface address, the group update path,
  the full refusal message and the fleet's availability zone, and the
  SDK launch configuration test cleans up on failure.

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

* fix(ec2): refuse reserved RunInstances tags before resolving the profile

Resolving the instance profile called the EC2 service before tag parsing,
so a reserved aws: tag was refused only after that lookup. Parse tags first,
as the reserved-tag check requires.

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

* test(autoscaling): assert the refresh launched the replacement

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

* test(autoscaling): describe what the refresh assertion checks

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

* test(cloudformation): cover invalid launch-configuration metadata options

Invalid HttpTokens, invalid HttpEndpoint, hop limits of 0 and 65 and a
non-integer hop limit each fail the AWS::AutoScaling::LaunchConfiguration
resource with the validation message, roll the stack back and leave no
launch configuration behind.

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

* test(cloudformation): pin metadata failure reasons and accepted hop limits

Assert the exact resource failure reason, and cover hop limits of 1 and 64,
a string hop limit and one from a Number parameter.

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

* refactor(ec2): leave IMDS token enforcement to a separate change

HttpTokens=required enforcement, the IMDSv2 readiness probe and the helper
shell environment reset move to their own pull request, so this change
keeps only the instance profile identity.

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

* refactor(ec2): leave mock public addresses to a separate change

Mock public IPv4 assignment, primary-interface public IP and subnet handling
and Elastic IP displacement move to their own pull request.

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

* refactor(autoscaling): leave launch metadata options to a separate change

Launch-configuration MetadataOptions over Query and CloudFormation, and
metadata options forwarded from launch templates and EC2 Fleet, move to
their own pull request. Launch-configuration profile resolution stays.

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

* test(ec2): use the shared metadata and authorization fixtures

Ec2MetadataProfileIntegrationTest starts its metadata server and requests
tokens through Ec2MetadataTestFixture, and it and
Ec2InstanceProfileIdentityIntegrationTest build their Authorization header
with EnforcementFixtures.auth.

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

* docs(ec2): close the Auto Scaling profile paragraph's code fence

Removes a stray fence that rendered the launch-configuration profile
paragraph as code, and a doubled blank line before the iam/info paragraph.

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

* test(ec2): find profile identity launches by a run tag

Each launch carries a tag unique to the test run, and the tests look their
instances up by that tag rather than by client token.

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

* refactor(ec2): leave the client-token filter to a separate change

The instance filter is not part of the profile identity, and this copy let
a wildcard match instances launched without a token.

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

---------

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
2026-10-17 08:03:38 -04:00
Vũ Thế Huy fa2a49e771 feat(redshift-serverless): add scheduled action actions (#5852)
Add CreateScheduledAction, GetScheduledAction, ListScheduledActions,
UpdateScheduledAction and DeleteScheduledAction. An action is recorded and
echoed, never run, and a cron schedule reports no upcoming invocations. It is
tied to the namespace by the namespace's generated id, so a namespace recreated
under the same name does not inherit it.

Required members, name patterns, the snapshot name prefix length and the tag
shape come from the AWS model through RedshiftServerlessRequestShapes. Only what
the model cannot express stays in the service: the schedule union, the time
window, the retention range and the namespaces that must exist.
2026-10-17 00:04:32 -04:00
Suja Shaj a611e9ea6f fix(iam): authorize Secrets Manager requests against the secret's ARN (#5781)
* fix(iam): authorize Secrets Manager requests against the secret's ARN

IAM enforcement evaluated CreateSecret against secret:* because the
builder read only SecretId, and a secret named by its name was evaluated
as secret:<name>, without the random suffix every secret ARN carries.
A secret:<name>-?????? policy, the pattern AWS documents for granting
access to a secret that may not exist yet, matched neither.

CreateSecret is now evaluated against secret:<Name>-??????, standing in
for the suffix that is assigned at creation, and a name-based SecretId
resolves to the stored secret's full ARN in the target account.

Closes #5364

* fix(iam): pick the Secrets Manager target by the serving operation

CreateSecret now reads only Name and other actions only SecretId, so a
field the handler ignores cannot choose the resource. Minted ARNs take the
request's partition, and a name lookup also reads a legacy unprefixed
secret for the default account. Adds an SDK compatibility test.

* fix(iam): resolve a partial-ARN SecretId to the stored secret's ARN

A SecretId given as an ARN without the random suffix is now authorized
against the stored secret's full ARN, resolved in the caller's account in
the order the operations use: an exact ARN first, then the ARN read as a
partial one. The enforcement tests share EnforcementFixtures' auth, a new
assumeRole helper, and a new createRole helper that removes the role after
the test. The Secrets Manager enforcement test also deletes the secrets it
creates.
2026-10-16 23:24:38 -04:00
Vũ Thế Huy 1cb8b0f747 feat(redshift-serverless): accept customDomainName in GetCredentials (#5856) 2026-10-16 23:11:42 -04:00
Vũ Thế Huy 2a012cf9a4 feat(redshift-serverless): add snapshot copy configuration actions (#5798)
* feat(redshift-serverless): add snapshot copy configuration actions

Add CreateSnapshotCopyConfiguration, ListSnapshotCopyConfigurations,
UpdateSnapshotCopyConfiguration and DeleteSnapshotCopyConfiguration. A
configuration is recorded and echoed; Floci copies no snapshot. A namespace has
one configuration at a time and the destination Region must differ from its own.
The configuration is tied to the namespace by the namespace's generated id, so a
namespace recreated under the same name does not inherit it.

Required members come from the AWS model through RedshiftServerlessRequestShapes.
The destination Region name and the retention range are checked by hand because
the model leaves them unconstrained.

* fix(redshift-serverless): validate boundary inputs and scope snapshot copy pagination tokens

* refactor(redshift-serverless): share maxResults range check and invalidPagination helper
2026-10-16 22:42:36 -04:00
XuJian d1509c368f fix(s3): default new buckets to BucketOwnerEnforced (#5782)
* fix(s3): default new buckets to bucket owner enforced

Initialize ownership controls at bucket creation and opt ACL-focused tests into legacy ownership modes. Repair existing import grouping so repository-wide Checkstyle passes.

* fix(s3): honor bucket ownership and ACL headers

Preserve explicit CreateBucket ownership and ACL grants, and reject grants incompatible with enforced ownership. Validate multipart grants at initiation and carry accepted grants through completion. Adapt ACL-focused regressions to opt into legacy ownership modes.

* fix(s3): respect account public ACL setting at bucket creation

* refactor(s3): share create-bucket ownership XML builder
2026-10-16 22:26:24 -04:00
Alessandro Lattao 197ccb5fb7 fix(cloudformation): refuse an update that has nothing to change (#5849)
* fix(cloudformation): refuse an update that has nothing to change

UpdateStack ran a full update for a stack resubmitted as it was, ending
UPDATE_COMPLETE, and CreateChangeSet created an AVAILABLE change set for
it. CloudFormation refuses the update with "No updates are to be
performed." and creates the change set FAILED, UNAVAILABLE, with "The
submitted information didn't contain changes. Submit different
information to create a change set."; the CDK and aws cloudformation
deploy read that reason as "no changes".

What CloudFormation compares was measured in eu-west-1: each active
resource's Type, Properties, Metadata, DeletionPolicy, UpdateReplacePolicy
and UpdatePolicy, and each active output's Value, Description and Export,
with whatever does not depend on a resource resolved first, and the tags
as a set (absent Tags keep the stack's). ComparedTemplate brings a
template to that form: a new Description, an unused parameter, a
DependsOn or a literal written as Fn::Join is no change, while a used
mapping value, a Ref of a resource rewritten as Fn::Sub, or a dynamic
reference whose stored value moved is one. Templates are compared as
processed, AWS::Include fragments read again and the SAM transform
applied with the stack's parameter values, and a stack with a nested
stack is always updated. The change set diff uses the same form.

The CDK deletes the FAILED change set and deletes it again by name
before its next deploy, so DeleteChangeSet now answers success for a
change set the stack does not have, as CloudFormation does. A stack set
instance whose stack has nothing to change is left as it is. Tests that
resubmitted an identical template to exercise an update add an output
through CfnUpdates.forceUpdate, which is an update on AWS too.

* fix(cloudformation): record dynamic reference values when an operation commits

Answers the review of #5849.

The value each dynamic reference resolved to is now recorded when the
stack's operation commits, from the template the stack then has and
keyed as ComparedTemplate hands the references over, instead of while
the engine provisioned each resource. Recording and comparison so see
the same strings, an Fn::Sub that also reads a resource included; an
update that fails and rolls back records nothing and keeps the last
deployment's values; a reference the template dropped is dropped; and
AWS::RDS::DBInstance's master credentials, which its provisioner
resolves itself with ssm-secure, are compared like any other reference.
The values are kept as an HMAC-SHA256 under a random key of the stack's
own rather than a bare SHA-256.

ComparedTemplate keeps an AWS::NoValue inside a function it compares as
written, and gives the array form of Fn::Sub the static variable
substitution the string form has, its own variables left as written.

A stack set instance with nothing to change succeeds whatever status an
earlier rolled-back update left its stack in, and the change set that
found it so is deleted. DeleteChangeSet by a change set's ARN alone
succeeds when the change set is gone, as measured on CloudFormation in
eu-west-1 on 2026-10-17.

The comparison now catches only what it can meet: a template that does
not parse, and the AwsException an AWS::Include, the SAM transform or an
SSM parameter raises, which the update itself then reports.
2026-10-16 21:53:03 -04:00
Vũ Thế Huy 7cab804d22 feat(redshift-serverless): add custom domain association actions (#5766)
* feat(redshift-serverless): add custom domain association actions

Add CreateCustomDomainAssociation, GetCustomDomainAssociation,
ListCustomDomainAssociations, UpdateCustomDomainAssociation and
DeleteCustomDomainAssociation. An association is recorded and echoed; Floci
serves no traffic on the domain and reads no ACM certificate. It is tied to the
workgroup by the workgroup's generated id, so a workgroup recreated under the
same name does not inherit it.

The domain name and certificate ARN patterns, lengths and the required members
come from the AWS model through RedshiftServerlessRequestShapes, so the service
carries no validation of its own.

* fix(redshift-serverless): address review findings for custom domains

- Expose custom domain name and certificate ARN in workgroup responses.
- Ensure custom domain names are unique across workgroups in a region.
- Remove ambiguous Pagination.paginate overload in favor of paginateNamespaced.
- Add domain name and certificate ARN validation patterns and length checks.
- Enforce validation for required parameters in custom domain operations.

* fix(redshift-serverless): enforce single custom domain per workgroup and populate certificate expiry

* fix(redshift-serverless): read certificate expiry dynamically and share custom domain serialization
2026-10-16 21:18:45 -04:00
David Phillips 92be67d2df fix(logs): enforce group permissions for lifecycle changes (#5840)
* fix(logs): enforce group permissions for lifecycle changes

* fix(logs): accept bare group ARNs in lifecycle policies
2026-10-16 20:59:38 -04:00
Mario Toffia 534571b2a3 feat(iot): route shadow events through topic rules (#5260)
* feat(iot): route shadow events through topic rules

Successful classic and named shadow changes, from the REST API and from MQTT
reserved topics, now reach the topic rules engine and MQTT subscribers on the
AWS response topics with AWS payload shapes. Shadow documents keep metadata,
clientid() reports N/A for messages without an MQTT client, and MQTT rejected
responses carry the numeric status code.

Closes floci-io/floci#5256

* fix(iot): compute the shadow delta through nested objects

GetThingShadow and the update/delta event compared desired and reported only at the top level, so one differing nested field put the whole desired object in the delta. AWS compares nested objects key by key and arrays whole, and the delta event carries the stored desired metadata of exactly the delta values.

* fix(iot): give a shadow stored without metadata its leaf metadata

A shadow persisted before metadata was kept now reads back with a metadata mirror of its state stamped with its stored timestamp, so GetThingShadow and the update/documents and update/delta events carry metadata for its existing leaves, as AWS does for every state leaf.

* fix(iot): reject a shadow name outside the AWS pattern

A whitespace-only shadow name no longer addresses the classic shadow, so DELETE ?name=%20 cannot delete it. As on AWS, an empty name is the classic shadow and any name that is not 1 to 64 of [a-zA-Z0-9:_-] fails with InvalidRequestException.

* fix(iot): ignore a shadow request on a named topic with an invalid name

As on AWS, an MQTT request on $aws/things/<thing>/shadow/name/<name>/<op> whose name is not a valid shadow name, empty included, is not a shadow request: nothing is published and the classic shadow is untouched. Before, an empty name updated the classic shadow and a blank one was rejected on the classic shadow's topic.

* docs(iot): note that wildcard rule filters receive shadow events

Verified on AWS IoT: rules FROM '#' and '+/things/<thing>/shadow/#' receive the $aws shadow update events. Adds a test locking in the existing matcher behavior.

* fix(iot): keep only the most recent recorded publish events

The recorder kept every publish, and shadow events now go through it too. Only tests read it, so it now keeps the most recent 1,000 events and drops the oldest.

* test(iot): read shadow rule queues without the 5s poll

* fix(iot): match AWS shadow names, delta numbers and clientToken echo

Accept the reserved $package shadow name and reject any other name containing $ with 'Invalid shadow name : <name>'; a name failing the pattern answers 'Bad Request'. Compare delta numbers as AWS does (equal when both double and long values are, integers beyond long exactly), which also stops a number beyond the double range failing the update, and echo a whitespace clientToken.
2026-10-16 20:47:34 -04:00
David Phillips 49a3ff9a10 fix(logs): bind ARN tag operations to their owning group (#5810)
* fix(logs): bind ARN tag operations to their owning group

* fix(logs): preserve literal names in tag requests

* test(logs): share authorization fixtures
2026-10-16 18:23:59 -04:00
Vũ Thế Huy c67a5afbc3 feat(redshift-serverless): add endpoint access actions (#5742)
* feat(redshift-serverless): add endpoint access actions

Add CreateEndpointAccess, GetEndpointAccess, ListEndpointAccess,
UpdateEndpointAccess and DeleteEndpointAccess. Floci creates no VPC endpoint, so
an endpoint is recorded and echoed with the workgroup's own address and port.
It is tied to the workgroup by the workgroup's generated id, so a workgroup
recreated under the same name does not inherit its predecessor's endpoints.

Required members and the ownerAccount pattern come from the AWS model through
RedshiftServerlessRequestShapes. The endpoint name rule is checked by hand
because the model documents it but does not encode it.

* fix(redshift-serverless): validate boundary inputs and scope endpoint pagination tokens

Validate policy is not null or blank in requireJsonObject before Jackson parsing to avoid unchecked IllegalArgumentException. Validate required endpointName, workgroupName, and subnetIds at create boundary. Validate non-null vpcSecurityGroupIds on endpoint updates. Add namespaced paginate overload with limit validation, scope ListEndpointAccess tokens to endpoint-access, and report pagination errors as ValidationException.

* fix(redshift-serverless): allow optional vpcSecurityGroupIds on update and reuse existing pagination overload

Allow omitting or passing null vpcSecurityGroupIds in UpdateEndpointAccess to leave existing security groups unchanged. Validate maxResults in the service and call the existing namespaced Pagination.paginate overload instead of adding core overloads. Omit the snapshot policy null check which belongs to #5730.
2026-10-16 13:40:19 -04:00
David 4353e4232b feat(rds): DescribeDBLogFiles and DownloadDBLogFilePortion (#5741)
* feat(rds): DescribeDBLogFiles and DownloadDBLogFilePortion

Both answered UnsupportedOperation, so an instance's log could only be
read with docker logs, outside the AWS API.

An instance's log is now read from its database container and cut into
files the way RDS names them: hourly error/postgresql.log.* files for
PostgreSQL, error/mysql-error.log for MySQL and MariaDB, and log/ERROR
for SQL Server. DescribeDBLogFiles filters and pages them, and
DownloadDBLogFilePortion follows the API reference's marker rules with
a 1 MB block cap. Control characters XML cannot carry come back as
U+FFFD. In mock RDS mode an instance has no log files.

Closes #5733

* fix(rds): bound and validate log file reads

A log read now takes the most recent 100,000 lines instead of the whole
history, fails when Docker does not finish in time instead of returning
part of the log, and, when Docker no longer knows the container, finds
or starts the backend once before answering DBInstanceNotReady rather
than an empty log. A single line over 1 MB is cut at 1 MB like the rest
of the block. Negative FileSize, FileLastWritten and Marker values are
InvalidParameterValue; the shared offset paging refuses a negative
marker instead of starting over.

* fix(rds): close the Docker log stream when a log read times out

A timed-out read now closes its callback before failing, so the stream
stops and nothing writes into the buffer after the read gives up; the
buffer is also written and read under one lock.

* refactor(rds): keep portion's Javadoc on portion

truncateUtf8 had landed between portion's comment and portion itself. It now follows portion.

* test(rds): read log files on the first call, and import class names

CreateDBInstance returns once the database accepts connections, so the startup log is already in the container's output. The Docker and SDK log tests now assert on the first DescribeDBLogFiles and DownloadDBLogFilePortion call instead of polling. The timeout test and RdsLogFilesTest import the classes they had written out in full.
2026-10-16 07:16:10 -04:00
David Phillips 167336fc73 fix(servicequotas): report the standard EC2 quota default (#5778)
* fix(servicequotas): report the standard EC2 quota default

* test(servicequotas): cover paged quotas and account isolation
2026-10-16 06:59:58 -04:00
Vũ Thế Huy a68e6bc768 feat(redshift-serverless): add resource policy actions for snapshots (#5730)
* feat(redshift-serverless): add resource policy actions for snapshots

Add PutResourcePolicy, GetResourcePolicy and DeleteResourcePolicy. A policy is
stored per account and Region and echoed in the shape of the API model, not
evaluated. It is tied to the snapshot it was put on by the snapshot's creation
time, so a snapshot recreated under the same name does not inherit it.

Required members come from the AWS model through RedshiftServerlessRequestShapes.

* fix(redshift-serverless): validate resource ARN before policy lookup and add account isolation tests

Validate resourceArn with snapshotNameFromArn at the start of require() so that foreign-account or non-snapshot ARNs return ValidationException on GetResourcePolicy and DeleteResourcePolicy even when no policy is stored. Parameterize snapshotNameFromArn so error messages reference resourceArn.

Add regression tests covering missing resourceArn on PutResourcePolicy and foreign ARN reads/deletes. Add integration test verifying policy isolation across accounts under real request contexts.
2026-10-15 22:13:02 -04:00
jwoa95 cbd2f61dc4 feat(s3): apply lifecycle expiration rules (#5158)
A bucket's lifecycle configuration was stored and returned but never
evaluated. A background sweep now applies its expiration actions:

- Expiration (Days, Date) deletes the current version of a matching
  object, or adds a delete marker in a versioning-enabled bucket. Day
  counts run from the last-modified time and round up to the next
  midnight UTC, as on S3.
- ExpiredObjectDeleteMarker, and a Days or Date expiration once the
  marker is old enough, remove a delete marker with no other versions.
- NoncurrentVersionExpiration (NoncurrentDays, NewerNoncurrentVersions)
  permanently deletes noncurrent versions, counting from when the next
  newer version was written.
- AbortIncompleteMultipartUpload (DaysAfterInitiation) aborts uploads
  under a prefix-only filter.

Filters are Prefix, Tag, ObjectSizeGreaterThan, ObjectSizeLessThan, an
And of them, or the older rule-level Prefix. Disabled rules are skipped,
versions under Object Lock retention or a legal hold are never deleted,
and each bucket is swept in its owning account. Lifecycle deletions are
notified as s3:LifecycleExpiration:* rather than s3:ObjectRemoved:*,
with S3 itself as the requester, and their EventBridge reason is
"Lifecycle Expiration".

A rule S3 would have refused on put, such as Days 0, a size bound that
is not a number or a Tag without a Value, is skipped as a whole, so a
bad value never widens what a rule deletes. A body that is not one
well-formed LifecycleConfiguration document has no rules.

Each key is planned from one pass over its account's objects, then read
again by its known store keys and applied under the bucket monitor.
Lifecycle configuration changes and tagging now change under that
monitor too, and a multipart upload is aborted only
while its bucket and the rules are still the ones the sweep started on.
Versions written in the same millisecond keep the order they were
written in, for ListObjectVersions as well as for lifecycle.

PutObject, GetObject and HeadObject on a current version that an
Expiration rule matches return x-amz-expiration with the expiry date
and the URL-encoded rule id.

The sweep runs every 60 seconds by default, configured with
floci.services.s3.lifecycle-sweep-enabled and
floci.services.s3.lifecycle-sweep-interval-seconds. Transition actions
are still not applied.

Closes #5137
2026-10-15 20:52:43 -04:00
Jackson Price ad8fba7f45 fix(cloudformation): evaluate conditions with intrinsics, require parameter values (#5737)
* fix(cloudformation): require a value for every declared parameter

CreateStack, UpdateStack and CreateChangeSet accepted a template that
declares a parameter with no Default when the request gave it no value.
The stack deployed with the parameter unset: a condition compared it as
an empty string, and a Ref resolved to the parameter's own name.

Such a request now fails with ValidationError "Parameters: [Env] must
have values", naming every such parameter in declaration order, before
the SAM transform and the dependency preflight run and before any stack
state changes. An empty value counts as a value. An update does not
carry values over, so it needs a value or UsePreviousValue, which keeps
the deployed one, for each parameter without a Default.
UsePreviousValue on a parameter with no deployed value passes none,
rather than an empty string. A request its stack refuses outright, an
update of a stack that is missing or cannot be updated or a create over
a name in use, still gets that refusal. A parameter that an AWS::Include
defines, which only execution merges, is not checked up front.

The same check refuses CreateStackSet and UpdateStackSet, before the
stack set changes or an operation is recorded. UpdateStackSet resolves
UsePreviousValue against the previous template's Defaults too, since a
stack set keeps only the values it was given. A nested stack resource
whose Parameters leave a child parameter without a value fails, before
the child is created or changed. Those Parameters now resolve as a
property value: an Fn::If may choose the whole map, and an AWS::NoValue
value passes nothing.

A CreateStackInstances whose targets cannot be resolved, or whose
change set is refused, now ends its operation FAILED. Left RUNNING, it
refused every later operation on the stack set.

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

* fix(cloudformation): evaluate conditions through the template engine

Conditions resolved only a bare Ref, and only to a parameter, the
account or the region. Every function other than that Ref compared as
an empty string inside Fn::Equals: Fn::FindInMap, a Ref to
AWS::StackName or AWS::StackId, Fn::Join. A condition on a mapped value
or on the stack's own name was decided wrongly, so the wrong resources,
or none, were created.

The operands now resolve through the template engine, with the
template's Mappings and the stack's name and id. The change-set preview
and the dependency preflight evaluate against the stack too: the live
one an update targets, or the name a create takes, whose id does not
exist yet. An operand the engine cannot resolve compares as an empty
string, as every function did before, so a template that evaluated then
still does. A declared parameter that a stack stored by an older Floci
lacks still compares as an empty string, and AWS::NotificationARNs is
the empty list, now in properties and outputs too.

CloudFormation does not allow Fn::ImportValue in a condition, so a
template being deployed with one there is refused with "Template error:
Cannot use Fn::ImportValue in Conditions.", also in an operand that
evaluation never reaches. A SAM template's change set, or its stack,
fails with that reason instead. A stored template compares the import
as an empty string, so it never blocks an update that supplies a new
template; UsePreviousTemplate checks the stored one as it would a new
one.

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

* fix(cloudformation): check a create's dependencies with its stack id

A create's dependency preflight evaluated AWS::StackId as an empty
string while the execution used the stack's id, so a dependency on a
resource whose condition reads the stack id could pass the preflight
and then fail the deploy, or the other way round. A create over a name
in use was checked against the stack holding the name instead, and
could get a dependency error rather than AlreadyExistsException.

createChangeSet now allocates the new stack's id before the preflight
and creates the stack with it, so the preflight, the change-set preview
and the execution evaluate the same id. An update, or a create that
attaches to a REVIEW_IN_PROGRESS placeholder, is checked against that
stack as before, and a create over a name in use is checked as the new
stack it asks for.

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

* docs(cloudformation): place the parameter check before dependency checks

The parameter section said template errors such as a dependency cycle
come first, but createChangeSet checks the parameter values before the
dependency checks, which evaluate conditions that read those values.
Say so, and keep the stack's own refusal ahead of both.

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

* docs(cloudformation): order the stack's refusal after dependency errors

The previous commit said the stack's own refusal comes ahead of both
the parameter check and the dependency checks. It comes ahead of the
parameter check only: a request its stack refuses still gets a
template's dependency error first, as on main. Say so, and re-wrap the
conditions paragraph.

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

* docs(cloudformation): say parameter values are checked before dependency errors

The parameter section still read as if a template's dependency errors
came first. createChangeSet checks the parameter values before the
dependency checks, which evaluate conditions that read the values, so
a template with a cycle and a missing value gets the parameter error.
Say that, and that a stack's own refusal replaces the parameter error
but still follows a dependency error.

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

* test(cloudformation): pin a missing value ahead of a dependency cycle

A template with both a DependsOn cycle and a parameter without a value
gets "Parameters: [Env] must have values" and creates no stack.

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

* refactor(cloudformation): name the tolerated parse failures ignored

requireParameterValues and parametersWithDefaults return when the
template does not parse, as intended: there is nothing to check or to
add, and the preflight and the execution report the parse error. Name
the caught exception ignored and say why, as AGENTS.md asks.

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

* refactor(cloudformation): say only execution reports a parse failure

The comment on the ignored parse failure in requireParameterValues
said the preflight reports it too. The dependency preflight skips a
template that does not parse; only executing the change set reports
the error.

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

---------

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
2026-10-15 16:56:00 -04:00
David 9cd9002e73 feat(rds): EnableHttpEndpoint, DisableHttpEndpoint and HttpEndpointEnabled (#5736)
* feat(rds): EnableHttpEndpoint, DisableHttpEndpoint and HttpEndpointEnabled

EnableHttpEndpoint and DisableHttpEndpoint answered UnsupportedOperation
and DBCluster carried no HttpEndpointEnabled, so Terraform's
enable_http_endpoint and CDK's enableDataApi never read back what they
set.

Clusters now record the flag and report it. The two actions take the
cluster's ARN and raise ResourceNotFoundFault and
InvalidResourceStateFault as the model lists them; CreateDBCluster,
ModifyDBCluster and the AWS::RDS::DBCluster EnableHttpEndpoint property
set it too. Turning it on is refused for engines other than Aurora
PostgreSQL and Aurora MySQL. The Data API itself does not check the
flag, so existing callers keep working.

Closes #5732

* refactor(rds): one cluster ARN parser, and stricter Data API inputs

clusterForResourceArn repeated the ARN parsing, cluster: prefix and
account and Region check of clusterIdentifierFromArnOrName; both now
call clusterIdFromArn, each raising the error its API documents.

The Data API engine check takes aurora-postgresql, aurora-mysql and the
older aurora name exactly instead of any name starting with aurora, and
the AWS::RDS::DBCluster EnableHttpEndpoint property accepts true or
false only, so a malformed value fails instead of turning the endpoint
off.

* fix(rds): take only aurora-mysql and aurora-postgresql for the Data API

The API reference lists those two engines, and new clusters cannot carry
the bare aurora name, so the check no longer accepts it.
2026-10-15 16:49:23 -04:00
Vũ Thế Huy d3fce14256 feat(redshift-serverless): add release track, managed workgroup and reservation reads (#5691)
* feat(redshift-serverless): add release track, managed workgroup and reservation reads

Add GetTrack, ListTracks, ListManagedWorkgroups, ListReservations,
ListReservationOfferings, GetReservation, GetReservationOffering and
CreateReservation so SDK, CLI and IaC clients no longer get an unknown
operation error. Floci models no zero-ETL managed workgroups and sells no
reservations, so the lists are empty and the reservation lookups answer
ResourceNotFoundException. The two release tracks are current and trailing.

Required members, patterns and lengths come from the AWS model through
RedshiftServerlessRequestShapes; only the track names, which the model leaves
unenumerated, are checked by hand.

* refactor(redshift-serverless): reuse Pagination.paginate and remove unused admin handle method

Rely on Pagination.paginate for maxResults and nextToken validation in listTracks and listWithoutItems, matching the other Redshift Serverless lists. Remove the unused handle method and its duplicate unknown-operation response in RedshiftServerlessAdminJsonHandler.
2026-10-15 13:46:35 -04:00
Langning Zhang ea45f81a81 fix(s3): reject undersized multipart upload parts (#5718)
* fix(s3): reject undersized multipart upload parts

Signed-off-by: boulea7 <zln1905391059@163.com>

* fix(s3): reuse multipart size error helper

Signed-off-by: boulea7 <zln1905391059@163.com>

---------

Signed-off-by: boulea7 <zln1905391059@163.com>
2026-10-15 12:55:58 -04:00
XuJian 7f8383db38 feat(cloudformation): provision SES email identities (#4812)
* feat(cloudformation): provision SES email identities

* fix(cloudformation): retry pending SES update rollback

* fix(cloudformation): keep recovered SES resource complete

* fix(cloudformation): retain recovered SES state on failed replacement

* test(cloudformation): use shared waiter for SES DKIM verification
2026-10-15 10:26:40 -04:00
TATSUNO “Taz” Yasuhiro 6f78083080 feat(lambdaweb): Lambda Web Functions control plane (#5706)
* feat(lambdaweb): Lambda Web Functions control plane

The lambda-web service model (apiVersion 2025-03-07) signs as lambda, so
it is served under the lambda service at /2025-03-07/... with the AWS
wire shapes, state words and error wording of the 20 operations on web
functions, revisions, endpoints, tags and the resource policy.

Revisions and endpoints converge at once. They are stored Active and an
endpoint update is stored Successful, while the create and update
responses report the transitional state AWS reports, so a CLI waiter
settles on its first poll. Code comes from an S3 object that must exist.
IamAuth, the resource policy and the endpoint domain are stored but not
served yet.

Part of #5699

* fix(lambdaweb): carry the page position in the token

The nextToken of a list operation was a UUID keyed into an in-memory
anchor map that only grew and was not scoped to the account. The token
is now a core Pagination cursor that encodes the request (operation,
region, account, function, filters and page size) and the cursor of the
item the page ended on. A token reused with other parameters gets the
AWS "does not match the request" error and any other token the AWS
"invalid or has expired" error.

AWS issues UUID tokens and rejects any other shape, so Floci no longer
reproduces the pattern error for a malformed token.

* fix(iam): resolve a Lambda Web revision or endpoint named by its ARN

The route resource for IAM enforcement took the path segment after
revisions or endpoints as the id. A revision or endpoint ARN in that
position carries slashes, so the resource ARN ended in the ARN's first
segment and a policy scoped to the revision or endpoint did not apply.
The id is now the last segment of such an ARN.

* fix(lambdaweb): add the values of a repeated state filter

AWS lists a function when any state filter in the request names its
state. A later state filter replaced the earlier one, so a request with
state=Active followed by state=Failed listed nothing.

* fix(lambdaweb): refuse empty arrays in a resource policy

AWS answers an empty Action or Resource array with the policy syntax
error and an empty principal array with the invalid principal error,
which wins when all three are empty. Floci stored such a policy.

* fix(lambdaweb): judge a wildcard principal by the operator and value of its condition

A trusted condition key alone kept an Allow for every principal out of
the public check. AWS blocks the policy unless a positive operator pins
the key: StringNotEquals and the IfExists forms do not count, nor does a
wildcard in an account value or in the account field of an ARN value,
while a wildcard elsewhere in an ARN and a literal * under StringEquals
do.
2026-10-15 06:46:52 -04:00
David Phillips dbe7fdb92e fix(logs): enforce stream resource permissions (#5694)
* fix(logs): enforce stream resource permissions

* fix(logs): retain request partitions for stream permissions
2026-10-14 23:42:14 -04:00
David Phillips a55352bf9d fix(elbv2): preserve default listener certificates (#5692)
* fix(elbv2): preserve the default listener certificate

* fix(elbv2): keep certificate checks independent of other VPCs
2026-10-14 23:13:33 -04:00
David Phillips 430af5fce7 fix(rds): keep Aurora member passwords owned by their cluster (#5685)
* fix(rds): keep Aurora passwords owned by the cluster

* test(rds): cover member changes across regions
2026-10-14 20:43:53 -04:00
David Phillips 92b2cf74f7 fix(rds): inherit Aurora member master credentials (#5667)
* fix(rds): inherit Aurora member master credentials

* fix(rds): retain defaults for incomplete cluster credentials

* test(rds): keep credential checks compatible with Java 17

* fix(rds): keep Aurora managed secrets on the cluster

* fix(rds): reject member credentials and publish offline changes

* fix(rds): match the member username error message

* fix(rds): release proxy listeners before reboot

* test(rds): shorten listener retirement failure checks
2026-10-14 19:31:42 -04:00
jwoa95andPriamo 17c40cecbd fix(cognito): reject token validity outside AWS's limits (#5160)
* fix(cognito): reject token validity outside AWS's limits

CreateUserPoolClient and UpdateUserPoolClient accepted any positive token
validity, so a client with one-minute access and ID tokens, or a
20-minute refresh token, worked locally and failed on deploy. AWS allows
access and ID tokens between 5 minutes and 1 day and refresh tokens
between 60 minutes and 3,650 days, in each token's TokenValidityUnits
unit (hours for access and ID tokens, days for refresh tokens, by
default). A client outside them now fails with InvalidParameterException
"Invalid range for token validity.", the message AWS returns.

floci.services.cognito.enforce-token-validity-limits (env
FLOCI_SERVICES_COGNITO_ENFORCE_TOKEN_VALIDITY_LIMITS, default true) turns
the check off for tests that want tokens shorter than AWS allows.

* test(scheduler): start recurring test schedules in the future

Since #5610 a rate schedule's first occurrence is its creation time, so
a schedule is due the moment it exists. The application's own dispatcher
keeps ticking every 10 seconds during @QuarkusTest and sees every
schedule, so a tick that lands between CreateSchedule and the test's own
dispatcher fires the schedule once more than the test expects.

Four tests create an enabled rate(1 minute) schedule and count exact
deliveries: recurringScheduleStartsOneExecutionPerOccurrence,
stepFunctionsDeleteScheduleStopsFutureOccurrence,
rateScheduleDeliversEachOccurrenceWithItsScheduledTime and
executionIdsDifferBetweenOccurrences. They now create the schedule
through SchedulerTestHarness.createRecurringSchedule, which sets a
StartDate a day ahead, and tick past it on their scoped dispatcher. The
application's dispatcher skips a schedule before its StartDate, and the
test profile and its tick interval stay as they are.

* test(compat): poll OpenSearch domain readiness every 250 ms against Floci

OpenSearchTest waited for the domain to finish processing in its own loop
that slept 5 s between checks and swallowed InterruptedException. Floci
flips Processing to false on its own 3 s readiness poll, so the test
could sit up to 5 s past the moment the domain was ready.

The wait now goes through TestFixtures.await, polling every 250 ms
against Floci and keeping the 5 s cadence against real AWS, with the
same 3 minute timeout.

* fix(opensearch): run domain containers under an init process so a stop ends them at once

The OpenSearch image's entrypoint is a bash script that starts the server
as its child instead of exec'ing it. Running as PID 1, that script ignores
SIGTERM, so every DeleteDomain, and every shutdown for each domain, waited
out the whole 5 s stop timeout before Docker sent SIGKILL. The server
never saw the SIGTERM either way.

Domain containers now run under Docker's init process, which takes the
SIGTERM and ends the container at once. Stopping a ready 2.11.1 container
took 5.27 s (exit 137) without it and 0.26 s (exit 143) with it, and
DeleteDomain in the compatibility OpenSearchTest took 5.3 s.

The two startDomain tests' shared setup moves into one helper, which the
new init test uses too.

* fix(cognito): keep a RefreshTokenValidity of 0 at 30 days in any unit

AWS replaces a RefreshTokenValidity of 0 with "the default value of 30
days". Floci stored the bare number 30 in the client's refresh token
unit, so a client with RefreshToken=minutes issued 30-minute refresh
tokens. With the token validity limits, any later UpdateUserPoolClient
that left the validity alone re-checked that stored 30 minutes and
failed with "Invalid range for token validity.", for a client Floci had
accepted.

A 0 now becomes 30 days in the client's refresh token unit (2592000
seconds, 43200 minutes, 720 hours or 30 days), on create and on update,
and the limits check runs on that normalized value. Also imports UUID on
a test line that spelled it out in full.

* fix(cognito): reset the settings UpdateUserPoolClient omits to their defaults

AWS: "If you don't provide a value for an attribute, Amazon Cognito sets
it to its default value." The developer guide adds that an update with
one parameter "sets all others to a default value". Floci kept the
stored value of every setting the request left out, so a client could
end up with a combination AWS never produces: an AccessTokenValidity of
60 kept from a minutes client, read in the hours of a units-only update,
was refused as out of range, where AWS resets the validity and accepts.

CreateUserPoolClient and UpdateUserPoolClient now build their settings
in one place, with a new client's default for each one the request
omits, and the update copies them onto the stored client. ClientName is
the exception: the API documents no default for it, so an update without
one keeps the name. The id, the secrets, the dates and the branding are
not settings and stay as they are. An explicitly empty list still clears
the setting.

The AuthSessionValidity tests and the boto3 compatibility test that
asserted the old keep-on-omit behaviour now expect the 3-minute default.

* test: share one self-signed and one user-cert TLS profile across the TLS integration tests

CustomDomainTlsIntegrationTest, TlsEnsureHostIntegrationTest, TlsHttp2HostRoutingIntegrationTest and EcrTlsDataPlaneDockerIntegrationTest each declared a self-signed TLS profile whose static block wrote its own CA-issued leaf before boot, and under @QuarkusTest that leaf is the one served. They now share SelfSignedTlsProfile, which writes one leaf for all four: the SANs TlsConfigSource uses by default, without 127.0.0.1, plus the API Gateway custom domain the HTTP/2 test routes to. The custom domain and ensure-host tests connect by IP and expect a name the leaf doesn't cover yet to be refused, and the JDK falls back to the peer address when the SNI name doesn't match, so a 127.0.0.1 SAN would let those handshakes through. The leaf and its metadata are written fresh every run, which also drops hostnames an earlier run learned at runtime, and the container CA bundle the ECR test relied on is written beside them.

TlsIntegrationTest and TlsUserCertIntegrationTest declared the same user-provided certificate setup apart from paths. They share UserCertTlsProfile, which keeps the certificate file carrying its private key, since TlsUserCertIntegrationTest checks /_floci/ca.pem never echoes it.

Both profiles live in the config test package, beside every class that uses them and the package-private default SAN list, and expose their paths as compile-time constants, so a test can read them without initializing the profile class and rerunning its static block under the running application.

Sharing an application also means no class may leave anything behind for the next. TlsHttp2HostRoutingIntegrationTest now removes the bucket, CloudFront public key, key group and distribution, and the REST API, domain name and base path mapping it creates. EcrTlsDataPlaneDockerIntegrationTest deletes the manifest it pushes, TlsIntegrationTest its queue and TlsUserCertIntegrationTest its parameter. CustomDomainTlsIntegrationTest and TlsEnsureHostIntegrationTest already end with a state reset, which keeps the configured names from the profile's metadata, so neither changes the leaf a later class is served.

The ECR test's registry container also outlived every run: keep-running-on-shutdown defaults to true and the test config never overrides it, and the next application to start adopted the container by name, a developer's own Floci registry included. SelfSignedTlsProfile now names it in the run's sidecar namespace, which SidecarContainersProfile exposes for this, and stops it at shutdown. The test checks for Docker through SidecarContainersProfile.requireDockerAndImage, so a registry a killed run left behind is removed like any other abandoned sidecar.

Part of #4542.

---------

Co-authored-by: Priamo <pgermosen@gmail.com>
2026-10-14 17:40:23 -04:00
Jackson Price 91c67c69df fix(appconfig): serve legacy deployed configuration requests (#5658)
* fix(appconfig): serve legacy deployed configuration requests

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

* fix(appconfig): keep 404 for an unknown application or profile

GetConfiguration now maps only a missing environment to
BadRequestException, as a missing or undeployed environment was
observed on AWS. An unknown application or configuration profile stays
ResourceNotFoundException (404), as the API reference lists.

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

* docs(appconfig): note GetConfiguration error codes

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

---------

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
2026-10-14 17:38:58 -04:00
David Phillips b395560fe2 fix(autoscaling): preserve paused refresh ownership (#5668)
* fix(autoscaling): retain paused refresh replacements across reloads

* fix(autoscaling): preserve paused and detached refresh instances

* fix(autoscaling): retain recovered refresh launch identity

* test(autoscaling): cover refresh recovery across groups

* test(autoscaling): cover paused refresh SDK responses

* fix(autoscaling): publish refresh ownership before reconciliation

* fix(autoscaling): release refresh ownership during group changes

* test(autoscaling): retain launch settings during refreshes

* fix(autoscaling): report accepted refresh placement

* fix(autoscaling): retain refresh settings and report launch failures
2026-10-14 17:05:00 -04:00
David ff32bae98c feat(rds): refuse role feature names the engine does not support (#5637)
* feat(rds): refuse role feature names the engine does not support

AddRoleToDBInstance, AddRoleToDBCluster and CreateDBCluster
AssociatedRoles stored any FeatureName, so Lambda on a MySQL instance
was accepted although MySQL supports no role features.

A FeatureName now has to be one the engine lists in
SupportedFeatureNames, matched without regard to case, or the call is
InvalidParameterValue; CreateDBCluster refuses before any cluster
exists. A cluster role with no feature, and an engine the catalogue
does not list, are left alone. Aurora PostgreSQL also lists Bedrock,
which the Aurora user guide offers next to Comprehend and SageMaker.

Closes #5631

* refactor(rds): keep the two-argument cluster role check

Callers that check an AssociatedRoles list without knowing the engine,
such as the CloudFormation provisioner in #5656, keep the signature they
compile against; it runs the same checks without the feature check.

* fix(rds): match feature names without regard to case in every role check

The supported-feature check matched without regard to case, but the
instance duplicate check and both removal lookups compared exactly, so
an instance could take s3Import and then s3import as two roles. All of
them now match the same way. The two-argument cluster role check, which
nothing here calls, is removed.
2026-10-14 16:59:28 -04:00
David Phillips 4ea7e3da23 fix(dynamodb): authorize every requested item return mode (#5652)
* fix(dynamodb): authorize every requested item return mode

* test(dynamodb): share authorization fixtures
2026-10-14 14:03:35 -04:00
David Phillips 12c8f969af fix(rds): inherit cluster IAM settings for new members (#5653)
* fix(rds): inherit cluster IAM settings for new members

* fix(rds): keep new member authentication in step with cluster changes

* fix(rds): allow metadata reads during member creation

* fix(rds): keep member creation consistent with lifecycle changes

* fix(rds): preserve metadata access during instance reboot

* fix(rds): use one cluster state for member creation

* test(rds): check IAM authentication consistently
2026-10-14 13:36:57 -04:00
Mohith 4d6ecc1ac2 fix(s3): validate multipart upload object size (#5643)
* fix(s3): validate multipart upload object size

* fix(s3): reject invalid multipart object sizes
2026-10-14 13:10:12 -04:00
jwoa95andPriamo 7c4d1c913a fix(ses): delete by id and filter by source in /_aws/ses (#5159)
* fix(ses): delete by id and filter by source in /_aws/ses

The inspection endpoint follows LocalStack's contract, as
docs/services/ses.md says, but differed from it in two ways. LocalStack
documents that "The query parameter id can be used to delete only a
specific message", and that "Query parameters id and email can be used
to filter by message ID and message source respectively".

- DELETE /_aws/ses?id=<id> cleared every message. It now deletes only
  that message, in whichever region it was sent. An unknown id deletes
  nothing.
- GET /_aws/ses?email=<address> matched the address against each
  message's ToAddresses. It now matches the message's Source, as
  LocalStack does.

GET also listed messages in storage hash order. It now lists them
oldest first by Timestamp, the order LocalStack keeps them in.

Floci's own tests read Cognito codes and other mail with
?email=<recipient>. They now list the mailbox and pick the recipient's
messages out of it, through a new SesMailbox test helper in src/test and
the same filtering in the Java and Node compatibility tests. A raw
send's mailbox entry shows RawData without its recipients, so the test
for recipients read from a raw message's headers checks the stored
record.

* fix(codeartifact): run the pypiserver sidecar under an init process so a stop ends it at once

The pypiserver image's entrypoint execs pypi-server, which installs no SIGTERM handler. The kernel
gives PID 1 no default signal actions, so the container ignored every stop request and went only
when Docker sent SIGKILL at the end of the 5-second timeout: each reset, repository delete and
shutdown waited that long for every pypi repository's container, one after another.

ContainerBuilder gains withInit(), carried on ContainerSpec as init and passed to Docker as
HostConfig.Init (docker run --init), and PypiserverSidecarManager uses it. Docker's init runs as
PID 1 and forwards the SIGTERM, so a stop now returns in a fraction of a second. Verdaccio already
handles the signal itself and is unchanged.

* fix(firehose): check buffers every second so delivery follows the buffering interval

AWS delivers a Firehose buffer once the first buffer condition is met. Floci checked for elapsed
buffering intervals on a 10-second tick, so a buffer was delivered up to 10 seconds after its
IntervalInSeconds ended: a 5-second interval landed anywhere from 5 to 15 seconds after the first
record. The default tick is now one second; the check is a scan of the in-memory buffers.

FirehoseFlushIntegrationTest's profile only set the same one-second tick, so it is removed and the
class shares the default test application. The compat tests that wait for a delivery checked S3
every 2 or 5 seconds; against Floci they now check every 250 ms, and keep their cadence against
real AWS.

* test: make subclass mocks the default so mocking stays cheap in a loaded test JVM

Mockito's default inline mock maker redefines every class it mocks in the running JVM. A
redefinition gets slow once the test JVM has loaded the Quarkus applications of the classes that
ran before, which in CI is most of the run: a unit class's first test spent seconds building its
mocks, and EmulatorLifecycleTest, which mocks some fifty types, spent 22 seconds. Subclass mocks
generate a subclass instead and redefine nothing. After twelve Quarkus applications in one JVM, the
fourteen Mockito classes whose first test was slowest in CI take 20.5 seconds instead of 41.9, and
their first tests 6.9 seconds instead of 27.8.

mockito-extensions/org.mockito.plugins.MockMaker makes the subclass mock maker the default. A
subclass cannot extend a final class, record or enum, so those mocks go through
InlineMocks.inlineMock and inlineSpy, or @Mock(mockMaker = MockMakers.INLINE), and
EmulatorLifecycleTest's static mock of Quarkus asks for the inline maker. The ContainerSpec mocks
a mocked ContainerBuilder.Builder returned were opaque values, so they are real specs now.

* fix(cloudformation): leave the last rollback's failed delete to ContinueUpdateRollback

#4949 refuses an update over UPDATE_ROLLBACK_FAILED until ContinueUpdateRollback finishes the
rollback, as AWS does. #4834, merged minutes earlier, had seven tests that update over that
status, and main has failed them since c4a809f47.

Six are in CloudFormationSchedulerScheduleIntegrationTest. They now reach their next update the
way AWS requires: ContinueUpdateRollback, which retries the schedule's own rollback, or, where the
replacement's delete has to keep failing, a skip of the schedule. The two whose update was meant to
be blocked by the pending rollback now check that the update is refused.

The seventh shows a real clash. #4949 made a second ReplacementCleanup.rollback retry the delete
the first one could not make, which is ContinueUpdateRollback's job. The Scheduler provisioner also
calls rollbackUpdate inside an update, to undo its own failed call, so after a skip a failed group
move deleted the earlier orphan there and then, and a failure of that delete would have failed the
move's restore. An update now ends that retry as it starts, through
ReplacementCleanup.endRollbackRetry, so the orphan stays owed for the next committed update or the
stack delete, as both changes document.

Three more provisioners roll an update back before ReplacementCleanup.record has cleared the retry,
and each returns as soon as the retry ran, skipping its own restore. CloudWatchDashboard and
IotAuthorizer unwind a failed in-place update that way, and CognitoResourceServer's failed attempt
is rolled back the same way, so after a skip the update's snapshot was never put back while the
resource was reported restored. They end the retry as an update starts too.

---------

Co-authored-by: Priamo <pgermosen@gmail.com>
2026-10-14 10:04:48 -04:00