Commit Graph
1727 Commits
Author SHA1 Message Date
Jackson Price fee688bd05 feat(cloudformation): support four AWS::AppConfig resource types (#6791) 2026-10-29 12:59:23 -04:00
Vũ Thế Huy 1a871392b7 feat(redshift): support pausing and resuming provisioned clusters (#6911)
* feat(redshift): support pausing and resuming provisioned clusters

* docs(redshift): sync supported operation count

* fix(redshift): harden pause and resume failure recovery

* fix(redshift): skip unchanged idle integration writes

* fix: consolidate Redshift pause and resume state persistence
2026-10-29 12:55:50 -04:00
Priamo Germosen 078931597e fix(iam): check five more services on the resources their requests name (#6927)
Under IAM enforcement, Budgets, Cost and Usage Reports, Service Quotas,
Textract and Translate requests were checked on `*`, so a grant scoped
to a budget, a report definition, a quota, an adapter or a terminology
was refused, and a deny scoped to one never applied.

The generated table of the resources requests name now reads them, 103
operations, from AWS's Service Reference and botocore as it reads the
first three batches: their namespaces move from the generator's
NOT_COVERED to NAMESPACES and the table is regenerated, nothing in it
edited by hand; 717 operations over 17 namespaces. Each resource
type's ARN format is the one Floci mints or reads: `budget/<name>` with
no Region (Budgets' tag handler parses it), `definition/<name>`, and
`<service code>/<quota code>` (Service Quotas' QuotaArn).

Three corrections, each with its reason: CreateBudget and UpdateBudget
name their budget by Budget.BudgetName and NewBudget.BudgetName, and
PutReportDefinition its report by ReportDefinition.ReportName, inside a
structure the rule does not read. Without them UpdateBudget and
PutReportDefinition were checked only on their BillingViewArn, a
billing view's ARN by botocore's pattern, so a caller allowed on one
budget or report could give its ARN there and name another.

Verified Permissions minted a policy store's ARN with a Region, where
AWS gives none: its CreatePolicyStore example answers
arn:aws:verifiedpermissions::123456789012:policy-store/PSEXAMPLEabcdefg111111,
the Service Reference's format alike. It now mints it without one, in
the Region's partition.

Not read yet, each with its reason in NOT_COVERED: Verified
Permissions, whose policyStoreId may name a store by its alias, which
AWS authorizes as the action on the store the alias points to and
GetPolicyStoreAlias on the alias, and whose aliasName carries the
`policy-store-alias/` its format already gives; Auto Scaling, whose
group and launch configuration ARNs Floci mints without AWS's id
(`autoScalingGroup:<name>` for
`autoScalingGroup:<id>:autoScalingGroupName/<name>`), which ECS reads
back; SWF, whose domain format the Service Reference gives no Region
while the SWF Developer Guide gives one; and CloudHSM, whose formats
end in names while its requests give ids.
2026-10-29 07:54:58 -05:00
Priamo Germosen 34269655ba feat(sts): read every modelled operation's constraints from the model (#6925)
The seven operations that still answered an absent member from a check of
their own are read against the vendored shapes now, which leaves every STS
operation that models a member reading its constraints from the model:
`AssumeRole`, `AssumeRoleWithSAML`, `AssumeRoleWithWebIdentity`, `AssumeRoot`,
`DecodeAuthorizationMessage`, `GetDelegatedAccessToken` and
`GetFederationToken`. `GetCallerIdentity` carries no member, so there is
nothing to read for it.

Two answers move, both onto the form the model and the rest of this package
give. A member the request leaves out is named as a constraint message spells
it, `roleSessionName` rather than `RoleSessionName`, and every absent member
is reported together in the order the model lists them, where the check it
replaces answered the first it found. A member sent empty is a value the
request carries, so it breaks its own minimum length rather than reading as
absent. That is the reading #6811 settled for the two services and what
`validateRequired` was the last of in this handler.

What the seven gain is every bound beside the required members, none of which
was read at all: `RoleArn` at 20 to 2048 characters, `RoleSessionName` at 2 to
64, `ExternalId`, `SourceIdentity`, `SerialNumber`, `TokenCode`, `Policy`,
`PolicyArns`, `Tags`, `TransitiveTagKeys` and `ProvidedContexts` on
`AssumeRole`, `SAMLAssertion` at 4 to 100000, `WebIdentityToken` at 4 to
20000, `ProviderId` at 4 to 2048, `Name` at 2 to 32, `EncodedMessage` at 1 to
10240, and the `DurationSeconds` and `MinimumSessionTokenSize` ranges each
operation declares. `AssumeRoot`'s own length check on `TargetPrincipal` said
what the model says, so it comes off with the rest.

One reading is this emulator's own, and `docs/services/sts.md` says so.
`TradeInToken` is required and declares no length, so a request sending it
empty carries a value: it reaches the lookup and is answered
`ExpiredTradeInTokenException`, the refusal any token that cannot be redeemed
gets, where the check it replaces called it absent. Nothing published says
what AWS answers an empty trade-in token.

Each operation keeps the refusals it answers ahead of the constraints:
`GetFederationToken` and `GetSessionToken` turn away session credentials
first, and `AssumeRoot` refuses the global endpoint first.

Three test fixtures carried values AWS refuses and now carry values it takes.
A `RoleSessionName` of `s` is one character where the model declares two, and
a `WebIdentityToken` of `jwt` three where it declares four, so the fixtures
that sent them are a character longer, as are the two assertions that read a
session name back out of an assumed-role ARN and a condition key.

The name the shared role-session fixture opens under has one writer now,
`EnforcementFixtures.SESSION_NAME`, read by every test asserting on that session
rather than spelled again in each: an `aws:userid` condition, a `PrincipalArn`
condition, two authorization-denial messages and the ARN two trust-policy cases
read back. Each of those carried the one-character name, which is a 403 where
the case wants a 200, or a prefix match that no longer pins the whole ARN.
2026-10-29 07:54:47 -05:00
Priamo Germosen c9bc1e7cb8 feat(emr): have the JVMs in EMR containers trust Floci's CA (#6926)
With TLS on, every container Floci launches gets the CA bundle and the
SSL_CERT_FILE family of variables, but the JVM reads none of them. So
in the docker runner mode a Spark job's own SDK clients that ignore
AWS_ENDPOINT_URL, the AWS SDK for Java 1.x's or an older 2.x's,
failed with "PKIX path building failed" against Floci's HTTPS, even
with FLOCI_DNS_SPOOF_AWS_ENDPOINTS sending AWS's endpoint names to
Floci. A job could only reach Floci over its HTTP endpoint.

Floci now also writes the bundle's certificates as a PKCS12 trust
store at boot, floci-ca-bundle.p12 beside the bundle. A launcher whose
workload is Java can copy it into a container before the container
starts (ContainerLifecycleManager.copyJavaTrustStore) and point the
container's JVMs at it through JAVA_TOOL_OPTIONS, with a shell line
that does so only when the file is there. The store has no password
and the line gives only its path, so a trust store a job or an image
names itself replaces Floci's, with that store's own type and
password. EMR Serverless job runs and EMR steps copy it into the
driver's container ahead of spark-submit or the step's command, and
the bootstrap actions' container gets it for its actions, then drops
it before the image is kept. Other services' containers are unchanged.

JAVA_TOOL_OPTIONS rather than spark.driver.extraJavaOptions, since
setting that key would replace what the image's spark-defaults.conf
gives it, and a job's own value would drop Floci's. Each JVM prints
"Picked up JAVA_TOOL_OPTIONS: ..." on its standard error, as the docs
now say.
2026-10-29 07:50:46 -05:00
TATSUNO “Taz” Yasuhiro c4ae11c414 feat(cloudformation): expose RegionalEndpoints of a web function endpoint to Fn::GetAtt (#6907) 2026-10-29 08:25:24 -04:00
Mohith 5f89a70095 perf(dynamodb): retain the live item map in memory mode instead of copying the table (#6915)
Keep memory item storage current by retaining the concurrent live map. Preserve snapshots for durable backends and cover writes, reloads, restore, and account-scoped storage.

Refs #1292
2026-10-29 08:07:42 -04:00
Jimmy Liu Jia 479595e6ec fix(lambda): preserve code signing ARN partition (#6913) 2026-10-29 08:02:41 -04:00
Aniket Shukla e24bc36f64 feat(ecr): support account settings (#6855)
* feat(ecr): support account settings

* fix(ecr): validate account settings against request model
2026-10-29 07:36:05 -04:00
Priamo Germosen 66a5c05037 feat(emr-serverless): retry a failed job run as its retry policy allows (#6894)
In the docker runner mode a job run's retryPolicy was stored and
returned, but a run whose driver failed was never tried again: every
run was its one attempt. Now, on release 7.1.0 or later, "EMR
Serverless releases 7.1.0 and higher include support for job
resiliency", a run whose driver fails is tried again as the user
guide's "Job resiliency" gives it:

- a BATCH run until it has made maxAttempts attempts, "The default is
  1, which means to not rerun the job";
- a STREAMING run, which "EMR Serverless indefinitely retries", until
  it has failed maxFailedAttemptsPerHour times within an hour, "The
  default is five".

The failed attempt ends FAILED with its stateDetails, and the next is
SCHEDULED again and runs its driver from the beginning, "its own set
of logs" under attempts/<n>/ in S3 and CloudWatch Logs. A cancelled
run, one past its timeout ("Cancelling: ... or the job run has timed
out"), one Floci's own shutdown stopped and one whose application is
gone are not tried again; a retry is admitted while its application
cannot be deleted, as the first attempt is.
GetJobRun without attempt returns "the latest attempt", and with one
an earlier attempt as it ended; ListJobRunAttempts lists them all,
oldest first, each with its own createdAt and updatedAt. No source says
whether a run's timeout spans its attempts; Floci applies it to each.
Floci sends no EMR Serverless events, so the job run retry event is
not sent.

StartJobRun holds retryPolicy to "Accepted values are 1 to 10,
inclusive" for both members: outside that range is a
ValidationException in the model's constraint form, and a member that
is not an integer a SerializationException, as Smithy's restJson1
malformed-request tests have it.
2026-10-29 00:34:34 -05:00
Priamo Germosen c9c1c0990b feat(sts): read a Query request's declared constraints from the model (#6891)
`GetAccessKeyInfo`, `GetSessionToken` and `GetWebIdentityToken` are held to
the constraints botocore's STS model declares, which
`tools/aws/regen_sts_shapes.py` vendors into `aws/sts-request-shapes.json`
and `StsRequestShapes` reads through the same `QueryConstraintCheck` walk
IAM reads its own file with. The two services share the protocol, the
message wording and the generator, so what is new is which operations are
read rather than how.

What it adds is on `GetSessionToken`: `SerialNumber`, `TokenCode` and
`MinimumSessionTokenSize` are declared and nothing read them, so a serial
number under 9 characters, a token code that is not six digits and a size
past 4096 answer `ValidationError` where they answered credentials. The size
is still only validated, the token staying the length this emulator mints.

`GetAccessKeyInfo` and `GetWebIdentityToken` keep the messages they already
answered, from the same bounds and the same patterns, and about 130 lines
of hand-written audience, tag and access-key checks come out. One answer moves:
a value breaking two constraints is answered for both, where the if-else
chain stopped at the first. That is the reading #6402 settled and #6580
already took for an empty role name.

`jwtAlgorithmType` publishes a fixed length of 5 and no enum, the two values
coming from the reference, so the walk takes a documented constraint keyed
by member name and reports it in that member's place, which keeps a
collected message in the model's order. It is reported only for a member the
request carries that breaks nothing the model declares, which is the
exclusivity the hand-written helper had.

A value that is no number at all stays `InvalidParameterValue`, answered
before the constraints, since the model declares a range and says nothing
about what counts as a number; a digit string is a number of any width, so a
`DurationSeconds` of `99999999999` breaks the maximum rather than being
called no integer, as #6625 settled for an oversized `MaxItems`. Each
operation asks for its violations where its own check ran rather than ahead
of the switch, because `GetSessionToken` refuses session credentials before
it reads anything.

The whitespace around a number comes off wherever this handler reads one. The
check takes a padded value and holds it to its range, so the read behind it
parses the same text: parsing the value as the request spelled it threw there
and fell back to the default, so a ` 3600 ` asking for an hour would have been
handed the twelve hours `GetSessionToken` defaults to, or the five minutes a
web identity token defaults to. IAM reads its own `MaxItems` that way already.

The generator is not new code. `request_shapes.main` already drives the five
generators that vendor member types, so it takes an `operations` argument
now and both Query-protocol generators hand it their model, output and
operations the same two-line way, which takes the hand-rolled driver out of
`regen_iam_shapes.py` as well. ECR and Resource Groups still carry theirs
and are a refactor of their own.

The generator contract tests move with it: that a vendored file carries
exactly the operations its generator lists and resolves every shape it names
is one parametrized test over all four constraints generators rather than a
copy per generator, and `build_constraints`'s own properties are tested
once, where the shared module already tested them. The model transform the
driver takes is driven through it as well, the file it writes carrying what
the transform left and the staleness check calling that file current only
when it prepares the model the same way, and IAM's own tests read the
vendored file for each paged request reduced.

Three sentences this handler wrote out by hand go the same way. The two
range refusals and the length refusal on `TargetPrincipal` come from
`SmithyValidationErrors`, which already wrote them word for word, and the
"Must be an integer." refusal has one writer and three callers. The length
comparison counts code points rather than UTF-16 units as a result, which is
the reading the rest of the package uses.
2026-10-29 00:34:23 -05:00
TATSUNO “Taz” Yasuhiro 385ffcfdd0 feat(lambdaweb): set the WebFunctionAuthType condition keys on endpoint routes (#6893) 2026-10-29 00:54:49 -04:00
Allen Sanborn d68876edcc fix(ec2): ignore ports when revoking an all-traffic rule (#6895)
* fix(ec2): ignore ports when revoking an all-traffic rule

Revoking an "all traffic" (-1) rule compared ports literally. Terraform's
aws_security_group revokes AWS's default egress rule as -1 with FromPort=0
and ToPort=0, which never matched the stored rule (it has no ports), so
every new group kept allowing all egress and the next plan wanted to
remove it again. AWS ignores ports for -1.

Protocols are now compared after the same normalization the security-group
evaluation uses, so a revoke naming protocol 6 also matches a tcp rule, as
on AWS.

* test(ec2): name the all-traffic revoke test a service test

* test(ec2): move the all-traffic revoke tests into Ec2ServiceTest

Use Ec2ServiceTest's existing mockModeService() instead of a copied
mock-mode harness, as requested in review.
2026-10-29 00:32:59 -04:00
Matheus Oliveira 1356cbbc84 fix(core): bind the DB proxies and EC2 port forwards with a 4096 backlog (#6744) 2026-10-29 00:20:54 -04:00
lex00 5a84d08383 fix(iam): read iam:PermissionsBoundary from the stored role or user an action names (#6897)
On the 15 actions where the Service Reference lists iam:PermissionsBoundary and the request carries no boundary, such as AttachRolePolicy, PutUserPolicy and GetRole, the key is the boundary stored on the role or user named by RoleName or UserName. The generator writes these pairs to a fromTarget section, and IamConditionContextResolver looks the boundary up through IamService. A role or user without one carries no value for the key.
2026-10-29 00:07:50 -04:00
Matheus Oliveira 9ce1b1755e fix(ecr): delete only the named tag in BatchDeleteImage (#6597) 2026-10-29 00:06:36 -04:00
Vũ Thế Huy da8e22744b feat(redshift-data): implement ListSessions (#6892) 2026-10-28 23:49:07 -04:00
Jimmy Liu Jia 5ffe6d1123 fix(lambda): attach code signing configs to functions (#6857)
* feat(lambda): attach code signing configs to functions

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

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

* fix(lambda): align code-signing attachment response paths
2026-10-28 23:00:50 -04:00
Priamo Germosen 407ac4e210 fix(iam): check CodeBuild and Kinesis Data Analytics on the resources their requests name (#6884)
Under IAM enforcement, CodeBuild and Kinesis Data Analytics (Amazon
Managed Service for Apache Flink) requests were checked on `*`, so a
grant scoped to a project, a report group or an application was
refused, and a deny scoped to one never applied.

The generated table of the resources requests name now reads them, 92
operations, from AWS's Service Reference and botocore as it reads the
first two batches: their namespaces move from the generator's
NOT_COVERED to NAMESPACES and the table is regenerated, nothing in it
edited by hand; 614 operations over 12 namespaces. Each resource type's
ARN format is the one Floci's handler mints, which the tests check
against the ARN each create returns: `project/<name>`,
`report-group/<name>`, `build/<project>:<number>` and
`application/<name>`.

Kinesis Data Analytics v1, the KinesisAnalytics_20150814 target of SQL
applications, is not read: Floci serves v2 only, and v1's operations
share v2's names with other members. It joins EventBridge V2 in the
generator's CLIENTS_NOT_READ, with its reason.

CodeBuild authorizes a build on its project: the CodeBuild User
Guide's permissions reference gives BatchGetBuilds, StopBuild,
RetryBuild and BatchDeleteBuilds the resource project/project-name.
Their requests name builds by id, which is `<project>:<id>` (its
CODEBUILD_BUILD_ID example is codebuild-demo-project:b1e6661e-...), so
four corrections read the project from the id up to its `:`. For them
the table may read a member filling a variable up to a character
`before`, as it already read an ARN member, in the generator, the
loader and the reader. Without them a policy granting StartBuild and
BatchGetBuilds on a project, as a pipeline's CodeBuild action role
has, allowed starting a build and refused watching it.

A list filling a type's one variable may mix names and ARNs: CodeBuild's
BatchGetProjects takes either for each of `names`. Each value that is
an ARN of the type now names that resource and the others are read as
names, where the reader took ARNs as given only when every value was
one, and otherwise put an ARN inside the name's format, refusing a
caller granted both projects.

Not in this change: a build batch, whose id the documents give no
format for and which Floci does not serve, and a report, named by a
report ARN where AWS checks its report group, stay on `*`.
2026-10-28 21:59:51 -05:00
Priamo Germosen 591d5f533b feat(emr): run a cluster's bootstrap actions in the docker runner mode (#6878)
In the docker runner mode a cluster's BootstrapActions were stored and
listed but never run, so a step that needed what they install, such as
a Python library a PySpark step imports, failed where on AWS it would
run. Now a cluster with bootstrap actions is BOOTSTRAPPING while they
run, one after the other, in one container of the release's EMR
Serverless image, and that container is then kept as the image the
cluster's steps run in.

- Each action's script is read from Floci's S3 (s3n:// and s3a:// name
  the same bucket) and runs with its Args in /home/hadoop through
  docker exec, with the credentials of the cluster's instance profile
  in that exec's environment alone, so they never become part of the
  image.
- "Bootstrap actions execute as the Hadoop user by default. You can
  execute a bootstrap action with root privileges by using sudo", but
  the image has no sudo: an action runs as root, with a sudo that runs
  its command as it is, and what it leaves in /home/hadoop is the
  hadoop user's. The kept image runs as the user of the image the
  container ran, as the steps do, and the steps get it by its id, which
  runs as it is whatever image-registry-base Floci pulls images from.
- An action that exits with another code than 0 ends the cluster
  TERMINATED_WITH_ERRORS, with BOOTSTRAP_FAILURE and "On the master
  instance (<instance-id>), bootstrap action <n> returned a non-zero
  return code", as a real cluster gave it
  (hashicorp/terraform-provider-aws#4378) and the Management Guide
  quotes it. A script that cannot be read ends it the same way, in
  Floci's words; a bootstrap that cannot run, or that a restart cut
  short, with INTERNAL_ERROR. TerminateJobFlows stops it at once.
- With a LogUri, each action's stdout.gz and stderr.gz go under
  <LogUri>/<cluster-id>/node/<instance-id>/bootstrap-actions/<n>/, the
  instance the master as ListInstances gives it. An action's output
  goes to Floci's log line by line as it runs, and to those files
  gzipped as it arrives, through a file on disk, so however much it
  writes, Floci keeps no more than a line of it in memory.
- The image goes once the cluster has ended and its last step is done,
  and the cluster names it until it is gone, so a removal Docker
  refuses is tried again the next time the cluster is read; a reset
  removes them all, and the startup sweep, before any restarted cluster
  can move on, the ones of clusters that are gone or have ended.

ContainerExec gets an overload that sets an environment for one
command alone. What the bootstrap has in common with the Spark runner
and the rest of Floci is shared rather than copied:

- core.common.docker.ContainerLaunches: the runs in progress and their
  containers, which a stop, a reset or a shutdown removes; both EMR
  runners keep theirs in it.
- ContainerLifecycleManager.commit and removeImage.
- ContainerLogStreamer.consoleLines, a stream that logs each line as it
  arrives through the line logger its attach methods now share.
- S3Uri.isS3 and parseAnyScheme, which read s3n:// and s3a:// as s3://.
- EmrServerlessSparkRunner.putLogs, the runner's S3 log writing, which
  now reads each file from a stream.
2026-10-28 21:59:40 -05:00
Allen Sanborn 8ececd84b4 fix(ec2): keep the tags CreateFlowLogs is given (#6890)
* fix(ec2): keep the tags CreateFlowLogs is given

CreateFlowLogs dropped its vpc-flow-log TagSpecification, and
DescribeFlowLogs had no tagSet, so Terraform's aws_flow_log tags never
read back and every plan after apply wanted to add them again. The tags
are now stored with the flow log and returned.

* test(ec2): read a flow log's tags back through the AWS SDK
2026-10-28 22:58:24 -04:00
Vũ Thế Huy c0d1767ec0 feat(redshift): send zero-ETL integration events to EventBridge (#6822) 2026-10-28 22:41:04 -04:00
TATSUNO “Taz” Yasuhiro a682400d45 fix(lambdaweb): check the endpoint quota after the revisions an endpoint routes to (#6888)
Lambda refuses a missing or Failed revision, a Failed latest revision and
a connector revision on a PerRegion or MultiRegion endpoint before it
refuses an endpoint past the maxEndpointsPerFunction quota.
2026-10-28 22:35:14 -04:00
Allen Sanborn 043664471b fix(apigateway): default a REST custom domain to EDGE when no endpoint type is given (#6885)
* fix(apigateway): default a REST custom domain to EDGE when no endpoint type is given

* docs(apigateway): state the CreateDomainName endpoint type default; cite its source

* test(apigateway): seed the legacy base path mapping test with a REGIONAL domain

The test reads its mappings through the v2 API, which refuses EDGE domains,
and a domain created with no endpoint type now defaults to EDGE.
2026-10-28 22:08:18 -04:00
Kenshin Okinaka 4dbe3731a9 feat(ses): add SES v2 ListRecommendations (#6817) 2026-10-28 21:55:19 -04:00
Allen Sanborn 0e87e6f1de fix(ec2): let a systemd guest's init start sshd (#6882)
Floci started /usr/sbin/sshd itself in every guest, including systemd ones
whose image starts sshd from its own unit at boot. The two raced for port
22: if Floci's won, ssh.service failed, and the stray daemon outside systemd
kept the port, so a later `systemctl restart ssh` (to apply an
sshd_config change, as user data commonly does) failed too. On EC2 the AMI's
init alone starts sshd; systemd guests now work the same way.
2026-10-28 21:11:09 -04:00
TATSUNO “Taz” Yasuhiro 177f8e9360 fix(lambdaweb): accept a policy Action of "*" or any case of lambda (#6883)
Lambda takes "*" or "<service>:<action>" with a service of letters,
digits, dots and dashes. Each action names lambda in any case, unless the
list also holds "*", which lets actions of other services through.
2026-10-28 21:07:10 -04:00
Allen Sanborn 3f36c4e99e fix(ec2): record EbsOptimized from RunInstances (#6875)
* fix(ec2): record EbsOptimized from RunInstances

RunInstances dropped EbsOptimized, so an aws_instance with
ebs_optimized = true read back false and Terraform replaced it on every
plan. The request's value, else the launch template's, is now recorded on
each launched instance.

It is applied after the launch on the RunInstances API path only;
instances launched by CloudFormation, Auto Scaling or Fleet still report
false (documented).

* test(ec2): clean up the launch template and each instance if a launch fails

The launch-template case launched both instances before its cleanup scope
opened, so a failed launch leaked the template and, on the second launch,
the first instance.
2026-10-28 21:05:31 -04:00
Vũ Thế Huy e820414f22 feat(redshift-serverless): execute scheduled actions on cron and at schedules (#6851) 2026-10-28 21:05:15 -04:00
Priamo Germosen 6606657434 fix(iam): name the member without the offending value in a validation error (#6811)
IAM's constraint violations read `Value at 'roleName' failed to satisfy
constraint: Member must have length greater than or equal to 1`, with no
value beside the member, which is where the recorded messages point: the two
IAM messages in LocalStack's AWS-validated snapshot from 2025-03-06, a 2026
capture of a `UserName` over 64 characters, and the messages the Identity
Center guide lists as the ones that commonly appear in CloudTrail events.
The two captures that carry the value are from 2019 and 2024, so they read
as stale rather than as wrong when written. STS keeps the value, which its
own 2024 capture carries and which is the same split this package already
records for pattern and enum messages.

It is a reading rather than a published rule, so `docs/services/iam.md` says
so and names the captures behind it. A direct capture that shows IAM
carrying the value again moves it back in one edit.

The form is chosen in one place. `SmithyValidationErrors.Violations` writes
each sentence once and carries both forms; the statics stay the quoting one,
so every other service answers exactly what it answered before.
`IamValidationErrors` names IAM's side of the split for the handler, the
service and the service-last-accessed check, and the shared Query walk is
loaded with the form of the service reading it, IAM without the value and
STS with it.

Two messages are left alone, neither being this question: a list checked as
a whole carries the list as its value, which is what AWS does elsewhere, and
a required member the request leaves out keeps `Value null at '<member>'`,
which no capture covers in either form.

Two checks built the message by hand rather than through a helper and so are
swept here too: `GenerateOrganizationsAccessReport` and the delegation
request operations each composed the quoted value inline, which is why
neither shows up in a search for the literal form. Their entity path and
request id now assert the whole message rather than only the error code,
since asserting the code alone is what let that drift sit unnoticed.

The vendored shapes file carries 52 operations now rather than 13, so the
members the paging wave opted in answer in the shorter form as well, and the
table sweep over every paged operation asserts it that way.
2026-10-28 19:51:54 -05:00
TATSUNO “Taz” Yasuhiro 9217533e76 fix(lambdaweb): give the container the memory the process sees on AWS (#6869) 2026-10-28 20:15:38 -04:00
Matheus Oliveira 347e8f63a9 fix(opensearch): scope domains to the request's region (#6682)
* fix(opensearch): scope domains to the request's region

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

Closes #6081

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

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

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

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

---------

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

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

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

Corrections, each with its reason:

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

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

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

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

RequestResourceMembersTest's test of every resource in the table now
expects, with the resource a request names, the resources of its
operation that every request names: Cloud Map's CreateService names
the service it creates with every variable open.
2026-10-28 17:18:11 -05:00
berce 6abd9d7ffb fix(sqs): reject DelaySeconds outside 0-900 (#6852)
* fix(sqs): reject DelaySeconds outside 0-900

* fix(sqs): don't let a json DelaySeconds outside the int range wrap around

* docs(sqs): document the DelaySeconds range
2026-10-28 16:57:56 -04:00
lex00 52eb4b9a9c fix(iam): read condition keys a request carries in a member under another name (#6858)
BY_HAND in tools/aws/regen_iam_condition_keys.py names the member for four pairs: iam:ServiceSpecificCredentialServiceName from ServiceName and iam:ServiceSpecificCredentialAgeDays from CredentialAgeDays on CreateServiceSpecificCredential, and iam:DelegationDuration from SessionDuration and iam:TemplateArn from Permissions.PolicyTemplateArn on CreateDelegationRequest. --check fails when a BY_HAND member leaves botocore, its type no longer fits the key, or the reference stops listing the pair. The other notRead pairs now say where AWS takes the value from.
2026-10-28 16:42:22 -04:00
Allen Sanborn 3212ce3c15 fix(iam): page ListUsers, ListGroups and policy lists with MaxItems and Marker (#6267)
* fix(iam): page ListUsers, ListGroups and policy lists with MaxItems and Marker

ListUsers, ListGroups, ListAttached{User,Group,Role}Policies and
List{User,Group,Role}Policies read neither MaxItems nor Marker and always
answered IsTruncated=false with every entry. They now go through the same
paginate helper ListRoles and ListPolicies use: an omitted MaxItems returns
100 items as the API reference documents, a MaxItems outside 1 to 1000 is a
ValidationError, a Marker the handler did not issue is InvalidInput, and a
Marker appears only on a truncated page.

Users, groups and inline policy names are listed in name order and attached
policies in ARN order, so a Marker keeps pointing at the same place between
calls even when the entry it names is removed in between.

* fix(iam): resume the newly paged IAM lists only from their own markers

ListUsers, ListGroups and the attached and inline policy lists read a
Marker they could not verify as a list offset, so Marker=1 silently
skipped the first entry, and a marker issued for one role's list resumed
another role's list after the same policy. These lists have only ever
issued signed markers, so their cursor now carries the action and, for a
per-principal list, the principal, and any other marker is InvalidInput.
ListRoles, ListPolicies and the other readers keep their existing marker
handling.

Also covers the omitted-MaxItems default on ListUsers and ListGroups with
101 entries: 100 on the first page, IsTruncated and a Marker that fetches
the last one.

* fix(iam): bind the newly paged IAM lists' markers to the request account

IAM entities are stored per account, but the marker cursor named only the
action and principal, so a marker issued in one account resumed the same
listing in another account after the same name and skipped its earlier
entries. The cursor now carries the account the request reads from, and a
marker from another account is InvalidInput.

* feat(iam): generate the IAM paginator table from botocore

tools/aws/regen_iam_paginators.py writes src/main/resources/aws/iam-paginators.json
from botocore's iam/2010-05-08 model, as the other tools/aws generators do: every
operation whose request models Marker, with its input and output token, limit
key, truncation flag and result keys, the MaxItems bounds of maxItemsType
(1 to 1000), the default page size the limit's documentation states ("defaults
to 100"), and markerType's bounds.

The 34 operations botocore's paginators-1.json lists take their tokens and
result keys from it. The six that model Marker without a paginator
(GetServiceLastAccessedDetails, GetServiceLastAccessedDetailsWithEntities,
GetOrganizationsAccessReport, ListServiceSpecificCredentials,
ListDelegationRequests, ListPoliciesGrantingServiceAccess) are read from
their request and response shapes and marked paginator: false.
ListServiceSpecificCredentials documents no default and
ListPoliciesGrantingServiceAccess models no MaxItems; the table records
both as such rather than inventing a value.

make aws-data-sync regenerates it and make aws-data-check fails when it is
stale against the pinned botocore.

* fix(iam): page every IAM list through one path driven by the paginator table

IamQueryHandler paged eight lists by hand through paginateScoped, a few more
through paginate, and left the rest (the tag readers, ListAccessKeys,
ListInstanceProfiles, ListPolicyVersions, GetGroup, ListGroupsForUser,
ListEntitiesForPolicy, GetAccountAuthorizationDetails, the simulations and
others) ignoring MaxItems and Marker with IsTruncated=false. Every operation
the generated aws/iam-paginators.json lists now pages through one paginate
path that reads its entry: the limit's bounds and default, the members that
resume and continue it, and the result keys pagedList and pagedLists write
under. paginateScoped, paginateByMarker and the hardcoded 100/1000 are gone.
ListEntitiesForPolicy and GetAccountAuthorizationDetails page their several
lists as one, in the paginator's order.

Marker semantics, chosen deliberately: a Marker is opaque and resumes only the
listing that issued it, on every paged operation. AWS documents it as "the
value of the Marker element in the response that you received", so a value
Floci did not issue, a bare number included, is InvalidInput; ListRoles,
ListPolicies and the report readers no longer read one as an index. The
marker names the last item of its page, so a deletion or creation ahead of
it skips nothing and repeats nothing, and it is signed (not prefixed) over
the account, the operation and every request member except Marker and
MaxItems, so a marker from another operation, principal, filter or account
is refused while the page size may change between calls. Signing the scope
instead of carrying it keeps issued markers short. markerType's 320-character
bound is not checked separately: every other value is refused as unissued,
and a long ARN key could otherwise push an issued marker past it.

MaxItems is now checked before Marker, as a malformed request is rejected
before anything is read from it. An omitted MaxItems is the documented 100;
ListServiceSpecificCredentials, which documents no default, returns its whole
list.

IamListPaginationIntegrationTest.everyPaginatedOperationHonoursMaxItemsAndMarker
iterates the table's 34 paginated operations, each with a fixture listing two
items, and checks the MaxItems bounds, a one-item page, resumption without
loss or repetition, the default page, and refusal of an unissued, bare-index
or other operation's marker. Its fixture map must name exactly the table's
operations, so one AWS starts paging later fails until it has one.
ListAccountAliases can hold one alias, so it is checked for everything but a
cut page. The tests the table test subsumes are removed; the ordering, anchor,
cross-listing and cross-account tests stay. Two ServiceLastAccessed tests
that walked by bare index now use issued markers.

* fix(iam): hold paged requests to the model through IamRequestShapes

MaxItems and Marker are request constraints, and main now checks a
request against the model before it runs. Every operation the paginator
table pages joins that wave in regen_iam_shapes.py, and the bounds leave
iam-paginators.json (which keeps only defaultItems, the documented page
size) and limit(), which now only parses the number and applies the
default. A pytest pins that every operation the paginator table carries
is in the wave, so a list AWS starts paging later cannot slip past the
bounds.

Six paged operations join with Marker and MaxItems alone: the three
report readers, whose JobId is answered by hand as "length equal to 36"
and whose SortKey enum is checked by hand; ListPoliciesGrantingServiceAccess,
whose empty ServiceNamespaces is answered InvalidInput; and the two
Simulate operations, whose ContextEntries nest a list inside a list of
structures, which the walk refuses. Vendoring their whole request would
reword answers main already settled; vendoring nothing would leave their
paging unbounded (SimulateCustomPolicy with MaxItems=0 was a 500).

Markers fit markerType's 320 characters. A marker embeds the key of the
item its page ended on, so a policy ARN with a long path produced one
of 610 characters, which the model check would now refuse on the way
back. SignedMarkers takes a maximum length: a cursor that would exceed
it is carried as a SHA-256 digest (119 characters once signed and
encoded), and the instance keeps the digest -> key mapping. That keeps
the existing resume semantics exactly: the marker still resolves to the
full key, so a deleted anchor resumes at the first key after it, and
the signature still binds account, operation and filter. Two stateless
alternatives were rejected: a truncated key prefix plus digest cannot
order a deleted anchor against items sharing the prefix, and a position
index skips or repeats when items ahead of it are deleted. The cost is
one map entry per distinct long key a page has ended on, never evicted
(marked ponytail in the code); markers already do not survive a
restart, as the signing key is per instance. Keys short enough to embed
are carried as before.

Checkstyle (./mvnw checkstyle:check) reported six errors in files this
PR touches: javax import order and two inline org.w3c.dom.Node in the
pagination test, and an inline java.util.Base64 in SignedMarkersTest.
The test now parses through XmlParser.parseDocument instead of its own
DocumentBuilderFactory. The switch statements in ListEntitiesForPolicy
and the test's holder fixture are switch expressions.

Tests: aMarkerEndingOnALongPolicyArnFitsTheModelAndResumesPastItsDeletion
attaches three policies under a 391-character path, pages with
MaxItems=1, deletes the anchor and resumes through the model check.
Constructing SignedMarkers without the limit fails it (610 characters);
restoring the pre-wave iam-request-shapes.json fails the table-driven
test (MaxItems=0 answered 500, MaxItems=1001 answered 200).

* fix(iam): bind a caller-resolved list's marker to the resolved user

ListAccessKeys, ListMFADevices, ListSSHPublicKeys, ListSigningCertificates
and ListServiceSpecificCredentials default an omitted UserName to the
caller. The marker was signed over the raw request members, so two users
in one account who both omitted UserName shared a scope and one's marker
resumed the other's listing. These handlers now page over the request
with UserName set to the resolved user, so the marker is bound to the
user the list was read for, named or implicit.

* fix(iam): bound the SignedMarkers digest map and trim the pagination test

SignedMarkers held every long cursor it had issued a digest for, in a map
that never shrank. It is now an access-ordered LinkedHashMap capped at
10,000 entries, the idiom CloudWatch Logs uses for its Insights queries. A
marker whose digest was evicted resolves to null, the same as an unknown
digest, so callers refuse it as an invalid marker.

IamListPaginationIntegrationTest spent most of its time in RestAssured's
per-request overhead on the hundred-item fixtures. Those creates and
deletes now go concurrently through java.net.http. The users and groups
default test keeps its first-page checks of the default of 100 and drops
the second page, which the roles default test and the every-operation test
already cover. The SSH public key fixture is generated once per run.
2026-10-28 16:37:49 -04:00
Jackson Price d7763fff8e fix(ec2): honor DryRun when creating VPCs, subnets and security groups (#6823)
* fix(ec2): honor DryRun when creating VPCs, subnets and security groups

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

---------

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
2026-10-28 16:26:07 -04:00
Aniket Shukla 3c391a06fb fix(lambda): paginate code signing configurations (#6832)
* fix(lambda): paginate code signing configurations

* fix(lambda): reuse signed service pagination
2026-10-28 13:46:14 -04:00
Aniket Shukla 8a19c3024b fix(sqs): reject invalid receive message counts (#6827) 2026-10-28 13:19:19 -04:00
galsuchetzky-act f926968167 fix(s3control): take TagResource and UntagResource tag condition keys from generated data (#6677)
The Service Authorization Reference lists aws:RequestTag/${TagKey} and
aws:TagKeys as condition keys for s3:TagResource, and aws:TagKeys for
s3:UntagResource. botocore's s3control model says where the request
carries them: TagResource's Tags list in the body, UntagResource's
TagKeys in the tagKeys query parameters.

With IAM enforcement on, Floci checked both S3 Control actions with no
request tag keys. A policy that allows TagResource only for certain tag
values, or UntagResource only for certain keys, matched no request, so
a request it allows was denied, and a ForAllValues condition on
aws:TagKeys allowed UntagResource whatever keys it named.

tools/aws/regen_s3control_tag_condition_keys.py now generates
s3control-tag-condition-keys.json from the two sources, as the DynamoDB
condition key table is generated: every s3 action the reference gives
either key, and every S3 Control operation's request members that feed
them, found as the tag-on-create table finds tag members.
IamConditionContextResolver reads it for a request on an S3 Control
route. The make targets check the members offline against the pinned
botocore in CI and the actions online against AWS in the IAM data drift
workflow. S3's own bucket and object tag keys stay as written, since
they were measured against AWS and do not all match the reference.
2026-10-28 10:14:26 -04:00
TATSUNO “Taz” Yasuhiro c55cb887d5 fix(lambdaweb): check resource policy statements in the order AWS does (#6788)
AWS runs each policy check on every statement before the next check. It answers an Effect other than Allow or Deny with "Invalid effect: <value>", and a malformed Principal or a non-string Effect with "Syntax error at position (-1,-1)".
2026-10-28 09:22:20 -04:00
Aniket Shukla 9eabfaf9bc fix(apigateway): map Lambda context in HTTP proxy requests (#6818) 2026-10-28 09:09:52 -04:00
Francisco Javier Barón 481b7f8d6d fix(lambda): pass LoggingConfig log format and level to the runtime (#6775)
* fix(lambda): pass LoggingConfig log format and level to the runtime

A function with LogFormat=JSON logged text: neither launcher set AWS_LAMBDA_LOG_FORMAT or AWS_LAMBDA_LOG_LEVEL, which the runtime interface clients read. Both launchers now pass them, and a JSON function without an ApplicationLogLevel gets INFO, the level the API reports, through one default shared with the response.

Closes #6774

* docs(lambda): note the log format and level the runtime receives

* refactor(lambda): build the runtime environment in one place for both launchers

ContainerLauncher and KubernetesPodLauncher wrote the same AWS_LAMBDA_* lines, the LoggingConfig ones included. LambdaRuntimeEnv.of now builds them once.
2026-10-28 09:04:14 -04:00
Aniket Shukla 119b7e9580 fix(athena): paginate query execution listings (#6816) 2026-10-28 09:03:55 -04:00
Jackson Price a83fa9c9e4 fix(ec2): keep the KMS key a volume is created with (#6756)
* fix(ec2): keep the KMS key a volume is created with

CreateVolume ignored KmsKeyId, so neither CreateVolume nor
DescribeVolumes reported kmsKeyId, even for a volume created encrypted
with a named key. A volume CreateVolume makes encrypted now keeps the
request's KmsKeyId as given, or gets the region's default EBS key when
it names none, and both responses report it. A volume that is not
encrypted keeps no key, and volumes stored before this change load as
they were, with no kmsKeyId.

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

* test(ec2): read volume responses with XmlParser

The volume KMS key tests read CreateVolume and DescribeVolumes
responses with a regular expression, substring offsets and plain
string matches. They now read them with XmlParser, as other EC2 tests
do, so element values are parsed and decoded as XML. Test-only; the
assertions are unchanged.

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

* fix(ec2): keep the KMS key a launch's block device mapping names

A launch's encrypted volumes got the region's default EBS key even
when their block device mapping, or the launch template's, named
Ebs.KmsKeyId. The key now goes from the mapping to the volume, root
included, and a mapping that names none still gets the default.

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

* test(ec2): pin the launch volume key rules

Pin that a launch mapping naming a key without Encrypted leaves the
volume unencrypted and keyless, and that a request entry's key wins
over its launch template's. Delete the test's launch template, reuse
the launch helpers in the root-volume test, and document that a launch
volume encrypted only by its snapshot gets the region's default key,
since snapshots record no key.

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

---------

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
2026-10-28 08:46:27 -04:00
Daniël van Ziel 0ee1d10659 fix(cognito): refuse a reused TOTP code for SOFTWARE_TOKEN_MFA (#6808)
A software-token code now answers one SOFTWARE_TOKEN_MFA challenge only. The step of the
last accepted code is stored on the user, and a code from that step or an earlier one fails
with ExpiredCodeException, as AWS does (RFC 6238 section 5.2). VerifySoftwareToken does not
record a step, and activating a new authenticator clears it.

Fixes #6804
2026-10-28 07:20:05 -04:00
Liron CohenandliRONCO11 548788840c feat(cloudfront): serve execute-api custom origins of this Floci in-process (#6754)
* feat(cloudfront): serve execute-api custom origins of this Floci in-process

A custom origin whose domain is an execute-api endpoint of an HTTP or
REST API in this Floci is now served through Floci's own listener, as
Lambda Web Function endpoints are, with the execute-api domain as Host.
Before, the origin went through DNS and the viewer got 502.

ApiGatewayExecuteApiHostFilter.routes() says whether the host filter
rewrites a host and path onto an API. A request that it does not route
(a WebSocket API, a disabled endpoint, a missing stage, another region)
answers 404 and never reaches Floci's other endpoints. Dot segments in
the forwarded path are resolved before that check. A forwarded viewer
Host answers 502. Every other origin is unchanged.

* refactor(cloudfront): share the execute-api routing decision with the host filter

ApiGatewayExecuteApiHostFilter.decide() returns the routing decision
without touching the request, with its lookups under the API owner's
account. filter() applies the decision and routes() reuses it, so the
two cannot drift.

This fixes two cases where routes() differed from filter(): an HTTP API
owned by another account than the viewer is now served through
CloudFront, and a REST API origin whose region label is not the API's
region now answers 404. The 404 body is one constant.

* refactor(apigateway): keep Optional out of the route decision record

RouteDecision stores the API owner as a nullable value, and the decision
helpers take it as a plain parameter. Optional stays the return type of
the owner lookup only, as AGENTS.md asks.

* refactor(cloudfront): name the ignored host parse failure and drop the Optional test field

---------

Co-authored-by: liRONCO11 <7966063+liRONCO11@users.noreply.github.com>
2026-10-28 07:12:47 -04:00
Aniket Shukla a636de20dc fix(backup): persist and manage backup plan tags (#6796) 2026-10-28 07:08:52 -04:00
Aniket Shukla da517acc65 fix(cognito): verify SRP proofs in custom authentication (#6794)
* fix(cognito): verify SRP proofs in custom authentication

* fix(cognito): include password-change challenge parameters
2026-10-28 07:07:12 -04:00