Commit Graph
5229 Commits
Author SHA1 Message Date
Priamo GermosenandAllen Sanborn d1d03a4ad8 feat(rds): report the requested Port in Describe* behind an opt-in setting (#8760)
Floci serves each RDS database through a proxy in the 7001-7099 range,
and Endpoint.Port and DBCluster.Port reported that proxy port even when
the request set Port=5432. The Terraform AWS provider sets port from
those fields, so every aws_db_instance and aws_rds_cluster with a
conventional port planned port 7001 -> 5432 on each run.

floci.services.rds.advertise-requested-port
(FLOCI_SERVICES_RDS_ADVERTISE_REQUESTED_PORT), off by default, makes
DBInstance.Endpoint.Port and DBCluster.Port report the requested Port,
while the proxy keeps listening in its range. A cluster member without
its own Port reports its cluster's. The managed master-user secret and a
CloudFormation secret target attachment keep the connectable proxy (or
published) port. The requested port is stored, so a restart or a backend
retry rebuilds the same advertised endpoint, a stopped database follows
the setting if it changed across a restart, and a blue/green switchover
moves the requested port with the endpoint it belongs to.

Closes #4575

Co-authored-by: Allen Sanborn <allen.sanborn@gmail.com>
2026-11-17 12:50:42 -04:00
Priamo Germosen 483dbb0931 fix(iam,organizations): fill in a simulation's organization context and result (#8741)
AWS's simulator fills in an organization context of its own beside the
principal keys, aws:PrincipalOrgID, aws:PrincipalOrgMasterAccountId and
aws:PrincipalOrgPaths, and says why that matters for exactly these policies:
"because these keys are populated for you, SCPs and other policies that use
principal or organization conditions are evaluated correctly". None of the
three reached a simulation here, so a service control policy handed to one and
keyed on the organization it guards matched nothing, where AWS matches it.

The keys are answered by the service that holds the organization, through a
narrow port Organizations implements beside the two it already does, and are
written onto the request context by the writer that already fills a principal's
keys on every path. An account in no organization carries none of them, which
is the availability both published keys declare, "included in the request
context only if the principal is a member of an organization", and an absent
key matching nothing is what refuses a statement written on one. A hierarchy
that cannot be walked up is no path rather than a failed call, the way an
organization that cannot be resolved already answers no SCP levels.

A real request carried none of the three either, so the same policy matched
nothing on the call a simulation stands for. A caller now comes back from the
credential lookup in the organization its own account belongs to, and the
account-root principal the filter stands in for is put in its account's
organization as well, so every context the filter fills carries the keys, the
one per resource a request names among them, and an identity policy, a resource
policy and a trust policy read them from the same place.

The path stops at the account's parent. An entity path is built "using the IDs
of the organization, root, and all OUs in the path down to and including the
OU" and ends with the account's own id, while the key's own published condition
compares o-a1b2c3d4e5/r-ab12/ou-ab12-11111111/ou-ab12-22222222/ with
StringEquals and "returns true for principals in accounts that are attached
directly to the ou-ab12-22222222 OU", which a value carrying the account id
could never equal. An account the organization holds at its root, the
management account among them, carries o-.../r-.../.

aws:PrincipalAccount was populated for a user source alone, so a role named as
a policy source carried neither its own account nor its organization. Both
describe the account the ARN names rather than the credential it stands for,
and both are answered for either source now. The session-shaped keys stay
user-only, there being no session behind a role named as a source.

Both simulators answered one result per action and resource, each naming the
resource it was given. The result's reference publishes the opposite: "the
simulator now returns a single EvaluationResult per action, regardless of how
many resource ARNs are provided", its top-level fields carrying "the aggregate
decision across all requested resources" with "the most restrictive decision
across all resources" at the top, and each resource answering for itself under
ResourceSpecificResults, which is where it sends a client that read them off
the top-level result before. A page is keyed by action now rather than by pair,
and a simulation whose resource is the wildcard, "either explicitly, or when
the ResourceArns parameter blank", carries no per-resource section at all.

EvalResourceName names no resource either: it carries "the ARN template for the
simulated resource type ... or * if no ARN format is defined for the action.
This is not a specific customer-provided resource ARN". The templates come from
the two generated tables built from AWS's Service Reference, which publishes
the resource types each action acts on and each type's ARN formats. An action
whose published types carry more than one format answers *, the value the field
gives an action with no format at all, and so does an action of a namespace no
table reads: which of several templates AWS names is published in no
machine-readable source, s3:GetObject acting on an object and on an access
point object with the field's own example naming the object's. The IAM page
records that difference.

Beyond its decision, a result carried nothing. For a same-account simulation,
the one kind this emulator models, AWS reports four more members, and a client
that reads any of them saw an empty element: the statements that decided the
scenario, the context keys the policies wanted and the call did not supply, and
what the organization levels and the permissions boundary said about it.

MatchedStatements is "a list of the statements in the input policies that
determine the result for this scenario", and each entry names the policy it came
from and the place it sits in that policy's text. The identifiers are the
published ones: a supplied document is PolicyInputList.N under the position it
arrived under, as AWS's own example reports it, a policy embedded in an entity
is its own name with that entity's type, and a managed policy is its own name
with whether AWS owns it. A grant the account applies without attaching anything
is named by neither, no policy naming it. An allow reports every statement that
allowed, an explicit deny reports the one that denied, "the deny statement is
the only entry included in the result", and an implicit deny reports none.

The positions follow AWS's own response to the character. Its example supplies a
document whose statement braces sit in column 15 of line 3 and column 3 of line
7, and reports line 3 column 16 through line 7 column 4, so each position is the
character just past a brace. That is where a streaming parse stands after
reading the opening brace and after reading past the statement, and a case pins
that document against those four numbers.

What AWS leaves out is left out. The member "doesn't include statements from
service control policies (SCPs)" and "only statements from identity-based and
resource-based policies appear here", so a deny that came from a level, from a
session policy or from the boundary reports no statement, and the boundary
reports its own effect under PermissionsBoundaryDecisionDetail instead, which is
what the same-account example shows for one that allowed the action.

MissingContextValues names the keys "required by the included input policies but
that were not provided by one of the input parameters". A key is wanted when a
statement the evaluation reaches for the action names it: the variables its
resources are written with, which a value has to resolve before a resource can
be compared at all, and, for a statement whose resources match, the keys its
conditions compare. A statement the action does not match is reached by nothing
and wants nothing, which is what gives each resource's list its own content. The
same exclusion holds, a key "referenced only by an SCP" not being returned; a
key supplied with no values at all counts as supplied, an empty set being a
value rather than an absence; and a variable under a document version that gives
${...} no meaning names no key.

OrganizationsDecisionDetail and PermissionsBoundaryDecisionDetail report whether
each of those two allowed the action, for a simulation that was handed levels or
carries a boundary. Each top-level flag is the most restrictive of the
resources' answers, as every other top-level field is, and the boundary's is
reported for each resource as well.

A key an operator answers for without a value is not one the policy requires,
and is not named among the missing: an ...IfExists operator publishes "if the
key is not present, evaluate the condition element as true", a Null asking for
absence is satisfied by the absence itself, and the two the evaluation already
reads that way follow, a ForAllValues quantifier holding over no values and a
negated operator holding against a key that matches nothing. A Null asking for
presence does require the key, and names it. The top-level list carries one key
however two statements spell it, a context key not being case sensitive, which
is how the evaluation that answered them read it too.

Whichever element a statement writes its resources in is read for variables,
Resource or NotResource: the comparison takes its patterns from either and
resolves them either way, so a value supplied for one of them can change the
answer, which is what the member is for. An excluding pattern whose variable
has no value excludes nothing and one carrying a value excludes what it names,
which the enforcement cases pin, so the key it carries is wanted.

A caller a site builds for itself carries the organization as one resolved from
a credential does, so a policy written on the three keys reads the same context
wherever it is evaluated: the trust caller a state machine's execution role is
checked as, the account-root principal three sites fall back to, the role a
Redshift copy acts as, and the principals a trust policy is asked about on an
account's behalf, which the trust evaluator reads through the same narrow port.

The lookup that answers them is on the authorization path, so it reads as
little as it can. An emulator holding no organization at all answers from the
store's own emptiness, an account that is in one is found once and carries its
own parent into the path rather than being looked up again, and the two
resolvers that answer an ARN alone no longer ask: nothing there fills a request
context, so no key is owed.

The template is read whatever case an action is written in, policy action names
being case-insensitive. Outside IAM's own actions the table is keyed by the
operation a request is dispatched as, so an action whose name is not its
operation's answers * as well: lambda:InvokeFunction is the action of the
Invoke operation, and what joins the two names is published in no
machine-readable source either. The IAM page records that beside the other.

The decision path is unchanged. The walk that answered a decision now answers a
report, the decision-only face reading the same walk without collecting what it
does not need, so the paths that only ask whether an action is allowed pay for
nothing more. A cross-account simulation is still not modelled: no resource
policy is evaluated, so ResourcePolicy, CallerArn and a populated
EvalDecisionDetails remain out, and the IAM page says so.

The IAM page also carried a difference this emulator no longer has. The
simulator's limitation on service control policies with global conditions is
gone from the guide, which says now that "the policy simulator evaluates SCPs,
including condition keys and resource scoping in deny statements" and evaluates
them "with service-aware logic, including global condition keys", which is what
the level walk already did. The page quotes the current sentences instead.
2026-11-17 12:50:12 -04:00
Murtuza Chhil 10445d89d8 feat(paymentcryptography): the use of a key can be stopped and started (#8749)
StartKeyUsage and StopKeyUsage enable and disable a key and answer with the key as it now stands. The key changes only when its enablement changes: a stop records UsageStopTimestamp, a start records UsageStartTimestamp and clears the stop moment, and a request that names a key already in that state keeps the moment it changed. A request that names a replica is refused, and a change on the primary reaches its replicas. The service takes those moments from the clock it is given, and the new integration tests delete the keys they make.
2026-11-17 12:49:56 -04:00
Priamo Germosen 2b3c22a3a5 fix(opensearch): give resource-tag conditions the tags of the domain a request names (#8762)
The generated request resources give OpenSearch's domain type the
aws:ResourceTag/ key, but no service answered the es namespace's stored
tags, so a condition on a domain's tags saw none. OpenSearchService now
answers it: storedTags reads the domain in the request's account, where
the tag handlers read, in place under the key the ARN gives or the name
a domain was stored under before its key named the Region, and matched
on the whole ARN. AddTags and RemoveTags changed the domain's map in
place with no lock; they now give it a new map one call at a time, and
the tags field is volatile.
2026-11-17 12:38:44 -04:00
Priamo Germosen 2517edb471 feat(emr): run a session's Spark Connect server on its cluster in the docker runner mode (#8751)
With runner-mode docker, StartSession now runs the session's Spark
Connect server on its cluster, as "Amazon EMR launches a Spark Connect
Server as a YARN application on your cluster": a container on the
cluster as a step's is, in the image its steps run in, its HDFS and
YARN started first where they are not running, the server's driver in
that container and its executors on the cluster's YARN. Its
spark-defaults are the cluster's, then the session's
EngineConfigurations, with the server's port; it runs as the session's
ExecutionRoleArn, else the cluster's instance profile.

A client reaches it through Floci as an EMR Serverless session's server
is reached (#8731): GetSessionEndpoint answers Floci's address and a
token, and a client connects with
sc://<host>:<port>/;x-aws-proxy-auth=<token>;authorization=<session id>,
AWS's string with Floci's port. The proxy drops the authorization
parameter, which AWS's own proxy reads, before the call reaches the
server.

The session is SUBMITTED until its container runs, STARTING until the
server answers, then IDLE, BUSY while a call runs on its server and
IDLE again once none does. TerminateSession goes through TERMINATING
until the server has stopped; the idle timeout stops it too, and the
cluster's end ends its sessions and stops their servers on its own,
its storage released only once the last of them has gone. A server that exits on its own, or does not answer within
10 minutes, fails the session; one a restart left behind fails as
interrupted, its container removed.

What EMR Serverless's sessions and these share moves into
emrserverless.SparkConnectServers: running each server, asking it
whether it answers, the tokens, the calls a session takes, and one
check for its next deadline; and SparkConnectSessionOwner, the states a
session goes through as its server starts, answers, takes calls and
stops, each service giving only how it stores, ends and checks its
sessions (both models implement SparkConnectSession). A server being stopped takes no new call, a call's
busy and idle reach the owner in order under the server's own lock, and
a server's entry goes even where its owner fails to hear it stopped. A step's setup on its cluster (its image, storage,
metadata address, added nodes and HDFS) moves into a preparation that
steps and sessions' servers share.

EmrSessionServerNightlyIntegrationTest runs it for real on an
emr-spark-8.1.0 cluster with Spark 4's JVM client from that image: a
wrong token refused, queries run, a missing table's Spark error back,
TerminateSession removing the server. The nightly job's timeout and
image prefetch take the new check.
2026-11-17 12:18:09 -04:00
Priamo Germosen 948dcadae8 fix(cognito-idp): give resource-tag conditions the tags of the user pool a request names (#8753)
The generated request resources give Cognito user pools'
userpool type the aws:ResourceTag/ key, but no service answered the
cognito-idp namespace's stored tags, so a condition on a user pool's
tags saw none. CognitoService now answers it: storedTags reads the pool
stored under its id in the request's account, where the handlers read,
in place, and matches the whole ARN, or the id for a pool stored before
pools recorded their ARN, as DescribeUserPool's lookup by ARN does. Tag
changes already store a new map under the pool's lock; the tags field is
now volatile.
2026-11-17 11:34:47 -04:00
Priamo GermosenandJason Pogozelski 2624f0683a feat(dynamodb): add stream iterator expiry, 24-hour retention and shards with lineage (#8744)
The native engine's streams had one shard that never closed, iterators
that never expired and records trimmed only by count, so the consumer
code that handles an expired iterator, a stale checkpoint or a shard
hand-off only ran for the first time against AWS.

Four settings, each off by default, bring a stream closer to AWS:

- stream-shard-count gives each stream that many open shards. An item's
  changes go to the shard its partition key picks, so they stay in order.
- stream-shard-rollover-seconds closes an open shard once it has been
  open that long, and a child shard naming it as ParentShardId takes its
  keys.
- stream-iterator-expiry-enabled expires an iterator 15 minutes after it
  is returned: GetRecords answers ExpiredIteratorException.
- stream-retention-enabled trims records after 24 hours and drops a
  closed shard 24 hours after it closes. GetShardIterator then refuses a
  trimmed sequence number with TrimmedDataAccessException and one the
  shard never held with ValidationException "Invalid SequenceNumber for
  the shard".

Disabling a stream closes its open shards, as AWS does, and a closed
shard read to its end returns no NextShardIterator. DescribeStream pages
with Limit and ExclusiveStartShardId. GetShardIterator refuses a shard
the stream does not have, and a sequence iterator with no sequence
number, with AWS's messages. The 1,000-record limit now holds for the
whole stream, and a read is refused as trimmed exactly when its shard
lost a record after the cursor.

Closes #4522

Co-authored-by: Jason Pogozelski <jpogozelski@xoi.io>
2026-11-17 10:54:34 -04:00
Priamo Germosen f9e88a2215 fix(firehose): give resource-tag conditions the tags of the delivery stream a request names (#8743)
The generated request resources give Firehose's deliverystream type the
aws:ResourceTag/ key, but no service answered the firehose namespace's
stored tags, so a condition on a delivery stream's tags saw none.
FirehoseService now answers it: storedTags reads the stream in the
request's account, where the handlers read, in place under its key in
the ARN's Region or the account's key from before the key named the
Region, and matched on the whole ARN. TagDeliveryStream and
UntagDeliveryStream read, changed and wrote the stream with no lock, so
one could drop another's tags or write back a stream a delete had just
removed; they now hold the per-stream lock a delete and a Redshift
update hold, and the tags field is volatile.
2026-11-17 10:31:00 -04:00
Priamo Germosen 6618ae3de6 fix(emr): scope Studio list markers to their account, Region and filters (#8740)
ListStudios used one constant namespace for its markers, and
ListStudioSessionMappings its Studio and identity type joined with
String.valueOf. A marker from another account or Region therefore
resumed this one's listing at its cursor, and an absent filter could
not be told apart from the text "null".

Both now scope their markers as ListNotebookExecutions does (#8705): a
JSON list of the operation, the account, the Region and each filter, so
any other marker is refused with InvalidRequestException "Invalid
Marker.". The JSON list moves from EmrNotebookExecutionService to
EmrService.listingNamespace, which all three listings use.
2026-11-17 10:05:23 -04:00
Jimmy Liu Jia 76413ce74a fix(cloudformation): attach managed policies to users and groups (#8708) 2026-11-17 09:47:02 -04:00
Priamo Germosen 2fdcbecdf0 fix(acm): give resource-tag conditions the tags of the certificate a request names (#8737)
The generated request resources give ACM's certificate type the
aws:ResourceTag/ key, but no service answered the acm namespace's
stored tags, so a condition on a certificate's tags saw none. AcmService
now answers it: storedTags reads the certificate stored under the key of
the Region the ARN names, in the request's account, where the handlers
read, in place, and matched on the whole ARN. Tag changes already store
a new map under the service's lock; the tags field is now volatile.
2026-11-17 09:26:43 -04:00
Koushik Dutta c6faa73eb7 fix(s3): allow resource wildcards in fixed-account ARN conditions under BlockPublicPolicy (#8500) 2026-11-17 09:16:56 -04:00
Murtuza Chhil 91943a061c feat(paymentcryptography): the resource policies of a key (#8702)
Payment Cryptography keys now take a resource-based policy through PutResourcePolicy, GetResourcePolicy and DeleteResourcePolicy. The policy is stored on the key, so it goes when the key goes, and it is not enforced. A document that is not a JSON object or carries trailing content, a policy with no statement, a statement that names no effect, principal, action or resource, a Resource that is neither the wildcard nor the key's own ARN, and a policy on a replica key are refused with ValidationException. An unconditional Allow that reaches everyone, through a wildcard Principal or a NotPrincipal that excludes someone, is refused with PublicPolicyException, and GetResourcePolicy on a key without a policy answers ResourceNotFoundException. Reading a policy's statements and checking for an everyone principal now live in iam.PolicyDocument, which S3, Secrets Manager and Payment Cryptography share.
2026-11-17 09:16:27 -04:00
mrfelek e8735be43b fix(servicecatalog): keep portfolios, products and their resources in their Region (#8717)
* fix(servicecatalog): keep portfolios, products and their resources in their Region
* refactor(servicecatalog): use partitionForRegion in copyProduct and ServiceCatalogRequests in the tests
2026-11-17 09:15:05 -04:00
Nikola Genčić be34135e5b fix(ecs): register EC2 tasks in instance target groups as AWS does (#8724)
* fix(ecs): register EC2 tasks in instance target groups as AWS does
* fix(ecs): hold instance host ports until the task stops
* test(ecs): share one EcsService builder across ECS service tests
2026-11-17 09:10:15 -04:00
Oleksandr Nikolaichuk a221e18838 fix(cloudformation): update an EKS cluster in place unless the engine says it must be replaced (#8730)
An AWS::EKS::Cluster update used to create another cluster every time, so an unnamed cluster left the old one behind and a named one failed. The cluster now keeps its name on an update the engine does not mark as a replacement, and the tags the last deployment wrote are reconciled from a recorded key list, leaving tags added outside the stack alone. A change to a create-only property (Name, RoleArn, EncryptionConfig, BootstrapSelfManagedAddons, OutpostConfig, AccessConfig.BootstrapClusterCreatorAdminPermissions or the network family and CIDR) replaces the cluster and deletes the old one once the update commits, and a failed update puts the tags or the prior cluster back. A Version change is accepted with a warning and not applied. EventBridge's tag reconcile now shares CfnRollback.reconcileTags.

Part of #6606
2026-11-17 09:07:49 -04:00
Priamo Germosen 1a26ef4f73 fix(emr-serverless): list same-millisecond runs and sessions newest first, and compare retries as held (#8735)
ListJobRuns and ListSessions ordered runs and sessions by their creation
millisecond, breaking a tie by the random id, so of two started within
the same millisecond the newer could list second. Each stored run and
session now keeps a creation sequence, the microseconds of its creation
or one past the latest its service gave, which the listing breaks a tie
by. One stored before keeps 0, and its id orders it, as before. A
nextToken given before, whose cursor holds no sequence, is refused with
"Invalid nextToken." rather than resuming at the wrong place.

A StartJobRun or StartSession retry was compared with the original as
raw request JSON, so one that left out a member the first gave at its
default, or empty, was refused with ConflictException. The two are now
compared as the run or session each would start holds them, built by
the same code that starts one: a run's execution timeout left out or
720, a session's idle timeout left out or 60, tags left out or empty,
and a session's configurationOverrides without a runtimeConfiguration
count as the same. Anything the run would hold otherwise still
conflicts, a mode given where the original left it out, a tag with an
empty value or another name among them. Classic EMR sessions compare
their retries as held since #8699.
2026-11-17 09:00:45 -04:00
Priamo Germosen 83c64f5d91 fix(ecs): give resource-tag conditions the tags of the resource a request names (#8732)
The generated request resources give ECS's cluster, task-definition,
service, capacity-provider, task and container-instance types the
aws:ResourceTag/ and ecs:ResourceTag/ keys, but EcsService answered no
tags, so a condition on an ECS resource's tags saw none. Its storedTags
now reads the resource the ARN names in the request's account, where
every ECS handler reads: a stored one in place under the key its ARN
gives, a record saved before storage was account-aware or before a task
definition's key named its Region included, matched on the whole ARN,
and a task or a container instance from memory. TagResource and
UntagResource changed the resource's map in place without a lock; they
now give it a new map under the service's lock, and the tags fields are
volatile.
2026-11-17 08:22:39 -04:00
Priamo Germosen 50276fa533 feat(emr-serverless): run a session's Spark Connect server in the docker runner mode (#8731)
With runner-mode docker, StartSession now runs the session's driver, a
Spark Connect server, in a container, as a job run's driver runs: in the
release's image or the application's custom image, on the same network,
with the execution role's credentials and the application's executors.
Its spark-defaults are the application's runtime configuration, then the
session's runtimeConfiguration; Floci sets the server's port and drops a
spark.connect.grpc.binding.address, which "is reserved by EMR Serverless
and cannot be overridden by users".

A client reaches the server through Floci. GetSessionEndpoint answers
Floci's own address, and the client puts the token in the
x-aws-proxy-auth parameter, as AWS's connection string does
(sc://<host>:443/;use_ssl=true;x-aws-proxy-auth=<token>). The new
core.common.SparkConnectProxy takes gRPC calls to
spark.connect.SparkConnectService on Floci's port, checks the token, and
forwards each call over HTTP/2, trailers included, to the server, whose
port is published on the Docker host's loopback interface only; a
Trailers-Only answer, Spark's error before any message, goes back as
one. A call
with no token, an unknown one or an expired one fails with gRPC's
UNAUTHENTICATED; one to a session that is not ready, or in the immediate
mode, with UNAVAILABLE.

The session is SUBMITTED until its container runs, STARTING until the
server answers, then IDLE. No source says when a session is BUSY: Floci
makes it BUSY while a call runs on its server and IDLE again once none
does, its idle timeout counting from then. TerminateSession goes through
TERMINATING until the container has stopped; the idle timeout, the 24
hours (counted from when the server answers) and StopApplication stop it
too, each session keeping one check for its next deadline. A server that
exits on its own, or does not answer within 10 minutes, fails the
session with the reason; one a restart left behind fails as interrupted,
and its container, if the startup's cleanup left it, is removed.

The runner's Job gains a listening port, published on loopback and
reported through Progress.listening once the container runs.

EmrServerlessSparkConnectNightlyIntegrationTest runs it for real: the
server in the emr-7.13.0 image and Spark's own JVM Spark Connect client
from that image, which runs a query through Floci with the token and is
refused with a wrong one. The nightly job's timeout and image prefetch
take the new check.
2026-11-17 07:55:24 -04:00
Yang Hao 93c1d39348 feat(account): implement GetAccountInformation and PutAccountName (#8725) 2026-11-17 06:58:24 -04:00
jwoa95andAndre Kurait 3e7ce122e7 fix(eventbridge): wait for the rate timer before delivery (#8617) (#8729)
* fix(eventbridge): wait for the rate timer before delivery
* test(eventbridge): drive scheduled SQL account checks from timer

Co-authored-by: Andre Kurait <AndreKurait@gmail.com>
2026-11-17 06:55:47 -04:00
Priamo Germosen 65c6440b8f fix(applicationautoscaling): give resource-tag conditions the tags of the target a request names (#8726)
The generated request resources give Application Auto Scaling's
ScalableTarget type the aws:ResourceTag/ key, but its service answered
no tags, so a condition on a scalable target's tags saw none. Its
storedTags now reads the target whose ARN is the ARN, among the targets
of the account and Region it names, a pre-multi-account one of the
default account included, as the handlers find it. Tag changes already
store a copy of the target under its lock; the tags field is now
volatile.
2026-11-17 06:53:47 -04:00
Priamo Germosenandlex00 151cb586f9 feat(ecs): vend task-role credentials to security-group protected tasks (#8721)
A task under security-group enforcement started without
AWS_CONTAINER_CREDENTIALS_RELATIVE_URI and kept Floci's baseline
identity, because its containers share the firewall helper's namespace
and had no route to the proxy holding 169.254.170.2.

The helper already joins the ECS Docker network the proxy sits on. It
now takes the task's one link-local address, which every container in
the namespace shares, and the compiled nftables table allows TCP to
169.254.170.2:80. AWS security groups do not filter the ECS task
metadata endpoints, and the exception covers that one listener only.

The protected namespace is now built inside the launch cleanup, once the
credentials are issued, as a shared task network's is. Its helper is
removed by name, and confirmed gone, before the task's link-local
address goes back to the pool. A helper Docker keeps leaves the task's
cleanup pending, to be retried.

Closes #4503

Co-authored-by: lex00 <121451605+lex00@users.noreply.github.com>
2026-11-17 06:49:02 -04:00
Oleksandr Nikolaichuk b3582da1f5 fix(ecr): list untagged images and honour tagStatus in ListImages and DescribeImages (#8684) 2026-11-17 05:57:04 -04:00
Chirag Sharma 580781847a fix(appsync): avoid duplicate AWS scalar definitions (#8612)
* fix(appsync): avoid duplicate AWS scalar definitions
* test(appsync): cover customer AWS scalar declarations
* fix(appsync): scan top-level scalar declarations
* test(appsync): cover scalar token edge cases
* fix(test): use newline separators in SDL cases
* fix(appsync): align SDL name tokenization
* refactor(appsync): simplify scalar declaration scan
2026-11-17 05:55:26 -04:00
Andre Kurait 07f6dea386 fix(codeartifact): retain unhealthy sidecars during active requests (#8692)
* fix(codeartifact): retain unhealthy sidecars during active requests
* fix(codeartifact): drain retired sidecar cleanup after failures
* fix(codeartifact): keep replacement sidecar names distinct
* fix(codeartifact): keep repository admission independent of startup
* fix(codeartifact): reclaim untracked repository sidecars
* fix(codeartifact): share run-labelled container cleanup
2026-11-17 05:53:34 -04:00
mrfelek b2f550e6be fix(s3vectors): address vector buckets and indexes by ARN (#8669)
S3 Vectors calls that name a vector bucket now take its vectorBucketName or its vectorBucketArn, and calls that name an index take vectorBucketName with indexName, or indexArn. GetVectorBucket, DeleteVectorBucket, ListIndexes, CreateIndex, GetIndex, DeleteIndex, PutVectors, GetVectors, DeleteVectors and QueryVectors used to answer NotFoundException for a request by ARN. A request that gives neither form, or both, or mixes indexArn with the names, gets AWS's ValidationException message. A bucket or index ARN of another partition or Region than the request's is refused with a ValidationException, and one of another account with AccessDeniedException (403), in these calls, ListVectors and the bucket policy calls alike. CreateVectorBucket and CreateIndex refuse a blank name or one with a slash, which no call could reach.
2026-11-17 05:52:13 -04:00
jwoa95 c2401d7e06 fix(lambda): return invocation log tails for LogType=Tail (#8618) (#8661) 2026-11-17 05:50:15 -04:00
Priamo Germosen 7ed62b2597 fix(resourceexplorer2): give resource-tag conditions the tags of the resource a request names (#8719)
The generated request resources give Resource Explorer's index and view
types the aws:ResourceTag/ key, but ResourceExplorer2Service answered no
tags, so a condition on an index's or a view's tags saw none. Its
storedTags now reads the index or view stored under the ARN in the
account it names, in place, matched on the whole ARN both are kept by;
each is an immutable record that tagging replaces. Tag changes now take
the service's lock, so two on one resource keep each other's tags.
2026-11-17 05:48:21 -04:00
Saim Zaib 6c18ec745e refactor(apigateway): import Duration in proxyOptions (#8712)
* refactor(apigateway): import Duration in proxyOptions
2026-11-17 05:32:34 -04:00
Oleksandr Nikolaichuk a98145795d fix(cloudformation): replace an SNS subscription when the engine says its create-only properties changed (#8677)
An AWS::SNS::Subscription update now replaces the subscription when the engine's change says Endpoint, Protocol or TopicArn changed, the three properties CloudFormation documents as "Update requires: Replacement". It used to subscribe anew and keep the old subscription, so the topic delivered every message twice. The displaced subscription is removed once the update commits, and a rollback removes the new one, never a subscription the update only adopted because it already existed. Deleting a subscription that is already gone is no longer an error.

Part of #6606
2026-11-17 05:28:17 -04:00
Jackson PriceandAndre Kurait 038e1383de fix(lambda): keep deployment buckets out of customer S3 listings (#8689)
Co-authored-by: Andre Kurait <AndreKurait@gmail.com>
2026-11-17 05:27:13 -04:00
Jimmy Liu Jia 3c54534a3d fix(cloudfront): preserve distribution WebACLId (#8707)
CloudFront now reads WebACLId, the member name the CloudFront API uses, on CreateDistribution and UpdateDistribution, and writes it under that name in GetDistributionConfig, GetDistribution and ListDistributions, where the summary now carries the stored value instead of an empty one. An empty WebACLId clears the association, and the earlier WebAclId spelling is still accepted on input when WebACLId is absent.

Part of #8645
2026-11-17 05:21:56 -04:00
Priamo Germosen 8b2d21498b fix(elasticache,memorydb): check AUTH sent after sign-in and close IAM connections after 12 hours (#8704)
Once a client had signed in, the auth proxy relayed its bytes blind, so a later AUTH or HELLO reached
the backend with the client's own credentials, which the backend refuses. A client refreshing its IAM
token or switching user got WRONGPASS where AWS signs it in. Where the proxy checks credentials, it now
keeps reading the client's commands and checks a later AUTH or HELLO as at sign-in. Accepted
credentials are relayed as their user's private backend credentials and refused ones as credentials
the backend refuses, so the backend still answers every command and the replies keep their order. The
client's password or token never reaches the backend, and every other command passes byte for byte.

A connection signed in with an IAM token is now closed 12 hours after it signed in, and a new token
gives it another 12 hours, as AWS documents for ElastiCache and MemoryDB. An IAM user's AUTH or HELLO
inside MULTI is refused, since AWS does not support IAM re-authentication inside a transaction.
2026-11-17 05:06:39 -04:00
Priamo Germosen da8cc6fb1b fix(paymentcryptography): give resource-tag conditions the tags of the key a request names (#8716)
The generated request resources give Payment Cryptography's key type
the aws:ResourceTag/ key, but PaymentCryptographyService answered no
tags, so a condition on a key's tags saw none. Its storedTags now reads
the key stored under the ARN in the account and Region it names, in
place, a record saved before the Region joined its storage name
included, matched on the key's whole ARN. TagResource and UntagResource
edited the held map in place, which only ListTagsForResource's lock
kept from a half-written read; they now put a new map in place of it,
and the field is volatile, so the lookup reads one whole map without
the lock.
2026-11-17 04:18:33 -04:00
Priamo Germosen e078bb7b00 feat(emr): answer GetClusterSessionCredentials for runtime role clusters (#8714)
GetClusterSessionCredentials, "temporary, HTTP basic credentials that
are associated with a given runtime IAM role and used by a cluster with
fine-grained access control activated", was not served.

Floci now answers it with a random username and password that expire in
an hour, for a RUNNING or WAITING cluster on emr-6.11.0 or later whose
security configuration turns on runtime roles
(EnableApplicationScopedIAMRole); any other cluster is refused. Floci
runs no endpoint that checks them, and keeps none. A request without an
ExecutionRoleArn is refused, as the credentials are "associated with a
given runtime IAM role". Whether a cluster is a runtime role enabled one
is now recorded as it is created, so a security configuration deleted
or reused later changes nothing; CreatePersistentAppUI's
RuntimeRoleEnabledCluster reads the same.
2026-11-17 03:37:08 -04:00
Priamo Germosen da39feee4e fix(ram): give resource-tag conditions the tags of the resource share a request names (#8713)
The generated request resources give RAM's resource-share type the
aws:ResourceTag/ and ram:ResourceTag/ keys, but RamService answered no
tags, so a condition on a share's tags saw none. RamService.storedTags now reads the share stored
under the ARN in the owning account the ARN names, in place, matched on
the whole ARN shares are kept by, when the caller may see it as
GetResourceShares shows it: one it owns or one made visible to it, so a
decision never turns on a share RAM hides from the caller. A share is immutable and tagging
stores a new one under the service's lock, so the lookup always reads
one whole set of tags.
2026-11-17 03:15:14 -04:00
Priamo Germosen 751c97dde6 feat(emr): keep persistent application UIs and answer their presigned URLs (#8711)
EMR's application UI operations, CreatePersistentAppUI,
DescribePersistentAppUI, GetPersistentAppUIPresignedURL and
GetOnClusterAppUIPresignedURL, were not served.

Floci now keeps a cluster's persistent application UIs, with the types
its release and applications give it (the Spark History Server from
5.25.0, the Tez UI and YARN timeline server from 5.30.1), refusing a
cluster with more than one primary node and an account past 200, and
reports whether the cluster's security configuration turns on runtime
roles. It serves none of those UIs: a presigned URL, persistent or
on-cluster, opens a signed one-hour page of Floci's about the cluster
and the interface asked for.

The link signing of EMR Serverless's dashboards and these pages is one
helper, core.common.LinkSigner, and their HTML page and table rows come
from core.common.Html.
2026-11-17 02:32:58 -04:00
Priamo Germosen 7199c8580e fix(oam): give resource-tag conditions the tags of the sink or link a request names (#8710)
The generated request resources give OAM's sink and link types the
aws:ResourceTag/ key, but OamService answered no tags, so a condition
on a sink's or a link's tags saw none. OamService.storedTags now reads
the sink or link stored under the ARN in the account it names, in
place, matched on the whole ARN they are kept by. Tagging and untagging
now take the service's lock, so two tag calls on one resource keep each
other's tags, and the tag fields are volatile; setTags already puts a
new map in place of the held one.
2026-11-17 02:09:51 -04:00
Priamo Germosen e0ef191767 feat(emr): keep notebook executions on a cluster (#8705)
EMR's notebook execution operations, StartNotebookExecution,
DescribeNotebookExecution, StopNotebookExecution and
ListNotebookExecutions, were not served.

Floci now keeps notebook executions and their lifecycle, without running
a notebook. An execution needs a RUNNING or WAITING cluster that meets
the EMR Notebooks cluster requirements (release 5.18.0 or later, with
Hadoop, Spark and Livy, and Jupyter Enterprise Gateway from 5.32.0 or
6.2.0), and an account runs at most 100 at once in a Region. It is
RUNNING from its start and FINISHED once the cluster's step duration has
passed, with AWS's "Execution is finished for cluster ..."; it stops at
once as STOPPED, and FAILS when its cluster shuts down first or after 30
days. ListNotebookExecutions gives the newest first, within its From and
To window (by default the last 30 days), 50 to a page. Executions are
stored apart from their clusters, and IAM's resource-tag conditions read
their tags.

EMR's release comparison, its enum check, the time a cluster began to
shut down, and reading an ARN's id and a resource's tags for IAM are
now shared helpers, which CancelSteps, sessions, Studios and clusters
use too.
2026-11-17 01:29:07 -04:00
Priamo Germosen a00b091da2 fix(sso): give resource-tag conditions the tags of the resource a request names (#8703)
The generated request resources give IAM Identity Center's instance,
permission set, application and trusted token issuer types the
aws:ResourceTag/ key, but SsoAdminService answered no tags, so a
condition on such a resource's tags saw none. SsoAdminService.storedTags
now reads them as ListTagsForResource does, in place: the resource the
ARN names, found as the handlers find it by its whole ARN, then the tags
a tagging call left on it or else its own. Its tag writes already put a
new map in place of the held one.
2026-11-17 01:00:44 -04:00
Fernando Farias 81f484fc18 fix(kms): accept application/x-amz-json-1.0 requests (#8658)
* fix(kms): accept application/x-amz-json-1.0 requests
* test(kms): declare JsonPath explicitly instead of var
* test(kms): reuse awsAction with an explicit content type
2026-11-17 00:23:48 -04:00
Andrew Barnes 8d9ab570cd fix(s3): store Windows-incompatible keys without filename collisions (#7925) 2026-11-17 00:21:46 -04:00
Priamo Germosen bd6c5810c3 feat(emr): keep EMR Studios and their session mappings (#8701)
EMR's Studio operations, CreateStudio, DescribeStudio, ListStudios,
UpdateStudio and DeleteStudio, and its Studio session mappings, Create,
Get, List, Update and DeleteStudioSessionMapping, were not served.

Floci now keeps Studios, checked against its own EC2 and IAM Identity
Center: a Studio's VPC, at most 5 subnets and its two security groups
must exist, the subnets and groups in the VPC; an SSO Studio needs a
UserRole and an IAM one may not have one, and the IdP members are for
IAM Studios only; an SSO Studio needs the account's IAM Identity Center
instance, or the one it names. UpdateStudio keeps every earlier subnet.
A session mapping is for an SSO Studio, names its user or group by id
or by name but not both, and that identity must be in the instance's
identity store, and is found again by the id or name it was made with.
Studios and mappings list in the order they were made, by a sequence no
deletion frees. AddTags and RemoveTags take a Studio's id, and IAM's
resource-tag conditions read a Studio's tags.
Floci serves no Studio: its URL is on Floci's own address.

Identity Store gains typed lookups of a user by name and a group by id
or display name, and EMR's random id helper is shared.
2026-11-17 00:21:18 -04:00
Andre Kurait 98c6a699e6 fix(iam): canonicalize AWS managed policy identities (#8659)
* fix(iam): canonicalize AWS managed policy identities
* fix(iam): preserve registered boundary identity during canonicalization
* test(iam): reuse CloudFormation stack lifecycle waits
2026-11-17 00:17:24 -04:00
Daniël van Ziel bf77705ace fix(cloudformation): apply DisplayName on AWS::SNS::Topic (#8693)
AWS::SNS::Topic now forwards DisplayName to the topic, so GetTopicAttributes reports it once the stack is created. An update that drops a DisplayName the previous template declared resets it to empty; one the stack never declared is left alone, in case it is set outside the stack. A value over the documented 100-character limit is rejected with a ValidationError before anything is created, and the "accepted and ignored" row for DisplayName leaves writable-property-gaps.tsv.

Closes #8666
2026-11-16 23:57:22 -04:00
Priamo Germosen 15519216c3 fix(cloudfront): give resource-tag conditions the tags of the resource a request names (#8700)
The generated request resources give ten CloudFront types the
aws:ResourceTag/ key, but CloudFrontKeyValueStoreService, the
namespace's StoredResourceArns, answered no tags, so a condition on a
CloudFront resource's tags saw none. It now reads the tags CloudFront
holds under the ARN, in place, from the tag store CloudFrontService
writes, where the tag handlers keep them: in the request's account, by
the whole ARN, since CloudFront ARNs name the default account whichever
account owns the resource. DeleteFunction now removes the tags kept
under the function's ARN, its name, and CreateFunction drops any left
there, so a function created again under a deleted one's name starts
with none. CloudFront's tag writes already put a new map in place of
the held one.
2026-11-16 23:54:23 -04:00
Jimmy Liu Jia bcf5e58886 fix(elbv2): return forward config for short-form actions (#8650) 2026-11-16 23:53:04 -04:00
TATSUNO “Taz” Yasuhiro 0e5785f6ec fix(dynamodb): hold a PartiQL Limit to the int range (#8694) 2026-11-16 23:50:30 -04:00
Jimmy Liu Jia f96cd91c8b refactor(cloudformation): share API shape conversion across provisioners (#8670)
* refactor(cloudformation): share API shape conversion across provisioners
2026-11-16 23:50:07 -04:00