Commit Graph
2970 Commits
Author SHA1 Message Date
Priamo Germosen 368488cd5b fix(iam): read the stored tags of SageMaker and BCM Data Exports resources (#9872)
The request-resources table gives resource-tag keys to SageMaker's model, endpoint configuration, endpoint and
training job types and to BCM Data Exports' export type, but neither namespace gave IAM the tags it stores, so an
aws:ResourceTag condition on one of their actions never matched.

SageMakerStoredResourceArns reads SageMakerService.storedTags: the tags of the caller's model, endpoint configuration,
endpoint or training job the ARN names, in its Region, by the resource part the ARN starts with, read in place and
copied under the monitor AddTags and DeleteTags change them under. BcmDataExportsStoredResourceArns reads
BcmDataExportsService.storedTags: the ResourceTags an export's create gave it, read in place under its ARN.

StoredResourceTagIamIntegrationTest checks a caller allowed sagemaker:DescribeModel and bcm-data-exports:GetExport
only on resources tagged team=blue reaches the blue one and is refused the red one; both fail without the readers.
SageMakerServiceTest checks the read, its copy, the ARNs that name nothing, and that a model, an endpoint
configuration, an endpoint and a training job of one name answer their own tags by their own ARNs.
2026-11-30 21:07:38 -04:00
Allen Sanborn 23ae30e78a fix(opensearch): report DomainProcessingStatus on domain status (#9870)
The domain status DescribeElasticsearchDomain and the OpenSearch domain
calls share now carries DomainProcessingStatus: Creating while the domain
starts, Active once it is ready, and Deleting once it is deleted.
terraform-provider-aws's aws_elasticsearch_domain create waits on it
reaching Active, so every create timed out before.

Closes #7767
2026-11-30 21:03:40 -04:00
mrfelek c8d961afd1 fix(ec2): honour DryRun on the address and network interface calls (#9659)
AllocateAddress, AssociateAddress, ReleaseAddress, CreateNetworkInterface,
DeleteNetworkInterface, AttachNetworkInterface and DetachNetworkInterface
ignored DryRun and did the real call. They now answer it with
DryRunOperation and change nothing.

As AWS answered these calls in us-east-1, the dry run is answered before
any resource is looked up, so an unknown or in-use allocation, interface,
instance, subnet or attachment still gets DryRunOperation. Only what needs
no lookup is refused first: a tag specification Floci refuses, and a
member the call's model marks required, with MissingParameter.

Part of #8220
2026-11-30 20:45:57 -04:00
XuJian fbe6adbb67 feat(iam): fix the default account's outbound federation issuer to a configured UUID (#9853)
FLOCI_SERVICES_IAM_OUTBOUND_FEDERATION_ISSUER_ID fixes the default
account's outbound web identity federation issuer to
https://<uuid>.tokens.sts.global.<suffix>, so a stack can name that URL,
and the key set route the same UUID keys, before the feature is enabled.
Unset, the issuer is minted as before. Other accounts always mint their
own, since an issuer resolves back to its account by that UUID alone.

The value must be the lowercase 8-4-4-4-12 form the discovery routes
match, or Floci refuses to start. An issuer already minted outlives a
disable, so the setting takes hold only on a volume that has not enabled
the feature yet. When a stored issuer overrides it, at the start or on a
re-enable, that is logged at debug with both values.
2026-11-30 20:42:02 -04:00
Allen Sanborn 837fa24f38 fix(cognito): word unknown-user, client and auth refusals as AWS does (#9845)
Cognito user pools now word their refusals as AWS does, built in one
place (CognitoErrors). Codes and statuses are unchanged.

- An unknown user answers "User does not exist." on the admin and
  signed-in operations, and "Username/client id combination not found."
  on ForgotPassword, ConfirmForgotPassword, ConfirmSignUp and
  ResendConfirmationCode.
- "Incorrect username or password.", "Invalid Access Token",
  "Invalid Refresh Token" and "Group not found.".
- A missing app client answers "User pool client does not exist." on
  DescribeUserPoolClient and UpdateUserPoolClient, "User pool client
  <id> does not exist." elsewhere, and names the pool for another
  pool's client. The pool is checked before the client.
- UpdateUserPool and CreateUserPoolClient on a missing pool answer with
  an empty message.
- "Domain already exists.", RevokeToken's "Unsupported token type", the
  duplicate custom attribute message and the two MFA preference
  sentences.
- AdminInitiateAuth answers "Auth flow not enabled for this client" for
  a disabled flow, refresh included. A client whose flows are only the
  legacy values still refreshes.

Every by-id client lookup goes through describeUserPoolClient, and the
in-pool check through one clientInPool.
2026-11-30 20:37:29 -04:00
Langning Zhang 19dc3b4a42 fix(cloudformation): apply API Gateway stage method settings (#9861)
AWS::ApiGateway::Stage now stores MethodSettings on create and update.
Each entry is keyed the way API Gateway keys a stack's method settings,
the ResourcePath without its leading slash and then the HTTP method: /*
with * is */*, the root is ~1/GET, and /~1pets~1owners is
~1pets~1owners/GET.

An update writes only the methods and fields the templates declare. An
entry the new template drops is removed, a field dropped from a kept
entry returns to its default, and methods set outside the stack are
kept. Rollback restores only the fields the update changed and removes
the entries it added.

Closes #9513
2026-11-30 20:17:28 -04:00
Priamo Germosen 4d0287e6dc fix(iam): check DMS requests on the resources they name, from the DMS User Guide's ARN syntax (#9857)
The Service Reference ends every DMS resource type's ARN format in a wildcard where the resource goes
(arn:${Partition}:dms:${Region}:${Account}:endpoint:*), which the table reader matches as written, so no DMS request
was checked on the resource it names: one naming an endpoint, an instance or a task by its ARN stayed on *, and no
aws:ResourceTag condition on a DMS resource could match.

The DMS User Guide gives what goes there: "An ARN for an AWS DMS resource uses the following syntax:
arn:aws:dms:region:account number:resourcetype:resourcename". tools/aws/fetch_dms_arn_formats.py vendors that page
(the syntax, the sentence saying what its resource name is, and its table of formats) into
tools/aws/sources/dms-arn-formats.json, pairs the syntax with each Service Reference DMS format ending in a wildcard
by its resource type, and writes that format with the page's placeholder where the wildcard was
(arn:${Partition}:dms:${Region}:${Account}:endpoint:${resourcename}). A reworded page, or a table row whose type no
such format has, is refused. regen_iam_request_resources.py takes those formats as they stand (ARN_FORMAT_SOURCES,
granted for dms alone), each checked to differ from the Service Reference's only where its wildcard was, and verifies
the source against the live pages beside the other vendored sources.

The generator's existing machinery then names a DMS resource by the ARN a request passes, or fills the format from
the identifier a request names it by. DmsStoredResourceArns finds such an identifier, or an ARN DMS holds, as DMS
stores it (an endpoint's, an instance's or a task's ARN ends in the id DMS minted, not in its identifier; one stored before keys carried the account is the default account's and found too), and reads
the tags of an endpoint, instance, task or subnet group for aws:ResourceTag, both in place. A subnet group's ARN
ends in its identifier as DMS stores it, in lower case ("This value is stored as a lowercase string"), so the reader
resolves an ARN naming one in another case to that one (resolveStoredArn). A request leaving out
an optional ARN names the resource DMS uses for one naming none, of which it has none. A replication instance whose create
names no subnet group goes into the account's default replication subnet group, so the reader answers that group as
the one such a create acts on (findImplicitDefault), and the create is checked on subgrp:default.

The fetcher also copies what AWS answers each DMS create with, from AWS's recorded exchanges with DMS (the AWS
Emulator evaluation suite's wire tests, "a recorded exchange with AWS") and botocore's examples: whether the ARN of
what the create makes ends in a member of its request (a subnet group's in its ReplicationSubnetGroupIdentifier, an
event subscription's in its SubscriptionName) or in a value the request does not give (an endpoint's, an instance's,
a task's, a certificate's: botocore's example answers EndpointIdentifier "test-endpoint-1" with
endpoint:RAAR3R22XSH46S3PWLC3NJAWKM). The generator's rule for a variable a create's response answers, which stays open
whatever member a rule would fill it from, reads that too (with_recorded_mints), both for what a create is checked
on and for what its tags are checked on: CreateEndpoint, CreateReplicationInstance and ImportCertificate are checked on
what they make with its id open (rep:*), the tags of CreateReplicationTask, CreateDataProvider and
CreateInstanceProfile on what they make likewise, and no other row of the table changes. The creates of data
migrations, migration projects, replication configs and assessment runs have no recorded answer and keep their
fills. A modify renaming an instance is still checked on rep:<new name> beside its own ARN, nothing
being recorded for it.

The regeneration also takes the Service Reference's new SageMaker candidate, leaderboard and model monitor config
actions.
2026-11-30 19:32:58 -04:00
mrfelek cc54152814 feat(eks): consolidate underutilized EKS Auto Mode nodes, as Karpenter does (#9658)
A pool whose consolidationPolicy is WhenEmptyOrUnderutilized (the default)
or Balanced (Auto Mode's built-in pools') now consolidates a node whose
workload pods have stayed the same for its consolidateAfter. When they fit
on the pool's other Ready nodes, the node is tainted, drained and removed as
an empty node is. Otherwise, when a smaller type the pool allows holds them,
the node is tainted karpenter.sh/disrupted:NoSchedule, a replacement is
launched, and the old node goes once the replacement is joined and Ready.
A pool replaces one node at a time, and the budgets that cover Underutilized
count. A do-not-disrupt pod, a pod pinned to named nodes, or a
PodDisruptionBudget allowing no disruption keeps the node; once a
replacement is Ready, such a pod holds the old node until a later pass can
drain it. A replacement that is gone, or not Ready within 10 minutes, is
called off: the old node's taint is lifted, and it is uncordoned if a failed
drain left it cordoned. WhenEmpty pools keep only removing empty nodes.

Part of #8914
2026-11-30 17:15:48 -04:00
thejrose1984 c7d89de0a8 fix(apigateway): render WebSocket mapping templates against the message (#9859)
Request templates of WebSocket AWS and HTTP integrations were rendered against
the whole Lambda proxy event with a nearly empty $context. $input is now the
client's message (base64 for a binary frame, empty on $connect and
$disconnect), and $context the route's request context, in response templates
too, where $input stays the integration's reply. VtlContext's
gatewayResponseContext is renamed requestContext, and gateway responses behave
as before.

Refs #9835
2026-11-30 17:09:16 -04:00
Jackson PriceandAndre Kurait aebe126726 fix(ec2): mark routes to deleted NAT gateways as blackhole (#9854)
DescribeRouteTables reported a route to a deleted NAT gateway as active. Route
state for a NAT gateway target is now read from the gateway record in the route
table's account and region when routes are described or sent to route table
listeners: a gateway that is gone, or not available, reads as blackhole, and the
route keeps its destination, origin and gateway ID until it is replaced or
deleted. Deleting a NAT gateway writes no route table, so a failed delete or a
CreateRoute or ReplaceRoute racing it cannot leave a stored state behind.
DeleteRouteTable takes the table lock that an egress-only internet gateway
delete holds while it blackholes routes, so that write cannot bring a deleted
table back.

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-30 16:44:08 -04:00
thejrose1984 d79719e61d fix(ecs): run the task definition's health check instead of the image's (#9851)
A container definition's healthCheck was stored and returned but never given to
Docker. The image's HEALTHCHECK ran instead and decided healthStatus and whether a
dependsOn HEALTHY condition was met, so a task whose dependency had its check only
in the task definition failed to start.

The definition's check is now set on container creation, with ECS's defaults
(interval 30, timeout 5, retries 3) for the members it leaves out, since Docker
would otherwise take them from the image. A definition without a healthCheck
creates the container with a NONE test, so the image's check doesn't run and
health stays UNKNOWN, as on ECS. ContainerSpec and ContainerBuilder gain an
optional health check; other services leave it unset and keep the image's.

Closes #9831
2026-11-30 15:42:38 -04:00
Priamo Germosen 5524acf043 feat(emr): run PrestoDB on a cluster with Presto, opt-in (#9849)
"Presto, the previous version of Trino, is still available for use with Amazon EMR", and Floci ran nothing for a
cluster with Presto. With presto.enabled on, such a cluster runs the Presto project's PrestoDB as Floci runs Trino: its
coordinator beside the metastore, its workers on the core and task nodes, the presto- classifications, presto-cli for
its steps and a host of its own for clients outside the cluster. A cluster that names Trino too runs Trino, as the two
"can't run simultaneously on the same cluster". PrestoDB authenticates a client only over its own HTTPS and lets
everyone in over HTTP, so a cluster whose presto-config sets http-server.authentication.type runs no PrestoDB, and its
host answers 403 with why.
2026-11-30 14:17:11 -04:00
thejrose1984 3b4b911396 docs(rds): correct the rds_replication workaround (#9850)
Since #9182 the master is NOSUPERUSER NOREPLICATION, so PostgreSQL refuses
ALTER ROLE ... REPLICATION from it and the workaround the page gave no longer
works. The page now says so, except where the master is the bootstrap
superuser, and that a member of rds_replication logging in with its password
cannot open a replication connection and needs an IAM token for one.
2026-11-30 13:47:13 -04:00
glorfindel33 c08c457463 fix(cloudformation): apply API Gateway stage access log settings (#9735) 2026-11-30 13:45:42 -04:00
Vũ Thế Huy b247c868b6 feat(rds): replicate a zero-ETL integration's ongoing changes into Redshift (#9448)
Keep an RDS zero-ETL integration from a PostgreSQL source up to date after its
initial load: rows inserted, updated or deleted on the source, and tables
truncated, reach the destination database in Redshift.

When the source runs with wal_level=logical, RdsIntegrationLoader creates a
publication of the tables it is about to copy and a pgoutput replication slot
of the same name before reading any table. RdsIntegrationReplicator peeks the
slot, decodes the pgoutput messages, applies whole transactions to the target
in one transaction, and only then advances the slot, so a Floci restart
resumes from the first change not yet applied. Every change is applied as a
full-row upsert or a delete by primary key, so replaying the changes made
during the copy converges on the source's rows; unchanged TOASTed values are
read from the source row under the update's key.

DeleteIntegration and a failed load drop the slot and the publication. A
change the target refuses, a change too large to apply, or a source table or
column that is gone fails the destination with ReplicationFailed and drops the
slot; an unreachable source or target is retried.

Closes #7985.
2026-11-30 13:39:34 -04:00
XuJian 5eebe2f708 fix(iam): check the ses v2 legacy GET list routes as their actions (#9826)
The sesv2 model moved ListEmailIdentities and ListConfigurationSets to the
POST /v2/email/list-* routes between botocore 1.43.104 and 1.43.105. SDKs built
before that move still send GET /v2/email/identities and
GET /v2/email/configuration-sets, which matched no route of the model, so those
requests were allowed whatever the caller's SES grants were, an explicit Deny
included.

The REST route generator now reads those routes from botocore 1.43.104's own
model: LEGACY names the release, and build_legacy vendors, for an operation both
models hold on another route, the older route as an alternative checked as the
operation's action. A regeneration carries them over offline, --fetch-legacy
(make legacy-routes-sync) reads them again, and --verify compares the vendored
block against the release. carried_legacy checks the vendored block.

Closes #9818
2026-11-30 13:38:40 -04:00
Priamo Germosen a0d4cc0ac8 feat(emr): run Trino workers on the nodes of a cluster with Trino alone (#9843)
From emr-7.14.0, a cluster with Trino alone runs no YARN or HDFS, so Floci ran no container for its core and task
nodes and its Trino had no workers. Each of those nodes that runs a worker, up to trino.max-workers, now runs that
worker alone, in a container of its own on the cluster's network with its node's host name and instance metadata.
The nodes run the cluster's bootstrap actions as themselves, as nodes that run YARN do, and a resize starts and
removes workers with its nodes. A worker started before its node's own bootstrap ended starts again from the image it
left. A container given a link-local address keeps the alias of its DNS name, which Docker dropped as Floci
reconnected it.
2026-11-30 12:11:25 -04:00
Hector Ventura 821456a149 fix(release): copy images to public ECR by digest, retried, and let a dispatch repair them (#9840) 2026-11-30 10:48:23 -04:00
Priamo Germosen 1b5c862c2f fix(iam): read the stored tags of ElastiCache resources (#9839)
The request-resources table gives resource-tag keys to ElastiCache's user, user group, replication group, cluster,
snapshot, subnet group, parameter group and serverless cache types, but ElastiCache gave IAM none of the tags it
stores, so an aws:ResourceTag condition on one of its actions never matched: an Allow scoped to a tag never applied
and a Deny scoped to one never refused.

ElastiCacheStoredResourceArns reads ElastiCacheService.storedTags, and ElastiCacheServerlessService.storedTags for a
serverless cache. A resource stored with its ARN is matched on its kind and id, as the handlers find it: those that change or delete
a user, user group, replication group, cluster or snapshot find it by its id whatever Region a request is signed
for, so IAM checks the one they act on; a subnet group,
stored by name alone, only in the request's Region, where ListTagsForResource reads it; a parameter group in the
ARN's Region. A user group's id and a serverless cache's name are read in lower case, as the handlers find them,
so a request spelling one in another case is checked with its tags. Each is read in place (AccountAwareStorageBackend.readInAccount): the handlers' lookups move a
pre-multi-account entry into the caller's account, which a read made before the request is allowed must not do. Each
kind's tags change in place under its own lock, so the read copies them under that lock, taken
only once the resource is found (an ARN naming nothing leaves no lock behind) and finding it again under it. A
serverless cache's tags are replaced whole on each change, so its copy needs no lock.

ElastiCacheResourceTagIamIntegrationTest checks a caller allowed elasticache:DeleteUser and
elasticache:DeleteCacheParameterGroup only on resources tagged team=blue deletes the blue one and is refused the red
one, and the same for elasticache:DeleteUserGroup with the group's id in upper case, and that a Deny on
team=red refuses a delete of the red user signed for another Region; ElastiCacheServiceTest and ElastiCacheServerlessServiceTest check the reads, their copies, the ARNs that name
nothing, that reading those leaves the lock count as it was, and that a legacy user is read where it is.
2026-11-30 10:30:23 -04:00
Priamo Germosen cd7017c6a5 fix(iam): read the stored tags of Transfer Family servers and users and SES resources (#9832)
The request-resources table gives resource-tag keys to Transfer Family's server and user types and to SES's
identity, configuration set, template, contact list, custom verification email template, dedicated IP pool and
tenant types, but neither namespace gave IAM the tags it stores, so an aws:ResourceTag condition on one of their
actions never matched: an Allow scoped to a tag never applied and a Deny scoped to one never refused.

TransferStoredResourceArns reads TransferService.heldTags: the tags the server or user the ARN names holds, in the
ARN's account and Region, read in place under every key the handlers find it under (its Region's, or one from
before keys named the Region or the account), matched on the whole ARN, and copied. AccountAwareStorageBackend gains
getForAccountWithLegacyKeys for that: the value getForAccountMigratingLegacyKeys returns, under the same keys and
owner check and the same monitor, with nothing moved. It writes nothing: the handlers' lookups move a resource under an old
key to its Region's key, and the tag read stores the tags it merges, neither of which a read made for IAM may do.

SesStoredResourceArns reads SesService.storedTags: the tags ListTagsForResource reads for the resource of each
taggable kind, in the ARN's account and Region; none for an ARN of another account, with no Region, or naming no
resource SES holds. Each domain reads it in place (SesTaggable.storedTags, through
AccountAwareStorageBackend.readInAccount): the lookup the tag operations make moves a pre-multi-account entry into the
caller's account, which a read made before the request is allowed must not do. Each tag change stores a new list, so
the copy is of one whole set. A tenant's ARN ends in the id SES mints, which a request naming the tenant by its name
(GetTenant, DeleteTenant) leaves out, so SesStoredResourceArns.find resolves the name to the stored tenant's ARN,
read in place too.

StoredResourceTagIamIntegrationTest checks a caller allowed transfer:DescribeServer and ses:GetConfigurationSet
and ses:GetTenant only on resources tagged team=blue reaches the blue one and is refused the red one; TransferServiceTest and
SesServiceStoredTagsTest check the reads, their copies and the ARNs that name nothing.
2026-11-30 09:13:57 -04:00
Allen Sanborn 1a490d79a8 fix(autoscaling): apply DescribeAutoScalingGroups Filters and paginate the filtered set (#9301) 2026-11-30 07:52:06 -04:00
nsandroni 3f881a6e24 feat(kinesisvideo): add stream lifecycle (CreateStream, DeleteStream, DescribeStream, ListStreams) (#9586)
Adds Amazon Kinesis Video Streams (kinesisvideo, REST JSON, 2017-09-30)
with the stream lifecycle control plane: CreateStream, DescribeStream,
ListStreams and DeleteStream, stored per account and Region.

A stream's ARN ends with its creation time in milliseconds and is
distinct for every stream, even one recreated within the same
millisecond, and its KmsKeyId defaults to alias/aws/kinesisvideo.
ListStreams pages by the last returned name, so deleting between pages
skips nothing. Requests are checked against the constraints of the
botocore model, vendored by tools/aws/regen_kinesisvideo_shapes.py, and
refusals carry the codes and wording AWS sends.

Under IAM enforcement every request is checked as its kinesisvideo:
action on the stream it names, read through the stream's stored ARN and
tags, and a tagged CreateStream also needs kinesisvideo:TagStream. The
IAM data comes from the generators.

A stream is ACTIVE as soon as CreateStream returns, and DeleteStream
removes it at once, where AWS passes through CREATING and DELETING.
2026-11-30 07:14:25 -04:00
Jackson PriceandAndre Kurait 22eadba187 feat(docker): include declared files in local helper contexts (#9803)
Let built-in helper Dockerfiles include sibling classpath files through a
<Dockerfile>.files manifest. The builder sends those declared files in the
Docker context and includes their contents in the recipe hash, so a changed
script rebuilds the image even when its Dockerfile stays the same. Invalid,
duplicate or missing filenames fail before a build starts. The native
resource rule includes the manifests and declared files alongside their
Dockerfiles.

Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
Co-authored-by: Andre Kurait <AndreKurait@gmail.com>
2026-11-30 07:04:39 -04:00
mrfelek c5ace1a36e feat(eks): Auto Mode nodes whose own kubelet registers them serve logs, exec and port-forward (#9825)
A node from an image with kubeletRegistersNode ran its pods, but the API server couldn't reach its kubelet:

- k3s dialled kubelets through its agent tunnel, which only a k3s agent opens. The server now runs with
  --egress-selector-mode=disabled and dials each kubelet directly, as EKS's API server does. Floci's other nodes have
  no kubelet, so only the server's own is otherwise reached, at its own address.
- Nothing approved the kubelet's kubernetes.io/kubelet-serving CertificateSigningRequest, so it served no TLS. Auto
  Mode's reconcile approves a pending one from a node it launched when it names only that node (CN
  system:node:<name>, O system:nodes) and the node's instance ID, private DNS name or private address, with server
  usages, as EKS approves it after checking the names are its instance's.
- The kubelet trusted only the cluster CA, while k3s signs the API server's client certificate with its client CA.
  The NodeConfig's certificateAuthority now carries both, where EKS's one CA signs everything.

Kubernetes signs the names of a request's first extension request, while the check read the last. A request with more
than one is now refused. A request list that can't be read, or an approval that fails, is logged and left for the next
pass, the rest of the pass going on. certificateAuthorities takes the client CA as a nullable String.
2026-11-30 06:59:28 -04:00
Oleksandr Nikolaichuk 4a013f5226 feat(iam): SimulatePrincipalPolicy lists resource-policy statements in MatchedStatements (#9776) 2026-11-30 06:57:27 -04:00
Priamo Germosen f0b2c2db2a fix(emr): keep a cluster's Trino node.id on its coordinator alone (#9829)
A node.id in a cluster's trino-node classification reached its Trino workers too (#9797), so every node had the
coordinator's id, where Trino needs it "unique for every node". It stays the coordinator's, and each worker is
named after its node's host, as a node given no id is.
2026-11-30 06:57:24 -04:00
Niels Kootstra 85a8cf0a96 fix(ec2): resolve RAM-shared transit gateways for consumer reads (#9770) 2026-11-30 06:47:12 -04:00
Priamo Germosen d6ab5bc760 fix(iam): read stored tags only from held resources, without leaving state behind (#9807)
Follow-ups of the stored-tags batches (#9794, #9799), from their reviews.

Config's TagResource keeps tags for any config ARN of a kind it holds no resource of (an aggregator, a stored query),
and storedTags read them, so a caller allowed config:TagResource could store tags on such an ARN that then satisfied
an aws:ResourceTag condition. AwsConfigService.heldTags answers only for the kinds Config holds and checks before
tagging (a rule, a conformance pack, an aggregation authorization, the configuration recorder), and finds the
resource without creating the per-Region maps or the lock its tag changes use, which the locked read did for the
Region of any ARN a request named, denied ones included; it takes that lock only once the resource is found. EFS's
storedTags likewise finds the file system or access point before taking its lock.

MemoryDbServiceTest checks that every map of tags MemoryDB answers is a copy, and the MemoryDB and Route 53 Resolver
integration tests' cleanups name the port, as they run after the test method once Quarkus has reset RestAssured's
(Route53ResolverRequests gains a port overload).
2026-11-30 06:26:15 -04:00
Priamo Germosen ac3be910ae feat(emr): run Trino workers on a cluster's core and task nodes (#9797)
EMR's Trino follows a "coordinator-worker model, where each component has a specialized role in query
execution", and Floci ran the coordinator alone. Each core and task node Floci runs now runs a Trino worker,
in a container that shares the node's network, up to trino.max-workers with trino.worker-memory-mb each, and
the coordinator runs the queries itself only on a cluster with no workers. Every node shares a secret Floci
makes as the coordinator starts, and a worker starts and goes with its node, a resize's among them.
2026-11-30 06:25:52 -04:00
Hector Ventura 099547cf4c chore(deps): move the web console to floci/floci-ui 0.9.0 (#9816)
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-11-30 00:00:55 -06:00
Priamo Germosen 10cec1d376 fix(iam): read the stored tags of CloudWatch alarms, dashboards and metric streams (#9796)
The request-resources table gives CloudWatch's alarms, dashboards and metric streams the aws:ResourceTag keys, which
the Service Reference lists for them, but CloudWatch answered no storedTags, so a condition on a resource tag never
matched: a caller allowed cloudwatch:DeleteAlarms only on alarms tagged team=blue was refused it on the blue alarm as
on any other.

CloudWatchStoredResourceArns reads the tags CloudWatch's tag operations read, each kind from the service keeping it:
an alarm's from the metrics service, a dashboard's from the dashboards service and a metric stream's from the metric
streams service. An ARN of another account, or one naming no resource CloudWatch holds, reads none.

The dashboards and metric streams services changed a resource's tags in place under no lock, and their tag read
handed out the live map, which an IAM check reading it while another request tags the resource could see half
changed or fail on. Their tag read, tag and untag are now synchronized, and the read returns a copy, as the metrics
service's already were; the dashboards and metric streams service tests check the read is a copy.

Each kind is told by the resource part its ARN starts with (alarm:, dashboard/, metric-stream/), as the table's
formats name it. isDashboardArn and isMetricStreamArn matched their word anywhere in the ARN, and an alarm may be
named x:dashboard/y, which then went to the dashboards service, read no tags and escaped a tag-scoped Deny; the tag
handlers dispatched with the same helpers, so they now match the prefix too.
2026-11-29 23:26:55 -04:00
Priamo Germosen bcb2a5e29c fix(iam): read the stored tags of Config, EFS and Route 53 Resolver resources (#9794)
The request-resources table gives AWS Config's rules, aggregators, conformance packs and other resources, EFS's file
systems and access points, and Route 53 Resolver's endpoints, rules and firewall domain lists the aws:ResourceTag
keys, which the Service Reference lists for them, but none of the three services answered storedTags, so a condition
on a resource tag never matched for them: a caller allowed an action only on resources tagged team=blue was refused
it on the blue one as on any other.

Each service's stored-ARN class now reads the tags it keeps on the resource the ARN names, under the lock that
resource's tag changes hold, so a concurrent change is seen whole or not at all: Config through ListTagsForResource's
own locked read; EFS from the caller's file system or access point the ARN names, matched on its stored ARN and
copied under its resource lock (EfsService.storedTags); Route 53 Resolver from its tag store for the caller's
endpoint, rule or firewall domain list, under the monitor its tag changes hold. An ARN of another account reads none, as these services keep no resource of it for the caller.
2026-11-29 22:59:34 -04:00
Priamo Germosen 91480010b7 fix(iam): read the stored tags of MemoryDB clusters, users and ACLs (#9799)
The request-resources table gives MemoryDB's clusters, users and ACLs the aws:ResourceTag keys, which the Service
Reference lists for them, but MemoryDB answered no storedTags, so a condition on a resource tag never matched: a caller
allowed memorydb:DeleteUser only on users tagged team=blue was refused it on the blue user as on any other.

MemoryDbStoredResourceArns reads the tags MemoryDB's ListTags reads, for the caller's cluster, user or ACL the ARN
names. Its tag changes mutated the stored map in place under no lock, and ListTags handed out that live map, which an
IAM check reading it while another request tags the resource could see half changed or fail on; the tag read, tag and
untag are now synchronized, and each returns a copy.
2026-11-29 22:52:36 -04:00
Daniël van Ziel 41b00b16db fix(cloudformation): provision ApiGateway Model and RequestValidator, and honor them on Method (#9790) 2026-11-29 22:26:15 -04:00
Hector Ventura edc6beb8e5 docs(partition): list the AMI owner alias account ids as an open question (#9795)
DescribeImages answers the commercial account ids behind the amazon and aws-marketplace owner aliases in every partition; Floci has no source for the ids in the other partitions yet.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-11-29 22:19:05 -04:00
Priamo Germosen 1dc6478108 fix(iam): return GetFunction's tags only to a caller allowed lambda:ListTags (#9782)
The Lambda API reference says of GetFunction's Tags "Lambda returns tag data only if you have explicit allow
permissions for lambda:ListTags", and the Service Reference lists lambda:ListTags among the actions GetFunction is
authorized by. Floci returned a function's tags to every caller allowed lambda:GetFunction.

tools/aws/fetch_lambda_response_permissions.py vendors, from the API reference page of each operation the Service
Reference lists as authorized by an action beside its own and the reference's operations page documents, each
response element's sentence saying it is returned only with a permission, with the element and the action. It
refuses a sentence naming a permission and a lambda: action in any other wording, and a page whose response elements
section is missing or lists no element without saying the response is empty, so a reworded or relaid page fails
rather than dropping the check. The authorized-actions generator reads it into a returnedOnlyIf
section, where botocore's response of the operation has a member of the element's name and the Service Reference
lists the action among the operation's: GetFunction returns Tags only with lambda:ListTags. IamAuthorizedActions
reads it, and LambdaController leaves the member out of a GetFunction response to a caller not allowed the action on
the function, checked with the function's tags through IamEnforcementFilter.authorizeEntryResource. TagsError is not
set, as no recording of AWS's answer for that case gives its code and message.

IamEnforcementFilter.requestAuthorization, which hands a handler the caller the filter evaluated, now treats a blank
Authorization header as no credential, as the filter itself does, and falls back to the presigned X-Amz-Credential;
before, a request with a blank header and a query credential passed the filter as that credential and the handler's
check as unsigned, so GetFunction returned Tags to a caller not allowed lambda:ListTags.
2026-11-29 22:09:26 -04:00
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
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
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
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
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 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
Niels Kootstra 518151ccd0 fix(sfn): reject JSONata group-by on a variable at top level (#9734) 2026-11-29 13:59:18 -04:00