Commit Graph
6036 Commits
Author SHA1 Message Date
mrfelek cf40caafa2 fix(eks): join EKS Auto Mode instances to the API server at its VPC address (#9786)
The NodeConfig an EKS Auto Mode instance joins with named the cluster's
endpoint as DescribeCluster returns it, the one Floci publishes for
clients outside the VPC (the Docker host's port, or localhost), which an
instance in the VPC can't reach, so a kubelet image's node never joined.

It now names the API server's address in the cluster's VPC, the cluster
node's address in its subnet on port 6443, which k3s names in its
serving certificate as it does every --node-ip, as an EKS private
endpoint answers inside the VPC. A cluster node without a subnet address
keeps the published endpoint.
2026-11-29 21:11:58 -04:00
Jackson PriceandAndre Kurait 13c6f0a419 test(apigateway): cover SigV4 authorization with request query maps (#9787)
Signed-off-by: Andre Kurait <akurait@amazon.com>
Co-authored-by: Andre Kurait <AndreKurait@gmail.com>
2026-11-29 21:06:38 -04:00
Priamo Germosen 907217bbcd feat(emr): run no HDFS or YARN on a cluster with Trino alone from emr-7.14.0 (#9775)
From emr-7.14.0, "When you select Trino as the only application at launch, Amazon EMR no longer starts YARN
and HDFS." A cluster whose Applications name Trino alone now runs neither: its primary node runs the metastore
EMR still installs with Trino, and Trino, without a NameNode or DataNode, and it starts no YARN and no core or
task node containers. Where Floci runs no Trino, such a cluster's steps get its volumes,
and its network, where they read their primary node's instance metadata.
2026-11-29 20:54:05 -04:00
Jackson PriceandAndre Kurait 46a3d8ae33 fix(dynamodb): cover account endpoint TLS hostnames (#9784)
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
Signed-off-by: Jackson Price <jxnprice@amazon.com>
Co-authored-by: Andre Kurait <AndreKurait@gmail.com>
2026-11-29 20:20:50 -04:00
mrfelek b356fefeae fix(eks): name an EKS Auto Mode node by its instance ID when its image runs a kubelet (#9785)
An EKS Auto Mode instance whose image's own kubelet registers its node
(kubeletRegistersNode) was looked for under its private DNS name, while
the node is authenticated as system:node:<instance-id>. Node restriction
refuses that kubelet a node under the DNS name, and one registered under
the instance ID was never found, so the instance was terminated once its
registration wait was up.

The node is now named by the instance ID whoever registers it, and the
NodeConfig Auto Mode launches with turns on nodeadm's InstanceIdNodeName
feature gate, so the kubelet registers it under that name.
2026-11-29 20:18:22 -04:00
Jackson Price c759246a4a test(redshift): share COPY pipeline regression coverage (#9783)
extendedCopyReleasesBufferedCloseBeforeTakingBackendOwnership in
RedshiftInterceptingBridgeTest repeated
pipelinedExtendedCopyPreservesResponseOrderAndSyncReadyForQuery step for
step, apart from a Sync sent in the same pipeline. The pipeline test now
takes whether Sync arrives with the pipeline or after COPY completes as a
parameter, so both cases share the backend exchange and the response
order assertions, and the delayed case still checks that ReadyForQuery
waits for the Sync.

Signed-off-by: Jackson Price <jxnprice@amazon.com>
2026-11-29 20:17:00 -04:00
Mahmoud Khalifa 539d9083e8 refactor(redshift): build zero-ETL backfill keys with DynamoDbKeyAttributes (#9777)
RedshiftDynamoDbZeroEtlConsumer.toBackfillRecord held its own copy of
the key schema loop that DynamoDbKeyAttributes.of provides. The helper
is now public and the backfill uses it, so the stream service, the
Kinesis forwarder, the BatchWriteItem capacity lookup and the zero-ETL
backfill build their Keys in one place. The helper walks the key schema
in the same order and skips an attribute the item lacks, so the backfill
record's Keys, and the event id hashed from them, are unchanged.
2026-11-29 19:17:22 -04:00
Mahmoud Khalifa cce4b4b65d refactor(dynamodb): drop the sections-only UpdateExpression check (#9780) 2026-11-29 19:15:09 -04:00
Hector Ventura 2a56926f7b test(eventbridge): cover the load-time move through init() and all eight stores (#9781) 2026-11-29 19:13:16 -04:00
Jackson Price 53beb7b198 test(cloudformation): reuse stack waits in deleted resource history tests (#9772)
CloudFormationDeletedResourceHistoryIntegrationTest now creates and
deletes its stacks through CfnStackWaits.createStack and deleteStack
instead of its own lifecycle waits, so a create that ends in another
terminal status fails at once with its reason. The by-name
ValidationError wait after the delete stays, since the stack reports
DELETE_COMPLETE a moment before its name leaves the live stacks.

Signed-off-by: Jackson Price <jxnprice@amazon.com>
2026-11-29 19:12:31 -04:00
Oleksandr Nikolaichuk c376c25262 refactor(cloudformation): Dashboard takes replacement from the engine (#9671)
AWS::CloudWatch::Dashboard now takes its name and its replacement decision
from ProvisionContext.changes and leaves the change-exempt list. The
FlociDashboardNameMode attribute and physicalName() go, since the engine
sees a dropped DashboardName itself; a replacing update that keeps the
prior name is refused.
2026-11-29 19:10:41 -04:00
Priamo Germosen e4ee7816ad fix(iam): check each secret a Secrets Manager batch read returns as GetSecretValue (#9774)
The API reference's required permissions for BatchGetSecretValue say "you must have secretsmanager:GetSecretValue for
each secret", and the Service Reference lists that action among the operation's. Floci checked the batch action only,
so a caller allowed secretsmanager:BatchGetSecretValue read every secret, whatever its policies said about
GetSecretValue on each one.

The authorized-actions generator now reads that clause, already vendored by
fetch_secretsmanager_required_permissions.py, into a perEntry section: the action an operation needs on each entry it
reads, with the type of the action the clause's words name as the generators' names go (stem: secret is Secret),
where the Service Reference lists the action among the operation's. IamAuthorizedActions reads it, and the Secrets
Manager handler checks each secret a batch read returns against it, both by SecretIdList and by Filters. A secret the
caller may not read goes to Errors as AccessDeniedException, under the id it was requested as (its ARN for a filtered
read), and the others are returned, as AWS's own fidelity check records it
(check_batch_get_secret_value_returns_partial_results_with_a_per_secret_error_for_a_denied_secret).

Each secret is checked with the condition keys of its own stored tags (aws:ResourceTag/<key>,
secretsmanager:ResourceTag/<key>), through IamEnforcementFilter.authorizeEntryResource, so a grant or a deny scoped to
a tag holds for each secret of a batch as it does for a GetSecretValue of that secret alone.

The gates this change runs need today's AWS too, so the tables they cover are synced: the Service Reference lists 37
more Glue actions with no resource type and S3 Tables' ListStorageLensConfigurations (iam-authorized-actions.json),
S3 Tables' StorageLens type on its tagging actions with its ARN format and tag keys, and the elasticfilesystem-endpoint
and s3files-endpoint namespaces it does not read (iam-request-resources.json), three S3 actions taking
s3:ResourceAccount, GetBucketDefaultStorageClass, PutBucketDefaultStorageClass and GetIncompleteUpload
(s3control-tag-condition-keys.json), and the S3 user guide's permissions table gives the two default storage class
operations (tools/aws/sources/s3-required-actions.json).
2026-11-29 19:06:49 -04:00
Jackson PriceandAndre Kurait 682611b339 fix(redshift): flush pending replies before Spectrum execution (#9773)
Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Jackson Price <jxnprice@amazon.com>
Co-authored-by: Andre Kurait <AndreKurait@gmail.com>
2026-11-29 19:02:37 -04:00
TATSUNO “Taz” Yasuhiro 2242a9de4f feat(eventbridgev2): look up the KMS key of a new event bus (#9771) 2026-11-29 18:56:07 -04:00
Priamo Germosen c4c62d9230 fix(emr): copy a cluster's Trino authenticator files without reading them into memory (#9768)
The files a cluster's trino-password-authenticator names were read whole into Floci's heap before being copied
into Trino's container, so a bootstrap action writing a file of several gigabytes could run Floci out of
memory. ContainerFiles.copy now copies a file between containers through an owner-only temporary file, one
Docker request after the other, and refuses one larger than the memory Trino's container gets, which Trino
reads it into, before any of it is written.
2026-11-29 17:11:32 -04:00
mrfelek a6b5d1b210 fix(eks): keep the nodes Floci registers for joined instances Ready, renewing their Lease as a kubelet does (#9759)
The node lifecycle controller marked every node Floci registers for a
joined instance Unknown once node-monitor-grace-period had passed (40
seconds up to Kubernetes 1.31, 50 from 1.32), tainted it unreachable
and evicted its pods, since no kubelet renewed its Lease. Every 10
seconds, as a kubelet does, Floci now renews each running instance's
node Lease in kube-node-lease, owned by the node and 40 seconds long,
and posts Ready again for a node the controller marked not Ready. A
stopped instance's node is not renewed, so it goes not Ready as on EKS.

The renewal runs on a scheduler of its own, apart from the readiness
poller, with each cluster on its own thread, so a slow API server
delays no other cluster's heartbeat, and a sweep that throws is logged
without ending the schedule. The kubectl apply command is now built
once, by EksClusterManager.kubectlApply.
2026-11-29 17:04:01 -04:00
Priamo Germosen 6563e6a315 fix(iam): check each layer a Lambda function adds as lambda:GetLayerVersion (#9769)
The Service Reference lists lambda:GetLayerVersion among the actions CreateFunction and UpdateFunctionConfiguration
are authorized by, and the Lambda Developer Guide says what it is checked on: "Make sure that you have permission to
call the GetLayerVersion API on the layer version". Floci checked neither operation as it, so a caller allowed to
create or update functions added any layer version of its account, whatever its policies said about reading it.

tools/aws/fetch_lambda_layer_permissions.py vendors that sentence from the adding-layers page, with the action and
the resource it names, and refuses a page asking for permission to call an API in any other wording. The
request-resources generator reads it (api_permission_resources): an operation the Service Reference lists as
authorized by that action is also checked as it on each value of the request's member holding botocore's ARN shape
for the type the words name (`<Type>Arn`, as minted_types reads it; `Layers`, a list of `LayerVersionArn`, for a
`layerVersion`). CreateFunction and UpdateFunctionConfiguration now check lambda:GetLayerVersion on each layer
version their Layers give, and a request giving none is not checked as it; no other operation changes.
--verify reports an operation checked so whose action the Service Reference stops listing (verify_api_actions).

CreateFunction is the first operation checked by parts that also tags what it creates, so IamEnforcementFilter now
checks an operation's own action, where it is one of the parts, as it would be alone: with the request's tags
(aws:RequestTag, aws:TagKeys) and carried values, not the bare part context. The checks made after it, the tagging
action a create also needs, a companion and a forwarded action, are made on the resources that action was checked on,
not on *, so lambda:TagResource is again checked on the function a tagged create makes.

Another account's layer version is checked on its ARN alone: LambdaStoredResourceArns answers reachedInItsAccount
for it, as Lambda reads such a layer in its owner's account through the owner's policy and never as the caller's layer
of that name, where IAM also checked the caller's same-named layer before (GetLayerVersionByArn too).

The table is regenerated against today's Service Reference too, which the online gate this change runs requires: AWS
added SageMaker's leaderboard and model-monitor-config types (their ARN formats and tag keys, and the types of
AddTags, DeleteTags and ListTags) and lists a backup-external namespace the table does not read.

The docs and two comments in LambdaService and LambdaLayerService no longer say Floci implements no layer
permissions.
2026-11-29 16:49:45 -04:00
Oleksandr Nikolaichuk f1b47125de fix(cloudformation): CompositeAlarm and SSM Parameter take replacement from the engine (#9654)
AWS::CloudWatch::CompositeAlarm and AWS::SSM::Parameter now take their
name and their replacement decision from ProvisionContext.changes, and
leave the change-exempt list. An update that drops an SSM parameter's
Name now replaces it under a generated name, as on AWS, where it used
to keep the old name. The composite alarm no longer stores its own
explicit-name flag, since the engine sees a dropped AlarmName itself.
2026-11-29 16:45:57 -04:00
Oleksandr Nikolaichuk 5a3bff3939 feat(iam): report EvalDecisionDetails per policy type for cross-account simulations (#9766) 2026-11-29 16:35:55 -04:00
Matheus André e0a57623c2 feat(lambda): add PutFunctionRecursionConfig and GetFunctionRecursionConfig (#9760)
Adds the two recursion config operations, so Terraform's
aws_lambda_function_recursion_config converges. RecursiveLoop is
stored on the function, Terminate until one is put, and an ARN of
another account or partition is a ResourceNotFoundException.

Allow lifts the 16-hop bound on a chain of asynchronous invocations,
since AWS takes no action on a loop it detects for such a function.
The setting is read from $LATEST whichever version or alias is
invoked, and an invocation past the bound starts on a thread of its
own, so the pool's caller-runs fallback cannot nest the loop on one
stack.
2026-11-29 16:29:06 -04:00
Priamo GermosenandJonathan Morley 3a0cce0188 fix(elbv2): route shared HTTPS to ALBs by server name (#9767)
With TLS on, Floci's TLS proxy holds floci.tls.aws-https-port (443 by
default) for AWS API calls and cfn-response callbacks, so an ALB HTTPS
listener on that port could not bind it and received no traffic, where
AWS serves it.

- an HTTPS listener on the proxy's port is served on loopback, and the
  proxy reads the ClientHello's SNI without terminating TLS and hands the
  connection to the listener that claims the name; Floci's own endpoint
  names, no SNI and unclaimed names stay with Floci
- the proxy waits for a whole ClientHello only while such a listener is
  served behind it, from one deadline armed by the first bytes, and sends
  anything else to Floci on its first bytes as before
- each proxied connection is pinned to the listener its ClientHello
  selected, and carries the client the proxy accepted it from, so targets
  see the client in X-Forwarded-For and X-Forwarded-Port names the
  listener's port
- the proxy and the embedded DNS server share one list of Floci's DNS
  suffixes
- a failing route lookup is logged at warn, and the connection goes to
  Floci

Refs #8613

Co-authored-by: Jonathan Morley <jonathanmorley@users.noreply.github.com>
2026-11-29 15:12:09 -04:00
Priamo Germosen 4328882f67 feat(emr): take passwords on a cluster's Trino with trino-password-authenticator (#9761)
A cluster's trino-password-authenticator now makes its Trino's password-authenticator.properties, which a
trino-config http-server.authentication.type of PASSWORD turns on. The files it names (file.password-file,
the LDAP key and trust stores) are copied into Trino's container from the image the cluster's bootstrap
actions left. Trino gets a shared secret for its internal communication unless trino-config names one, as EMR
configures one, and is found ready by its image's health check, which needs no credentials. Trino takes a
password only over HTTPS, so through Floci with its TLS on.

ContainerFiles reads one file out of a container; ElastiCache's snapshot read and Lambda Web's init-error read
move onto it.
2026-11-29 14:52:45 -04:00
Priamo Germosen 2efd250432 feat(lambda): serve layer version permissions and read them as the layer's resource policy (#9764)
AddLayerVersionPermission, RemoveLayerVersionPermission and GetLayerVersionPolicy had no handler, so a layer's owner
could not grant another account, an organization or everyone lambda:GetLayerVersion on one of its versions, as the
Lambda Developer Guide says it must ("To use a layer in another account, the owner of that account must grant your
account permission in a resource-based policy").

LambdaLayerPolicyService keeps a layer version's statements with the version, in the order they were added, each
granting lambda:GetLayerVersion to an account (written as its root ARN), to everyone, or to an organization
(aws:PrincipalOrgID), with a revision each change renews. Its answers are AWS's, as the aws-emulator evaluation
suite records them: a statement id already in the policy is a ResourceConflictException that leaves the revision as
it was; a RevisionId other than the latest a PreconditionFailedException, before anything changes; an OrganizationId
with an account principal an InvalidParameterValueException; a policy past 20480 characters a
PolicyLengthExceededException; the model's constraints a ValidationException in member order; and a version that
never had a policy and one whose every statement was removed answer differently ("No policy is associated with the
given resource." and "Layer version ... does not have any resource policy.").

LambdaResourcePolicyProvider now returns a layer version's policy, owned by the account in its ARN, so under IAM
enforcement a caller in another account is refused lambda:GetLayerVersion on it until its owner grants that account.
Reading another account's layer once granted is not served yet: GetLayerVersionByArn still resolves a layer only in
the caller's own account.
2026-11-29 14:34:14 -04:00
Oleksandr Nikolaichuk 0722c64a1f refactor(cloudformation): name the stack type constant STACK_TYPE (#9765)
NESTED_STACK_TYPE in CloudFormationService also labels a stack's own
events (CREATE_COMPLETE, ROLLBACK_COMPLETE and the rest), where that
stack isn't nested, so it is now STACK_TYPE. No behaviour change.
2026-11-29 14:31:55 -04:00
Niels Kootstra 518151ccd0 fix(sfn): reject JSONata group-by on a variable at top level (#9734) 2026-11-29 13:59:18 -04:00
Mahmoud Khalifa 3440dcc7c5 fix(dynamodb): refuse overlapping UpdateExpression paths on the service path too (#9763)
The overlap check ran only in NativeDynamoDbJsonHandler, so callers that
reach DynamoDbService.updateItem directly, the Step Functions DynamoDB
updateItem task through NativeDynamoDbBackend and PartiQL UPDATE, still
applied an UpdateExpression whose actions name the same path, or a path
and one inside it, where DynamoDB refuses it.

- add DynamoDbUpdateExpressionSyntax.checkPaths, which reads the sections
  and runs only the shared overlap check (the placeholder and value checks
  stay in the handler)
- call it in updateItemInternal before the item lock, the read and the
  condition, and in the TransactWriteItems Update validation
2026-11-29 13:49:10 -04:00
mrfelek 0ad01626bd fix(eks): start an EKS cluster's node again when its container exits by itself (#9750)
A k3s node whose container exited without Floci stopping it (k3s
crashing, say) stayed stopped until Floci restarted, and a container
started again outside Floci had none of its attached EBS volumes'
devices, so their mounts failed. Floci now watches each node container,
as it watches an EC2 instance's, adopts one that exited again as a
restart adopts it, and makes its volumes' devices again. Once its API
server answers, the readiness poller sets it up and finalizes it as it
does a replaced node, so the link-local metadata and Pod Identity
addresses, the VPC routes and the log follower are made again in the
started container. A node that exits more than three times within ten
minutes is left stopped.

The exit goes to EksService, as EC2 hands a guest's shutdown to
Ec2Service, and EksService starts the node again under the cluster's
capacity lock, which DeleteCluster and the first node group's
replacement hold, so an exit handled while the cluster is deleted, or
once it is gone, leaves the node stopped. Each restart has its own
number that the poller clears only once it finalized that one, so a
restart during the finalize is kept, and deleting a cluster forgets its
restarts. The node restart Docker test's volume helper image is
prefetched under its own class name.
2026-11-29 13:48:47 -04:00
Priamo Germosen 96819a87fd fix(iam): check a Secrets Manager request for the actions its required permissions give (#9758)
The Service Reference lists the actions each Secrets Manager operation is authorized by without saying when each is
needed, so a request was checked as its own action alone: a BatchGetSecretValue using Filters without
secretsmanager:ListSecrets, a CreateSecret adding replica Regions without secretsmanager:ReplicateSecretToRegions and
a ValidateResourcePolicy without secretsmanager:PutResourcePolicy were all let through.

Each operation's page in the API reference says it, in its required permissions: "If you use filters, you must also
have secretsmanager:ListSecrets", "To add replica Regions, you must also have secretsmanager:ReplicateSecretToRegions",
"Required permissions: secretsmanager:ValidateResourcePolicy and secretsmanager:PutResourcePolicy".
tools/aws/fetch_secretsmanager_required_permissions.py copies that paragraph for each operation the Service Reference
lists as authorized by another of its actions, with each clause's action and what it is needed for or on, into
tools/aws/sources/secretsmanager-required-permissions.json. Two generators read it:

- regen_iam_authorized_actions.py: an action needed when the request does something is a companion of the request
  member the clause's words name as the generators' names go (filters is Filters, add replica Regions
  AddReplicaRegions), where the Service Reference lists it for the operation and does not mark it as tagging, which
  the tag-on-create table checks. A companion a request member sets may now carry no session key.
- regen_iam_request_resources.py: actions an operation always needs beside its own are each checked on what the rules
  read for it (ValidateResourcePolicy and PutResourcePolicy on the secret its SecretId names). A request checked by
  parts that names nothing is now checked on * as each action the table checks on the same resources as its own, not
  as its own alone, so a ValidateResourcePolicy naming no secret still needs PutResourcePolicy.

The fetcher refuses a sentence naming a secretsmanager: action in a wording it does not read, so a reworded page fails
rather than dropping a check, and the enforcement test runs on the AWS SDK.

Not read: GetSecretValue for each secret of a batch, which AWS reports per secret in Errors rather than refusing the
call; PutResourcePolicy for a cross-account replica and DeleteResourcePolicy for one stopped replicating, whose words
name no member of the request; and the KMS permissions of a secret on a customer managed key.
2026-11-29 13:12:46 -04:00
Hector Ventura 610ff85fe1 fix(eventbridge): move resources saved before account isolation into the default account at load (#9753)
EventBridge read buses, rules, archives, replays and targets by name
through the request scoped store, which moves an entry saved under a bare
key before stores kept accounts apart into whichever account reads it.
A call of another account naming such a resource took the default
account's into its own partition, where it could read, change or delete
it (a DeleteArchive also dropped its archived events).

At load the service now moves every bare key of its eight stores into the
default account, which owns them, through a new
AccountAwareStorageBackend.moveLegacyEntriesToTheDefaultAccount, so no
later read finds one.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-11-29 12:31:48 -04:00
Mahmoud Khalifa 85a2c03434 fix(dynamodb): refuse a Key that holds non-key attributes (#9677)
DynamoDB refuses a Key argument that holds any attribute outside the
table's key schema with "The provided key element does not match the
schema". Floci only checked that the key attributes were present and
well typed, so passing a whole item as the Key of GetItem, DeleteItem or
UpdateItem succeeded.

- check the attribute names of every Key argument in buildItemKey:
  GetItem, DeleteItem, UpdateItem, BatchGetItem keys, BatchWriteItem
  DeleteRequest keys, TransactGetItems and the TransactWriteItems
  Update, Delete and ConditionCheck keys
- split BatchWriteItem DeleteRequest keys (new BATCH_DELETE surface) from
  PutRequest items, which still accept whole items, as PutItem and the
  TransactWriteItems Put do
- look up the previous item for BatchWriteItem write capacity by its key
  attributes only, instead of passing the whole PutRequest item as a Key
- one DynamoDbKeyAttributes.of helper replaces the key extraction copies
  in DynamoDbStreamService, KinesisStreamingForwarder and the
  BatchWriteItem capacity lookup

Closes #9676
2026-11-29 12:31:23 -04:00
Hector Ventura a5a4489ce1 test(apigateway): check an edge domain's absent fields in one helper (#9755)
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-11-29 12:27:53 -04:00
Hector Ventura eabc17c6df refactor: share the scan of every account's entries in a store (#9754)
Lambda, GuardDuty, IoT and CloudWatch each read every account's entries
of an account-aware store, and the single account's otherwise, with their
own copy of the same branch. AccountAwareStorageBackend.entriesInEveryAccount
and valuesInEveryAccount hold it once. Route 53 keeps its own: on a store
that is not account-aware it reads the owner off each zone.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-11-29 12:27:38 -04:00
Matheus André da01dd282d test(apigateway): cover every pageById collection in the page cap test (#9752)
ApiGatewayPageCapTest now also checks the 500-item cap on GetModels,
GetDocumentationParts and GetBasePathMappings, so collections() lists
every collection that pages through pageById.
2026-11-29 12:26:50 -04:00
Hector Ventura 679c60cfb9 test(lambda): build the single-account S3 mock once in LambdaServiceTest (#9756)
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-11-29 12:26:06 -04:00
Matheus André 24271ff5a6 fix(apigateway): filter GetApiKeys by name and customerId (#9749)
GetApiKeys ignored the name and customerId filters and returned every
key. name now keeps the keys whose name starts with it and customerId
the keys of that customer; the filtered keys are paged by limit and
position as before.

ApiGatewayRestApiPageCapTest and ApiGatewayApiKeyPageCapTest become one
parameterized ApiGatewayPageCapTest over the collections paged through
pageById.
2026-11-29 11:35:27 -04:00
Priamo Germosen 1c84d5eccf fix(iam): check an SQS redrive as the actions its guide gives each queue (#9743)
StartMessageMoveTask was checked as sqs:StartMessageMoveTask alone, on both its SourceArn and its DestinationArn, so a
caller granted the permissions AWS requires was refused on the destination, and one granted the action alone on the
dead-letter queue was let through. ListMessageMoveTasks was checked as its own action alone.

The Amazon SQS developer guide's table of a dead-letter queue redrive's minimum permissions gives each task's actions
of each queue: "Add the sqs:StartMessageMoveTask, sqs:ReceiveMessage, sqs:DeleteMessage, and sqs:GetQueueAttributes
of the dead-letter queue", "Add the sqs:SendMessage of the destination queue", and "Add the sqs:ListMessageMoveTasks
and sqs:GetQueueAttributes of the dead-letter queue". The API reference names each queue's parameter: SourceArn "only
ARNs of dead-letter queues (DLQs)", DestinationArn "specify the destination queue". AWS's own fidelity check
(iam__sqs__sts/check_start_message_move_task_requires_composite_source_and_destination_permissions in
aws/aws-emulator-evaluation-suite) refuses a caller granted sqs:StartMessageMoveTask alone on the dead-letter queue,
naming sqs:ReceiveMessage on it, and lets the call through once the five are granted.

tools/aws/fetch_sqs_redrive_permissions.py copies the table's rows and those parameter sentences into
tools/aws/sources/sqs-redrive-permissions.json, a new PERMISSION_SOURCES entry, and the request-resources generator's
task_permission_resources reads it: the row naming the operation's own action, each action on the resource the rules
read from the parameter naming its queue, a queue the request names by no such parameter being the one the row names
the operation's own action of. --verify checks each row's actions against the Service Reference's AuthorizedActions.
Only StartMessageMoveTask and ListMessageMoveTasks change; CancelMessageMoveTask names its task by handle and keeps
its reading.
2026-11-29 11:22:57 -04:00
mrfelek a98a43d519 fix(eks): tag EKS Auto Mode instances as AWS does, and find their NodeClaims by provider ID (#9737)
AWS's Auto Mode instances carry aws:eks:cluster-name and no karpenter.sh/nodeclaim tag (measured). Floci now writes aws:eks:cluster-name and no longer tags an instance with its claim's name: a pass finds each instance's claim by its status.providerID, as Karpenter matches them, else by the old tag on an instance launched before, else by the derived name, another derivation when an older instance's claim has it.

A claim whose launched status write failed keeps the name its launch chose, as claims Auto Mode doesn't manage and claims a provider ID places stay reserved, and with the claims unreadable a pass launches nothing, so a launch can't take a name already in use.
2026-11-29 11:04:14 -04:00
Hector Ventura 2d3a5c045a test: bind the listeners of shared-ports-lock classes to loopback (#9747)
On macOS a listener bound to the wildcard address does not stop another
socket binding 127.0.0.1 on the same port, and a localhost dial then
reaches that socket, so the test's accept() waits for good. Classes on
the ports lock in READ mode run beside each other in the plain pass, and
two laptop passes hung this way in S3CopySimulatorTest. Linux refuses the
second bind, so CI was not affected.

The READ classes with such a listener, and FakeRespServer, which two more
use, now bind the loopback address: a ServerSocket, a JDK HttpServer or a
Vert.x server alike. ParallelLocksInventoryTest fails on a READ class, or
a helper it names, that opens a port-0 listener with no address, and
AGENTS.md states the rule.

RuntimeInitializationTest and RuntimeApiServerTest release a port and
start RuntimeApiServer on it, which binds every interface, so they take
the exclusive ports lock instead. The tests that dialed a listener on the
literal 127.0.0.1 now dial its bound address.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-11-29 10:49:14 -04:00
Hector Ventura 10b5f08654 fix(eventbridge): leave another account's legacy connection in place when reading by name (#9745)
Connection and API destination reads by name went through the request
scoped store, which moves an entry the default account saved before
stores kept accounts apart into whichever account reads it. A call of
another account naming it took it into its own partition, and could then
read and change it, while the default account no longer found it; a
CreateConnection of that name in another account was refused as a
duplicate.

The by-name reads, find() and findApiDestinationByArn now move a legacy
entry only into the account its own ARN names, as the connection ARN path
already does.

A list scans the caller's own keys and reads each one back. When another
request deleted that entry in between, the read fell through to the bare
legacy key and moved the default account's entry into the caller's
account. The read back now goes through the same owner check as the
by-name reads.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-11-29 10:48:33 -04:00
Matheus André 00e4ceb1b2 fix(apigateway): page GetApiKeys by limit and position (#9748) 2026-11-29 10:48:21 -04:00
Hector Ventura 0bef961cf0 test(iot): retry a broker start whose released port another process took (#9746)
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-11-29 10:46:56 -04:00
Hector Ventura e6518505aa test(cloudwatch): build the dashboards service once in its unit test (#9744)
CloudWatchDashboardsServiceTest built the service over a store with the
same RegionResolver at nine sites. A serviceOver(store) helper holds that
construction once.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-11-29 10:40:06 -04:00
Kenshin Okinaka 7a57347fbb feat(s3tables): add TagResource, UntagResource and ListTagsForResource (#9724)
S3 Tables accepted tags only at CreateTableBucket and CreateTable, so a
client could not read them back or change them.

The three operations are served on their modelled restJson1 routes,
POST, DELETE and GET /tag/{resourceArn}, for a table bucket's ARN or a
table's ARN. They read and change the tags the create operations store,
the same ones IAM reads for aws:ResourceTag conditions, so a tag set
with TagResource is what the next request's condition sees. The IAM
route and action tables already mapped the routes to
s3tables:TagResource, UntagResource and ListTagsForResource. Like S3
Tables' other routes, /tag is rewritten only for a request signed for
s3tables, so a path-style S3 request for a bucket named tag still
reaches S3.

A table keeps its tags through a rename, as its ARN ends in a minted id,
and tagging leaves its versionToken. An unknown table bucket answers
NotFoundException "The specified bucket does not exist.", and a table
ARN whose table or bucket is missing "The specified table does not
exist.", as AWS does.

TagResource refuses with BadRequestException a missing or non-object
tags member, a value that is not a string, a key beginning with aws:, a
key outside the tag character set, a key or value outside the modelled
lengths (in Smithy's validation wording), or more than 50 tags on the
resource counting the ones it already has. The aws:, character set, key
length and 50-tag messages are the ones AWS answers. CreateTableBucket
and CreateTable now apply the same rules to the tags they are given,
and no longer store a null or non-string value as its text.

TagResource and UntagResource build the new tags apart and restore the
old ones if the save throws, so a failed WAL write leaves nothing
visible to ListTagsForResource or IAM resource-tag conditions.

Tag condition keys come from generated data, and that table covers only
the IAM namespace, so S3 Tables' TagResource and UntagResource stay
without aws:RequestTag and aws:TagKeys, as most services' tagging
actions do.
2026-11-29 10:23:51 -04:00
Andre Kurait 4bee0869dd test: await Lambda log-tail fixture stdout writes (#9742)
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
2026-11-29 10:07:10 -04:00
TATSUNO “Taz” Yasuhiro beefbdc155 feat(eventbridgev2): deliver subscriber events to Lambda functions (#9720)
AWS invokes a Lambda target with a JSON array of up to MaxBatchSize
events (10 by default), synchronously unless InvocationType is EVENT,
and with LambdaParameters.Qualifier resolved from each event. It checks
a Lambda TargetArn's form, then the Region and account of any target,
then that the parameter block is the target's.

A reset or deleting the subscriber drops the invocations still waiting.
AWS drops a waiting event only once it outlives the subscriber's
MaxEventAgeInSeconds or uses up MaxRetryAttempts, so a burst behind a
slow function is not cut at a fixed count.
2026-11-29 09:59:39 -04:00
mrfelek c2743ec70f fix(eks): refuse an EKS Auto Mode NodePool that would outlive the 21-day maximum node lifetime (#9741)
Auto Mode's node pool guide: the sum of expireAfter and terminationGracePeriod can't exceed 21 days, and expireAfter can't be Never. The NodePool kind took a Never or 720h pool. It now has the three rules and messages AWS's NodePool kind has on an Auto Mode cluster, keyed on an eks.amazonaws.com NodeClass ref, and expireAfter's schema as AWS's (a 336h default and a duration-or-Never pattern); terminationGracePeriod's schema is Karpenter's published one.
2026-11-29 09:55:09 -04:00
Niels Kootstra 7b096e99d9 fix(s3): honor success_action_redirect and success_action_status on a presigned POST (#9680)
A presigned or browser POST upload answered 204 whatever the form asked.
It now honors success_action_redirect and the deprecated redirect field
with a 303 whose Location is that URL plus bucket, key and etag query
parameters, and ignores a URL S3 cannot interpret, as AWS does. Without
a redirect, success_action_status 201 returns the PostResponse XML with
the object's absolute Location, 200 an empty body, and 204 or any other
value the default. The 201 Location follows the bucket the virtual-host
routing chose and the forwarded host and scheme.
SigV4Canonicalization.percentEncode now shares uriEncode's byte loop.
2026-11-29 09:00:07 -04:00
Andre Kurait a95afb8994 test: clean up UsagePlan rollback stacks on failure (#9739)
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
2026-11-29 08:55:31 -04:00
Andre Kurait 7b90c1eba3 test: establish existing request log permissions explicitly (#9732)
Set the existing-file permission fixture explicitly after creation so inherited umask does not change its precondition. Preserve the writer permission assertions and private profiling defaults.

Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
2026-11-29 08:41:41 -04:00
Priamo Germosen 8440821793 fix(iam): read iam:AccountPropertyNamespaces from the keys PutAccountProperties sets (#9736)
The generated IAM condition key table had iam:AccountPropertyNamespaces in notRead on both actions the Service
Reference lists it on, so a policy keyed on it matched nothing: the IAM user guide's DenyRoleManagerEnablement
statement, ForAnyValue:StringEquals on RoleManager, let a caller enable role manager, and an Allow requiring the
namespace refused every call.

Neither botocore nor the Service Reference says where the value is; AWS's pages do. The IAM user guide's condition
key table: iam:AccountPropertyNamespaces "Specifies the account property namespaces being read or modified in the
request ... When you call PutAccountProperties or GetAccountProperties". The API reference on PutAccountProperties'
Properties: "Each key uses the format Namespace/PropertyName. The key must contain exactly one / separating the
namespace from the property name". tools/aws/fetch_iam_account_property_namespaces.py copies both sentences into
tools/aws/sources/iam-account-property-namespaces.json with what they name: the key, the operation, the parameter,
the format, its separator and the part that is the namespace. regen_iam_condition_keys.py takes that entry as it
stands, refusing it unless the Service Reference lists the pair and botocore models the parameter as a map of
strings, and writes it to a new fromMapKeys section, which the IAM context resolver reads from the request's map as
the operation's handler does. GetAccountProperties names no properties, so it stays in notRead.
2026-11-29 08:40:07 -04:00