Commit Graph
1563 Commits
Author SHA1 Message Date
Andre Kurait 985a2ea949 fix(elbv2): admit new targets after one successful health check (#6507)
* fix(elbv2): admit new targets after one successful health check

Preserve recovery thresholds and verify initial admission against a real HTTP target.

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

* fix(elbv2): scope initial health admission to application targets

Preserve network and gateway target-group health thresholds.

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

* fix(elbv2): retain initial health checking reason

Preserve the intermediate reason for network and gateway targets below their success threshold.

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

---------

Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
2026-10-25 09:30:22 -04:00
Aniket Shukla ddb94d6c15 fix(batch): paginate multi-node job listings (#6512)
Honor maxResults and nextToken for MNP node summaries using the existing Batch paging conventions. Keep exhausted pages terminal and avoid overflow for large offsets.
2026-10-25 09:09:12 -04:00
Jimmy Liu Jia b90b671c21 fix(cognito): verify admin contact attribute updates (#6474)
* fix(cognito): verify admin contact attribute updates

* fix(cognito): roll back failed admin contact updates

* fix(cognito): preserve verification during overlapping callbacks

* fix(cognito): scope verification cleanup to issued codes

* fix(cognito): retry undelivered admin attribute codes

* test(cognito): update tracked code fixtures

* fix(cognito): share contact updates after sender failures
2026-10-25 08:59:27 -04:00
Aniket Shukla 9c8d2ba58d fix(glue): paginate security configurations (#6496)
* fix(glue): paginate security configurations

Honor GetSecurityConfigurations page size and continuation tokens using the existing Glue paging helper. Enforce the documented 1-200 range and preserve account and region isolation.

* refactor(glue): share action-specific pagination limits

Centralize range validation for security configurations, workflows and triggers. Defer list loading until after validation to preserve dependent-job error ordering and keep the existing default and general helper limit.
2026-10-25 08:33:22 -04:00
Vũ Thế Huy 0a13e4259e feat(redshift-serverless): manage namespace admin credentials (#6491) 2026-10-25 08:24:23 -04:00
jwoa95 f219988a27 docs(elasticache): explain engine version and backend image precedence (#6508) 2026-10-25 08:15:28 -04:00
Mario Toffia bab7af3a21 fix(apigateway): return a usage plan's API stages, throttle and quota (#6360)
* fix(apigateway): return a usage plan's API stages, throttle and quota

* fix(apigateway): refuse a usage plan create whose text or number member is a list, map or wrong scalar

* fix(apigateway): refuse an unknown usage plan quota period before any other create check

* fix(apigateway): check a usage plan create body against API Gateway's vendored request shapes

* fix(apigateway): read a usage plan create body the way API Gateway does

* fix(apigateway): truncate a usage plan's integer limits without a double rounding

* refactor(apigateway): reuse SmithyValidationErrors and a shared request shape lookup
2026-10-25 07:55:54 -04:00
Aniket Shukla da9f7e93b1 fix(cognito): keep attribute updates after sender failures (#6493)
* fix(cognito): keep attribute updates after sender failures

* fix(cognito): withdraw stale codes after sender failure

Invalidate prior verification codes when a failed sender handover retains a different active or pending contact destination. Preserve codes for unchanged contacts the send loop never reached.
2026-10-25 07:48:48 -04:00
Vũ Thế Huy b15bc708fa feat: deliver Redshift audit logs to CloudWatch Logs (#6432)
* feat: deliver Redshift audit logs to CloudWatch Logs

* fix: correct Redshift audit logging and account isolation

* docs: remove Redshift audit logging design document

* fix: reject transaction control in Redshift Data API batches

* fix: track Redshift batch audit changes through savepoints

* fix(redshift-data): guard explicit batch commits against cancellation

* fix(redshift): preserve audit regions and redact ambiguous passwords
2026-10-25 07:42:48 -04:00
TATSUNO “Taz” Yasuhiro 8f3a6eafeb fix(lambdaweb): give the code bucket check the version as s3:VersionId (#6483) 2026-10-25 07:39:20 -04:00
TATSUNO “Taz” Yasuhiro 3dc5d356d0 feat(dynamodb): export the changes of a period as an incremental export (#6480)
* feat(dynamodb): export the changes of a period as an incremental export

* fix(dynamodb): write characters above U+FFFF in export lines as UTF-8

* feat(dynamodb): refuse incremental export periods over 24 hours

* fix(dynamodb): wait for unfinished writes when an incremental export reads items

* fix(dynamodb): write no incremental export record when only the order of set members changes
2026-10-25 07:38:55 -04:00
Matheus Oliveira 9242c7003a fix(organizations): preconfigure the account access role in a new account (#6444)
* fix(organizations): preconfigure the account access role in a new account

CreateAccount was returning a member account with no OrganizationAccountAccessRole, so sts:AssumeRole into it failed on a role that does not exist. The role AWS preconfigures is now created through IAM's own creation, in the new account's namespace: it trusts the management account and carries AdministratorAccess. CreateAccount's RoleName is honored, defaulted to OrganizationAccountAccessRole, and validated with the pattern the reference publishes, including the AWSServiceRoleFor refusal. Invited accounts do not get the role, which is AWS behavior. IAM owns the how behind an interface, the way ScpProvider already decouples IAM's reads of organization policy.

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

* fix(organizations): answer RoleName errors with their reasons and provision the role as the new account

CreateAccount's InvalidInputException for a bad RoleName now carries the
reference's Reason, INVALID_PATTERN for a pattern violation and
INVALID_ROLE_NAME for the reserved prefix, asserted at the service, the
wire and the SDK levels. The provisioner itself now runs createRole and
attachRolePolicy inside RequestScopes.callAs(memberAccountId), so
validation, ARN minting and storage stay IAM's own and the hand-built
role with its account-aware storage branch is gone. EntityAlreadyExists
is the one error caught, falling back to the role that is there, and
the integration test builds its requests and auth through the
OrganizationsRequests and EnforcementFixtures helpers.

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

---------

Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>
2026-10-25 07:31:36 -04:00
Priamo Germosen edbcac33c7 feat(emr-serverless): run Spark job runs in a container (#6469)
A new runner mode, floci.services.emrserverless.runner-mode=docker,
runs each Spark job run. Floci starts one container per run from the
release's EMR Serverless base image on Amazon ECR Public, and starts
spark-submit in local mode in it itself, since the image's own
entrypoint hands over to a script only EMR Serverless supplies. The
default, immediate, keeps today's behaviour.

A docker run is SCHEDULED while its image is pulled and its container
starts, RUNNING once the Spark driver runs, then SUCCESS when it exits
0 and FAILED otherwise, with the exit code in stateDetails, as the
user guide's job run states describe. CancelJobRun, or a BATCH run
passing its executionTimeoutMinutes, makes it CANCELLING until the
driver is stopped, then CANCELLED. A run left by a Floci restart is
FAILED once read.

Floci's shutdown and a state reset stop every driver, one whose image
is still being pulled as soon as its container is up, and a reset
raises a generation the runs' threads check, so none writes its run
back after the storage wipe. A driver a hard stop left running is
removed before this process starts one: driver containers carry the
deployment's owner label, as EC2's and ECS's do, and
reconcile-containers-on-startup turns the removal off, as theirs does,
for two Flocis sharing a daemon. A stop that comes after its run has
ended is dropped, and a cancel before a run starts is read from the
run's state. A driver is watched with a look at its container every
250 ms, as Batch's runner watches its jobs, so a run holds no Docker
connection while its driver runs; a run past its timeout is
CANCELLING while its driver is stopped.

spark-submit gets the entry point, its arguments and the
sparkSubmitParameters (split as a POSIX shell would), after the
spark-defaults of the application's runtimeConfiguration, or the
run's own in its applicationConfiguration, which replace the
application's whole classification ("Only the properties included in
StartJobRun is considered for this classification"); from
emr-spark-8.1.0 the two merge by property, the run's winning, as its
release notes say. S3A takes s3:// and s3a:// paths to Floci's S3 on
every release, with in-memory commit tracking, without which EMR's
committer loses every write; the Glue Data Catalog client goes to
Floci's Glue. The container gets a session for the run's execution
role and AWS_ENDPOINT_URL, as the other containers Floci launches do.
The image is public.ecr.aws/emr-serverless/spark/<release>:latest, or
spark4/ in place of spark/ for an emr-spark-* release, where ECR
Public keeps the AWS runtime for Apache Spark images. image-template
names another image, and docker-network the network.

Docker answers a stop of a container that has already exited with
HTTP 304, which ContainerLifecycleManager logged as a failed stop
after every run that ended by itself. It now counts as stopped, as a
304 on start already counts as started, and so does the runner's stop
for a cancel that finds the driver already exited.

A Hive run fails without running. Log destinations, retries and the
cancellation grace period are not emulated; the driver's output goes
to Floci's log.

Part of #6046 (REAL-2).
2026-10-24 23:03:37 -05:00
Priamo Germosen 68e7b313a8 fix(iam): validate the values each ReplacementValues entry carries (#6478)
ReplacementValueEntry declares Values required and replacementValueListType
bounds it at 1 to 20 values, which the API Reference spells out as "Array
Members: Minimum number of 1 item. Maximum number of 20 items" with
"Required: Yes", and AcquireRole read only the map's own 30-entry cap. An entry
carrying no values and an entry carrying 21 of them both reached the template
lookup and answered NoSuchEntity, where the validation ahead of the operation
answers ValidationError.

A Query list of no members is how an absent member arrives, so the lower bound
of 1 is never reached on its own: an entry carrying nothing is the required
member reading as null. The values are counted by the member being present
rather than by what it holds, the list's members publishing no constraint of
their own, so a value sent empty is a value; they are read through the helper
the other Query services read a list with. The violation names the entry by its
key, the way the account properties map names one, rather than by the index the
request numbered it with, and an entry is read back under the index the request
spelled rather than under the number that index reads as, the parameters that
carry it being named after the spelling. The map's own length is now reported
beside its entries rather than ahead of them, the shape being walked from the
outside in, so a request broken in several places is told all of it at once.

No recorded AWS violation on a map member is on hand to confirm that path
spelling against the nested "Map value must satisfy constraint" form, so the
role template docs say it is Floci's reading and what would change it.

Five tests: an entry with no values at all, a 21st value in one entry with 20
of them carried through to the 404, an entry whose only value is empty, an
entry numbered 01 read under that spelling, and 31 entries with two of them
left empty answered in one message. The role template docs say what is read
before the lookup, so they name the entries too.
2026-10-24 23:03:26 -05:00
TATSUNO “Taz” Yasuhiro cd2dac708d feat(lambdaweb): check the code bucket versioning and policy as AWS does (#6479) 2026-10-24 23:33:50 -04:00
Priamo Germosen 3053b35b84 feat(codeartifact): add UpdatePackageVersionsStatus and DisposePackageVersions (#6435)
Moves package versions between Published/Unlisted/Archived (UpdatePackageVersionsStatus)
or permanently to Disposed with real asset deletion (DisposePackageVersions), for generic
and every container-backed format. Both share the same all-or-nothing batch semantics,
NOT_FOUND/MISMATCHED_REVISION/MISMATCHED_STATUS/NOT_ALLOWED error codes, and SKIPPED
fallback confirmed against the User Guide's own worked examples.

Container-backed formats (maven/npm/pypi/nuget) get a new in-memory status-override store,
since none of their sidecars have a native status concept beyond existing-or-not; generic
already had status/revision on its own record. GetPackageVersionAsset now 404s for
Archived/Disposed versions (assets undownloadable per the User Guide), and
ListPackageVersions correctly surfaces real Archived/Disposed/Unlisted data instead of the
previously-unreachable filtering branch.

Verified end to end against all four real sidecar containers, not just mocks.
2026-10-24 22:14:01 -05:00
Priamo Germosen 64f4f9e489 fix(iam): check a create's tags on its own and its tagging action (#6452)
Under IAM enforcement a request that tags the resource it creates was
checked only for the operation's own action. AWS also checks the
service's tagging action, as the SNS API reference says: "To be able to
tag a topic on creation, you must have the sns:CreateTopic and
sns:TagResource permissions." A caller allowed to create but not to tag
could set at creation the tags that a tag-based policy trusts. The
operation's own action did not see the tags either: aws:RequestTag and
aws:TagKeys were set only for Logs, S3 and EC2 RunInstances, so a
policy allowing sqs:CreateQueue only with aws:RequestTag/team never
matched, and one denying it when aws:RequestTag/team is null refused a
tagged create.

AWS's Service Reference lists the tagging action among each operation's
authorized actions and marks the actions that only tag, but does not say
which request member carries the tags; botocore's models do. A new
generator, tools/aws/regen_iam_tag_on_create.py, joins the two into
src/main/resources/aws/iam-tag-on-create.json: 581 operations over 69
namespaces, those Floci authorizes by operation. An
operation is in it when the reference lists, beside its own, an action
that only tags and adds tags; its tags are read from a top-level member
named Tags, TagList, TagSpecifications or the like that holds a tag list
or map. 569 are read from the table (579 members), CloudWatch Logs
CreateLogGroup is checked by hand as before, and 11 carry no tags this
file can read, each with its reason. A correction gives SQS's Query
name, Tag.N, and one drops an EC2 IPAM pool's allocation rule, which
tags nothing.

When a request carries tags, IamEnforcementFilter checks the tagging
action for each resource's tags apart, with them as aws:RequestTag/<key>
and aws:TagKeys, and, where the action takes it, the operation as its
namespace's CreateAction key (ec2:CreateAction is RunInstances for an
instance launched with tags). A tag specification's tags are checked on
the resource of the type it names, from the ARN the reference gives the
type with its name left open (arn:aws:ec2:<Region>:<account>:instance/*),
which the table carries for EC2 and RDS; other tags on the resources the
operation is checked on. Lambda's CreateFunction is now checked on the
function its body names, which the reference gives it, rather than on *,
so a grant scoped to the function covers both its action and its tags.
The operation's own action is checked with the
same two keys, once for each resource's tags, where the reference lists
them for it or for a resource it acts on (542 of the 569), keeping any a
service's own condition keys set. The table is keyed by operation, so
the filter now carries the operation it resolved beside the action,
which differs for an operation AWS authorizes under another name
(Budgets' CreateBudget is budgets:ModifyBudget).

The tags are read as the Floci handler that applies them reads them, so
the check sees the tags the resource gets. A form's are read under the
SDK's spelling, from 1 to the first number with no key, and under the
further spellings the RDS, DocumentDB, Neptune, ElastiCache and Redshift
handlers read, numbered as each numbers them; EC2's from every tag
specification under either TagSpecification spelling, to the first
naming no resource type. A body's member is read under its own name, and
CloudWatch's PutMetricAlarm and PutCompositeAlarm also under tags, and a
CodeDeploy tag as Key and Value or key and value, each as text whatever
it holds, as its handler reads. The
tagging action is also checked for tags under any other spelling a
handler might read (a name, key or value in any case, any list spelling
and number, an object's structures), so none a handler applies goes
unchecked. The operation's own action is checked with every reading, its
handler's, any other spelling's, and none where its handler reads none,
and refused if any is denied, so a deny on a tag holds and a required tag
counts only where the handler applies it.

make iam-tag-on-create-check, part of aws-data-check, re-derives every
member from the pinned botocore; make iam-tag-on-create-verify, part of
iam-data-verify, checks every operation against AWS, and the IAM data
drift workflow also runs on a change to the table or its generator.

Not checked: sts:TagSession in a role's trust policy, service-specific
request tag keys such as rds:req-tag, EC2 RequestSpotFleet's nested
tags, and the REST services whose routes no rule maps yet.
2026-10-24 22:12:56 -05:00
Vũ Thế Huy 36e244f104 feat: support parameters in Redshift Data API batches (#6475) 2026-10-24 22:59:41 -04:00
Andre Kurait 2525e38179 fix(elbv2): preserve TLS handshakes during certificate reloads (#6473)
* fix(elbv2): preserve TLS handshakes during certificate reloads

Reuse the generation-aware TLS key manager for ELBv2 and publish fully loaded SNI snapshots without replacing the active SSL context. Preserve the previous snapshot on load failure.

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

* fix(elbv2): cover TLS resumption and wildcard selection

Verify TLS 1.2 resumption with unchanged material and fresh authentication after certificate replacement or removal. Separate the wildcard certificate from the default and document the full-handshake boundary.

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

* fix(elbv2): document retained TLS sessions on reload

Exercise stateful and stateless TLS 1.2 resumption with shared client contexts. Document the retained-session certificate boundary while preserving full-handshake refresh behavior.

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

---------

Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
2026-10-24 22:51:13 -04:00
Jackson Price c517e4eb76 fix(autoscaling): tag member instances with aws:autoscaling:groupName (#6471)
* fix(autoscaling): tag member instances with aws:autoscaling:groupName

Auto Scaling adds the aws:autoscaling:groupName tag, valued with the
group's name, to every instance it launches or attaches, and removes it
when the instance is detached. Floci never set it, so filtering EC2
instances on tag:aws:autoscaling:groupName found none of a group's
members.

- Launches add the tag after the launch template's instance tags and the
  group's PropagateAtLaunch tags, so the group's actual name wins over
  any stored tag with that key.
- AttachInstances applies the group's PropagateAtLaunch tags and the
  group-name tag to the instances EC2 holds. It refuses the whole batch
  with ValidationError when an instance already belongs to a group, so
  one group cannot overwrite another group's tag, and an instance named
  twice in one request joins once. An ID EC2 has no instance for still
  joins, as before, but gets no tags, which would otherwise outlive it
  in EC2's DescribeTags.
- DetachInstances removes only the group-name tag, and only where it
  still names that group. It goes through a new service-owned EC2 tag
  delete, because the public DeleteTags refuses aws: keys.

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

* test(compat): cover the Auto Scaling group-name tag through the SDK

Drives launch, attach, a refused second attach and detach with the AWS
SDK for Java and checks the instance tags EC2 reports after each step.

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

---------

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
2026-10-24 22:46:08 -04:00
Andre Kurait 75d7923290 fix(cloudwatch): validate manual state reason lengths (#6470)
Check modeled reason lengths before state mutation, preserving required StateReason validation and both regression groups from current main. Use the Unicode-aware Smithy formatter.

Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
2026-10-24 22:24:06 -04:00
Andre Kurait 3d2e17bbbd fix(elbv2): reject gateway listener protocols (#6465)
* fix: reject explicit protocols on gateway load balancer listeners

Validate gateway listener Protocol before create publication or modify mutation. Preserve omitted-field updates and cover Query rejection and state preservation.

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

* test(elbv2): omit protocol in gateway listener fixture

Keep the successful gateway listener lifecycle fixture aligned with the accepted Protocol prohibition. Assert protocol preservation after an action-only update without introducing a default-protocol contract.

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

* fix(elbv2): preserve gateway listener defaults

Default gateway listener responses to GENEVE and keep omitted protocol and port unset through CloudFormation create and update. Preserve application and network listener defaults. Cover direct Query and stack lifecycle behavior.

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

---------

Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
2026-10-24 22:03:48 -04:00
Andre Kurait 87cd8ead73 fix: require StateReason before changing alarm state (#6466) 2026-10-24 21:56:48 -04:00
Andre Kurait 40b6bfc204 fix(stepfunctions): honor ListExecutions status filters (#6406)
* fix(stepfunctions): honor ListExecutions status filters

Filter by the requested current status, validating filter values and types before listing executions. Serialize the captured matching status, preserve unfiltered behavior, and cover the wire path through the normal SDK suite.

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

* fix(stepfunctions): reject unsupported pending-redrive listings

Reject PENDING_REDRIVE consistently without implying map-run listing support. Exercise execution filters through explicit stop completion instead of polling for asynchronous success.

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

* fix(stepfunctions): use Smithy status filter validation

Reuse the shared enum validation helper and preserve the AWS status ordering in invalid ListExecutions filter errors. Verify exact messages before service access and through boto3.

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

---------

Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
2026-10-24 21:22:55 -04:00
Priamo Germosen 32663a24ad feat(iam): dispatch GetMFADevice, AcquireRole and GetRoleTemplateVersion (#6453)
The last three operations the IAM model publishes and Floci did not dispatch.
All three can only ever answer NoSuchEntity here, and that is the argument for
dispatching them rather than against it: a 404 both their API pages model beats
the UnsupportedOperation 400 an undispatched action answers, which no SDK maps
to anything for these operations.

GetMFADevice reads a FIDO security key. The reference says of its serial number
that "For this API, we only accept FIDO security key ARNs", and nothing in the
IAM API creates such a device: CreateVirtualMFADevice is the only operation that
mints one here and it mints an mfa/ device, so there is never a FIDO key to
find. A virtual device's serial is refused the same way, deliberately, since
answering with it would hand back a device AWS would not return for the same
request. The page models NoSuchEntity and ServiceFailure and nothing else, so
there is no validation answer to prefer over the 404.

Role templates are AWS's own. The user guide has role manager using "AWS-managed
role templates" and a role created from one with iam:AcquireRole and the
template's ARN, and the model agrees from the other side: GetRoleTemplateVersion
is the only operation that names a template and there is no create, list, update
or delete, so nothing a client can call puts a template into an account. Both
operations answer NoSuchEntity naming the ARN they were handed.
RoleTemplateDisabled is the other refusal AcquireRole models and it is not this
one: it reads "the specified role template is disabled", which is a statement
about a template that exists.

That this is a reading, and what would change it, is written into
docs/services/iam.md rather than left in a commit message. The guide publishes
the template ARNs but not their bodies, so a published body would turn those
ARNs into answers and leave the 404 for every other, and RoleManager/Enabled,
role manager's own switch, is a separate question this does not read.

The declared constraints are read before the lookup, as #6402 put them
elsewhere in this package: SerialNumber to serialNumberType's 9 to 256 and its
pattern, UserName to userNameType whenever the request carries the member, a
blank one included, the member being present whatever it holds, TemplateArn to
arnType's 20 to 2048, the two minor versions to being integers, answering
InvalidInput for a value that is not a number, and ReplacementValues to the 30
entries it declares. The ARN check is #6402's, read through one helper now
rather than copied, and the member path validation messages spell is a helper
too.

role-template leaves ResourceArnBuilder.UNRESOLVED_TYPES, which is empty now.
GetRoleTemplateVersion carries the template's ARN, so the type resolves like any
other the request names, in the aws account rather than the caller's.
AcquireRole stays on *, AWS's service reference publishing no action for it.

Eleven tests. Five on GetMFADevice: the FIDO serial reported missing rather
than unsupported, a virtual device refused and still listed afterwards, the
serial's length and pattern as counted violations, a user the account does not
hold reported instead of the device, and a blank UserName read as a value
rather than as absent, which breaks both of userNameType's constraints when it
is empty and its pattern when it is whitespace. Six on the templates: both
operations' 404s, TemplateArn under its length and absent on each, a minor
version that is not a number on each, and 31 replacement values refused where
30 reach the 404. The unresolved-types test lost a guard an empty map would
fail and gained the claim that emptied it.
2026-10-24 20:22:23 -05:00
Priamo Germosen 55b060b891 feat(emr): add an optional timed lifecycle for clusters and steps (#6441)
Three settings, all 0 by default, hold an EMR cluster and its steps in
the states of the Management Guide's cluster lifecycle.
cluster-startup-delay-seconds, declared before but read by nothing,
keeps a new cluster STARTING for its first half and BOOTSTRAPPING for
its second; step-duration-seconds keeps each step RUNNING; and
cluster-termination-delay-seconds keeps a cluster TERMINATING before it
is TERMINATED. A ready cluster is RUNNING while it runs its steps, in
the order they were added and at most its StepConcurrencyLevel at a
time, and WAITING once none is left; a transient one ends after them
without waiting. ModifyCluster starts the steps a higher level makes
room for. TerminateJobFlows cancels every step not yet completed, as
its API reference says, and CancelSteps cancels a RUNNING step from
release emr-5.28.0, which makes room for the next. A waiter or a step
sensor now has something to wait for, and CancelSteps something to
cancel.

A new EmrClusterLifecycle works out when each change falls due from the
settings and the times already recorded. Every call that reads a
cluster first makes the changes due by then, and the service wakes at
each cluster's next change, also after a restart, so the change's
aws.emr event goes out when it happens, read or not; a wakeup sends its
events on a thread of their own, in order, so a slow rule target holds
up no cluster's change. A step's RUNNING now sends the step events
table's event, and a WAITING cluster that runs added steps sends
WAITING again once they are done. Every call that reads a cluster now
holds the service and publishes its events after, as the four that
changed one did, and answers from a copy made while it holds it.

With the settings at 0, a cluster is ready, and its steps complete,
before the call returns, as before; the step RUNNING events and the
second WAITING are the only new events. ModifyInstanceGroups and
ModifyInstanceFleet refuse a cluster that is not RUNNING or WAITING, a
STARTING or BOOTSTRAPPING one included, as their AWS messages say, and
AddJobFlowSteps and ModifyInstanceFleet a TERMINATING one, whose AWS
message names a cluster "shutting down". AddInstanceFleet gives a
TERMINATING one ModifyInstanceFleet's answer too, and AddInstanceGroups
AddJobFlowSteps' ValidationException, since its model declares no
InvalidRequestException; an AddJobFlowSteps with no steps leaves the
cluster as it is.

Part of #6046 (part 4).
2026-10-24 20:22:11 -05:00
Vũ Thế Huy fac6378abd fix(redshift): raise postgres max_connections to 500 (#6421)
* fix(redshift): raise postgres max_connections to 500

The Postgres container behind a Redshift cluster runs with the default max_connections of 100, and each retained session keeps a connection open. Near 100 sessions, Data API calls and JDBC clients on that cluster encounter 'sorry, too many clients already', well before reaching the 500-session limit. Raising max_connections to 500 in RedshiftContainerManager lets the documented 500-session limit apply.

* fix(redshift): raise default proxy max connections to 500

The PostgreSQL backend limit was raised to 500, but the Redshift auth proxy connection semaphore defaulted to 100 via proxy-max-connections. As a result, client connections above 100 were refused by the proxy before reaching PostgreSQL. Raise the default proxy-max-connections to 500 across config, application YAML, and documentation.

* fix(redshift): follow node type for max_connections and raise proxy default to 2000

* fix(redshift): support rg node types, pass serverless from runtime, and update test stubs

- Include rg.* node types for 2,000 max_connections
- Pass 'serverless' node type from RedshiftServerlessRuntime and drop prefix check
- Update start(...) stubs across integration tests with the six-argument signature
2026-10-24 21:09:27 -04:00
TATSUNO “Taz” Yasuhiro acb9fd2cd6 feat(lambdaweb): serve the MultiRegion global domain in the default region (#6460)
* feat(lambdaweb): serve the MultiRegion global domain in the default region

AWS serves the global domain from the region nearest the caller. Floci
now takes floci.default-region for where the caller is. The global domain
is served in that region when the endpoint lists it, and in the home
region otherwise. The environment, logs, metrics, SigV4 and
aws:RequestedRegion then use that region, as on AWS.

* fix(lambdaweb): use the serving region as aws:RequestedRegion for CloudFront

A CloudFront origin request got the home region from the endpoint ARN.
On AWS it is the region that serves the request, for the global domain
and for a regional domain alike.
2026-10-24 21:06:25 -04:00
Andre Kurait f49376f538 fix(cloudwatch): preserve metric alarm state on definition updates (#6464) 2026-10-24 21:02:33 -04:00
Andre Kurait fe9dce4061 fix: reject explicit ports on gateway load balancer listeners (#6462)
Reject explicit gateway listener ports before publication or mutation, preserving listener range validation and omitted-port updates.

Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
2026-10-24 20:57:42 -04:00
Jackson Price fad23ae0b9 fix(route53): fully qualify the default SOA and NS nameservers (#6450) 2026-10-24 20:56:32 -04:00
Jackson PriceandPriamo Germosen 2705818ff1 fix(cloudformation): scope SAM REST auth defaults to each operation (#6358)
* fix(cloudformation): leave root security out of SAM REST auth defaults

AWS::Serverless::Api Auth (DefaultAuthorizer: AWS_IAM, ApiKeyRequired)
gave each operation without security of its own a copy of the
document's root security before adding the defaults. SAM reads only
the operation's own security and leaves the root security as written,
and API Gateway does not apply root-level security. As a result:

- a root requirement naming a SigV4 scheme or an authorizer, beside
  the generated AWS_IAM default, failed the import with "Only one
  Authorizer or IAM authorization is allowed per operation", where SAM
  gives the operation the one AWS_IAM requirement;
- other root requirements, such as an API key scheme, were copied into
  every operation and enforced, where AWS does not enforce them.

The defaults now start from the operation's own security. An Auth
that selects no default, such as ApiKeyRequired: false alone, now
leaves the body as written, as SAM does; it used to copy the root
security into every operation.

The docs also say that floci's REST importer still applies root-level
security to an operation that has none of its own, which API Gateway
does not.

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

* fix(cloudformation): add SAM REST auth defaults inside Fn::If branches

An Fn::If written around a path item or an operation in the
DefinitionBody of an AWS::Serverless::Api kept the Auth defaults from
reaching the operation. A conditional path item was skipped, because
its only key is not a method, and a conditional operation got the
default beside the Fn::If, which the template engine drops when it
keeps the chosen branch. Either way the method was imported with
authorizationType NONE and answered unsigned calls, where SAM adds the
default inside each branch.

The defaults are now added inside each branch, skipping an
AWS::NoValue one, as SAM's get_conditional_contents does. When a
default applies, a nested Fn::If, or one whose value is not a list, is
refused with a ValidationError instead of being left without the
defaults.

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

* fix(cloudformation): refuse SAM REST bodies that would lose the defaults

Some DefinitionBody shapes lost the generated AWS_IAM and api_key
schemes or requirements on their way to the REST importer, which then
imported the methods with authorizationType NONE:

- a securityDefinitions, components or securitySchemes map written as
  an intrinsic function such as Fn::If. The generated schemes were
  written beside the function, and the template engine keeps only its
  result;
- a body with an Fn::If key beside its own keys, which the engine
  replaces with the chosen branch;
- an existing AWS_IAM or api_key scheme with the expected fields and
  an Fn::If key, which the engine replaces with a branch that need not
  be that scheme;
- a body declaring both swagger: "2.0" and an openapi version. The
  transform wrote the schemes into securityDefinitions, which the
  importer, reading the body as OpenAPI 3, ignores.

When a default applies, these are now refused with a ValidationError,
as a path item written as a $ref already is.

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

* test(cloudformation): cover SAM REST root security through the SDK

The SDK suite creates a stack whose AWS::Serverless::Api root security
names its own SigV4 scheme, with DefaultAuthorizer: AWS_IAM, in Swagger
2.0 and OpenAPI 3.0. It checks that the stack deploys, that the
processed template keeps the root security and gives the operation the
one AWS_IAM requirement, and that the method is imported as AWS_IAM
without an API key.

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

* test(cloudformation): pin false Fn::If routes and conditional bodies

An Fn::If around a path item or an operation whose condition is false
resolves to AWS::NoValue. The transform adds no default to that
branch, and the REST importer creates no resource or method for it, so
the API has no such route, as on AWS, while the other routes keep the
AWS_IAM default.

A DefinitionBody written as an Fn::If is refused for any non-empty
Auth, ApiKeyRequired: false included. SAM refuses it too: for every
non-empty Auth, _add_auth checks SwaggerEditor.is_valid, which needs a
literal paths object. The docs now say so.

Neither behavior changes here; the tests keep both in place.

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

* docs(cloudformation): say a SAM REST Auth needs a paths object

The sentence added in the previous commit said any non-empty Auth
needs a literal paths object. The transform, like SAM, accepts any
object there, a paths map written as Fn::If included when no default
is selected. What it refuses is a DefinitionBody without one, such as
a body written as Fn::If.

The previous commit's message also said a false Fn::If around an
operation leaves no route. That holds for get, post and the other HTTP
methods. For x-amazon-apigateway-any-method the REST importer fails
the stack instead, with "expected an Operation object", on main too
and without Auth.

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

* fix(cloudformation): check no-default SAM REST bodies as SAM does

An Auth that selects no default, such as ApiKeyRequired: false alone,
returned once the DefinitionBody had a paths object. SAM checks more
for any non-empty Auth before it applies a default:
SwaggerEditor.is_valid wants a truthy swagger or an openapi version
3.x, and the SwaggerEditor constructor wants every paths entry, and
each branch of an Fn::If around one, to be an object. floci therefore
accepted a body without a version, a paths map written as Fn::If, or
a path item that is not an object, all of which SAM refuses. The
previous commit's message said SAM accepts such a paths map; it does
not.

These are now refused with a ValidationError when no default is
selected too. Nothing else is checked in that case, as in SAM: an
OpenAPI 3.1 body, a $ref path item, a nested Fn::If or a malformed
security requirement is left as written. SamTransformProcessor's
isTruthy helper, which already models SAM's truthiness, becomes
package-private so the check can share it.

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

* fix(cloudformation): leave nested Fn::If operations as SAM does

With a default selected, an Fn::If around an operation whose branch
was itself an Fn::If failed the transform with "Auth does not support
a nested Fn::If in paths". SAM does not fail there. Its
iter_on_all_methods_for_path reads one level of Fn::If around an
operation and skips a method definition without an
x-amazon-apigateway-integration. It therefore leaves the nested
branch as written, adds the defaults only to the plain one, and the
template deploys on AWS.

Such a branch is now left as written, without the defaults, and the
plain branches still get them. A nested Fn::If around a path item is
still refused: SAM fails there too, once it reads the methods of the
inner Fn::If.

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

* test(cloudformation): share the SAM REST stack deploy in one helper

Three SamRestApiAuthIntegrationTest cases each created the stack,
waited for it, read its ApiId output and deleted it in a finally
block. withDeployedApi now does that once: it adds the ApiId output,
deploys the template, hands the API id to the assertions once the
stack is CREATE_COMPLETE, and deletes the stack in its finally. The
assertions are unchanged; a failed deploy now reports the stack's own
status reason in all three cases.

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

* test(cloudformation): keep the failed resource's reason in deploy failures

withDeployedApi reported only the stack's status reason when a stack
did not reach CREATE_COMPLETE. For a resource failure that is the
generic "The following resource(s) failed to create", where two of
its callers used to report the failed resource's own reason, such as
the importer's refusal. The helper now appends that reason when the
stack rolled back, and keeps the stack's reason alone for a transform
failure, which has no failed resource. Only failure messages change.

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

---------

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
Co-authored-by: Priamo Germosen <6233424+pgermosen@users.noreply.github.com>
2026-10-24 20:15:07 -04:00
Isak Lindbeck bc18cbbdaa feat(msk): scheduled reconcile for SCRAM secret changes (#6384)
* feat(msk): scheduled reconcile for SCRAM secret changes

* fix(msk): match AWS error for SCRAM secrets scheduled for deletion

* fix(msk): suppress repeated SCRAM reconciliation warnings

* feat(msk): make SCRAM reconciliation interval configurable

* docs(msk): clarify SCRAM user revocation and restoration

* fix(msk): reconcile clusters independently with threaded workers

* docs(msk): correct the docs after reconcile multi-threading changes

* fix(msk): reuse Secrets Manager scheduled deletion error message

* fix(msk): start SCRAM reconciliation at application startup
2026-10-24 19:49:40 -04:00
Aniket Shukla 381ad1f00b fix(cognito): match custom message trigger event fields (#6445) 2026-10-24 19:17:35 -04:00
Andre Kurait 60ef203fa8 fix(ec2): launch instances into capacity reservation groups (#6404) 2026-10-24 18:45:19 -04:00
TATSUNO “Taz” Yasuhiro ed21e67cd4 feat(dynamodb): export tables in the ION format (#6429)
* feat(dynamodb): export tables in the ION format

* chore(dynamodb): check the ION export file without polling

* chore(dynamodb): share the export file reader in the compatibility test
2026-10-24 18:25:41 -04:00
TATSUNO “Taz” Yasuhiro 72bbc809b4 feat(lambdaweb): serve each region of a PerRegion endpoint in that region (#6423)
* feat(lambdaweb): serve each region of a PerRegion endpoint in that region

A request to the regional domain of another region now runs in an
environment of that region. It gets that region in AWS_REGION and from
the metadata endpoint, and maxEnvironments and rateLimit count per region.
Its .local logs and its metrics go to that region. The centralized logs
and AWS/Lambda/Web also go to the home region, as on AWS. SigV4 and
aws:RequestedRegion use the region of the domain. The regional domains
share one id, as on AWS. The MultiRegion global domain stays in the home
region.

* test(lambdaweb): wait for the logs once and cover the mirror region deny

The Docker test now waits only for the centralized stream, since each
batch reaches the .local group first. The Authorization headers come from
EnforcementFixtures.auth. The RequestedRegion test also denies us-east-1
and checks that the west domain is still allowed.
2026-10-24 18:23:19 -04:00
Andre Kurait 01b388eca9 fix(lambda): reject provisioned concurrency for SnapStart versions (#6433)
* fix(lambda): reject provisioned concurrency for SnapStart versions

Reject provisioned concurrency admission and configured alias retargeting for published SnapStart versions before mutation. Preserve older version snapshots and unconfigured alias behavior.

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

* test(lambda): remove redundant SnapStart SDK fixture

Retain the pool regressions and existing alias retarget SDK coverage as requested in review. Remove the duplicate SDK case and its custom zip construction.

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

---------

Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
2026-10-24 17:54:59 -04:00
Andre Kurait 922e36a472 feat(cloudwatch): support composite alarm lifecycle (#6408) 2026-10-24 17:54:21 -04:00
Jackson Price 9c6d6a0ce8 fix(cloudformation): append AutoPublishCodeSha256 to a SAM function's Description (#6364) 2026-10-24 17:44:13 -04:00
Priamo Germosen b36fd2f0be fix(iam): authorize Budgets operations as ModifyBudget and ViewBudget (#6436)
Under IAM enforcement a Budgets operation other than a budget action was
authorized as its own name, budgets:CreateBudget and the like, which is
no IAM action. A policy granting budgets:ModifyBudget was denied
CreateBudget, and one granting budgets:ViewBudget was denied
DescribeBudgets, while a policy naming the operation, which grants
nothing on AWS, let it through.

AWS's Service Reference authorizes these operations as
budgets:ModifyBudget or budgets:ViewBudget. Beside that action it lists
the aws-portal Billing console permissions and, for CreateBudget, the
tag-on-create budgets:TagResource, so the authorized-action generator
counted two or three actions and left them out. It now counts neither:
the aws-portal actions gate the Billing console, and the Billing and
Cost Management user guide says programmatic requests to AWS Budgets
are not affected by them; a namespace's tagging action beside exactly
one other is the tag-on-create permission. That adds the 15 Budgets
operations and IoT FleetWise BatchCreateVehicle, which Floci does not
serve, to the vendored map.

Not checked: budgets:TagResource when CreateBudget or CreateBudgetAction
carries tags.
2026-10-24 14:58:08 -05:00
Jimmy Liu Jia 4a95c1bb95 feat(ec2): support DHCP options lifecycle (#6428)
* feat(ec2): support DHCP options lifecycle

* fix(ec2): validate DHCP options lifecycle edge cases

* fix(ec2): reuse region-aware private DNS domain for DHCP defaults

* fix(ec2): isolate DHCP options review regressions
2026-10-24 15:39:22 -04:00
Matheus Oliveira 781a68b6cb fix(s3): store object key segments past the file-name limit (#6438)
A disk-backed storage mode lays an object body out as the bucket
directory, the key, and a data suffix, so a single key segment longer
than the 255-byte file-name limit made every write of the object fail
with FileSystemException, where AWS takes keys up to 1024 bytes and
memory mode always did.

A segment that fits its byte budget is stored as written, so every path
an earlier Floci could create is still found. A longer one, and a segment
shaped like an encoded one so a crafted short key cannot land on it,
becomes a readable prefix, a separator, and the SHA-256 of the whole
segment: deterministic, so a key always resolves to one file, and
injective, so two keys never share one. The object index keeps the key,
so listing answers with the key the client used.

The temporary file a write stages beside its target no longer derives
from the target's name either: at the limit that name ran 41 bytes past
it. A constant-length name does not.

Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>
2026-10-24 15:03:52 -04:00
Matheus Oliveira 8d25cd91a6 fix(cloudfront): honor the origin completion and keep-alive timeouts (#6198) 2026-10-24 14:17:34 -04:00
Aniket Shukla c5ab54d49c fix(cognito): omit absent authentication message metadata (#6440) 2026-10-24 14:10:26 -04:00
Aniket Shukla 9e12547978 fix(eventbridge): default and validate ECS target settings (#6420)
* fix(eventbridge): default and validate ECS target settings

Apply ECS target defaults when storing PutTargets and reject invalid task counts or malformed role and dead-letter ARN shapes before storing the batch. Add SDK read-back and wire-error regressions.

Closes #6188

* fix(eventbridge): validate target ARN components

Reject incomplete IAM role and SQS dead-letter ARN shapes before storing PutTargets batches. Preserve partition support and existing model length errors, with regression controls for all published partitions and IAM role paths.

* fix(core): share IAM role and SQS queue shape checks

Use shared resource-shape helpers from EventBridge, Step Functions, Lake Formation, AppSync, and S3 while preserving caller-specific errors and account/partition rules. Apply the existing SQS 80-character name limit to EventBridge dead-letter targets.
2026-10-24 14:08:08 -04:00
Renald Dubus 5116b3c578 feat(kms): add GenerateDataKeyPair and GenerateDataKeyPairWithoutPlaintext (#6359) 2026-10-24 14:01:40 -04:00
Jimmy Liu Jia be7b0ed62b fix(s3): expose bucket policy status (#6397)
* fix(s3): expose bucket policy status

* fix(s3): align bucket policy status response

* test(s3): verify policy status through SDK and IAM

* refactor(s3): reuse bucket policy lookup for status
2026-10-24 13:49:10 -04:00
Aniket Shukla fb08a5ca55 fix(glue): default missing required column statistics counts (#6366)
Extend the shared read-time defaults to long, double, decimal, date, and boolean statistics so primitive-count readers receive zeros. Preserve supplied values, optional bounds, and stored records.
2026-10-24 11:44:26 -04:00
Priamo Germosen 62c202f073 fix(iam): read declared constraints before the lookup they precede (#6402)
The validation AWS runs ahead of an operation never reaches its store, so a
request that breaks a declared constraint is refused whether or not the thing it
names exists. Four places here had the order the other way round, and each one
answered a 404 for a request AWS answers with a 400.

The three Access Advisor and Organizations report readers looked the job up
before reading JobId, MaxItems and Marker, so an unknown job carrying a
MaxItems of 0 answered NoSuchEntity, and a JobId of the wrong length was never
held to its shape at all. jobIDType is min 36 and max 36, and the fixed length
reports as one constraint, "Member must have length equal to 36", which is the
form lifecycleActionToken already uses for the same shape in Auto Scaling. The
MaxItems check moves out of paginate so a reader can run it early, and paginate
still runs it, being reached from readers that look nothing up.

GenerateServiceLastAccessedDetails had the same order on its Granularity enum,
reading it inside the generate that sits behind the ARN resolution, so a
granularity AWS refuses answered NoSuchEntity for an ARN that named nothing.
The check is its own method now and the handler runs it first.

PolicySourceArn is arnType, min 20, and the simulators resolved the entity out
of whatever followed the last slash, so ":user/bob" simulated against a user
named bob. A value too short to be any ARN is now the length ValidationError
IAM answers for a short ARN member. A value that clears 20 characters and still
parses as no ARN is left alone: the member publishes no pattern, and no source
records what AWS answers for one.

The service-specific credential id reported both of its length bounds in one
violation, so a short id was told about a 128-character ceiling it was nowhere
near. Each message names the one bound the value broke, which is how every
recorded IAM length violation reads: "Member must have length less than or
equal to 64" for a user name over 64, and "Member must have length greater than
or equal to 20" for an ARN under 20.

Seven tests. Four over the wire on the readers: a JobId of the wrong length
refused before any lookup on both the last-accessed reader and the entities
reader, the same on the Organizations reader with no organization built at all,
and an unknown job carrying a bad MaxItems, a bad Marker and then nothing wrong,
which pins the 400s and the surviving 404. One on the generator, where the
granularity is refused for an ARN that names nothing. One on both simulators for
a PolicySourceArn under 20. And the credential id's two bounds, each asserting
the other bound is absent from the message, with the credential itself still
listed once the refusals are done: a validation error that deleted something on
its way out would read the same from the response alone.
2026-10-24 08:38:33 -05:00