Commit Graph
5104 Commits
Author SHA1 Message Date
Jimmy Liu Jia 1686f29e04 feat(s3): track archived object restore state (#8166)
* feat(s3): track archived object restore state

* fix(s3): validate restore options and report version restore status
2026-11-13 00:08:10 -04:00
Andre Kurait c3551d351e feat(kms): list completed key rotations (#8146)
Record completed rotation history, validate filtering and pagination, preserve concurrent key updates, and publish primary and replica material as one atomic storage batch.

Revalidate the initially resolved key before atomically publishing import parameters, preserving deletion safety and alias identity. Share the malformed rotation request fixture.

Use shared striped monitors keyed by resolved key ID, preserving replica publication and import identity while permitting unrelated key operations. Reuse shared concurrency and SDK fixtures.

Signed-off-by: Andre Kurait <akurait@amazon.com>
2026-11-13 00:00:10 -04:00
Vũ Thế Huy 315367f21f feat(redshift): share a cluster snapshot with another account (#8077)
AuthorizeSnapshotAccess and RevokeSnapshotAccess record the accounts that may restore a
manual, available snapshot. The snapshot reports OwnerAccount and AccountsWithRestoreAccess,
DescribeClusterSnapshots takes an OwnerAccount filter that lists only what the owner shared
with the caller, and RestoreFromClusterSnapshot takes an OwnerAccount (or a SnapshotArn of
another account) and restores a shared snapshot from the owner's dump. A snapshot that is not
shared is refused with AccessToSnapshotDenied, and the grant does not outlive the snapshot.

IAM takes generated data only, so the RestoreFromClusterSnapshot correction is replaced by two
rules in regen_iam_request_resources.py. A top-level request member whose name ends in Account
gives the account of each type whose botocore structure has that same member: Snapshot has
OwnerAccount and Cluster does not, so the snapshot moves to the owner's account and the restored
cluster stays the caller's. Of several members that could fill a variable, one naming the type
before the variable wins over a bare one, so the snapshot's ClusterName comes from
SnapshotClusterIdentifier rather than ClusterIdentifier.

Across every operation the rules change only that entry, which also gains DefaultIamRoleArn and
RedshiftIdcApplicationArn as ARN rows that never match a cluster or snapshot, and CloudFront's
GetInvalidationForDistributionTenant, whose tenant is now filled from DistributionTenantId rather
than the invalidation's Id.

The handler's SnapshotArn check now resolves the partition through RegionResolver, as the
service's Region check does, so a Region outside the known partitions cannot make the two
disagree.
2026-11-12 23:34:54 -04:00
Jimmy Liu Jia 9c0f644038 fix: enforce Kinesis stream tag limit for AddTagsToStream (#8179) 2026-11-12 23:33:20 -04:00
Priamo Germosen a3eea94899 fix(codeartifact): stream asset uploads instead of buffering them as byte[] (#8170)
PublishPackageVersion and the Maven, pypi, and NuGet wire-protocol endpoints all
received the request body as a single byte[] before any size check ran, so the
real, documented 5 GB asset quota never actually applied: an array is capped at
~2.147 GB (Integer.MAX_VALUE), so a legitimately-sized multi-GB asset either
failed with an OOM or never got far enough to hit the quota check at all.

Reworks the write path for all four formats to stream through a staged file
instead of a resident array:

- AssetDigestingInputStream computes MD5/SHA-1/SHA-256/SHA-512 and enforces the
  5 GB cap in one pass while the body is read, rather than after it's fully
  buffered.
- CodeArtifactService.stageAssetBody/deleteStagedAssetBody give every upload
  path a single, consistent staged-file lifecycle; existing byte[]-based
  entry points (CopyPackageVersions, small in-process metadata writes) are
  left as additive overloads, not replaced, so ~120 existing direct-call test
  fixtures keep working unchanged.
- MultipartFormParser.extractFilePart streams a pypi/NuGet multipart body from
  disk in fixed-size chunks with a carried-over overlap window, so a boundary
  marker that straddles two reads is still found correctly, without ever
  holding the whole envelope (or the file part inside it) in one array. Text
  fields are bounded both individually and in aggregate, so a real long
  pypi description doesn't get rejected but many small fields together still
  can't accumulate the whole envelope on the heap.
- Every sidecar write (Reposilite, pypiserver, BaGetter) now has a
  Path/InputStream-based overload alongside its existing byte[] one, using
  HttpRequest.BodyPublishers.ofFile/concat instead of a resident buffer.
  Verdaccio's own write streams the base64-encoded tarball through a piped
  JDK Base64 encoder instead of building one large encoded string, and a
  writer-side read failure now fails the publish outright instead of risking
  a truncated tarball published under hashes computed from the whole file.
- Every large-transfer HTTP call site's timeout now scales with the content
  length (SidecarUriUtils.transferTimeout) instead of a flat 30 seconds, which
  a multi-GB transfer can legitimately exceed.

Manually verified against a packaged jar running under a 1 GB heap cap: a 3 GiB
Maven deploy, a 3 GiB pypi twine-shaped upload, and a 3.2 GB NuGet push each
completed with no OOM and round-tripped byte-identical. Documents two related,
pre-existing ceilings that this change does not and cannot remove on its own:
the emulator's own global HTTP body-size cap (FLOCI_PROTOCOLS_MAX_REQUEST_SIZE,
2048 MB by default) still caps any single request below the real 5 GB quota
until raised, and the generic format's in-memory storage mode still holds an
asset as one byte[].
2026-11-12 23:30:30 -04:00
Priamo Germosen c1c1c2475f perf(emr): start a primary node's daemons together (#8182)
A cluster's primary node started Hive's metastore only once its HDFS
was usable and its folders made, and YARN only once the metastore took
connections. None of them needs the HDFS to start, so they now start
with the NameNode, and the node waits for each once the HDFS is ready.
Its folders are made by one hdfs command, not two.

On emr-7.5.0 with Hive and YARN, a node was ready in 12s and 20s,
against 26s twice before, on the same loaded machine.
2026-11-12 23:22:08 -04:00
Daniël van Ziel a840c31109 fix(kms): reject CreateAlias on an existing alias name (#8171)
* fix(kms): reject CreateAlias on an existing alias name with AlreadyExistsException

* test(kms): cover alias update in CloudFormation and tighten the race test
2026-11-12 22:41:43 -04:00
soreavisandPriamo Germosen b2fa3e0cfb fix(organizations): apply PutResourcePolicy tags only on creation (#8174)
PutResourcePolicy replaced the tag set of an existing resource policy
whenever the request carried Tags. The model says tags apply only to
the initial creation of the resource policy and that the call throws
otherwise. It now applies Tags only when it creates the policy and
answers InvalidInputException for Tags on an existing one, before it
changes anything. The model names no error for this case;
InvalidInputException is the one it lists for invalid request values.
An empty Tags list has no tags to apply and is accepted.

The CloudFormation provisioner relied on the old replace to converge
the Tags of AWS::Organizations::ResourcePolicy on update. An update now
leaves Tags out of PutResourcePolicy and converges them through
TagResource and UntagResource by the rp- ID, as the provisioner does
for OUs, accounts and policies and as AWS's own handler does.

Co-authored-by: Priamo Germosen <6233424+pgermosen@users.noreply.github.com>
2026-11-12 22:18:32 -04:00
Jackson Price 405a3cad12 fix(glue): serialize table deletion with catalog updates (#8173) 2026-11-12 22:17:43 -04:00
Murtuza Chhil 7c138ce3f1 fix(paymentcryptography): the list of keys answers with their summaries (#8135)
The model's KeySummary holds the identifier, the state, the attributes, the
check value and the two flags, and not the whole key. The list answered with
the whole key, so it carried the timestamps and the origin that a summary
does not hold.

The list answers with the summary now, and the whole key stays the answer of
the operation that names one key.

The control plane's answers are driven through a real SDK and through the AWS
CLI, so the wire format of the operations the summary fix touches is the one
the clients read.

The certificate of a key pair, a tag that is added and removed, a key pair
that keeps the usage its derived keys have, the RSA cryptogram the key
exchange serves, the key the two parties agreed, and the timestamps the
answers carry.

The page said the member was read and checked. Nothing reads it: the shape
check is what checks it, against the range the model states.

The page said each key in the list is the whole key rather than the summary the
model names, which the change that answers with the summary makes untrue. The
page says what a listed key carries now.

The round trip through the RSA cryptogram asserted the ARN of the key that
came in and the usage it was given, which a wrong key of the same usage would
also pass. It compares the check value with the exported key's, so the test
shows that the same key came back.

The key that came in was not added to the list the cleanup walks, so it was
left in the service when the class finished. It is added now.
2026-11-12 22:10:28 -04:00
TATSUNO “Taz” Yasuhiro 891c0cd58f fix(dynamodb): refuse a repeated section in an UpdateExpression (#8167) 2026-11-12 21:23:38 -04:00
Priamo Germosen 438e01a225 feat(emr-serverless): run a Spark job's executors in their own containers (#8168)
EMR Serverless gives a Spark job's driver and each of its executors a
worker of their own; a docker job run ran them all in one container, in
Spark's local mode. With executor-containers above 0, the driver's
container now runs Spark's standalone master beside the driver, and each
executor runs in a container of its own, a standalone worker offering one
executor's cores and memory.

Floci follows the driver through its UI: an executor's size from its
settings, and how many executors dynamic allocation wants from its
metrics. It starts executor containers, or removes idle ones, to match:
at most executor-containers at once, and none that would take the
application past its maximumCapacity. They share a secret per
run, run the Executor worker type's image, and go with the driver.

executor-containers is 0 by default: then, or on the host's network,
the executors run in the driver's container, as before.
2026-11-12 21:22:01 -04:00
Kal Cramer 9f9b116f73 fix(efs): keep IpAddressType and Ipv6Address on CreateMountTarget and require SubnetId (#8169) 2026-11-12 21:16:53 -04:00
Priamo Germosen 623bb15283 fix(iam): read the documents a request supplies, and hold each to being a policy (#8164)
`SimulatePrincipalPolicy` read neither `PolicyInputList` nor
`PermissionsBoundaryPolicyInputList`, so a caller testing a policy it has not
attached, or a boundary other than the stored one, was answered about the
principal as it stands: a decision about a question nobody asked. Both members
have published behaviour, and `SimulateCustomPolicy` already read both, the
documents being its whole input, so this is the principal simulator dropping two
of its own.

A `PolicyInputList` document is "an optional list of additional policy documents
to include in the simulation", so each is evaluated with the weight of a policy
the principal holds: an allow in one allows an action the attached policies do
not, which is what the operation's own example in the API Reference turns on, and
a deny in one stops an action they allow. A `PermissionsBoundaryPolicyInputList`
document is the boundary that simulation runs with in place of the stored one,
"if a permissions boundary is attached to an entity and you pass in a different
permissions boundary policy using this parameter, then the new permissions
boundary policy is used for the simulation", and it is the boundary when the
entity carries none, the member being "the IAM permissions boundary policy to
simulate". The one-document limit both simulators are held to is read in one
place now rather than two.

Neither document is attached to anything, so no `PolicyExclusionList` identifier
reaches either: that member names the policies "actually attached to the
principal", where these are the request's own. A simulation leaving out every
part a `PolicyType` can name therefore still carries what the request handed in,
and a boundary handed in still holds the simulation down where the stored one was
left out.

Reading a document means being able to read it, so each supplied document is held
to the grammar before anything is decided from it. Four operations take
`PolicyInputList`, the two simulators and the two context-key readers, and each
takes "the complete, valid JSON text of an IAM policy". A text that does not
parse as a JSON object, and an object carrying no `Statement`, "the main element
for a policy. This element is required.", are both refused with the modelled
`InvalidInput`, 400, naming the entry by the index the request numbered it with.
A supplied permissions boundary carries the sentence that names no entry, the
member taking one document. Without that, an unreadable document was answered as
though the request had carried nothing at all: an unreadable identity document
left an attached allow still allowing, and an unreadable boundary was worse,
becoming a ceiling that allows nothing and turning an allow into an implicit
deny.

The 500 `PolicyEvaluation` the two simulators model is not that answer. It
carries no sender fault where `InvalidInput` does, and the two context-key
readers take this same member and model no `PolicyEvaluation` at all, so one
defect on one member would otherwise be answered two ways across the four
operations that take it.

A document already stored is read as it always was: it contributes no statements
and the decision is made on the rest, because a policy the account accepted once
must not make every later call fail. The supplied documents are read ahead of the
principal lookup now, which is where this package answers an input.

Either supplied document is also held to the shape the model declares, so one
past 131072 characters is a `ValidationError` naming the member under the index
the request numbered it with. The boundary list was read by the constraint walk
already; `PolicyInputList` was carried by hand for both simulators, which only
`SimulateCustomPolicy` needs: it requires the member and answers an empty list in
its own wording, "At least one PolicyInputList member is required.", where
`SimulatePrincipalPolicy` leaves the member optional and so has nothing of its
own in front of the walk. So the generator's exemption drops that operation and
the vendored shapes are regenerated from the pinned model, which adds the one
member to `SimulatePrincipalPolicyRequest`.
2026-11-12 20:59:23 -04:00
Priamo Germosen 40ec27593e fix(iam): check created tags, default views, FIS actions and cross-account ARNs (#8165)
Four gaps in how the request-resources table reads a request, which the
review of #8154 found in its services and which hold for any service:

- A create whose action acts on no resource type had its tags checked on
  `*` too, so a tagging grant scoped to the type it makes refused them. The
  generator gives such a create the resource it makes (`makes`), and its
  tags are checked there when the request's tagging action acts on that
  type.
- An optional member holding the ARN of a type, left out, names the
  resource its service uses then (`default`), which the reader asks the
  service for: Resource Explorer's `Search` and `ListResources` with no
  `ViewArn` are checked on the Region's default view.
- A field of each value of a map of structures, named after a type the
  action acts on, names one resource for each value: an FIS experiment
  template's create and update are checked on each action it names.
- An ARN naming another account is checked as given alone when its service
  acts on the resource in that account: an OAM sink a link is made to, a
  RAM invitation sent to the caller or a share another account owns.
2026-11-12 20:59:03 -04:00
mrfelekandmrfelek 6b1ba4387a fix(route53): check Route 53's requests under IAM enforcement (#8090)
Under IAM enforcement no Route 53 request but the delegation set calls
was checked: Route 53's model was not among the vendored REST routes,
and its namespace's request resources were not read, so no other
request was mapped to an action and the filter let it through. A
caller with no permissions could create, change and delete hosted
zones, record sets, health checks and tags.

Route 53's routes are now vendored and its requests read, now that
REST-XML path and query members are. Two generator changes name what
the rules did not:

- a path segment in ies names the type in y, so a bare Id after it is
  that type's: ListTrafficPolicyVersions's, in
  /trafficpolicies/{Id}/versions, is the traffic policy's, as the rule
  for path labels already reads UpdateHostedZoneComment's hosted zone
  and the other traffic policy calls;
- a member whose enum lists two or more of the action's types picks
  the type: Route 53's tag calls, by ResourceType.

RequestResources drops a leading /<type>/ from an id, the path Route 53
returns its ids under, so a delegation set or hosted zone named that
way is the same resource. The delegation set calls go through the
vendored routes like the rest, and their hand-built action map and ARN
builder are gone.

Co-authored-by: mrfelek <17274927+mrfelek@users.noreply.github.com>
2026-11-12 20:56:16 -04:00
Matheus Oliveira 282b53cacc fix(dynamodb): report correct WarmThroughput for tables (#7648)
Table-level WarmThroughput was hardcoded to 0/0. Now reports provisioned
capacity for provisioned tables and 12000/4000 for on-demand tables, matching
AWS. Tracks max capacity history on updates. Omits WarmThroughput from
CreateTable responses as AWS does.

Closes #7114

Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>
2026-11-12 20:55:22 -04:00
Jimmy Liu Jia 6ef4ad536b docs(rds): clarify zstd IAM DDL passthrough (#8155) 2026-11-12 20:54:16 -04:00
soreavis 355c180db3 fix(memorydb): return InvalidARNFault when ResourceArn is not a MemoryDB ARN (#8163)
ListTags, TagResource and UntagResource answered ClusterNotFoundFault
for a ResourceArn that is not a MemoryDB ARN at all: one that does not
parse, or one that names another service. botocore lists
InvalidARNFault on all three operations ("The specified Amazon
Resource Name (ARN) is not valid."), and the MemoryDB API Reference
gives it HTTP 400.

clusterByArn now answers InvalidARNFault unless the value is an ARN
naming memorydb. A MemoryDB ARN of another Region or account still
answers ClusterNotFoundFault.
2026-11-12 20:37:42 -04:00
Andre Kurait 1820d6470d fix(ec2): preserve security group deletion scope and dependencies (#7920)
* fix(ec2): preserve security group deletion scope and dependencies

Coordinate group publication, attachment and deletion, preserve instance/interface group state, and reject invalid DryRun values before deletion.

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

* fix(ec2): tolerate absent persisted group dependency fields

Keep unknown-state instance attachments blocking deletion while treating absent dependency collections as empty. Cover all nullable scan fields and missing identifiers without changing normal dependency semantics.

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

* fix(ec2): roll back failed security group creation

Retain the default rule identity before publication and compensate both group and rule writes when either store fails. Preserve the original exception and record cleanup failures without skipping the remaining cleanup.

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

* fix(ec2): serialize group rule references with deletion

Acquire the regional topology monitor before the source group monitor while resolving and publishing ingress and egress rules. Keep runtime reconciliation outside the mutation locks and preserve existing unknown-reference compatibility.

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

* fix(ec2): retain groups used by Instance Connect endpoints

Reject deletion before mutation when an Instance Connect endpoint uses the group. Return CannotDelete for default groups and reuse shared SDK clients in the existing fixtures.

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

* refactor(ec2): share resource locks and deletion race helpers

Reuse the reference-counted lock lifecycle for volume operations and instance group assignments. Keep scoped keys and lock ordering unchanged. Reuse deletion tasks and blocked-or-done observations without weakening race assertions.

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

---------

Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
2026-11-12 20:31:14 -04:00
Jackson Price 4b3b5cc211 fix(glue): serialize table creation with database deletion (#8148) 2026-11-12 20:31:00 -04:00
TATSUNO “Taz” Yasuhiro f5e581a872 feat(lambda): give each durable execution an X-Ray trace header (#8161) 2026-11-12 20:17:12 -04:00
thejrose1984 55b2fb7bd3 fix(eks): allow a cluster name in more than one Region of an account (#8140)
Cluster names only have to be unique within a Region of an account, but
EKS stored clusters under the bare name, so creating `demo` in
eu-central-1 failed with ResourceInUseException while a `demo` existed in
eu-west-1. Since #7936 the eu-central-1 caller cannot even see that
cluster.

Clusters, node groups and Fargate profiles are now keyed by
`<region>::<name>`, as OpenSearch domains and Kinesis streams are, and so
are the node-capacity locks and the OIDC signing keys. On startup,
records persisted under the bare name move to the new keys, taking the
Region from each record's ARN. A cluster's signing key moves with it, so
tokens it signed before the upgrade still verify. Access entries, add-ons
and Pod Identity associations were already keyed by the cluster ARN.

A cluster outside the default Region, or one that shares its name with a
cluster in another Region, puts its Region first in its Docker container
and volume names. This is persisted as dockerNameRegion and left out of
API responses, so two Regions' clusters never share a k3s container. A
default-Region cluster, and any cluster created before this change, keeps
its name, so existing containers, volumes and endpoint-mode=network DNS
names stay as they are.

The Pod Identity webhook path now includes the Region. The old path still
works for clusters whose webhook configuration predates the change. The
_floci OIDC routes have no Region of their own and are usually called
unsigned, so they try the request's Region and then the account's only
cluster with that name.

Closes #7966

Follow-up to the Regional cluster names change, from review:

- k3s was given a signing key minted under the bare cluster name while
  EksService created, published and migrated the cluster's key under its
  Regional key, so pod tokens could be signed with a key JWKS did not
  publish. EksClusterManager now asks for the key by the Regional key, at
  start and on reinjection.
- The token-webhook kubeconfig, audit policy, registries.yaml and Pod
  Identity manifest Floci writes per cluster now live under
  <kind>/<account>/<region>/<name>/, the layout of the signing-key files,
  so same-named clusters in two Regions no longer share them.
- The Region-less Pod Identity webhook route resolves the cluster created
  before Regional names, which registered it, rather than preferring the
  request's Region, which could pick a newer same-named default-Region
  cluster.
- OIDC discovery and the key route take an optional region query
  parameter, and the discovery document's jwks_uri names the cluster's
  Region, since a verifier follows it without the discovery context.
- A signing key stored before account-prefixed keys now moves with its
  cluster too, checked by its issuer.
- CreateCluster reserves the Regional key until the cluster is stored, so
  a concurrent create of the same name in the same Region is refused
  instead of overwriting the first.
- Test imports replace fully qualified names, for Checkstyle.

Cluster names are unique only within a Region of an account, and the
token route is usually called unsigned, so with the same name in two
Regions it could only mint for the request's Region. Accept the same
optional ?region= as the discovery and key routes, and document it.

Also correct the accountQualifiedName Javadoc, which still said names
are unique only within an account.
2026-11-12 20:10:54 -04:00
Tyler Webb 0383d65acb fix(ssm): validate PutParameter names and resolve tagging ARNs only in the request's region (#7965)
* fix(iam): evaluate SSM GetParametersByPath and GetParameters against the requested parameters

GetParametersByPath is now checked against the parameter ARN of its Path, and GetParameters against each entry in Names, instead of parameter/*. A root Path keeps the parameter/* fallback.

* test(ssm): cover path and per-name IAM checks on parameter reads

* fix(iam): read each SSM operation's own resource field and drop read selectors

GetParametersByPath is evaluated against Path only, GetParameters and DeleteParameters against Names only, and other actions against Name only, so a field the handler ignores can no longer stand in for the one it acts on. GetParameter and GetParameters names lose their :version or :label selector, in name and ARN form, before the parameter ARN is built, so a grant on the base parameter covers them.

* test(ssm): cover per-operation IAM fields, read selectors and batch deletion

GetParametersByPath with a denied Path and an allowed extraneous Names entry is refused; a grant on a parameter allows reading its versions and labels by name and ARN; DeleteParameters needs a grant on every name and deletes nothing when one is refused.

* fix(iam): check SSM Names as the handler reads them and the root path as parameter/

Names is iterated the way SsmJsonHandler iterates it, so an object-shaped Names is checked against each of its values instead of parameter/*. A name that looks like an ARN but does not parse loses its selector like any other name, matching how SsmService reads it. GetParametersByPath on the root path is checked against parameter/, the empty parameter name AWS authorizes it against; a missing or empty Path keeps the parameter/* fallback.

* test(ssm): prove path and batch-delete checks with a Deny under a parameter/* Allow

Both tests now allow the action on parameter/* and deny it on the protected path or parameter, so they fail where the request is checked against parameter/* and pass only when it is checked against the Path or every entry in Names.

* fix(iam): treat an SSM request without an operation as a Name request

Set.of rejects a null lookup, so the Names and selector-read checks now test for a missing operation first; such a request falls to the Name branch as it did before.

* fix(iam): check GetParametersByPath without a Path against the root path

SsmJsonHandler reads Path with asText and SsmService lists a blank path from the root, so a missing, empty or non-text Path is now checked against parameter/, the same resource as Path="/", instead of parameter/*. A Deny on parameter/ could otherwise be sidestepped by leaving Path out. A null Path or, for the parameter operations whose handler reads Name with asText, a null Name is checked against parameter/null, the parameter the handler acts on. The builder's Javadoc is split into shorter sentences and wrapped to 120 columns.

* test(ssm): prove a Deny holds against read selectors and the root path

A Deny on a parameter refuses GetParameter on its version, its label and its ARN with a label, and a Deny on parameter/ refuses GetParametersByPath on Path="/" and with no Path at all, each under a parameter/* Allow.

* fix(ssm): reject a PutParameter name outside the parameter name syntax

* test(ssm): cover PutParameter rejecting colon and space names

* fix(iam): check SSM names with the whitespace their handler keeps

* test(ssm): cover untrimmed Name and Names in IAM checks

* test(ssm): prove a Deny holds against GetParameters selectors

* fix(ssm): strip surrounding spaces from a PutParameter name as AWS does

* fix(iam): check a PutParameter against the name it stores, spaces stripped

* test(ssm): cover PutParameter stripping surrounding spaces from a name

* test(iam): cover a PutParameter Name checked with its spaces stripped

* fix(ssm): read a parameter//name ARN as //name, not /name

* test(ssm): prove a parameter//name ARN cannot read a denied /name

* fix(iam): check GetParametersByPath on its path without a trailing slash

* test(iam): prove a Deny on a path holds when GetParametersByPath adds a trailing slash

* fix(iam): check an empty SSM name on parameter/, not parameter/*

* test(iam): cover an empty SSM Name and Names entry checked on parameter/

* fix(cloudformation): record an SSM parameter under the name PutParameter stores

* test(cloudformation): cover an SSM parameter Name with surrounding spaces

* fix(iam): check SSM tagging against the parameter its ResourceId names

* test(iam): cover SSM tagging checked against ResourceId, not an injected Name

* fix(cloudformation): update an SSM parameter in place when its prior id differs only by surrounding spaces

* test(cloudformation): cover updating a parameter recorded with surrounding spaces

* fix(ssm): resolve a tagging ResourceId ARN only in the request's partition, region and account

AddTagsToResource, ListTagsForResource and RemoveTagsFromResource now resolve
an ARN ResourceId the way parameter reads do: only an ssm parameter/ ARN in the
request's partition, region and account names a stored parameter. An ARN for
another region or account, or a parameter ARN without the slash after
parameter, is looked up as a literal name and reported as InvalidResourceId.

IAM evaluates tagging against the ResourceId ARN as sent, so before this a
foreign-region ARN could pass a Deny on the local parameter's ARN and still
tag the local parameter.

* test(iam): cover SSM tagging by a foreign-region ARN leaving a denied parameter untagged

* fix(cloudformation): replace an SSM parameter whose prior id has surrounding spaces

A stack created before parameter names were stripped stored its parameter
under the spaced name, so updating it in place under the stripped name read a
parameter that does not exist and failed with ParameterNotFound. The update
is a replacement again, as for any changed physical id: it creates the
stripped name and deletes the spaced parameter when the update commits.

* refactor(iam): shorten the SSM resource ARN builder's Javadoc

* fix(ssm): resolve a legacy parameter<name> ARN in tagging calls

Before parameter ARNs matched AWS, Floci gave a top-level parameter the
form parameter<name>, and the ARN normalization promised those ARNs
still resolve. Tagging now reads its ResourceId through the
request-scoped read path, which rejected them. A parameter<name> ARN of
the request's partition, region and account is now read as
parameter/<name> before the lookup; one from any other partition,
region or account is still rejected.

* fix(iam): check a legacy parameter<name> tagging ARN as parameter/<name>

The tagging handler reads a parameter<name> ResourceId ARN of the
request's partition, region and account as parameter/<name>. IAM now
evaluates the same ARN, so a Deny on parameter/<name> holds against the
legacy form and IAM and the handler agree on the parameter. A legacy ARN
of another partition, region or account is evaluated as given, and the
handler rejects it.

* fix(ssm): trim only spaces from a PutParameter name

AWS removes leading and trailing spaces from a PutParameter name, not
other whitespace. PutParameter, the AWS::SSM::Parameter provisioner and
the IAM check on PutParameter used String.strip(), which also dropped
tabs, newlines and non-breaking spaces, so such a name was stored under
a different name instead of failing validation. All three now share
SsmService.withoutSurroundingSpaces, which removes only the space
character, so IAM still checks the name the handler stores.
UnlabelParameterVersion keeps its existing strip() on both sides.

* fix(cloudformation): roll back an SSM parameter without PutParameter's name checks

A failed stack update restores the parameter through PutParameter under
the name its snapshot recorded. PutParameter now trims spaces and
rejects colons and interior spaces, so restoring a parameter stored
before those checks either failed, leaving the rollback half done, or
wrote a different, trimmed name. SsmService.restoreParameter overwrites
the parameter under its exact stored name with the rest of
PutParameter's validation, and the rollback uses it.

* docs(ssm): describe parameter name checks, tagging ARNs and IAM resources

Document that PutParameter trims only spaces and rejects names outside
the parameter name syntax, that tagging accepts parameter ARNs of the
request's partition, region and account (the legacy parameter<name>
form included), and which request field each action's IAM check reads.

* fix(iam): check a GetParametersByPath path ending in // as the path searched

GetParametersByPath searches under a Path that already ends in a slash
unchanged, so /app// lists /app//<name>. Dropping one slash checked it
against parameter/app/, which a Deny on parameter/app// never matched.
Only a single trailing slash is dropped now.

Signed-off-by: Tyler Webb <tyler.webb@verkada.com>

* fix(iam): read a legacy SSM tagging ARN in the request's partition

The tagging handlers decide whether a legacy parameter<name> ARN is the
request's own using the request's partition, which for a Region no
partition publishes is the deployment's. The IAM check used the
commercial partition there, so in a non-aws deployment it checked the
literal parameter<name> ARN while the handler tagged parameter/<name>,
and a Deny on parameter/<name> did not apply. SSM requests now carry the
request's partition into the check, as Route 53's do.

Signed-off-by: Tyler Webb <tyler.webb@verkada.com>

* test(cloudformation): fail an SSM rollback restore through restoreParameter

The rollback restore now writes through SsmService.restoreParameter rather
than putParameter, so the integration test's simulated restore failure has
to stub that method for the rollback to fail as the tests expect.

Signed-off-by: Tyler Webb <tyler.webb@verkada.com>

* refactor(iam): leave SSM request resources to the existing builder

Move the SSM IAM resource changes out of this branch so it carries only the
SSM service fixes. The resource-per-operation work moves onto the IAM
request-resource generator separately. withLegacyParameterSlash goes back to
private now that only SsmService reads it.

Signed-off-by: Tyler Webb <tyler.webb@verkada.com>

* test(ssm): cover a parameter//name ARN reading nothing under one slash

Signed-off-by: Tyler Webb <tyler.webb@verkada.com>

* docs(ssm): drop the IAM resource description and note the double-slash ARN

Signed-off-by: Tyler Webb <tyler.webb@verkada.com>

---------

Signed-off-by: Tyler Webb <tyler.webb@verkada.com>
2026-11-12 20:02:54 -04:00
Priamo Germosen 54ea160aa6 feat(emr): run a step's MapReduce and Hive's Tez on the cluster's YARN (#8151)
Where a docker cluster runs YARN its Spark ran on it, while MapReduce and
Hive's Tez stayed in local mode, in the step's container, and a job's own
-D mapreduce.framework.name=yarn failed.

- A step's mapred-site names YARN and the layout of the cluster's nodes,
  which yarn.application.classpath's default does not, S3A's AWS SDK, and
  the step's AWS environment for the application master and tasks, sized
  for a NodeManager; the cluster's mapred-site replaces them.
- A step's hadoop, hadoop-streaming and hdfs dfs run from the nodes'
  Hadoop, /usr/lib or an emr-spark-* release's /opt, set for that command
  alone, so a spark-submit in the same step keeps the release's own.
- The images hold EMR Serverless's build of Tez, whose tez-site.xml names
  its own plugins. On YARN a Hive step names the stock classes from the
  same jars, real ports and bind addresses, ${env.NM_HOST} left for the
  application master's node to fill in, Tez's jars from the node's own
  disk, and one virtual core a task, as YARN's default scheduler grants
  one and Tez gives back a container that does not match what it asked.
  Intermediate compression is off, as the image's codec needs a native
  library it lacks.

Where a cluster runs no YARN, MapReduce and Tez stay in local mode.

Two Docker cases check that a streaming job's tasks and a Hive query's
Tez tasks run in YARN's containers on the cluster's nodes. With them the
two EMR Docker classes take 651s and 402s on CI's runners, so the shard
partitioner weighs them at that, as at 280s and 260s their shard ran into
Surefire's 25 minutes.

With that split, PipesStreamEnrichmentDockerIntegrationTest ran in a JVM
where no class before it had told RestAssured how to send and read
DynamoDB's application/x-amz-json-1.0, which it relied on; it now does so
itself, as other tests do.
2026-11-12 19:20:56 -04:00
Jimmy Liu Jia f41c4ee5c0 feat(kinesis): support stream consumer resource tags (#8057)
* feat(kinesis): support stream consumer resource tags

* fix(kinesis): validate resource tags before updates

* refactor(kinesis): rely on generated tag constraints

* fix(kinesis): align resource tag characters with Tag type

* fix(kinesis): accept colons in resource tags
2026-11-12 19:16:10 -04:00
soreavis 91ec6d29ef fix(apigateway): treat blank documentation part location fields as absent (#8153)
Terraform's aws_api_gateway_documentation_part sends every location
member: the provider sets each key present in the block's map, and the
plugin SDK fills the keys the configuration leaves out with "". The
service kept those blanks in the location and then rejected each one
that does not apply to the part's type, so every type except
RESPONSE_HEADER failed with "Invalid documentation part location field".

A blank member is now dropped like an absent one: it is not stored or
returned, and the type's default fills it where there is one. A
non-blank member that does not apply to the type is still rejected, and
a blank name on a type that requires one still fails as missing.

Fixes #7706
2026-11-12 19:15:21 -04:00
TATSUNO “Taz” Yasuhiro ef785e3269 fix(dynamodb): refuse provisioned capacity above the account and table quotas (#8156)
CreateTable and UpdateTable answer LimitExceededException above the
quotas DescribeLimits reports: 40,000 capacity units for a table or for
one index alone, and 80,000 for the account. The account total adds
every provisioned table and index in the Region.
2026-11-12 19:04:12 -04:00
Tyler Webb c6361cab91 feat(eventbridge): create partner event buses from EventSourceName (#7968)
* feat(eventbridge): create partner event buses from EventSourceName

CreateEventBus and AWS::Events::EventBus now accept EventSourceName. The
bus takes the source's name, so Name must equal it and must match
aws.partner/<partner>/<source>. Floci does not model partner event
sources, so any well-formed source name is accepted without one being
created or activated first.

A partner bus name contains slashes, so rule lookups for a bus no longer
match the rules of a bus nested under its name, and a rule ARN on a
partner bus resolves its bus and rule name from the last slash.

* test(eventbridge): cover partner event buses

Covers creating a partner bus from its EventSourceName, a name that
differs from the source or is not a partner name, rules, targets, tags
and PutEvents on the bus by name and by ARN, nested partner buses
keeping their rules apart, deletion, and the CloudFormation resource.

* refactor(eventbridge): resolve rule ARNs from the first slash again

ruleKey joins the bus and rule name with a slash, so splitting a rule
ARN at the first or the last slash finds the same stored rule. The
original split is kept, and the test that only exercised the changed
split goes with it; tagging a rule on a custom bus by ARN stays covered
by the existing tag tests.

* fix(eventbridge): validate rule names in PutRule

PutRule accepted any name, so a name holding a slash was stored under a
key that ListRules, PutEvents and DeleteEventBus no longer treat as a
rule of that bus, and could collide with a rule on a nested partner bus.
Rule names now match [\.\-_A-Za-z0-9]+ and are at most 64 characters,
as AWS models them, and a missing or out-of-pattern name fails with
ValidationException. The CloudFormation AWS::Events::Rule resource
creates its rule through the same PutRule path.

* fix(cloudformation): reject a Policy or malformed source on a partner event bus

An AWS::Events::EventBus with EventSourceName now checks the source name
against aws.partner/<partner>/<source> in the provisioner, so a
malformed one fails with ValidationError like the resource's other
checks rather than with the service's ValidationException. A Policy
given with EventSourceName is rejected with ValidationError before the
bus is created, since Floci never applies a resource policy to a bus
whose name holds a slash.

* fix(eventbridge): answer partner and rule name violations in AWS's shape

CreateEventBus with EventSourceName and PutRule now report a bad name
the way AWS's validation layer does, through SmithyValidationErrors:
"1 validation error detected: Value '...' at 'name' failed to satisfy
constraint: ...", naming the length, pattern or missing member that
failed. A partner bus with no Name now gets the required-member error
rather than a name mismatch. The partner source pattern is one public
constant on EventBridgeService, which the CloudFormation provisioner
now uses too.

* fix(eventbridge): refuse PutPermission and RemovePermission on a partner bus

Both operations model the bus as NonPartnerEventBusName, so AWS refuses
a partner bus there. Floci stored the policy, but never applied a
resource policy to a bus whose name holds a slash, so the statement had
no effect. They now fail with ValidationException in AWS's validation
shape, and an AWS::Events::EventBusPolicy on a partner bus fails the
stack the same way.

* fix(cloudformation): let an update change a partner bus's EventSourceName

Once a bus exists its Name is fixed, and a Name change is already
refused as a replacement, so EventSourceName carries nothing more on an
update. An UpdateStack that drops, adds or changes it while keeping
Name used to be validated as if it were creating the bus and failed;
it now updates the bus in place. Whether the bus is a partner bus is
read from its name, so a Policy on one is still refused when the
template stops naming its source.

* test(eventbridge): cover nested-bus PutEvents, partner rule tags and CFN rules

PutEvents on a partner bus does not fire the rules of a bus nested under
its name, a rule on a partner bus is tagged and listed by its ARN, and
an AWS::Events::Rule names a partner bus in EventBusName and goes with
the stack.

* docs(eventbridge): note partner bus permissions, PutEvents and the rule-name upgrade

* fix(cloudformation): validate a supplied EventSourceName on an event bus update

An update that keeps the bus's Name skipped EventSourceName entirely, so
a malformed source, one that does not match Name, or one newly added to
a custom bus was accepted. When the template supplies EventSourceName it
is now checked the way creation checks it; leaving it out still updates
the bus in place.

* fix(eventbridge): let a legacy slash-named rule block DeleteEventBus

DeleteEventBus only counted rules whose name held no slash, so a bus
whose only rule was a legacy slash-named one could be deleted, orphaning
the rule; a scheduled one kept firing after a restart. Every rule stored
under the bus now blocks the delete, except the rules of an existing
nested partner bus, which share the key prefix but belong to that bus.

* fix(eventbridge): validate rule names in the rule and target operations

Only PutRule checked the rule name, so DeleteRule, EnableRule,
DisableRule, PutTargets, RemoveTargets and ListTargetsByRule took a
name like a/b and looked it up by key, which on a partner bus could
reach a rule of a nested bus. They now answer a ValidationException the
way PutRule does. A legacy slash-named rule that is stored on the bus
named in the request is still reachable by its exact name, so it can
have its targets removed and be deleted.

* refactor(eventbridge): split a rule ARN at its last slash

A rule name holds no slash, so the bus is everything before the last
one. Splitting at the first slash found the same stored rule, since the
key joins bus and rule with a slash, but left RuleRef's bus and rule
wrong for a rule on a partner bus such as
rule/aws.partner/example.com/acct/r1.

* docs(eventbridge): describe legacy slash-named rules and EventSourceName updates

A legacy slash-named rule is hidden from ListRules and PutEvents but
still reachable by its exact name and blocks DeleteEventBus, and the
other rule operations now validate the name. On a CloudFormation update
a supplied EventSourceName is validated as on creation.

* fix(eventbridge): keep every persisted rule reachable by its exact name

PutRule did not validate rule names before, so a stored rule can be longer
than 64 characters or contain a space, colon or at sign. Skip name validation
whenever a rule with that exact name is stored on the requested bus, not only
for slashed names, so such a rule can still have its targets removed, be
disabled and be deleted, and no longer blocks DeleteEventBus forever.

* fix(eventbridge): name the rule member in target operation validation errors

PutTargets, RemoveTargets and ListTargetsByRule take the rule name in their
Rule member, so report a rejected name at 'rule' as AWS does instead of
at 'name'.

* fix(eventbridge): validate the rule name in DescribeRule

DescribeRule now applies the same rule name check as the other rule
operations, so a malformed name fails with ValidationException instead of
ResourceNotFoundException, while a persisted rule stays describable by its
exact name.

* fix(eventbridge): resolve a legacy slashed rule ARN on a custom bus

Splitting a rule ARN at its last slash finds rules on partner buses but
misses a rule persisted with a slash in its name on a custom bus, such as
rule/foo/team/r1. When no rule is stored for the last-slash split, fall back
to the first-slash split if the rule stored there belongs to that bus, so
TagResource, UntagResource and ListTagsForResource reach it again.

* refactor(eventbridge): decide DeleteEventBus by each rule's own bus

Count a stored rule against the bus being deleted when its eventBusName is
that bus, rather than inferring ownership from whether a nested bus exists
under the rule key's prefix.

* docs(cloudformation): note that AWS replaces a bus whose EventSourceName is dropped

* test(eventbridge): cover legacy slashed rules on a custom bus

Exercise the rule and target operations on a slash-named rule persisted on a
custom bus, and check that a slashed name stored for a different bus is still
rejected by every rule and target operation.

* refactor(eventbridge): split a rule ARN at its last slash only

A rule's store key joins the bus and rule name with a slash, so splitting
rule/foo/team/r1 at its first or last slash names the same stored rule. The
first-slash fallback could never find a rule the last-slash lookup missed;
drop it and resolve the ARN without a store lookup.

* test(eventbridge): pin the error a removed legacy slashed rule returns

Once the stored rule is gone, DescribeRule validates its slashed name again and
fails with ValidationException. Assert that code, and that the rule left the
store, instead of any AwsException.

* fix(cloudformation): treat a gone legacy-named rule as deleted

A stack created before rule names were validated can hold a rule whose name
PutRule now rejects. Once that rule is gone, ListTargetsByRule validates the
name and fails with ValidationException, so DeleteStack ended DELETE_FAILED.
Check whether the rule is stored first, through a new
EventBridgeService.ruleExists that skips name validation, and treat a missing
rule as already deleted.

* docs(eventbridge): spell out what a legacy slashed rule can still do

A slashed rule on the default bus can't be tagged by ARN, since rule/team/rule-1
reads as rule rule-1 on bus team; it stays reachable by exact name for the rule
and target operations only. A stack holding a legacy-named rule can still be
deleted, but an UpdateStack touching it fails because PutRule rejects the name.

* fix(eventbridge): report the length violation of a long partner bus name on permission calls

Signed-off-by: Tyler Webb <tyler.webb@verkada.com>

* test(cloudformation): drop the section divider above the partner bus provisioner tests

Signed-off-by: Tyler Webb <tyler.webb@verkada.com>

* docs(eventbridge): ground the partner bus permission rejection in the API model

Signed-off-by: Tyler Webb <tyler.webb@verkada.com>

* fix(eventbridge): keep a partner bus off a legacy rule that shares its key

A rule key joins the bus and rule name with a slash, so a slash-named rule
persisted by an earlier version on a custom bus named aws.partner (for
example example.com/orders/r1) has the same key as rule r1 on partner bus
aws.partner/example.com/orders. Rule lookups, ListRules and PutEvents now
check the stored rule's bus, so the partner bus neither lists, fires nor
manages that rule, and PutRule on the partner bus is rejected rather than
taking over the legacy rule's tags and targets.

Signed-off-by: Tyler Webb <tyler.webb@verkada.com>

* test(eventbridge): keep Step Functions target rule names within the 64 character limit

PutRule now rejects rule names longer than 64 characters, as AWS does. The
Step Functions integration test built names from a 16 character prefix, the
suffix and a UUID, so the missing-target rule name reached 67 characters and
PutRule rejected it before the test ran. Use a shorter prefix.

Signed-off-by: Tyler Webb <tyler.webb@verkada.com>

* fix(eventbridge): check a permission call's bus name against the modeled 256 character limit

PutPermission and RemovePermission type EventBusName as NonPartnerEventBusName, which the model bounds at 1 to 256 characters with pattern [\.\-_A-Za-z0-9]+. The partner bus check used the 64 character rule name limit, so a partner bus name of 65 to 256 characters drew a length violation AWS does not report.

Signed-off-by: Tyler Webb <tyler.webb@verkada.com>

---------

Signed-off-by: Tyler Webb <tyler.webb@verkada.com>
2026-11-12 19:03:15 -04:00
Priamo Germosen 8b625f7e30 fix(iam): hold a blank required member to its shape rather than reading it as absent (#8058)
A required member the request carried empty was answered as a member it
never carried: `requireParam` threw the null violation for a blank value
as well as for an absent one, and `validatedPolicySourceArn` handed a
blank to the resolver that answers an absent `PolicySourceArn`. On this
protocol an empty value is a member the request carries, so what a blank
breaks is the shape declared for it, and that is the constraint AWS's
validation layer reports.

For nearly every member nothing moves, because the constraints read
ahead of the operation already answer a blank against the minimum, the
pattern or the value set its shape declares: `RoleName=` breaks its
pattern, `Status=` its value set, `PolicyDocument=` both its minimum and
its pattern. Of every member read through `requireParam`, only
`serviceName` on `CreateServiceSpecificCredential` declares none of the
three. A blank there reaches the operation now, where a service name
nothing supports is `NoSuchEntity` with the name echoed as the caller
sent it, which is what LocalStack's AWS-validated snapshots record for a
malformed name as well as for an unsupported one.

`PolicySourceArn` is the one `arnType` member this package reads by hand,
the simulators answering an absent one in a sentence of their own. A
blank is held to the 20 characters the member declares now, which is the
answer `GetContextKeysForPrincipalPolicy` gives for the same member
through the model, so the two readers of it agree on the same input. One
left out keeps that sentence.

`docs/services/iam.md` records the split beside the wording an absent
member answers with, and four tests in the constraints class pin both
halves on both members. One assertion in the service-specific credential
tests pinned the old reading, a blank name said never to reach the
service check, and it moves with the fix: the blank reaches it and the
absent name is what the required-parameter check answers.
2026-11-12 19:02:40 -04:00
Priamo Germosen 9f1cccf83f feat(iam): check FIS, RAM, OAM and three more services by their REST routes (#8154)
Under enforcement a REST route no rule maps and no vendored model names
runs unchecked. AWS Fault Injection Service, AWS RAM, CloudWatch
Observability Access Manager, AWS Resource Explorer, AWS Account
Management and AWS Control Catalog were among those: none of their 94
served routes had a rule.

Vendors the six models, so each route is checked as its operation's
action, on the resource its request names. A caller holding no grant
for them is now refused where the request used to pass; that is the
behaviour change.

Resource Explorer's five routes that S3 Vectors shares are matched on
the path without the prefix its filter moves them under. The FIS and
Resource Explorer tag routes are the shared controller's and keep its
bare /tags form. OAM's tag routes take the ARN as the rest of the path,
as the controllers serving them do, so an ARN sent with its slash
unencoded is checked too.

The request-resources generator reads these requests with no
hand-written correction, through four rules that hold for any service:
- A bare id after a path segment naming a type names that type:
  /safetyLevers/{id}/state is the lever whose state
  UpdateSafetyLeverState sets.
- A member fills the variables of a resource's own path before the
  account its ARN is in, so Account Management's AccountId is the
  member account of an accountInOrganization ARN.
- A type whose ARN is the account alone applies to a request leaving
  out its optional account member, when that member names another
  type: a request without AccountId acts on the caller's own account.
- A create makes its own type even when a member holds the resources
  the action acts on: CreateResourceShare makes the share, and its
  resourceArns are what the share holds.

Account Management finds that member account's organization and
management account in the caller's organization, through the lookup
the reader asks a service for the ARNs it stores, so a request naming a
member is checked on the ARN AWS checks.

The first rule also reads four CloudFront web ACL association
operations and four OpenSearch data source attachment operations on the
distribution or application their paths name. Floci serves none of
them.

An ARN fitting both a customer's format and one AWS owns is AWS's, so
an AWS managed permission is not also checked in the caller's account.

Regenerating the tables also brings in what AWS has added since the
last sync: eight Amazon Cognito user pool session operations and eight
Kinesis Analytics snapshot operations, none of which Floci serves. The
snapshot create's tags are read once the pinned botocore has it. The
count of tagged operations in iam.md is now the table's, 589, which
also takes 23 that earlier syncs added without moving it.
2026-11-12 18:59:01 -04:00
soreavis 6b129de242 fix(config): add the recorder arn to its status and filter by Arn (#8142)
DescribeConfigurationRecorderStatus did not return the recorder's arn,
a member botocore models on ConfigurationRecorderStatus, and neither
Describe call read the Arn request member both of them model.

Return the arn in the status. An Arn that does not name the recorder
now answers NoSuchConfigurationRecorderException, which both
operations model, as a name that matches nothing already did. Given
both Arn and ConfigurationRecorderNames, each must name the recorder;
the model and the API reference don't say what AWS does then. A
recorder saved before recorders had an ARN has no arn in its status,
and no Arn finds it, until its next Put.

Both Describe methods carried the same check that answers
NoSuchConfigurationRecorderException for an Arn that does not name the
recorder. It now lives in one private helper, as requireRule and
requireAuthorizationKey do for their checks. No behaviour change.

The two Arn tests called a private post helper that repeated
RestAssuredJsonUtils.awsAction. They now call awsAction directly.
2026-11-12 16:50:20 -04:00
mrfelekandmrfelek 0b6a6003b0 fix(emr-serverless): check EMR Serverless's requests under IAM enforcement (#8143)
Under IAM enforcement no EMR Serverless request was checked: its model
was not among the vendored REST routes and its namespace's request
resources were not read, so no request was mapped to an action and the
filter let it through. A caller with no permissions could create, read,
update and delete applications and start and cancel job runs. A request
sent straight to /_emrserverless, the prefix its route filter moves
requests onto, reached the controller too, whatever it was signed for.

EmrServerlessRouteFilter now goes through SignedServiceRoute, as the
other filters that move a service's routes do: a request signed for
EMR Serverless is moved onto /_emrserverless, one sent to the prefix
signed for another service is refused, and the prefix it records lets
IAM match the vendored routes at the model's paths. EMR Serverless's
routes are vendored and its requests read, so an application call is
checked on the application its path names. Its namespace also leaves
the exclusions of regen_iam_tag_on_create.py and regen_iam_passed_roles.py:
tags a create sends are checked as emr-serverless:TagResource, and
StartJobRun and StartSession check iam:PassRole on the execution role.

Co-authored-by: mrfelek <17274927+mrfelek@users.noreply.github.com>
2026-11-12 16:46:38 -04:00
Niels Kootstra f3c6d8e809 fix(ssm): send DescribeDocument's CreatedDate as epoch seconds (#8139) 2026-11-12 16:25:02 -04:00
jwoa95 1bdc839350 fix(apigatewayv2): retain integration descriptions (#7998) (#8126)
Closes #7998

Validate description types before creating or changing an integration so malformed JSON returns BadRequestException instead of an uncaught ClassCastException. Preserve omitted, null and empty-string behavior. Cover create and update over REST and JSON 1.1, including rejection without stored changes.
2026-11-12 16:22:16 -04:00
Oleksandr Nikolaichuk 5876a37888 refactor(cloudformation): tell each provisioner what the update changed in its properties (#8087) 2026-11-12 16:20:30 -04:00
Jackson Price c0ef5b2bfd fix(appsync): require a format for type updates (#8149) 2026-11-12 16:17:42 -04:00
Jimmy Liu Jia 0924e6a46d fix(dynamodb): validate update attribute values (#8145) 2026-11-12 16:15:01 -04:00
soreavis 9ead504085 fix(organizations): refuse a request member of the wrong JSON type (#8141)
The Organizations handler read each member with asText, asInt or path,
so a Tags that isn't a list was read as no tags, a number where a
string belongs as its text, and a string MaxResults as a number.

Vendor botocore's Organizations request shapes with
tools/aws/regen_organizations_shapes.py, kept in sync by make
aws-data-check. Once the switch in handle finds a served operation,
walk the request against that operation's input shape with
RequestShapeCheck before the operation reads it, as Rekognition's
handler does. An operation Floci doesn't serve still answers
UnknownOperationException, whatever its body.

A mismatch is a SerializationException worded as DynamoDB's
deserializer words it. Organizations' own error and wording haven't
been measured.

The tag checks parseTags already makes still run: a null member counts
as absent in the walk, so a null or missing Key or Value and a repeated
key keep their InvalidInputException.
2026-11-12 16:10:12 -04:00
Priamo Germosen 81894c545d feat(iam): check API Gateway's routes by botocore's models (#8060)
API Gateway was the one REST service besides S3 that the registry
authorized by hand: seven rules gave every management route its HTTP
method's action, apigateway:GET, apigateway:POST and so on, with two
named exceptions written in. Its routes were vendored for the coverage
test only.

The developer guide gives the management API's actions as the HTTP
verbs, and the Service Reference lists most API Gateway operations the
action of their route's method beside permissions AWS checks only when
the request carries what they guard, such as UpdateRestApiPolicy for a
resource policy or iam:PassRole for a role. The authorized-actions
table now lists those operations, 55 of them, under authorizedByMethod,
and a request on such an operation's route is checked as the action its
own method names: TagResource is a PUT in v1 and a POST in v2. The
other 132 are the single-action renames the table already held,
RejectDomainNameAccessAssociation and PutRoutingRule among them, or
keep the action of their own name, as the portal, portal product and
routing rule operations do.

So the rules go and API Gateway leaves the hand-routed scopes. Every
route Floci serves is checked as before. Its v1 tag routes are the
shared tags controller's, so they take an ARN sent unencoded and keep
the bare /tags forms, whose tagging form is a POST although v1 tags
with a PUT. v2's tag routes take an unencoded ARN too, as its
controller does.

The routes Floci does not serve, those of portals, portal products and
routing rules, are now checked as the actions AWS names for them rather
than as their method. A path no route of either model has, such as a
deployed API's execute path signed for apigateway, is no longer checked
as a management action: AWS authorizes an invocation as
execute-api:Invoke, which the execute path checks itself.

Regenerating the authorized-actions table also brings in two Lake
Formation operations AWS has added since,
GetGlueFunctionSessionContext and GetTemporaryGlueFunctionCredentials,
both authorized as lakeformation:GetDataAccess. Floci serves neither.

The passed-role generator imports the authorized-actions one, so the
online IAM gate checks the passed-role table for this change too, and
the table no longer held: AWS now passes EMR StartSession's role to
managed-compute.elasticmapreduce alone. Syncing it had failed since AWS
listed iam:PassRole for three more operations the generator found no
role member on, and asks a reason for.

CloudWatch Logs StartQuery names no role at any depth, in the pinned
botocore or the newest, so it is not read for that reason. SSM
RegisterDefaultHostManagementConfiguration and Kinesis Analytics
ImportSnapshot are newer than the pinned botocore, so their requests
cannot be read yet. They get a reason the sync and the offline gate
both refuse once the pinned models carry the operation, so a bump
cannot leave their roles unread. Floci serves StartQuery and neither of
the others.

That refusal caught two entries the pin had already outgrown. ECS
CreateGateway and UpdateGateway were excused as operations botocore
does not model, from the day the table was generated, and the pin has
had both for a while, each naming the infrastructureRoleArn of "the IAM
role that the gateway assumes to create and manage infrastructure on
your behalf". The reference passes it to ecs.amazonaws.com, so the
table reads it for both now. StartSession's role goes where the
reference sends it, and the hand mapping that picked elasticmapreduce
out of its two services is gone. Floci serves neither ECS gateway
operation nor StartSession.
2026-11-12 16:07:36 -04:00
Roger Far 9831603f67 feat(cloudfront): add CloudFront KeyValueStore support (#8108) 2026-11-12 14:19:52 -04:00
Jackson PriceandAndre Kurait 2beb3b6c0d fix(glue): remove database functions during deletion (#8128)
* fix(glue): remove database functions during deletion

Remove user-defined functions belonging to a deleted database alongside
its existing table cleanup. Recreating the database must not expose its
old functions or prevent a fresh function with the same name.

Cover deletion and recreation through the service and AWS SDK, retaining
same-name functions in a neighboring database.

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

* fix(glue): make database function cleanup atomic

Include default-account legacy functions in one atomic deletion batch and
coordinate database lifecycle with function writes and legacy lookups.
Match the stored database identity when selecting records for cleanup.
Cover persisted legacy data, account ownership, write failures and races.

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

---------

Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
Co-authored-by: Andre Kurait <akurait@amazon.com>
2026-11-12 14:12:26 -04:00
Jackson PriceandAndre Kurait 5d1d626cbe fix(appsync): validate type updates before mutation (#8129)
Reject an invalid type format before changing the stored definition.
Keep validation inside the existing synchronized update operation.

Cover the refused request through service and AWS SDK tests, including
unchanged get/list responses and a subsequent successful valid update.

Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
Co-authored-by: Andre Kurait <akurait@amazon.com>
2026-11-12 14:08:04 -04:00
jwoa95 5da8045bb2 fix(cognito): reject undeclared custom user attributes (#7994) (#8124) 2026-11-12 14:04:51 -04:00
jwoa95 021e580a60 fix(ecs): preserve requested service platform version (#7997) (#8125)
* fix(ecs): preserve requested service platform version

* fix(ecs): restore requested platform version on rollback

Snapshot the requested service setting separately from the resolved revision version so rollback preserves LATEST. Retain a fallback for older snapshots and cover numeric versions, serialization and rollback after restart.
2026-11-12 14:02:05 -04:00
Priamo Germosen 7ebed877a8 feat(emr): run a cluster's core and task nodes in containers of their own (#8066)
A docker cluster's YARN and HDFS ran on its primary node alone, however
many instances the cluster named. On EMR "Core nodes run the Data Node
daemon", "a core node runs YARN NodeManager daemons, Hadoop MapReduce
tasks, and Spark executors", and "Task nodes don't run the Data Node
daemon".

- Each core and task node is a container of its own on the cluster's
  network, with its data in a volume of its own, its name there the
  private DNS name ListInstances gives it. The primary node keeps a
  DataNode and a NodeManager only on a cluster created with no core
  node, which keeps them as core nodes are added, and a primary node
  whose volume holds a DataNode's data runs it in any case, so the
  blocks on it stay in reach.
- ListInstances gives each group's instances addresses of their own, so
  an instance keeps its address while another group resizes.
- How many follows the instance groups' counts or the instance fleets'
  target capacities, at most yarn-max-worker-nodes, core nodes first. A
  fleet's unit of capacity is one node. With 0 a cluster runs on its
  primary node alone.
- HDFS keeps what EMR's does: one copy of a block below four core nodes,
  two below ten, three otherwise, or the hdfs-site classification's
  dfs.replication. Steps' Spark, Hive and hadoop clients write that many.
- A resize reaches the nodes of a cluster a step has started them on, on
  another thread: a new node takes work once it has registered, and one
  no longer wanted is decommissioned, HDFS and YARN telling when it may
  go, within EMR's default hour, each node its own, then goes with its
  data. Core nodes stop at the copies HDFS keeps.
- A core node's NodeManager is decommissioned only once HDFS has moved
  its blocks, as a decommissioned NodeManager exits, which ends the
  node's container, its DataNode with it. A core node that has gone
  stays among HDFS's excluded nodes until the NameNode has it dead, 40s
  after it stopped, so the copies it held never count again.
- A core node that stops before HDFS has moved its blocks starts again
  on its data, and one a shutdown cut off while it was decommissioned
  starts again with the cluster's next step, from its volume, which
  carries its name, to be decommissioned then. A task node's volume a
  shutdown left goes.
- A decommissioning round that fails, a refresh of HDFS's or YARN's
  lists among them, is tried again on the next; a node Docker will not
  remove yet stays to be removed then, and one whose start a teardown
  passed goes. A cluster's end removes the volumes of nodes that have no
  container, and finishes even when Docker cannot list its nodes.
- The node list is read inside the cluster's lock, so a step queued
  before a resize starts the nodes asked for by then.
- Container logs come from every node, a decommissioned one's first.
2026-11-12 13:59:34 -04:00
Jimmy Liu Jia 40ba75fd6f fix(rds): rewrite IAM user DDL in compressed MySQL commands (#8114)
* test(rds): reuse MySQL login harness in older socket tests
* fix(rds): rewrite compressed IAM DDL in multi-statement queries
* fix(rds): preserve compressed MySQL frames at relay boundaries
2026-11-12 13:57:45 -04:00
galsuchetzky-act 254d9b9610 fix(lambda): retain MicroVM run settings and image version (#8123)
* fix(lambda): retain MicroVM run settings and image version

Retain execution settings in run responses and stored MicroVM metadata, and select the requested image version. Validate request bodies with vendored model constraints through the shared request validator.

* fix(lambda): share connector defaults and verify list summaries

Use the same managed connector projection for image and MicroVM responses. Cover the requested version and unchanged summary fields in ListMicrovms, including explicit-version and omitted-version controls.
2026-11-12 13:55:28 -04:00
Jimmy Liu Jia e1cd3e3015 fix(dynamodb): reject malformed nested attribute values before writes (#8121) 2026-11-12 11:59:43 -04:00
jwoa95 021ce5e59b fix(cognito): expose response headers for allowed browser origins (#8109) 2026-11-12 11:29:07 -04:00