Commit Graph
2859 Commits
Author SHA1 Message Date
Vũ Thế Huy 004ceb7b09 feat(docker): reach a daemon named by an ssh:// Docker host through an SSH tunnel (#9531) 2026-11-27 11:57:00 -04:00
Andre Devay ab71c20cda fix(apigateway): page GetUsagePlanKeys by limit and position (#9594)
GetUsagePlanKeys ignored limit and position and returned every key attached to the plan in one response. It now pages with the same id-ordered pageById helper and pageResponse envelope GetUsagePlans and GetAuthorizers use: 25 keys by default, 500 at most, limit=0 rejected, position on nonterminal pages only, and an unknown position rejected with BadRequestException. GetUsage and the data plane keep the unpaged list.

Closes #9062
2026-11-27 11:05:39 -04:00
Priamo Germosen 9c5f57808a feat(rds): serve a DB cluster's instances in its VPC and resolve its endpoint names to them (#9590)
With floci.services.rds.endpoints-in-vpc on, each instance of an Aurora DB
cluster gets its own address in its VPC, as a standalone instance does, and
serves the cluster's port, which the API reference says "is managed by the
cluster". The cluster reports the names the Aurora user guide gives its
endpoints, <cluster>.cluster-<identifier>, <cluster>.cluster-ro-<identifier>
and <endpoint>.cluster-custom-<identifier>, and Floci's DNS server resolves
them to the instances as Aurora points them: the cluster endpoint to the
writer, following a failover; the reader endpoint to another instance, or
the writer when none is served; a custom endpoint to one of the instances it
holds, picked at random, and none once its static members are all deleted.
Answers live five seconds, the TTL of Aurora's DNS zones. A Multi-AZ DB
cluster, whose instances Floci does not create, and an Aurora Serverless v1
cluster, which has none, keep the proxy endpoint.

The names are routed again whenever a cluster's instances, writer or custom
endpoints change, under one lock, and are restored at restart. An IAM token
generated for any of a cluster's names is good at each of its instances, and
the proxies' certificate covers the names. StopDBCluster removes the
instances' relays and StartDBCluster serves them again; a failed instance
create forgets its name and leaves the names as they were; a cluster
restored from a snapshot serves the snapshot's port.

Refs #6273
2026-11-27 10:17:04 -04:00
Priamo Germosen 1a91dbda76 fix(iam): check iam:PassRole on the roles an EMR RunJobFlow request names (#9587)
AWS's Service Reference lists iam:PassRole for RunJobFlow, passing its
roles to application-autoscaling.amazonaws.com, ec2.amazonaws.com and
elasticmapreduce.amazonaws.com without saying which member's role goes
where, and JobFlowRole names an instance profile rather than a role.
The passed-roles table left the operation unread, so a caller allowed
elasticmapreduce:RunJobFlow could launch a cluster with any service role
and any instance profile.

A new vendored source, tools/aws/sources/emr-roles.json, written by its
own script from the EMR API reference, management guide and AWS CLI
reference, gives each member's role. The guide's page of each role names
its default role ("The default role name is EMR_EC2_DefaultRole"), and
the full access policy it gives users passes each default role to one
service ("iam:PassedToService": "ec2.amazonaws.com*"). The API reference
calls JobFlowRole an instance profile ("Also called instance profile and
Amazon EC2 role"), and the CLI reference's create-cluster examples give
the roles by name (--service-role EMR_DefaultRole). The steps' runtime
role, StepExecutionRoleArn, is not passed: "You can control access to
the runtime role with the condition key elasticmapreduce:ExecutionRoleArn."

The generator reads the source through ROLE_SOURCES, as it reads EKS's,
now taking a documented iam:PassedToService over a trust policy, a member
by name or as an instance profile where the source says so, and leaving
out a member whose role a condition key controls. RunJobFlow moves out of
notRead: ServiceRole to elasticmapreduce.amazonaws.com and AutoScalingRole
to application-autoscaling.amazonaws.com, each by name or ARN, and the
roles of the instance profile JobFlowRole names, by name or ARN, to
ec2.amazonaws.com, found with the instance-profile lookup RunInstances
already uses. A profile IAM does not hold passes no role, as Floci's EMR
already reads JobFlowRole. An instance-profile member is not read for a
call with no request of its own, which has no such lookup.

The instance profile is now found one way everywhere it is used
(IamService.instanceProfileNamed): by its name, or by its own ARN, path
and account included. IAM's passed-role check, EMR's step role and an
EC2 instance's credentials each read it their own way, and EMR kept only
the name after an ARN's last slash. A JobFlowRole ARN of another account
or path then found no role to check but ran the steps as the local
profile's role.

A member's JSON value is now read as the text a handler reads it as, a
number or a Boolean included, as the request resources and condition
keys already read a body's values. The passed-roles reader took strings
alone, while EMR takes "JobFlowRole":123456 as the profile 123456, so a
role named by a number went unchecked.
2026-11-27 08:11:04 -04:00
Kenshin Okinaka b981d0916d fix(ses): check a v2 templated send on the template it names (#9582)
A v2 SendEmail or SendBulkEmail naming a stored template was not checked
on that template, so a policy granting or denying ses:SendEmail on one
template did not reach a v2 send with it. The request-resources generator
now reads, from botocore's shapes, the name and ARN members of a structure
named after a resource type inside a request structure
(Content.Template.TemplateName and TemplateArn, DefaultContent.Template
for bulk sends), and the table and its reader accept a field of a
structure inside a structure.
2026-11-27 07:13:10 -04:00
TATSUNO “Taz” Yasuhiro c67a520e4e fix(eventbridgev2): name webhook hosts in the server certificate (#9581)
With TLS on, CreateEventSource and DescribeEventSource add *.c01.events-webhook.<region>.<host> to Floci's generated server certificate, so a client that verifies the certificate accepts a source's webhook URL. One wildcard covers every source of a Region. The source is stored under the service lock and the certificate is reissued outside it, as the API Gateway, Cognito and IoT custom domain operations do. A user-provided certificate is not changed. The TLS handshake test helper is shared through TlsTestSupport.
2026-11-27 07:04:04 -04:00
Priamo Germosen b8dcbeceb6 feat(rds): serve a DB instance at its own address in its VPC, on its Port (#9561)
With the new opt-in floci.services.rds.endpoints-in-vpc, a standalone DB
instance gets its own address in the subnet of its Availability Zone, as on
RDS, and serves the Port it was created with, or its engine's default, under
the name RDS gives it: <instance>.<identifier>.<region>.rds.<dnsSuffix>, with
one identifier per account and Region. Floci's DNS server answers the name
with the address, so two instances can both serve 5432.

A relay container at the address forwards each connection to the instance's
auth proxy, so IAM authentication, TLS and the master login are unchanged;
IAM tokens bind to the name and port the proxy binding publishes. The
address follows the instance through create, stop and start, a backend
started on retry, a move to another DB subnet group, a blue/green
switchover, delete, a failed create and a restart, and keeps its subnet and
VPC in use for DeleteSubnet and DeleteVpc.

VpcAddressRelays serves any endpoint this way next to VpcContainerLeases,
which now takes back a preferred address; RdsDnsRecordSource answers the
names, and AwsEndpoints builds them. Clusters and DB proxies keep the proxy
endpoint for now.

Refs #6273
2026-11-27 06:48:51 -04:00
Priamo Germosen fb0e72c96a fix(iam): check iam:PassRole on an EKS Auto Mode cluster's node role (#9576)
CreateCluster and UpdateClusterConfig take EKS Auto Mode's node role in
computeConfig.nodeRoleArn. AWS's Service Reference lists iam:PassRole
for both operations, with iam:PassedToService ec2.amazonaws.com and
eks.amazonaws.com, but not which member's role goes to which service.
Floci never checked the node role: CreateCluster read only its cluster
role, by hand, and UpdateClusterConfig was left out of the table.

A new vendored source, tools/aws/sources/eks-roles.json, written by its
own script from the EKS API reference and user guide, gives each member's
role and the service its trust policy is for. CreateCluster's roleArn is
the cluster IAM role ("provides permissions for the Kubernetes control
plane"), whose page links from the member and whose trust policy names
eks.amazonaws.com. nodeRoleArn is "the IAM Role EKS will assign to EC2
Managed Instances", whose description names the EKS Auto Mode IAM
reference, whose node IAM role section links the guide's page of that
role, whose trust policy names ec2.amazonaws.com. The generator reads
the source (ROLE_SOURCES) to choose, among the services the Service
Reference names for an operation, the one each member's role is for. It
fails on a vendored role for a service the reference does not name, and
on one no operation reads. --verify checks the source against the live
pages.

So CreateCluster now needs iam:PassRole on roleArn for eks.amazonaws.com
and on computeConfig.nodeRoleArn for ec2.amazonaws.com, and
UpdateClusterConfig on its node role for ec2.amazonaws.com. Both move
into the generated table. So do CreateNodegroup, CreateFargateProfile,
CreateAddon and UpdateAddon, whose roles PassedRoles read by hand, the
same members to eks.amazonaws.com the generator gives from botocore and
the Service Reference. Their hand readers are gone, and Step Functions'
EKS tasks now check them as a direct request does.
2026-11-27 01:00:33 -04:00
Andre Kurait 15a0aacb06 fix(cloudwatch): accept summaries accompanying weighted values (#9560)
StatisticValues sent beside Values and Counts is read as a summary of the same distribution, so the weighted samples are kept without counting the summary twice. A conflicting scalar Value or a malformed summary still fails before anything is published. The weighted-summary and metric-math alarm tests share one JSON-to-Query conversion in CloudWatchTestRequests.
2026-11-26 23:40:56 -04:00
Priamo Germosen 6ba4970877 fix(iam): check iam:PassRole on the role an S3 replication configuration names (#9570)
PutBucketReplication passes the Role of its ReplicationConfiguration to
S3, and AWS's Service Reference lists iam:PassRole for it with
iam:PassedToService s3.amazonaws.com. Floci never checked it: the
passed-roles table recorded the operation as not read, because its
request body is XML, so a caller allowed s3:PutReplicationConfiguration
could name any role.

PassedRoles now reads a REST-XML body the way the condition keys of a
REST-XML request are read (XmlParser.valuesAt): each member at the
elements botocore serializes it as, below the document element, a
list's elements under the name its shape gives them or as member. The
text is read without surrounding whitespace, which S3 keeps in a Role it
accepts. The generator reads rest-xml models too, and fails on a role
member reached through a map or a flattened list, which an XML body
does not nest as the table's paths do. Two operations move from notRead
into the table: S3's PutBucketReplication (Role, to s3) and S3 Access
Grants' CreateAccessGrantsLocation (IAMRoleArn, with no named service).

Form parameters are now read only from a request the Query controller
dispatches (IamActionRegistry.isQueryRequest: a form posted to the root
path), as formParameters already documented. A request to another
protocol's route is read as its handler reads it, whatever Content-Type
it is sent with: an S3 replication configuration sent as
application/x-www-form-urlencoded was parsed as one form key, so its role
went unchecked while S3 stored the XML. The same held for tag-on-create
and request resources reading a REST request's JSON body.

S3's PutBucketReplication now refuses with MalformedXML a document that
is not well-formed as a whole, or whose configuration does not hold
exactly one Role with text, as it already counts each rule's Destination
and Bucket. It read the first Role anywhere in the document from a parse
that stopped where the configuration ended, so a second Role holding an
element, or content after the configuration, left IAM reading no role
while S3 stored the document.

The table is keyed by operation, as the Service Reference lists it, but
the enforcement filter and the Step Functions request checks looked it
up by the IAM action. The two differ for PutBucketReplication, which is
authorized as s3:PutReplicationConfiguration, so its entry would never
have been found. Both now look roles up by the request's operation, as
tag-on-create already does. DMS's ModifyDataProvider and
ModifyMigrationProject, authorized as UpdateDataProvider and
UpdateMigrationProject, are found the same way once Floci serves them.
2026-11-26 23:27:51 -04:00
Hector Ventura e55988e705 fix(stepfunctions): run a task's calls in the account of its credentials role (#9569) 2026-11-26 20:55:56 -04:00
Matheus Oliveira 19162f3423 fix(cloudformation): attach the template tags to AWS::IAM::Role (#9270) 2026-11-26 20:27:49 -04:00
Priamo Germosen 613ace44dc feat(emr): give a cluster's Trino the exchange manager its trino-exchange-manager names (#9565)
A cluster's trino-exchange-manager now makes Trino's
exchange-manager.properties, for fault-tolerant execution. With no
properties it is EMR's default, spooling in the cluster's HDFS in
trino-exchange/ under the trino user's home; exchange.base-directories
with exchange.use-local-hdfs names HDFS directories, and an s3://
directory spools in Floci's S3. The Trino project's Trino refuses EMR's
exchange.use-local-hdfs and an hdfs:// directory in a filesystem exchange
manager, so Floci leaves the first out and gives HDFS directories Trino's
own hdfs exchange manager, with a core-site.xml naming the cluster's
NameNode as its hdfs.config.resources: without one, Trino takes an hdfs://
directory for another file system's ("Wrong FS ... expected: file:///").
2026-11-26 19:29:31 -04:00
TATSUNO “Taz” Yasuhiro c24cb12811 feat(eventbridgev2): revoke event sources and subscribers (#9528)
RevokeResource answered UnsupportedOperation. It now revokes a webhook event source or a subscriber for good. A revoked source answers 403 on its webhook URL and refuses UpdateEventSource and RotateWebhookCredentials with InvalidStateException. A revoked subscriber receives no more events and refuses UpdateSubscriber the same way. Both can still be described, listed and deleted, and report Revoked once revoked while leaving the member out before.

DeleteEventBus ignores revoked sources and subscribers, which outlive their bus under a key a new bus of the same name cannot reach. ListSubscribers pages by bus name, subscriber name and ARN, so an orphan and its namesake on the recreated bus both show.
2026-11-26 18:47:36 -04:00
Priamo Germosen e6a9092be8 feat(iam): check AppConfig, CodeArtifact and CodeGuru Reviewer by their REST routes (#9530)
Under enforcement a REST route no rule maps and no vendored model names
runs unchecked. AWS AppConfig with its data plane, AWS CodeArtifact and
Amazon CodeGuru Reviewer were among those: Floci serves each and no rule
mapped them.

Vendors the appconfig, appconfigdata, codeartifact and codeguru-reviewer
models' routes, 120 operations, so each request is checked as its
operation's action: a caller holding no grant for one is now refused
where the request used to pass. A request signed with a vendored model's
own name, which Floci also serves (appconfigdata), is checked under the
signing name the routes file records for that model (appconfig).

The three namespaces join the table of request resources. CodeArtifact's
48 operations and CodeGuru Reviewer's 14 read every type the Service
Authorization Reference marks required. Nine of AppConfig's 58 act on a
required type the table reads no member for (a deployment, a hosted
configuration version, an experiment run, a configuration profile named
as Configuration), so those are checked on the types it does read.
AppConfig Data's StartConfigurationSession is checked on the application
its ApplicationIdentifier names by its id or its name, from a measured
entry quoting AWS's own refusal of it on application/<app_id>, and
GetLatestConfiguration on the configuration of the session its
ConfigurationToken names: a reading gives a request's token that a
create of its service answers as naming what that create's session is
on, which the service finds.

A request member whose botocore shape is an account id now gives the
account of what the request names wherever a REST request carries it,
its path and query too, as the generator's own rule says, not only in
its body: CodeArtifact's domain-owner, QuickSight's AwsAccountId path
label on 196 operations, and Signer's GetSigningProfile profileOwner.
Such a resource in another account than the caller's is named as an ARN
of another account already is, in that account and as the caller's of
that name too, unless its service acts on it in that account. Signer,
ECR, CodeArtifact and Redshift do and say so, so each is checked on that
account's resource alone, as AWS checks it: Signer now reads the profile
or job its profileOwner or jobOwner names in that account, as AWS does,
where it read the caller's own, and saves a job it revokes there. Such a
request needs the owner's grant beside the caller's own policy, as AWS
requires of a cross-account request: CodeArtifact gives IAM a domain's
and a repository's policy, and Signer the profile permissions
AddProfilePermission adds, as the resource's policy (ResourcePolicyProvider),
a permission of one profile version holding for that version alone: a
job's, the version that signed it.
A resource a request names by another spelling than its service stores
it under is checked as the service reads it (resolveStoredArn, now also
for an ARN the reader builds from members): an AppConfig environment or
configuration profile by its id when named by its name, a CodeArtifact
PyPI or NuGet package by its normalized name, as AWS writes it in ARNs.

AppConfig, CodeArtifact and CodeGuru Reviewer give IAM the tags they hold
on the resource a request names (an application, a domain, repository or
package group, an association), so a grant conditioned on aws:ResourceTag
reaches a tagged resource; Signer reads a profile's tags in the profile's
own account, another account's included. A tagged create is checked for tagging on what
it makes where botocore's response gives it: CreateEnvironment answers
an Environment whose Id is the new environment's, AssociateRepository
the RepositoryAssociation whose AssociationArn is the association it
makes. A tagged StartDeployment's tags go on the deployment it makes,
its DeploymentNumber AppConfig's to mint, open. AppConfig stays out of
the passed-roles table: CreateExtension and UpdateExtension pass a role
in Actions{}[].RoleArn, a map of lists that file does not read.

A new vendored source, tools/aws/sources/codeartifact-permissions.json,
written by its own script from the CodeArtifact user guide, gives what
neither botocore nor the Service Reference says: CopyPackageVersions is
checked as ReadFromRepository on its source repository and as
CopyPackageVersions on its destination repository, and a package with
no namespace has an empty one in its ARN (package/my_domain/my_repo/
npm//react), so a request leaving namespace out is checked on that ARN.
A variable the reference names Encoded and a botocore shape's name is
filled from the member of that shape and encoded as its service encodes
it, through StoredResourceArns: CodeArtifact's package group pattern,
percent-encoded in lower case, which CodeArtifact now writes into the
group's own ARN as AWS does (/npm/team/* is /npm/team/%2a). A tag call
spelling a group's pattern otherwise (%2A), which CodeArtifact reads as
the same group, is checked on the group's own ARN, which CodeArtifact
resolves it to, so a deny on that ARN holds.

With AppConfig in the table, a tag call naming one of its ARNs with the
slash unencoded is refused as a path its model does not give, as for
every namespace the table reads; AppConfig's tests now send the ARN
encoded, as an SDK does. AppConfig Data's GetLatestConfiguration, which
a route filter moves off GET /configuration so S3's bucket of that name
keeps its route, is moved under an internal prefix the request records,
as every such route is, so IAM matches it on its modeled path. The table
tests place a create's members where the table locates them, expect a
member holding the type's own ARN to name it as it is, and expect each
resource in the account its own account member gives.
2026-11-26 18:45:59 -04:00
Priamo Germosen 34153a29f0 feat(emr): apply a cluster's trino-node, trino-log and trino-env to its Trino (#9563)
trino-node's and trino-log's properties now go into the image's own
node.properties and log.properties, after its lines, so an image of
trino.image's keeps its settings; Floci names the node only where neither
gives it an id; and trino-env's nested export
properties ("If any classification ends in env, use the export
sub-classification") become the Trino container's environment, which a
catalog reads as ${ENV:NAME} where its connector takes Trino's
configuration, as Iceberg's does. The exports come after Floci's
AWS settings, which they may change as a trino-env.sh would, and before
the variables Floci writes Trino's files from, which they may not.
2026-11-26 18:14:10 -04:00
Andre Kurait 09db5e5979 fix(route53): scope private DNS answers to the querying VPC (#9508)
For an identified workload, Route 53 and Cloud Map private DNS answers come only from zones associated with the querying VPC, account and Region; visibility is decided before the most specific zone is chosen, authoritative negative answers are kept, and conflicting runtime identities are refused. A caller with no known VPC keeps its private answers. EC2 and ECS register their guests' VPCs for the lifetime of the workload, revoking them on confirmed stop, and a terminating instance's IAM sessions and metadata tokens are revoked independently of Docker removal. The guest DNS checks run as nightly Docker checks.
2026-11-26 16:27:39 -04:00
Broth 87ace1bc01 feat(lambda): resolve python3.15, ruby4.0 and the Java AL2023 runtimes to their base images (#9548)
CreateFunction accepted python3.15, ruby4.0, java8.al2023, java11.al2023 and java17.al2023, but ImageResolver had no image for them, so every invoke failed with "The runtime parameter ... is not supported". They now map to python:3.15, ruby:4.0, java:8.al2023, java:11.al2023 and java:17.al2023 on public.ecr.aws/lambda, so every identifier in Lambda's supported runtimes table resolves to an image.

The Lambda docs no longer say that any runtime with a base image works, and name the deprecated runtimes Floci runs instead.
2026-11-26 15:18:39 -04:00
Niels Kootstra df8989cf5b fix(logs): read a minus followed by a space as an exclusion in a filter pattern (#9539)
A term filter pattern with a space between the minus and the excluded term, "ERROR" - "Unauthorized", was rejected with "expected a value", while AWS reads it as an exclusion, the same as "ERROR" -"Unauthorized". The term parser now skips whitespace after a minus and reads the next term as excluded, so metric filters, subscription filters and FilterLogEvents accept it alike.
2026-11-26 14:43:51 -04:00
Priamo Germosen ad51bc5ecc feat(emr): start a cluster's Trino with it and reach it from outside Docker (#9534)
A cluster with Floci's Trino now starts its primary node, and Trino on it,
in the background as it becomes ready, steps or none, the way an
application UI link already does; the cluster goes WAITING as before.

Clients outside the cluster reach Trino through Floci on a host of the
cluster's own, <cluster-id>.emr-trino.<Floci's host>, through the app UI
proxy: Trino's port is published on the primary node's loopback like the
node's web interfaces, the request keeps its Host, which Trino names its
next pages by, and goes on with X-Forwarded-Proto, which Trino honours
with http-server.process-forwarded. Until Trino answers the host gives a
503, which Trino's clients retry, and starts the node where it is not
running; an ending or ended cluster gives a 404. Floci's TLS certificate
names the new host label.
2026-11-26 12:49:29 -04:00
mrfelek 31befa5e92 feat(eks): remove EKS Auto Mode nodes left empty for their pool's consolidateAfter (#9465) 2026-11-26 12:09:54 -04:00
Kenshin Okinaka b33ca9e7ea feat(ses): support global shared delivery (PutAccountDeliveryAttributes) (#9445)
PutAccountDeliveryAttributes stores the account's SharedPoolDeliveryMode per Region, GetAccount always reports it under DeliveryAttributes (GLOBAL when unset), and configuration sets accept DeliveryOptions.SharedPoolDeliveryMode, which PutConfigurationSetDeliveryOptions keeps when a request omits it. The Java compatibility suite moves to AWS SDK 2.59.7.
2026-11-26 11:21:11 -04:00
Priamo Germosen f2125d8908 fix(neptune): start clusters' containers again when Floci restarts (#9522)
Floci's shutdown stopped every Neptune cluster's proxy and graph
database container and nothing started them again, so after a restart
with persistent storage a cluster reported available with nothing
behind its port.

At startup each cluster now reports maintenance, and its instances
starting, with its proxy port held for it at once, so a cluster created
meanwhile is never handed it. Its container comes back in the
background on the volume its graph is kept in, in the engine the graph
was kept in, which the cluster's record now names, and its proxy
listens on its port again; the cluster and its instances then report
available. With no Docker daemon reachable they come back available
with no container, as a cluster created then does. A cluster whose
container or proxy does not start is left with none and its instances
failed, and is tried again at the next start. The restore runs in each
cluster's own account and Region, and marking the clusters calls no
Docker.

Floci now records which cluster holds each proxy port, so a cluster
whose stored port another cluster holds moves to a free one, its
instances with it, and one restored in the same process keeps its own. One recorded before its engine was kept is
taken to be in the configured one, and one recorded before its graph
was kept in a volume gets a volume, both kept before any Docker call.

A DeleteDBCluster while the restore is starting the cluster's container
leaves it deleting until the container has started, a second one too,
and the restore removes it then. A delete defers only while a restore
owns the cluster, which it does only once its marking is done, so one a
failed write left deleting is retried at once; one still deleting at the next start is removed in the
background. The delete, the restore and CreateDBInstance decide under a
per-cluster lock, and instance creation, deletion and the restore's
status writes under a per-instance one, taken first, so the restore
never puts back an instance deleted meanwhile. CreateDBInstance is
refused with InvalidDBClusterStateFault for a cluster that is not
available.
Shutdown now marks the container manager first, after which no
container starts. A container left under a cluster's name, by a Floci
that exited without stopping it, is now stopped with the same 30
seconds as at shutdown before its replacement starts, rather than
removed outright, so Gremlin Server saves its graph to the volume
first. The message refusing to delete a cluster with instances uses a
colon in place of its dash.

Closes #5664.
2026-11-26 10:08:52 -04:00
Priamo Germosen 5c1e8b8110 feat(iam): check Amazon SES by its generated routes and request resources (#9504)
SES v2 was checked by 118 hand-written rules in IamActionRegistry, one
per route of the model, and no SES request, v1 or v2, was checked on
the resource it names: the ses namespace waited in the table of request
resources' NOT_COVERED, as the generator refused it while its REST
clients had no vendored routes to tell their requests apart.

Vendors the sesv2 and pinpoint-email models' routes under the ses
credential scope, so each v2 request is checked as its operation's
action by the route botocore gives it, and removes the hand rules. The
ses namespace joins the table of request resources, 231 operations over
the ses, sesv2, pinpoint-email and mailmanager clients: an identity, a
configuration set, a template or a contact list by the member naming it,
an ARN member by the ARN it holds, as the Service Reference gives their
formats; an operation naming none of its action's types stays on "*".
Floci mints the same identity/<name> and configuration-set/<name> ARNs.

SES v1 and v2 share the operation names of the table, and the generator
merged the rows of clients that share an endpoint prefix, holding that a
request cannot tell them apart: a v2 SendEmail was read for v1's
SourceArn, so a grant on one identity sent from another by adding one.
Every row of the table now names the APIs it is read for, each a
protocol botocore gives a client of the operation with its API version
(SourceArn is query/2010-12-01), and the reader reads a request for the
rows of its own API alone: a Query request's by the Version its handler
dispatches it by, its form's on a POST and never its URL's, a REST
request's by the version of the model whose route it matched, never by
a member a caller adds. A request whose API neither gives, or
one no row names, is read for every row, as before. 68 rows are read
for some of their operation's APIs only, over SES, Elastic Load
Balancing's classic and v2 APIs, EventBridge, Lambda and Bedrock.

botocore now gives ListConfigurationSets and ListEmailIdentities as
POST /v2/email/list-configuration-sets and POST /v2/email/list-identities.
The GET /v2/email/configuration-sets and GET /v2/email/identities routes
an SDK built before that still sends stay served and match no route of
the model, so they are not checked. The hand-kept copy of the SES v2
model's routes the registry test read is removed: the route coverage
test checks every vendored route.
2026-11-26 10:08:17 -04:00
Priamo Germosen 63df4c12ee feat(emr): give a cluster's Trino its trino-connector catalogs and trino-config (#9523)
Each trino-connector-<catalog> classification now adds that catalog to the
cluster's Trino, of the connector of its name (delta_lake for delta,
raptor_legacy for raptor) unless it names its own. delta, hudi and iceberg
sit on the cluster's Hive metastore, or on Floci's Glue when the
classification says glue, and on Floci's S3, as hive already does; Delta
writes to S3 are on, as the Release Guide's Delta tutorial inserts into a
table there. trino-config goes into config.properties after Floci's, and
its http-server.http.port moves the coordinator, its readiness query and
the address the steps' trino-cli reaches.
2026-11-26 09:47:50 -04:00
Broth 5a2b6f9e1c feat(lambda): support the nodejs26.x runtime (#9393)
Resolve nodejs26.x to public.ecr.aws/lambda/nodejs:26, which the Docker launcher, the Kubernetes launcher and Web Function environments all use, and accept nodejs26.x for Web Function revisions next to nodejs24.x.

Closes #9392
2026-11-26 09:02:33 -04:00
John Gillett 2c2cf3e3e3 fix(sts): name the role, not the session, as a role session's web identity token subject (#9517) 2026-11-26 08:56:12 -04:00
Andre KuraitandEmanuel Aseghehey 4ee43a0ce0 fix(ec2): add default IPv6 security group egress (#9497)
Security groups in a VPC with an IPv6 CIDR block get the default ::/0 outbound rule alongside 0.0.0.0/0, in the same -1 permission, as AWS adds it. Associating a VPC's first IPv6 block adds it to the default group and to every group whose outbound rules are still the original IPv4 one, under each group's lock, then refreshes the firewalls once. A failed group creation removes both default rule records.

Co-authored-by: Emanuel Aseghehey <aseghey@amazon.com>
2026-11-26 08:43:31 -04:00
Vũ Thế Huy 1f86733b1c feat(glue): crawl a Redshift database through a crawler's JDBC target (#9484)
A crawler with a JdbcTarget now crawls a Redshift cluster or workgroup through its Glue connection: it signs in with the connection's secret, username and password, or KMS-encrypted password, selects tables and views by the include path and exclusions, and writes one Data Catalog table per relation, updating only changed schemas and keeping user-added metadata. The read runs off the run service's lock and the write only while the crawl is still current. UTF-8 byte truncation moves to core.common.Utf8 for Glue, RDS log files and S3.

Closes #7818
2026-11-26 08:20:16 -04:00
Priamo Germosen 6a3874a3e2 fix(neptune): keep each cluster's graph in a Docker volume of its own (#9505)
A Neptune cluster's graph lived only in its container: Gremlin Server's
TinkerGraph kept it in memory, and Neo4j in the unnamed volume its image
declares for /data. Removing the container, as Floci's shutdown does,
lost it, so a cluster could never be started again with its graph.

When Neptune's records are kept (its own storage mode, or the global
one, is persistent, hybrid or wal), a new cluster now gets a volume ID,
kept in its record, and its container mounts floci-aws-neptune-<id>, or
binds <host-path>/neptune/<id> when the host persistent path is an
absolute path. Neo4j keeps its data directory there. Gremlin Server's
image has its data directory there, and Floci writes the image's
TinkerGraph properties before the container starts so the graph is
saved to it when the server stops and loaded from it when it starts.
Under the host path Gremlin Server runs as root, since the directory
belongs to whoever created it rather than to the image's gremlin user.
An image laid out otherwise keeps its graph in memory, with a warning.
A container now has 30 seconds to stop before Docker kills it, as
Gremlin Server saves its graph a few seconds after the stop signal.

DeleteDBCluster removes the volume as the storage policy says, under
the storage mode Neptune's records are kept in, its own or the global
one; a create that fails removes it whatever the policy. A cluster created
again under a deleted one's identifier starts on a new, empty volume.

Starting the clusters' containers again on these volumes when Floci
restarts comes next.

Part of #5664.
2026-11-26 08:19:46 -04:00
galsuchetzky-act 7c9382f666 feat(bedrock): add enforced guardrail configurations (#9449)
Add PutEnforcedGuardrailConfiguration, ListEnforcedGuardrailsConfiguration and DeleteEnforcedGuardrailConfiguration, stored per account and Region and checked against the resolved guardrail's ARN and published versions. DeleteGuardrail refuses a guardrail, or a version, that an enforced configuration names, and deleting an unknown configId answers AWS's missing-configuration message.

Closes #7311
2026-11-26 08:09:38 -04:00
galsuchetzky-act 33c843535b fix(apigateway): validate the domain resource owner selector (#9516)
GetDomainNames accepted any resourceOwner. An unknown or empty value now answers HTTP 400 ValidationException with AWS's enum message; an omitted value, SELF and OTHER_ACCOUNTS are still accepted.

Closes #9026
2026-11-26 08:08:47 -04:00
Niels Kootstra 370b49861a fix(ec2): apply the shutdown behavior when an instance's guest powers itself off (#9475)
EC2 watches each instance container once it runs, and an exit Floci did not cause applies the instance's InstanceInitiatedShutdownBehavior: StopInstances by default, TerminateInstances for terminate, with the state reason Client.InstanceInitiatedShutdown. The behavior comes from RunInstances, its launch template or ModifyInstanceAttribute, is set before any container starts, is reported by DescribeInstanceAttribute, and must be stop or terminate. Reboots queue behind the container's other lifecycle operations, and the wait-stream exit watcher moves from Lambda to core.common.docker.

Fixes #9385
2026-11-26 01:14:24 -04:00
Priamo Germosen 4792c97902 fix(docdb): start clusters' containers again when Floci restarts (#9498)
Floci's shutdown removed every DocumentDB cluster's MongoDB container
and nothing started them again, so after a restart with persistent
storage a cluster reported available with nothing behind its endpoint.

At startup each cluster now reports maintenance, and its instances
starting, and its container comes back in the background on the volume
the cluster's data is kept in, with the master password the data was
set up with. Floci now keeps that password in the cluster's record,
never returned by the API, since a snapshot authenticates with it. The
cluster and its instances then report the new container's port and
available. With no Docker daemon reachable they come back available
with no container, as a cluster created then does. A cluster whose
container does not start is left with none and its instances failed,
and is tried again at the next start. The restore runs in each
cluster's own account and Region.

A cluster recorded before Floci kept the master password reads it from
the container it left, if one is there, and keeps it in its record
before that container is replaced; with none left it cannot be started,
and the restore says to create it again. One recorded before
its data was kept in a volume gets a new volume, kept in its record
before any Docker call.

Marking the clusters calls no Docker; the containers, and the removal
of a delete Floci did not live to finish, are all in the background.

A DeleteDBCluster during the restore leaves the cluster deleting until
its container has started, a second one too, and the restore removes it
then; one still deleting at the next start is removed then. The restore
applies its result only to the cluster it marked. CreateDBInstance is
refused with InvalidDBClusterStateFault for a cluster that is not
available, as RDS refuses it, so a deferred delete leaves no instance
behind. Shutdown now marks the
container manager first, after which no container starts, and a start
it overtakes removes its container.

Part of #5664.
2026-11-26 01:01:13 -04:00
Priamo GermosenandJames McMahon 05b77db069 feat(ssm): support agent-backed Session Manager sessions (#9492)
Session Manager for Linux EC2 guests running the stock SSM agent and the Session Manager plugin: interactive shells, SSH and port forwarding, with StartSession, ResumeSession, TerminateSession, DescribeSessions and GetConnectionStatus, and session document validation. Direct SendCommand execution on instances without the agent is unchanged.

StartSession and GetConnectionStatus are checked on the EC2 target, and StartSession on the selected or default session document, read from the Session Manager guide and API reference pages vendored in tools/aws/sources/ssm-session-permissions.json.

Replaces #9366, rebased onto main with the generated IAM table refreshed. On top of it, GetConnectionStatus echoes the Target it was asked about, as AWS answers. The agent's OpenDataChannel is checked on the session ARN, as the client's is, so a deny on one session reaches the instance role. Starting a session deletes the account's history older than the 30 days DescribeSessions lists.

Closes #9365

Co-authored-by: James McMahon <james@jamesmcmahon.co.uk>
2026-11-26 00:04:57 -04:00
Andre Kurait 0bd2688912 fix(rds): reserve the configured DSQL listener port (#9471) 2026-11-25 23:21:24 -04:00
Priamo Germosen 733895a953 fix(docdb): keep each cluster's data in a Docker volume of its own (#9491)
A DocumentDB cluster's MongoDB container kept its data in the unnamed
volume the mongo image declares for /data/db. Removing the container, as
Floci's shutdown does, left that volume behind with nothing to find it
by, so a cluster could never be started again on its data.

With a persistent storage mode (persistent, hybrid or wal), a new
cluster now gets a volume ID, kept in its record, and its container
mounts floci-aws-docdb-<volume-id> at /data/db, or binds
<host-path>/docdb/<volume-id> when the host persistent path is an
absolute path. Memory mode and mock mode are unchanged.

DeleteDBCluster removes the volume as the storage policy says: a
persistent mode keeps it unless prune-volumes-on-delete is set. A
cluster whose create fails, or that a failed snapshot or point-in-time
restore discards, never reached the caller, so its volume goes whatever
the policy. A container that started but whose MongoDB never answered
is removed too, so it holds no volume. A cluster created again under a
deleted one's identifier starts on a new, empty volume.

Starting the clusters' containers again on these volumes when Floci
restarts comes next.

Part of #5664.
2026-11-25 23:00:18 -04:00
Priamo Germosen 6196543370 feat(iam): check Amazon EFS by its REST routes (#9483)
Under enforcement a REST route no rule maps and no vendored model names
runs unchecked. Amazon EFS was among those: Floci serves it and no rule
mapped it.

Vendors the efs model's routes, so each request is checked as its
operation's action: a caller holding no grant for one is now refused
where the request used to pass.

EFS joins the table of request resources: a file system by its id, an
access point by its, and a mount target's operations and the tag calls
by what EfsStoredResourceArns answers their MountTargetId or ResourceId
reaches, the file system or the access point EFS stores. All 31 of its
operations read every type the Service Authorization Reference marks
required, so every route is checked on the resources AWS checks. Its
two creates join the tag-on-create table, and
CreateReplicationConfiguration's Destinations[].RoleArn is checked for
iam:PassRole.

A tagged create of a type its action does not act on tags the resource
it makes where its request names every variable of it; a variable the
service mints, which the create's response answers and its request
carries none of, now counts as named there, staying open as it does in
every resource a create makes. So CreateAccessPoint, which acts on its
file system, has its tags checked on access-point/* rather than on the
file system, and so do five creates of other namespaces whose made
resource was named but for a minted id: CloudFormation's
CreateChangeSet, EMR's StartNotebookExecution, Textract's
CreateAdapterVersion and Transfer Family's CreateAgreement and
CreateConnector.
2026-11-25 22:46:23 -04:00
mrfelek 4b7d57f016 feat(eks): launch EKS Auto Mode nodes for pods no node can take (#9444) 2026-11-25 22:30:00 -04:00
Priamo Germosen fb658f01ee fix(iam): read the role's tags in federated and service trust policies (#9486)
A role's trust policy read for AssumeRoleWithWebIdentity or
AssumeRoleWithSAML, or when a service assumes the role, never saw the
role's own tags: a condition on aws:ResourceTag/<key> or
iam:ResourceTag/<key> matched nothing, so a trust policy allowing an
assume only onto roles carrying a tag refused every one, and one denying
it onto such roles never applied. AssumeRole has read them since the
role's stored tags were given to its trust policy; these paths run their
own condition reading and were left out.

Each of those assumes acts on the role, which the Service Authorization
Reference gives aws:ResourceTag/${TagKey} and iam:ResourceTag/${TagKey},
and the global condition keys page has aws:ResourceTag in the request
context "when the requested resource already has attached tags". The
web identity and SAML evaluators now read the role's tags, under the keys
the generated resourceTagKeys table gives the role type, beside the
token's claims or the assertion's attributes, a tag key matched whatever
its case. A service's assume reads them through a new
AssumeRolePolicyEvaluator.allowsService taking the role, which the
service-role authorizer, the AppSync data source authorizer, Step
Functions' Lambda and API Gateway tasks and the Lambda web adapter's
execution role now use, beside the service's principal and source keys.
2026-11-25 22:26:18 -04:00
Niels Kootstra f046df07aa fix(ec2): attach launch-created EBS volumes as block devices when the instance runs (#9438)
Restore the data volumes a launch creates from its block device mappings as guest block devices through the StartInstances restore hook, run before the instance is marked running so they exist before UserData. DetachVolume takes the per-volume lock attach and delete already take, and the restore re-reads each volume under it, so a detach during a restore removes the device afterwards.
2026-11-25 22:06:55 -04:00
TATSUNO “Taz” Yasuhiro aeb4593696 feat(eventbridgev2): rotate webhook credentials (#9443) 2026-11-25 21:56:53 -04:00
Allen Sanborn ad8498a813 fix(ec2): honour DryRun on the transit gateway, Client VPN, key pair, launch template and describe calls (#9075) 2026-11-25 21:48:56 -04:00
Priamo Germosen 0ed899bd59 fix(iam): give a role's tags to the policies an AssumeRole is checked against (#9474)
IAM's stored lookup answered no tags, so a role or user was never given its
aws:ResourceTag or iam:ResourceTag keys outside the IAM condition-key
table's fromTarget route, and an AssumeRole saw none of the role's tags:
a caller's policy allowing sts:AssumeRole on roles carrying a tag (the
guide's "Assume roles that have a specific tag") matched no role, and a
trust policy keyed on its own role's tags never matched.

IamStoredResourceArns.storedTags now gives the tags of the user or role an
ARN names, in the account it names, path included: the identity resources
iam:ResourceTag reads ("the tag attached to the identity resource (user or
role)"), which IAM and STS read aws:ResourceTag on alike. The trust policy
of an AssumeRole, and of the role a Step Functions Lambda task assumes, is
read with the role's tags under the keys the generated table gives the
role type, through IamConditionContextResolver.resourceTagKeys, which
resourceTags now shares.

A resource-tag key the generated IAM condition-key table does not read for
the action being checked is left out of its context
(IamConditionContextResolver.resourceTags(action, resource), from
IamConditionKeys.unreadTagPrefixes): the table reads none for iam:PassRole,
AWS warning that ResourceTag conditions with PassRole "do not have reliable
results", so a PassRole check still sees no role tags.
2026-11-25 18:46:34 -04:00
Priamo Germosen c829b397ab fix(mwaa): start environments again when Floci restarts (#9466)
Floci's shutdown removed every MWAA environment's Postgres and Airflow
containers, with their volumes, and nothing started them again, so after
a restart with persistent storage an environment reported AVAILABLE with
nothing behind its webserver URL.

Shutdown now keeps the volumes while the environments are stored to come
back, and Floci keeps the secrets the metadata database was set up with
(its password, the Fernet key and the admin password) in a store of its
own, which GetEnvironment never returns. Shutdown removes containers by
the IDs Floci holds and under the environments' names, so none outlives
it, the ones a restore had not reached yet included. At startup each
environment reports MAINTENANCE, or CREATING while it was being created,
and its containers come back in the background. Containers that outlived
Floci are taken over, their secrets read back from the Airflow
container. Otherwise new ones start on the kept volumes with the kept
secrets, so DAG runs, connections and variables are back, and the
startup script and requirements.txt run as at creation. Containers and
volumes named before the floci-aws- prefix are found too. The web proxy
comes back on the port WebserverUrl names, or on a new one when that
port is taken. The first DAG sync after the restore compares the DAG
volume with S3, so a DAG deleted while Floci was stopped is removed; the
sync reads every page of the S3 listing, so no DAG past the first
thousand reads as deleted. The readiness poller reports the environment
AVAILABLE once Airflow is healthy, or UNAVAILABLE when a container exits
first; one whose containers do not start is UNAVAILABLE, and tried again
at the next start.

An environment stored before Floci kept the secrets gets them back from
a container left under its name, or, with none left, new ones, as its
volumes went at the shutdown then; one whose volumes are still there is
left UNAVAILABLE rather than started on new ones. Secrets found or given
are kept before anything starts. When Docker cannot say which containers
or volumes are left, the environment's restore fails, removing nothing.

A DeleteEnvironment during the restore leaves the environment DELETING
until its containers have started, and the restore then removes it; one
still DELETING at the next start is removed then. A start that shutdown
overtakes removes its containers. A new environment starts on empty
volumes, so it never inherits a database set up with other secrets.

Part of #5664.
2026-11-25 17:23:27 -04:00
Priamo GermosenandAndre Kurait b012f4d6bf fix(iam): check VPC endpoint IDs in EC2 tag calls on their endpoint ARN (#9467)
CreateTags and DeleteTags checked a vpce- ID in their Resources list on `*`, because the generated table learns
each ID prefix from botocore's examples and botocore gives none for VPC endpoints. A grant on one endpoint was
refused and a deny on it never applied.

fetch_ec2_id_examples.py copies the identifier examples of the EC2 API reference's CreateVpcEndpoint page into
tools/aws/sources/ec2-id-examples.json, and the generator matches their XML paths to botocore's output shapes,
which gives VpcEndpointId the vpce- prefix. That prefix joins botocore's in the one prefix map and reads only the
tagging calls' generic list, so DeleteVpcEndpoints keeps its typed reader. The source names its namespace and
pages, and the shared source verifier checks it against the live page.

The regenerated table also takes in what the Service Reference added on 2026-11-25: CloudWatch's omni-slo,
experiment and lookup types, which its tag operations now act on, Elastic Load Balancing's proxy type and the
amplifygen3 namespace.

Co-authored-by: Andre Kurait <AndreKurait@gmail.com>
2026-11-25 17:22:55 -04:00
Priamo Germosen 215e37eb48 fix(cloudtrail): name S3 denials as CloudTrail records the operation's data event (#9460)
IamEnforcementFilter named the CloudTrail data event of a denied S3 request
from a hand-written table keyed by the IAM action, so a request checked
under another operation's action took that operation's name: HeadBucket
was recorded as ListObjects, CopyObject, UploadPart and UploadPartCopy as
PutObject, GetObjectTorrent as GetObject, ListBuckets as a data event,
and ListObjectVersions, ListParts, DeleteObjects, AbortMultipartUpload and
the legal hold and retention calls were not recorded.

A denial is now recorded under the data event of the operation the request
matched, from src/main/resources/aws/cloudtrail-s3-data-events.json, which
tools/aws/regen_cloudtrail_s3_data_events.py generates from botocore's S3
model, the S3 user guide's data events table and its sentence naming the
event a call is recorded with (vendored by
tools/aws/fetch_cloudtrail_s3_data_events.py), and AWS's S3 service
reference. An operation the table for general purpose buckets lists is
recorded under its name or the one the guide gives it (PutObjectRetention
as PutObjectLockRetention), a versioned one under the version-less name
the table lists (ListObjectsV2 as ListObjects), and an operation it does
not list records no data event. readOnly is the service reference's, by
the reading iam-action-resources.json's readOnlyActions are vendored by,
in place of CloudTrailService's hand-written list.

The IAM data drift workflow runs on a pull request touching any of the six
new files, so the online check covers a change to the table alone.
2026-11-25 15:10:24 -04:00
galsuchetzky-act 208b07b54a fix(apigateway): paginate REST deployments (#9437)
Use the shared ID pager and response envelope for GetDeployments. Preserve unpaged internal reads, missing-parent responses and deployment metadata.

Closes #8603
2026-11-25 14:44:35 -04:00
mrfelek 0dfa48e9fc feat(eks): give EKS Auto Mode Ingresses of the ALB class an Application Load Balancer (#9413)
Step 7c of #8914: while a cluster has EKS Auto Mode load balancing on, an Ingress whose IngressClass names the eks.amazonaws.com/alb controller, or that names no class while such a class is the default, gets an Application Load Balancer.

- Floci installs the IngressClassParams kind (eks.amazonaws.com/v1) while load balancing is on, through the shared applyAutoModeManifest step, and removes it once it is off.
- The load balancer is named k8s-<namespace>-<name>-<hash>, with the scheme and subnets of the class's IngressClassParams, else the alb.ingress.kubernetes.io/scheme annotation and the cluster's subnets, internal by default. Ingress names hash their kind, so a Service and an Ingress of one name don't collide.
- An HTTP listener on port 80 answers a fixed 404 or forwards to the Ingress's defaultBackend. Each rule's paths become listener rules in the Load Balancer Controller's order: the rules as listed, and within each, Exact paths first, then Prefix paths longest first, then ImplementationSpecific ones.
- Target groups sit on each backend Service's TCP NodePort, with the cluster's node registered and an HTTP health check at the healthcheck-path annotation's path.
- A changed scheme replaces the load balancer, changed subnets and health-check paths are applied, and an Ingress whose class names missing IngressClassParams keeps its load balancer as it is.
- The Services reconciler's ELBv2 lookups, node registration and kubectl calls move to EksAutoModeElb and EksAutoModeKubectl, shared with Ingresses.
2026-11-25 13:52:02 -04:00
andrei-fabricdata f1c2c44883 fix(verifiedpermissions): resolve action groups from the policy store schema (#9427)
AVP builds the action entities, with their memberOf action-group parents,
from the policy store's schema. Floci sent the sidecar only the entities in
the request, so a policy scoped with `action in NS::Action::"Group"` never
matched a member action and IsAuthorized returned DENY where AWS returns
ALLOW.

IsAuthorized, BatchIsAuthorized and their token variants now merge the
schema's action entities into the request entities before evaluation. The
schema's definition replaces a caller entity with the same identifier, since
IsAuthorized entities cannot include actions and IsAuthorizedWithToken accepts
an action entity with only its identifier. An unreadable stored schema is
logged and the request is evaluated without schema-derived actions.
2026-11-25 13:51:52 -04:00