Commit Graph
6432 Commits
Author SHA1 Message Date
mrfelek eef1ccc4dc fix(ec2): write every instance's operator, and on each DescribeInstanceStatus item, as AWS does (#9683) 2026-11-28 17:55:48 -04:00
Andre Kurait 8b90262c50 test(eventbridge): receive webhook deliveries without polling (#9681)
EventBridgeV2WebhookIntegrationTest read its queues with up to three
one-second long polls, so each of its two empty-queue checks waited
three seconds. A webhook request is answered only after its event has
been delivered to the subscribers' queues, as a PutEvents call is, so
the test now reads each queue with one zero-wait receive, and its
helpers lose the expected count the polling needed.
2026-11-28 17:49:40 -04:00
Matheus Oliveira ccd76cbec8 fix(cloudformation): carry a template's Object Lock onto its bucket (#9618)
Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>
2026-11-28 17:36:53 -04:00
Priamo Germosen 1b7ddb1101 fix(iam): read EKS access entry condition keys from the vendored Service Authorization Reference (#9682)
Under enforcement a CreateAccessEntry scoped by eks:principalArn or eks:accessEntryType was refused for every entry, and an AssociateAccessPolicy scoped by eks:policyArn or eks:namespaces for every association, as #8311 reports: the request condition key table read none of these keys, so a condition on them never saw a value. Neither botocore nor the Service Reference says which request member carries them.

The Service Authorization Reference's table of the keys EKS defines says it: eks:principalArn, eks:kubernetesGroups, eks:policyArn and eks:namespaces filter on "the <member> present in the access entry requests" or in "the associate / disassociate access policy requests", and eks:accessEntryType and eks:username on "the access entry type" and "the Kubernetes username" present in them, the access entry requests' type and username. A vendored source, tools/aws/sources/eks-condition-keys.json, written by tools/aws/fetch_eks_conditions.py from that page, gives each key its member, and the generator reads it for eks (CONDITION_SOURCES) beside the cluster keys it already reads.

The page gives what a request carries, so a vendored key is read from an action's request only where the reference lists it on the action itself; one the reference gives a resource type alone is the stored resource's value. A list's values are each read (kubernetesGroups, accessScope.namespaces). A vendored member the request carries outside its body, as DisassociateAccessPolicy carries policyArn in its path, or as a structure, as accessScope is, the page not saying which of its values the key holds, is not read.

The keys the reference gives the access entry itself, its stored principal, type, groups and username on the operations acting on one, are not read yet: those requests are checked on an access entry ARN whose identity and id are left open, which names no one entry to read them from.

Closes #8311.
2026-11-28 17:12:28 -04:00
Oleksandr Nikolaichuk cd37bbbd71 fix(cloudformation): replace an IoT thing, policy or rule when the engine's change says so (#9585) 2026-11-28 17:04:52 -04:00
Jackson PriceandAndre Kurait 2f92b2b22d test(eks): wait for node initialization before restart (#9678)
EksRegistryHostsDockerNightlyIntegrationTest waited for its node to be
Ready before the node group replaced it and before restarting the
replacement, but a Ready node keeps Kubernetes'
node.cloudprovider.kubernetes.io/uninitialized NoSchedule taint until
the cloud controller initializes it. The test now also waits for that
taint to clear, with the service account, Ready nodes and renewed
leases it already waited for, before the replacement, before the
restart and after it, then reads hosts.toml once and starts the pod.

Co-authored-by: Andre Kurait <akurait@amazon.com>
2026-11-28 16:20:45 -04:00
Jackson PriceandAndre Kurait 9becdfa021 fix(codepipeline): skip queued actions after an execution stops (#9679)
Check for a stop request when the worker acquires the execution lock to
register its action. A queued action can otherwise register after stop
has already visited the action list and then invoke its provider.

Adapted from Andre Kurait's CodePipeline action admission change in
5fe030e5dd4713bfdd2efbfb49f7dc6664ec8008.

Co-authored-by: Andre Kurait <AndreKurait@gmail.com>
Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Jackson Price <jxnprice@amazon.com>
2026-11-28 16:18:07 -04:00
mrfelek 01564bd94c fix(eks): expire EKS Auto Mode NodeClaims at Auto Mode's 21-day maximum node lifetime (#9670)
An EKS Auto Mode NodeClaim whose expireAfter was Never, longer than 21
days, missing or unreadable never expired, where Auto Mode terminates
an instance once it has lived its 21-day maximum lifetime. A claim now
expires at the earlier of its expireAfter and 21 days from its
creation. A claim whose creationTimestamp can't be read still doesn't
expire, and an unreadable expireAfter is logged.
2026-11-28 16:09:47 -04:00
Mahmoud Khalifa 51e887e46c fix(dynamodb): refuse an UpdateExpression whose actions overlap (#9675) 2026-11-28 15:59:01 -04:00
Andre Kurait 92994cbd27 test(iam): cover capacity reservation quote request tags (#9667)
No test named CreateCapacityReservationDateChangeQuote or its
capacity-reservation-modification-quote resource type. The quote now
joins the SQS and RDS cases in TagOnCreateTest's own-action test,
pinning that the operation's own action is checked with its request
tags, as the Service Reference lists aws:RequestTag and aws:TagKeys on
that resource, and that ec2:CreateTags is the tagging action it also
needs.
2026-11-28 15:56:58 -04:00
Hector Ventura e951df03ad fix(stepfunctions): check the connection and secret permissions of an http task (#9645)
An HTTP task reads its EventBridge connection to authorize the request, but TaskPermissions.httpInvoke checked only states:InvokeHTTPEndpoint, so under IAM enforcement a role lacking the connection's permissions succeeded where AWS refuses it. The task now also needs events:RetrieveConnectionCredentials on the connection and secretsmanager:GetSecretValue and secretsmanager:DescribeSecret on the secret EventBridge keeps its credentials in, the grants the CDK's HttpInvoke task writes (aws-stepfunctions-tasks/lib/http/invoke.ts, buildTaskPolicyStatements). EventBridge answers the secret ARN through StoredResourceArns.recorded.

The secret lookup and the call that uses the connection share one lookup by ARN, connectionNamedBy, so they cannot drift apart. The secret lookup reads the connection in the account its ARN names, in place, also finding one the default account saved under a bare key before stores kept accounts apart. A connection belongs to the account its ARN names: a lookup by ARN from another account finds none, and the call moves a legacy connection only into the account its ARN names, so a connection whose secret is not checked cannot be used.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-11-28 15:55:23 -04:00
Oleksandr Nikolaichuk ab5759529f test(cloudformation): start the ECR registry before every ECR stack test (#9672) 2026-11-28 15:54:16 -04:00
mrfelek faa4892239 feat(ec2): hide managed instances from list and filter calls unless IncludeManagedResources asks for them (#9501) 2026-11-28 15:50:40 -04:00
Andre Kurait 2a18184718 test(eventbridgev2): inspect synchronous deliveries without long polling (#9651)
The SQS receive in EventBridgeV2SubscriberIntegrationTest no longer long-polls. PutEvents sends its deliveries before it answers, so a look right after it sees everything the call delivered, and an empty look proves the call delivered nothing. The current assertions, every positive-delivery control and the production code are unchanged.

Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
2026-11-28 15:50:20 -04:00
Priamo Germosen b4cc436ad0 fix(iam): read EventBridge's rule and target condition keys from the vendored user guide (#9673)
Under enforcement a PutRule scoped by events:source was refused for every event pattern, and a PutTargets scoped by events:TargetArn for every target, as #8320 reports: the request condition key table never filled either key, so a Null or ForAllValues condition on them never saw a value. The table's reader is generic, but which member carries a key comes from SERVICES in regen_request_condition_keys.py, and EventBridge was not there. Neither botocore nor the Service Reference says where a request carries these keys: botocore models EventPattern as a string ("The event pattern").

EventBridge's user guide says it, in its table of condition keys: events:source is "the literal string for the source field of the event", with events:detail-type, events:detail.service, events:detail.eventTypeCode and events:detail.userIdentity.principalId the same for their fields, which a rule's event pattern gives ("EventPattern is a mandatory argument to PutRule"), and events:TargetArn is "the ARN of the target for the rule". A vendored source, tools/aws/sources/eventbridge-condition-keys.json, written by tools/aws/fetch_eventbridge_conditions.py from that page, gives each key its member, and the generator reads it for events (CONDITION_SOURCES), each key in the one operation the page names: PutEvents, CreateEventSource and UpdateEventSource take events:source too, which the page does not describe, so they are not read there. --verify checks the file against the page.

The table writes a field of a JSON document a string member holds after #: EventPattern#source.* is each literal string of the pattern's source, read by one generic step of the JSON reader. A pattern leaving a field out names nothing, so ForAllValues allows it and a Null check refuses it, as the page's examples show. The fields are read at the pattern's top level, where every example on the page gives them, so a $or branch's names nothing, and a matcher such as {"prefix": "aws."} is no literal string and names nothing. events:TargetArn reads each target's own Arn, not its dead-letter queue's.

Closes #8320.
2026-11-28 15:50:13 -04:00
Jackson PriceandAndre Kurait 0609698473 fix(ec2): keep network interface pagination stable across storage scans (#9666)
Sort the matching interfaces before applying an offset token so a reordered scan cannot repeat an interface or skip a result.

Co-authored-by: Andre Kurait <AndreKurait@gmail.com>
Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Jackson Price <jxnprice@amazon.com>
2026-11-28 15:06:56 -04:00
TATSUNO “Taz” Yasuhiro d44f29cc15 fix(core): answer a disabled service's CBOR error in the request's media type (#9662)
A CBOR request to a disabled service got its ServiceNotAvailableException
as application/cbor, even when it was sent as
application/x-amz-cbor-1.1. The error now goes through
ProtocolErrorResponses.cbor and the shared CBOR writer, so it answers in
the media type the request sent, as Floci's other CBOR errors do. Its
body and headers are unchanged.
2026-11-28 14:47:13 -04:00
Hector Ventura 82d5c18018 fix(cloudwatch): keep dashboards global per account instead of per region (#9643)
Dashboards were stored under region::name keys, so a dashboard put through one Region was missing from GetDashboard, ListDashboards and DeleteDashboards in every other Region of the same account. The CloudWatch model says otherwise. PutDashboard: "All dashboards in your account are global, not region-specific." ListDashboards: "Returns a list of the dashboards for your account."

Key dashboards by name in the account's store. Dashboards persisted under the old keys are folded onto their name when the store loads, in every account; when one name was stored in several Regions the most recently modified copy is kept, a tie going to the Region that sorts first. A legacy entry is one whose key ends in the dashboard's own name after the separator, whatever the Region, and a folded source is deleted where it was stored, including the bare key of a dashboard saved before stores kept accounts apart. A region-ful dashboard ARN now resolves whatever Region it names, and the regionless ARN is unchanged.

PutDashboard now refuses a name outside A-Z, a-z, 0-9, - and _ with InvalidParameterValue "The value for field DashboardName contains invalid characters. It can only contain alphanumerics, dash (-) and underscore (_).", as AWS does.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-11-28 14:47:10 -04:00
Jackson PriceandAndre Kurait b8ea79234e test(ec2): wait for cancelled launch cleanup to finish (#9665)
Wait for the launch worker before checking the instance fields and verifying that it removed the container.

Co-authored-by: Andre Kurait <AndreKurait@gmail.com>
Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Jackson Price <jxnprice@amazon.com>
2026-11-28 14:46:12 -04:00
Hector Ventura 39ca25397b fix(stepfunctions): validate itemreader fields, honour its versionid and refuse sdk .sync (#9646)
The Developer Guide's ItemReader page lists Resource, Parameters or Arguments, and ReaderConfig as the reader's fields, and says a getObject reader takes VersionId. Floci accepted any other field and read the latest version whatever VersionId named. An unlisted field is now refused at definition time as SCHEMA_VALIDATION_FAILED "Field '<name>' is not supported", as other unsupported fields are, and VersionId reaches the versioned S3 read, checked as s3:GetObjectVersion with s3:versionid, as S3 checks a direct read of a version.

The integration patterns table lists Run a Job (.sync) as not supported for AWS SDK integrations, yet the sfn, scheduler, cloudformation, dynamodb and rdsdata SDK arms ignored the suffix. An aws-sdk .sync or .sync:2 task now fails with States.TaskFailed "Unsupported resource", as the ECS arm answers an unsupported pattern.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-11-28 14:32:54 -04:00
mrfelek f5457a2516 feat(eks): expire EKS Auto Mode NodeClaims after their expireAfter, as Karpenter does (#9634) 2026-11-28 14:32:17 -04:00
Andre Kurait daa6f35bb5 fix(eventbridge): contain secondary dispatch failures (#9655)
A failure while EventBridge recorded a failed target delivery escaped
the dispatcher. In PutEvents it failed the whole call, and in the
scheduled retry tick it made scheduleWithFixedDelay suppress every
later run, so no retry ran again until a restart. The dispatcher now
logs such a failure and drops only that delivery, so the request
completes and the other pending deliveries still run.

The delivery and dead-letter warnings keep the exception's stack trace
and cause for an unexpected error, and stay one line for an
AwsException, such as a throttled API destination being retried.
2026-11-28 14:31:01 -04:00
Priamo Germosen c0c60ea886 fix(iam): check AWS Backup by its generated routes, resources and passed roles (#9669)
Under enforcement a REST route no vendored model names runs unchecked, and AWS Backup was among them: a caller could start a backup job or assign resources to a backup plan with any role and no iam:PassRole, and a grant scoped to one backup vault or plan covered every one, as #6255 reports. Backup's model routes are vendored, so each request is checked as its operation's action, and Backup joins the tables of request resources, passed roles and tags on create.

The Service Reference passes most of Backup's roles to one service, which the passed-roles generator reads alone: IamRoleArn to backup.amazonaws.com, a backup plan's scan settings' ScannerRoleArn to malware-protection.guardduty.amazonaws.com, and a restore testing selection's to restore-testing.backup.amazonaws.com. It passes StartScanJob's IamRoleArn and ScannerRoleArn to both of the first two without saying which goes where, so a vendored source, tools/aws/sources/backup-roles.json, written by tools/aws/fetch_backup_roles.py from the developer guide's malware protection page, gives each: the scanner role "trusts malware-protection.guardduty.amazonaws.com", and the backup role is "the same role found in ... the BackupSelection API", linking CreateBackupSelection, whose role the Service Reference passes to backup alone. The generator reads such a role as going where the reference passes that operation's roles, when that is one service.

A backup vault is checked by its name and a backup plan by its id; BackupStoredResourceArns answers the tags Backup holds on either, which an aws:ResourceTag condition reads. A recovery point's format the Service Reference gives with a literal * account, which the reader matches as written, so a request naming a recovery point by its ARN is checked on *, as one naming a DMS endpoint is.

A namespace the table reads is served on the shared tag routes only with a method its model gives on the path, as it already was only on the paths its model gives: Backup removes tags with POST /untag/{resourceArn}, so a DELETE on its /tags/{resourceArn}, which no Backup operation is and no action checks, was let through and removed tags an aws:ResourceTag deny relies on. It is now refused with MethodNotAllowedException (405), as a tag call sent with the other verb is.

Closes #6255.
2026-11-28 14:26:04 -04:00
Priamo Germosen 0da5179612 fix(iam): check AWS AppSync by its generated routes, resources and passed roles (#9668)
Under enforcement a REST route no vendored model names runs unchecked, and AWS AppSync was among them: a caller could give a data source any service role and a GraphQL API any CloudWatch Logs or merged API execution role with no iam:PassRole, and a grant scoped to one GraphQL API covered every API, as #6255 reports. AppSync's model routes are vendored, so each request is checked as its operation's action, and AppSync joins the tables of request resources, passed roles and tags on create.

The Service Reference passes every AppSync role to appsync, so the passed-roles generator reads each member alone: a data source's serviceRoleArn, a GraphQL API's logConfig.cloudWatchLogsRoleArn and mergedApiExecutionRoleArn, and an Event API's eventConfig.logConfig.cloudWatchLogsRoleArn, each passed to appsync.amazonaws.com.

The request-resources generator now also fills a variable whose stem no member's matches with the one path label a REST route puts after the literal segment the type's format puts before that variable, or after that segment qualified by the variable's first word: AppSync's apiId in /v1/apis/{apiId} fills apis/${GraphQLAPIId}, and sourceApiIdentifier in /v1/sourceApis/{sourceApiIdentifier} a merged API association's apis/${SourceGraphQLAPIId}. No other namespace's reading changes. An operation on an API's data sources, resolvers, functions, types, API keys or schema, which the Service Reference gives no resource type, stays on *, as AWS checks it. AppSyncStoredResourceArns answers the tags AppSync holds on a GraphQL API or a custom domain name, which an aws:ResourceTag condition reads.

AppSync now mints a channel namespace's ARN as apis/<apiId>/channelNamespace/<name> and an association's as apis/<mergedApiId>/sourceApiAssociations/<associationId>, from the association's own id, as AWS returns them, so a policy naming the ARN AppSync returns names the resource the request is checked on. Floci minted channelNamespaces/<name>, and an association ARN under sourceApis/ or mergedApis/ ending in a second id.

AppSync's tag routes are served, as every namespace's the table reads, on the route its model gives, /v1/tags/{resourceArn} with the ARN encoded as an SDK sends it.

Part of #6255.
2026-11-28 13:03:05 -04:00
Priamo Germosen 739e1274bc fix(iam): check AWS Batch by its generated routes, resources and passed roles (#9660)
Under enforcement a REST route no vendored model names runs unchecked, and AWS Batch was among them: a caller could create a compute environment with any service, instance or Spot Fleet role and register a job definition with any job or execution role, as #6255 reports. Batch's model routes are vendored, so each request is checked as its operation's action, and Batch joins the table of request resources and the passed-roles table.

The passed-roles generator reads RegisterJobDefinition's roles, each passed to ecs-tasks.amazonaws.com, alone. The Service Reference passes CreateComputeEnvironment's and UpdateComputeEnvironment's roles to batch, ec2, ecs and spotfleet without saying which member's goes where, so a vendored source, tools/aws/sources/batch-roles.json, written by tools/aws/fetch_batch_roles.py from the Batch API reference and user guide, gives each: serviceRole is trusted by batch.amazonaws.com, a compute resource's instanceRole is an instance profile whose role is trusted by ec2.amazonaws.com, spotIamFleetRole by spotfleet.amazonaws.com, and a managed instances provider's infrastructureRoleArn needs "iam:PassedToService: ecs.amazonaws.com", the update's naming the same role in the same words. SubmitServiceJob, which Floci does not serve, names its role inside the SageMaker request it queues, a string the table does not read.

The request-resources generator reads a type of two variables from a member whose documentation spells it, as it does ECS's "(family:revision)", now also where a variable shares only some of its words with the type's name, so DeregisterJobDefinition's "(name:revision)" names a job definition revision whole, not only its name, and where a member lists the form among those it takes, as SubmitJob's "definition-name, definition-name:revision, or the ARN" does, naming the revision rather than the job definition its name alone fills: "the request ARN includes the revision". BatchStoredResourceArns resolves it as Batch does, a name alone being the latest active revision a job runs, and answers the tags of what Batch stores. A member of a structure documented as "The Amazon Resource Name (ARN) of the" resource is read as one, so a job queue's computeEnvironmentOrder[].computeEnvironment is checked. No other namespace's reading changes.

A role name a path prefixes, which Batch documents ("if a role with the name bar has a path of /foo/, specify /foo/bar as the role name"), is checked on the role IAM holds under that name and path.

Batch's tag routes are served, as every namespace's the table reads, on the route its model gives, /v1/tags/{resourceArn} with the ARN encoded as an SDK sends it. Its tag-on-create reading waits: CreateComputeEnvironment is checked as batch:TagResource or batch:SetCapacityTags, and nothing says which of its tag members each is for.

Part of #6255.
2026-11-28 11:14:42 -04:00
TATSUNO “Taz” Yasuhiro 31d2222c93 feat(eventbridgev2): encrypt the webhook secret with KmsKeyIdentifier (#9661)
#9321 stored a webhook event source's KmsKeyIdentifier without using it. The source's secret is now created with that key, an UpdateEventSource that changes it re-encrypts the secret, and one that leaves it out or sets "" returns the secret to the AWS managed key aws/secretsmanager. A key that does not exist answers AccessDeniedException with KMS_KEY_NOT_FOUND, and an AWS managed key, or a key ARN of another Region or account, answers InvalidInputException, each at the point AWS checks it.
2026-11-28 10:20:52 -04:00
rajp33 927ff3a001 fix(rds): place an Aurora cluster member in the AvailabilityZone it names (#9452) 2026-11-28 10:20:16 -04:00
Andre Kurait 4c71f6d446 test(rds): own authentication failures and wait before socket cleanup (#9650)
The PostgreSQL authentication fixture could close its local proxy socket after reading ReadyForQuery while the authenticator was still resetting that socket's timeout, and the SocketException escaped a raw virtual thread, landing under whichever test was waiting. ProxyTestAuthentication now runs authentication and bridging through the owned ProxyTestTask, completing a future once authentication finishes, so each test waits for it before closing the socket and a worker's failure reaches the test that started it. Every raw authentication thread in PostgresProtocolHandlerTest goes through these helpers, and the test listeners bind to loopback through one loopbackServerSocket helper.

Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
2026-11-28 09:58:55 -04:00
Priamo Germosen e61927b824 refactor(iam): read 12 PassRole operations from the generated table, not by hand (#9653)
PassedRoles read the role of twelve operations by hand: Lambda's CreateFunction and UpdateFunctionConfiguration (Role), CreateMicrovmImage and UpdateMicrovmImage (buildRoleArn), RunMicrovm (executionRoleArn), CreateNetworkConnector and UpdateNetworkConnector (OperatorRole), Step Functions' CreateStateMachine and UpdateStateMachine (roleArn), EventBridge's PutRule (RoleArn), Auto Scaling's PutLifecycleHook (RoleARN) and Application Auto Scaling's RegisterScalableTarget (RoleARN). The passed-roles generator reads each of them from botocore's model to the same member and the same service the role is passed to, so they leave its BY_HAND list, the regenerated table gives their members, and their cases and the two service constants only they used leave PassedRoles.
2026-11-28 09:18:36 -04:00
Allen Sanborn 6ff7b0fdd9 fix(iam): match AWS wording for missing and duplicate entity errors (#9098)
IAM's wording for missing and duplicate entities now matches what AWS answers. A duplicate CreatePolicy is "A policy called <name> already exists. Duplicate names are not allowed.", and a permissions boundary that names no policy, on CreateUser, CreateRole, PutUserPermissionsBoundary or PutRolePermissionsBoundary, answers "Scope ARN: <arn> does not exist or is not attachable.". A version id that names nothing on a policy that exists is named inside the attach sentence on GetPolicyVersion, DeletePolicyVersion and SetDefaultPolicyVersion, inline policies read "The user|group|role policy with name <name> cannot be found.", and instance profiles read "Instance Profile <name> ...". The wording tests share IamWordingRequests, which registers every create with PartitionCleanup.
2026-11-28 09:14:58 -04:00
Oleksandr Nikolaichuk bc38cee127 fix(cloudformation): report Automatic for an unchanged nested stack and Always for a name-derived create-only property (#9562) 2026-11-28 08:40:18 -04:00
Oleksandr Nikolaichuk a36725ec2d feat(iam): evaluate ResourcePolicy on SimulatePrincipalPolicy for a user source (#9583)
SimulatePrincipalPolicy ignored ResourcePolicy, so a simulation answered from the identity policies alone. For an IAM user source the supplied resource policy is now evaluated through the same decide the enforcement path uses, with CallerArn, which defaults to the source user, as its principal, and its condition keys counted in MissingContextValues. Each resource's owner is the account its ARN names, otherwise ResourceOwner, otherwise the caller's account, and RoleResourceAccessAuthorizer.relationship picks the same- or cross-account rules. A role source still ignores it, as the reference says resource-based policy simulation isn't supported for roles, and CallerArn is held to its declared length.
2026-11-28 08:40:11 -04:00
mrfelek 885874f5a4 feat(eks): name EKS Auto Mode nodes by their instance ID, as AWS does (#9631)
An EKS Auto Mode node was named by its instance's private DNS name, as
managed node groups' nodes are, where AWS names Auto Mode's nodes by
their instance ID. The Ready node Floci registers for an Auto Mode
instance now takes the instance ID as its name and its
kubernetes.io/hostname label, and keeps the private DNS name as its
InternalDNS and Hostname addresses, as on AWS. Node DNS answers and
forwarding rules still use the private DNS name.

A cluster kept from before this change has its Auto Mode nodes under
their private DNS names. Once such a node registers again under its
instance ID, Auto Mode's stray-node sweep deletes the DNS-named node,
only when its provider ID is that instance's, whether the instance is
live or terminated.
2026-11-28 08:34:59 -04:00
Hector Ventura e20b3ff8dc fix(cognito): refuse user pool custom domains in the China Regions (#9644) 2026-11-28 08:27:25 -04:00
Niels Kootstra 28d6d2997f fix(cloudfront): preserve tenant parameter definitions (#9647)
CreateDistribution, GetDistribution and GetDistributionConfig dropped a
distribution's TenantConfig.ParameterDefinitions. They are now parsed,
stored and returned, with DefaultValue and Comment kept as sent and a
numeric Required (1 or 0) read as an XML boolean. The TenantConfig
subtree is read as a bounded stream: more than five definitions,
CloudFront's quota for parameters per multi-tenant distribution, or
nesting deeper than 32 levels is refused with InvalidArgument.

Closes #9580
2026-11-28 08:24:27 -04:00
Andre Kurait 777c959de4 test(ecs): observe the completed stop transaction before checking counts (#9649)
stopTaskDuringThePullAnswersWithTheTaskStillLaunching could read STOPPED on the live task while the stop still held the task's monitor, before markTaskStopped decremented the cluster's running count, and then see a count of one. The test now checks the stop invocation and the running count while holding the same task monitor, so it reads them only once the stop has completed.

Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
2026-11-28 08:23:32 -04:00
Jackson PriceandAndre Kurait 70cf13bc4c test(cloudformation): delete the alarm stack after the integration test (#9642)
CloudFormationCloudWatchAlarmIntegrationTest left its stack and metric alarm in the shared emulator, where later tests could find them. The stack name is now a field, the alarm is named after it, and an @AfterEach deletes the stack through CfnStackWaits.deleteStack and waits for the deletion, even when an assertion fails.

Co-authored-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Jackson Price <jxnprice@amazon.com>
2026-11-28 08:19:53 -04:00
Kenshin Okinaka 2effefbbf0 fix(s3tables): route requests by the service they are signed for (#9603)
S3 Tables' routes begin with literal segments (/buckets, /get-table,
/namespaces, /tables) that shadowed S3's path-style routes, so an S3
call for a bucket with one of those names reached S3 Tables. The routes
now sit under an internal prefix that only a request signed for
s3tables is rewritten onto, as Signer's and DLM's are, so a request
signed for S3 keeps its path and reaches S3.

The shared SignedServiceRoute rewrite now keeps the path's
percent-encoding, so an encoded table bucket ARN stays one path
segment, and IAM matches a moved request on that percent-encoded path.
2026-11-28 08:16:03 -04:00
TATSUNO “Taz” Yasuhiro c5dddb8c2f fix(iam): read the tags of EventBridge V2 buses, subscribers and event sources (#9627)
EventBridge's storedTags answered only event-bus and rule ARNs, so aws:ResourceTag conditions on EventBridge V2 buses, subscribers and event sources saw no tags, and a Deny keyed on a tag never matched. EventBridgeService now hands an event-busv2, subscriber or event-sourcev2 ARN to EventBridgeV2Service, which reads the tags through findEventBus, findSubscriber and EventBridgeV2EventSources.lookup in the account and Region the ARN names. With V2 disabled or absent the answer stays empty.
2026-11-28 08:15:09 -04:00
Kenshin Okinaka 0b5448e17a fix(ses): refuse the headers SES sets itself on a v2 simple send (#9633)
SES v2 SendEmail accepted any additional header on a simple message,
but SES refuses the ones it sets itself. A Content.Simple.Headers entry
named From, To, Cc, Bcc, Subject, Date, Message-ID, Reply-To,
Return-Path, MIME-Version, Content-Type or Content-Disposition, in any
case, now answers 400 BadRequestException "Header <Name> is not
supported" with the name as sent, ahead of the configuration set lookup
and the sender verification. Other headers are accepted as before.
2026-11-28 08:11:41 -04:00
Jackson PriceandAndre Kurait c452942d3f refactor(rds): share cluster snapshot data lookup (#9641)
CopyDBClusterSnapshot, RestoreDBClusterFromSnapshot and the cluster
snapshot export each read the stored snapshot archive with their own
copy of the same lookup. They now share requireClusterSnapshotData,
which reads the same regional key and still answers
DBClusterSnapshotNotFoundFault (404) when the archive is missing.

Co-authored-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Jackson Price <jxnprice@amazon.com>
2026-11-28 08:06:17 -04:00
Priamo Germosen 5f89a2a174 refactor(iam): match a label its controller lets span slashes on the router's values alone (#9640)
The REST routes generator kept ARN_SPANNING_ROUTES, a list of the operations whose controller takes an ARN label with the slashes it was sent with unencoded (API Gateway v2's tag routes, OAM's and EKS's access entry routes), and vendored their labels greedy. IAM now matches such a request on the values the router gave the path parameters of the method it dispatched to, which covers every controller that takes a label so without a list, so the list goes and the routes keep the model's labels. A route agrees with the router when its labels, given the router's values in some order, rebuild the request's path, so a value holding one of the route's own segments (an EKS principal whose IAM path holds access-entries) is still matched, where taking the one split the spanning pattern finds would match no route.

OAM's tag requests reach the shared tags controller, which serves no OAM tagging, so an OAM ARN sent unencoded is no longer checked as OAM's before that controller refuses it. The tests give the router's values where a request is unencoded, and an API Gateway v2 tag request with an unencoded ARN is checked through the router.
2026-11-28 08:06:11 -04:00
Jackson Price c1a4cadfdb fix(core): wait for the sweep worker thread to exit on shutdown (#9639) 2026-11-27 23:25:44 -04:00
Hector Ventura fb03dff2a5 fix(iot): keep MQTT shadow replies, rules and saved shadows in the shadow's account (#9629)
#9623 moved MQTT shadow requests to the device certificate's account and
Region, but the broker still fanned each shadow reply out to every live
session whose subscription matched, so a device of another account
received the shadow's document. Shadow replies now go only to the
sessions of the shadow's account and Region, as AWS keeps each account's
topic namespace apart in each Region, and a message with no owner counts
in the default account and Region rather than in all of them.

Shadow events also evaluated their topic rules on the broker's rule
worker with no request scope, so the default account's rules fired and
the device account's never did. Each shadow event now evaluates its
rules, and runs their actions, as the shadow's account and Region.

The shadow paths now read, write and delete as the shadow's account. A
shadow saved before stores kept accounts apart sits under its bare key
and belongs to the default account, so only the default account finds
it and moves it under its own key on that first read.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-11-27 23:12:07 -04:00
Daniël van Ziel fd2eef7f74 fix(securityhub): page DescribeStandards with MaxResults and NextToken (#9635)
DescribeStandards ignored MaxResults and NextToken and always returned
the whole catalogue. It now pages through the shared Pagination helper
in catalogue order, returns a NextToken while standards remain, and
refuses a MaxResults outside 1 to 100 with InvalidInputException.

Closes #7607
2026-11-27 22:53:00 -04:00
Jackson Price 171f42ce6e fix(rds): acknowledge instance creation before database startup (#9599)
CreateDBInstance waited for the Docker backend before answering, so a
client with the SDK's default timeouts could retry a create that had
already succeeded and get DBInstanceAlreadyExists. It now stores the
instance and answers creating, as AWS does. DescribeDBInstances sees the
record while a background worker starts the container and proxy outside
the instance lock, and the worker publishes the backend only if the same
instance is still creating.

ModifyDBInstance and RebootDBInstance refuse a creating instance with
InvalidDBInstanceState and AWS's messages. A delete accepted during
startup keeps the record and the caller's backup choice until the worker
has torn down what it started, and after a restart Floci reopens the
PostgreSQL volume to save a retained backup before removing it. A state
reset waits up to 15 seconds for pending starts and otherwise refuses
with 503 from checkReset, before any container stops.

Signed-off-by: Jackson Price <jxnprice@amazon.com>
2026-11-27 22:48:48 -04:00
Jackson Price 2c5363131e fix(cloudformation): preserve JSON strings in EventBridge bus policies (#9630) 2026-11-27 22:24:18 -04:00
Priamo Germosen 489a6ffc7d fix(iam): check RDS Data and Resource Groups by their generated routes, the last hand rules gone (#9636)
IamActionRegistry kept 12 hand route rules: six for RDS Data, five for Resource Groups and a catch-all for Kinesis. RDS Data and Resource Groups now have their botocore routes vendored, and RDS Data joins the namespaces whose request resources are read, its model being what kept it out. Resource Groups' requests were already read, and the routes match them on the model's own path, without the /_rg prefix its route filter moves them under.

RDS Data's rules gave the action alone, so a statement was checked on every resource and a grant scoped to a cluster refused it even on that cluster. It is checked on the cluster its resourceArn names now, as AWS does. A secret's ARN is no cluster's, and a commit, a rollback and a statement inside a transaction now read their request's secret as every other call already did, refusing one Secrets Manager cannot read (SecretsErrorException, which AWS models on them), so a cluster's ARN given as the secret cannot stand in for the database the call runs on. A statement on a DB instance, which Floci serves and AWS's Data API does not, names no resource the check reads, so it is checked on *.

The authorized actions list RDS Data and Resource Groups among the routed scopes.

The Kinesis rule checked any POST with no X-Amz-Target as kinesis:*, an action no policy grants by name. Kinesis serves no such request, so it goes, as the rule machinery does, no rule being left.
2026-11-27 22:08:21 -04:00
Priamo Germosen d87aa9de1c refactor(iam): check Lambda by its generated routes alone (#9632)
IamActionRegistry kept 135 hand route rules for Lambda, Lambda MicroVMs and Lambda Web Functions. The generated REST routes, read from botocore, map every route those controllers serve to the same action, except where a controller takes a label's value with the slashes it was sent with unencoded: a durable execution's ARN and a callback id ({arn: .+}, {callbackId: .+}) and a Web Function's ARN ({resourceArn: .+}, {resource: .+}), where the model gives each label one segment. The rules' .+ took those.

A request that matches no route with each label taking one segment is now matched again with each label spanning the segments its value holds, and only a route whose labels the path then gives the values the router gave the path parameters of the method it dispatched to is its match: the route of the operation that runs. That needs no list of the labels a controller lets span. A request the shared tagging controllers serve keeps its match as it was: they serve a service only on the routes its model gives, so the values their own paths take name none of the service's. With that, the rules go, and none of Lambda's is left. The rule-precedence test moves to an RDS Data rule.
2026-11-27 20:33:59 -04:00
Hector Ventura 622e589dc3 fix(lambda): re-sync S3 code for functions in every region (#9621)
The reactive S3 sync listed functions in the default Region only, so a function created in any other Region never picked up new code when its S3 object changed. The observer now scans every Region's functions and syncs each one in the Region its ARN names, under its own account.

Buckets are per account unless the global bucket namespace is on, so two accounts can own same-named buckets, and matching by bucket name and key alone let an upload to one account's bucket redeploy another account's function. The observer now resolves the bucket written in the uploader's account and syncs a function only when its owner resolves its code bucket to the same owning account; with the global bucket namespace both resolve to the one bucket, so a shared code bucket still redeploys every function that uses it.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-11-27 19:53:37 -04:00