Commit Graph
4393 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
Hector Ventura 85813108c1 chore(rename): add a script that moves an open branch across the rename (#6790)
* chore(rename): add a script that moves an open branch across the rename

Part of #6589. After the cut, a branch that forked before it conflicts on
every Java file it touches. tools/rename/rebase_across_rename.sh runs
rename_package.py apply on the branch's merge-base and on its tip, and
cherry-picks the renamed tip onto the target with the renamed merge-base as
the merge base, so only real conflicts remain. The branch becomes one commit
carrying every original message in order, sign-offs included, and the first
commit's author; the old tip is kept as <branch>-before-rename and nothing
is pushed.

rename_package.py now imports the partition lexer only for report, so apply
runs on a bare python3 without PyYAML.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>

* fix(rename): run the rebase script from any directory of the checkout

git rev-list pathspecs and git archive paths are relative to the current directory, so a run from a subdirectory found no cut and reported that the rename had not landed. The script now changes to the top level first.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>

---------

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-10-29 12:52:49 -04:00
Allen Sanborn bfa13dfa5e fix(ec2): repeat the primary interface association on its primary private address in DescribeInstances (#6928) 2026-10-29 12:51:41 -04:00
Daniël van Ziel d7911da436 fix(ec2): derive subnet and EFS zone ids from the zone name (#5580) (#6923)
Subnets, EFS file systems and mount targets persisted before zone ids took
AWS's shape (#5486) still carried the old <region>-az<n> id, so
DescribeSubnets reported an id DescribeAvailabilityZones --zone-ids
rejects. The id is a function of the zone name and region, so the models
now derive it from the stored zone name on read instead of trusting the
stored value.
2026-10-29 10:21:42 -04:00
Hector Ventura 3e8369664e refactor: read and check ARNs through AwsArnUtils in SES, SWF, Verified Permissions, AppSync and five more (#6905)
Twelve startsWith("arn:") probes become AwsArnUtils.looksLikeArn. The SES tenant resource reader, the SWF tag region, the Verified Permissions Cognito user pool check (now AwsArnUtils.isArnFor) and the AppSync data source region read ARN fields with AwsArnUtils.parse and regionOrDefault instead of a split.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-10-29 10:17:45 -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
Jackson Price 23d815f08b fix(appconfig): serialize tag writes with deletes and write copies (#6912) 2026-10-29 07:58:41 -04:00
Allen Sanborn 146ba44c92 fix(ec2): refuse an explicit CreateNetworkInterface address that is already in use (#6908) 2026-10-29 07:47:55 -04:00
TATSUNO “Taz” Yasuhiro 772b444850 fix(dynamodb): return the item that a PartiQL write's failed condition saw with ALL_OLD (#6910) 2026-10-29 07:44:59 -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
Hector Ventura 03da5da997 refactor: read and check ARNs through AwsArnUtils in RAM, Resource Groups, CloudWatch, Service Catalog and four more (#6904)
Seven startsWith("arn:") probes become AwsArnUtils.looksLikeArn. RAM, the Resource Groups Tagging visibility check, the CloudWatch dashboards cross-account ARN and Service Catalog read ARN fields with AwsArnUtils.parse and regionOrDefault instead of a split; the dashboards ARN without its region is rebuilt as an AwsArnUtils.Arn.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-10-29 07:31:03 -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
Hector Ventura d7204696d4 refactor: read and check ARNs through AwsArnUtils in DataSync, DynamoDB, Glue, Lake Formation, Redshift and S3 Tables (#6903)
Ten startsWith("arn:") probes on name-or-ARN parameters become AwsArnUtils.looksLikeArn. DataSync's private arnRegion and arnAccountId copies are deleted in favour of AwsArnUtils.regionOrDefault and accountOrDefault, and its resource, Glue's resource and Redshift's integration source type are read with AwsArnUtils.parse instead of a split.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-10-29 00:41:03 -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
Vũ Thế Huy de2e5192b2 chore(redshift-data): reuse ManualClock in session and idempotency tests (#6901) 2026-10-29 00:18:45 -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
Hector Ventura 42e7f6f2f3 refactor(rds): read the read replica source ARN through AwsArnUtils.parse (#6887)
resolveReadReplicaSource split the source ARN by hand right under the looksLikeArn check. AwsArnUtils.parse gives the same partition, region, account and db:<name> resource; an ARN that is truncated, names another account or names a cluster still finds no source.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-10-28 22:20:13 -04:00
Hector Ventura 63aa7710d0 refactor(lambda): tell names from ARNs and read regions through AwsArnUtils (#6881)
The startsWith("arn:") probes in Lambda, Lambda MicroVMs and the API Gateway v2 quick-create target become AwsArnUtils.looksLikeArn. The runtime version ARN and the MicroVM image region read the region with AwsArnUtils.regionOrDefault instead of a split. LambdaTagController keeps its split, marked: Lambda reads the fourth field of any tag target, ARN or not, which IamRestRouteEnforcementIntegrationTest pins.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-10-28 22:17:14 -04:00
Hector Ventura 9cea537cfa refactor(ecs): tell names from ARNs through AwsArnUtils.looksLikeArn (#6879)
The eleven startsWith("arn:") probes in EcsService, EcsContainerManager and EcsCfnProvisioner become AwsArnUtils.looksLikeArn, which is the same check, and the null guards it already makes are dropped.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-10-28 22:16:51 -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
Vũ Thế Huy a950c704c7 fix: initialize service-call authorizer at startup (#6876) 2026-10-28 20:52:46 -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
Hector Ventura 42b4bf4245 refactor(rds,docdb,neptune,cloudformation): tell names from ARNs through AwsArnUtils (#6880)
* refactor(core): add AwsArnUtils.looksLikeArn for name-or-ARN parameters

A parameter that takes a name or an ARN, where AWS answers a malformed ARN with its own error, needs to treat any value starting arn: as an attempted ARN. isArn needs all six fields and would send arn:aws:rds down the name path, so the sites the earlier migration PRs left on purpose still probe with a hand-written startsWith. looksLikeArn is that probe, in one place, so the area PRs that follow can move them off the arn-probe baseline without changing the error a caller sees.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>

* refactor(rds,docdb,neptune,cloudformation): tell names from ARNs through AwsArnUtils

The startsWith("arn:") probes on name-or-ARN parameters in RDS, DocumentDB, Neptune, CloudFormation and the EC2 instance provisioner become AwsArnUtils.looksLikeArn, the same check, so a malformed ARN still gets the operation's own error. NeptuneQueryHandler reads a resource's region with AwsArnUtils.parse instead of a split.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>

---------

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-10-28 20:48:48 -04:00
Hector Ventura 22ea3ca2e0 refactor(core): add AwsArnUtils.looksLikeArn for name-or-ARN parameters (#6877)
A parameter that takes a name or an ARN, where AWS answers a malformed ARN with its own error, needs to treat any value starting arn: as an attempted ARN. isArn needs all six fields and would send arn:aws:rds down the name path, so the sites the earlier migration PRs left on purpose still probe with a hand-written startsWith. looksLikeArn is that probe, in one place, so the area PRs that follow can move them off the arn-probe baseline without changing the error a caller sees.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-10-28 20:47:03 -04:00
Allen Sanborn d726533659 fix(ec2): return the network interface association in DescribeInstances (#6872)
* fix(ec2): publish a container instance's public address before it reports running

The launch worker flipped the instance to running and only then exposed its public
address, so a DescribeInstances poll in between saw a running instance with no public
IP. Terraform's wait-for-running reads exactly that. The restart paths already expose the
address before the state flips; the first launch now does the same. If exposing throws,
the existing catch fails the launch, so the instance is not left pending. A launch
cancelled after the address was published clears it in failLaunch.

* fix(ec2): report the public address as the primary interface association in DescribeInstances

DescribeInstances omitted networkInterfaceSet.item.association, which the Terraform
provider reads to set associate_public_ip_address, so the attribute drifted and forced
replacement on every plan. The association comes from the Elastic IP on the primary
private address when there is one (owned by the interface owner, as DescribeNetworkInterfaces
shows it), otherwise from the automatic address (owner amazon). Other interfaces carry none.

* test(ec2): explicit types, imports and assertNull in the public address and container manager tests

* perf(ec2): read the Elastic IPs once per DescribeInstances and RunInstances response

The primary interface association looked up the instance's Elastic IP by
scanning the address store, once per rendered instance. Index the region's
associated addresses by instance id and interface id once per response and
look each instance up in the index; single-instance callers build their own.

* fix(ec2): check an indexed Elastic IP still belongs to the instance before showing it

The per-response address index holds the live Address objects, which
AssociateAddress and DisassociateAddress change in place. An address
disassociated or moved to another instance after the index was read still
sat under its former owner's key, so that instance showed an association it
no longer had. The lookup now checks the address's owner and association
again, as the per-instance scan did.

* test(ec2): an indexed Elastic IP still held is shown, and a moved one is not

The stale-index test only asserted what must not be shown, so a lookup that
refused every address passed it. It now also checks that an instance still
holding the Elastic IP shows its allocation, association and public IP, and
pins the known limit for the new owner of a moved address: its public
address shows as an automatic one. The association copy is checked once
more, so a disassociation between lookup and copy shows the instance's own
address rather than an association with no id.
2026-10-28 20:17:28 -04: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