Commit Graph
2290 Commits
Author SHA1 Message Date
Priamo Germosen 97fcbf21d0 fix(stepfunctions): check EMR Serverless tasks as the same request made directly (#8322)
The EMR Serverless task arm wrote its action ("emr-serverless:" plus the API
name) and its ARNs (/applications/<id>, /jobruns/<id>) by hand, and skipped
the checks a direct request gets beside its own action: iam:PassRole on
StartJobRun's execution role, and emr-serverless:TagResource on the tags
CreateApplication and StartJobRun send.

A new RequestChecks reads a JSON request as the enforcement filter reads the
same request made directly: the action from IamAuthorizedActions, its
resources from RequestResources.ofBody, the request's tags on the action where
the tag-on-create table says it takes them, iam:PassRole on each role the
passed-roles table reads with iam:PassedToService, and the tagging action on
what a create makes. PassedRoles, TagOnCreate and RequestResources.created
gain a body form for it. The arm now hands RequestChecks the request the
integration sends EMR Serverless, so a regeneration of any of those tables
moves the task and the direct call together.
2026-11-14 12:42:27 -04:00
luiseterc e2712cf344 fix(route53): populate record change IAM conditions (#8297)
* fix(route53): populate record change IAM conditions
* fix(route53): align DNS identity and preserve XML validation errors
* fix(route53): read record change conditions from the generated table
2026-11-14 12:13:47 -04:00
Aniket Shukla d5b7a11f89 feat(appsync): execute HTTP data sources and signed local AWS requests (#7609) 2026-11-14 12:07:22 -04:00
Jackson PriceandAndre Kurait c97f913f5e fix(ssm): normalize names across parameter operations (#8278)
Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Jackson Price <jxnprice@amazon.com>
Co-authored-by: Andre Kurait <AndreKurait@gmail.com>
2026-11-14 11:44:37 -04:00
Yang Hao 3e4d867de3 fix(account): check alternate contact requests against the model (#8312) 2026-11-14 11:29:06 -04:00
Jackson PriceandAndre Kurait ae62fe04bc fix(ec2): keep security group rule description updates consistent (#8277)
Signed-off-by: Akash Kurait <akurait@amazon.com>
Signed-off-by: Jackson Price <jxnprice@amazon.com>
Co-authored-by: Andre Kurait <AndreKurait@gmail.com>
2026-11-14 11:21:20 -04:00
Maxence LEFEBVRE a56739ca30 fix(ecs): roll a load-balanced service healthy-first and drain the old task before stopping it (#8256)
* fix(ecs): keep a load-balanced service task running while its targets drain
* fix(ecs): stop a replaced task only once its replacement's targets are healthy
* fix(ecs): drain a load-balanced task as DEACTIVATING and hold a deployment on unhealthy replacements
2026-11-14 11:16:52 -04:00
Priamo Germosen f09468fb19 feat(redshift): require kms:Decrypt on an encrypted snapshot's key to restore it (#8309)
AWS requires the customer managed key of an encrypted snapshot to be shared
with the account restoring it (Redshift Management Guide, "Sharing a
snapshot"). Neither botocore nor the Service Reference says so, so the
request-resources generator states it in FORWARDED, an evidence entry under
MEASURED's rules: the action and the snapshot type, with the rest read from
the metadata (the key type and format kms:Decrypt acts on, the snapshot
record's KmsKeyId member, the endpoint prefix, kms:ViaService).

Under IAM enforcement a Redshift or Redshift Serverless restore is then also
checked as kms:Decrypt on the key the snapshot records, found in the
snapshot's account, against the key policy and the caller's own policies,
with aws:ViaAWSService and kms:ViaService naming the service's endpoint. KMS
key policies are now evaluated as resource policies.

A key KMS would not use, disabled, pending deletion or not held, refuses the
restore, as KMS refuses the request the service makes with it. A snapshot
under AWS's own key records none, and one under an AWS managed key (a copy
grant made without a key) needs nothing, as AWS writes that key's policy to
let the account use it through the service.
2026-11-14 11:04:31 -04:00
Priamo Germosen ddc844b48e feat(emr-serverless): report the image digest each job run attempt resolved (#8307)
GetJobRun now carries the job run's imageConfiguration and
workerTypeSpecifications. Each attempt copies its application's image
configurations as they stand when the attempt is made. The configuration
the driver takes its image from, its worker type's or else the
application's, gets the resolvedImageDigest of the image the attempt
pulled for the driver: the manifest digest the Docker runner's pull
already returned. The executors' configuration gets theirs, or keeps the
driver's where the two share one. "To identify which image version each
job is running, the GetJobRun API response returns the resolvedImageDigest
for that specific job."

A retried attempt resolves its images again ("New job attempts will pick
new images") and keeps its own digests; earlier attempts keep theirs. A
configuration no worker type ran gets no digest, even one naming the same
image, nor does an image built locally under that URI, nor any outside
the docker runner mode. The application's own resolvedImageDigest, which
AWS fixes at its start for 7.13 and earlier, is not part of this change.
2026-11-14 10:59:40 -04:00
Saim Zaib b2bdb2bbe9 feat(apigateway): trust FLOCI_TLS_EXTRA_CA_PATH for HTTP and HTTP_PROXY integrations (#8285) 2026-11-14 10:45:45 -04:00
Aniket Shukla fdb2d7fe44 fix(ssoadmin): provision IAM roles for permission sets (#8239)
* fix(ssoadmin): provision IAM roles for permission sets
* fix(ssoadmin): preserve role ownership during cleanup
* test(ssoadmin): share customer boundary request setup
2026-11-14 10:30:14 -04:00
Hector Ventura 6f928e6062 feat(stepfunctions): evaluate the execution role on ECS, EMR and EMR Serverless tasks (#7723)
Under IAM enforcement, these tasks are now authorized as the execution role, or as the Credentials role a state names. ECS runTask, in all its forms, is checked on the task definition revision it would run, so a family and the revision it stands for are the same resource. The ECS SDK tasks are checked on the service ECS would act on or describe, and listServices on any resource. Each EMR and EMR Serverless API is checked on its cluster, application or job run under its IAM action, and a ByName API needs the list it makes as well as the modify. createCluster and createApplication have no resource type, so they are checked on any resource.

A .sync task needs its starting call alone, so a job cannot fail mid-wait for lack of a Describe permission. A request naming nothing it can reach is left to its service, and a form an integration does not serve stays unsupported. With enforcement off nothing changes.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-11-14 09:40:33 -04:00
Yang Hao 869a5fcb59 fix(account): refuse the management account as an AccountId target (#8276)
* fix(account): refuse the management account as an AccountId target
2026-11-14 09:31:36 -04:00
Jackson PriceandAndre Kurait ad549728df fix(ssm): return GetParameters results alphabetically (#8270)
Signed-off-by: Andre Kurait <AndreKurait@users.noreply.github.com>
Signed-off-by: Jackson Price <jxnprice@amazon.com>
Co-authored-by: Andre Kurait <AndreKurait@gmail.com>
2026-11-14 01:37:14 -04:00
Jackson Price c6b41a4627 fix(config): validate recorder selector list cardinality (#8269)
* fix(config): validate recorder selector list cardinality
* test(config): reuse shared SDK client setup
2026-11-14 01:35:09 -04:00
TATSUNO “Taz” Yasuhiro ff5b6df114 fix(lambda): answer DeleteFunction of a durable function with 202 (#8271)
DeleteFunction answered 204 for every function. AWS answers 202 with {}
when it deletes a durable function or a published version of one, and
Floci now does the same. A plain function and a missing version still
answer 204.
2026-11-14 01:10:32 -04:00
Priamo Germosen cb03bc373b fix(iam): read a statement that names no effect as stating nothing (#8268)
The policy evaluator defaulted a statement's Effect to Allow, so a statement
that named none granted what it described. The IAM guide says the element "is
required and specifies whether the statement results in an allow or an explicit
deny" and that "valid values for Effect are Allow and Deny", so a statement
naming neither describes no permission, and a document that describes no
permission is not a document that grants one. A resource policy whose statement
named a principal and an action but no effect allowed that call, and so did a
session policy, a service control policy and an identity policy: a statement is
held to naming an action and a resource when a document is stored, not to naming
an effect, so such a document is kept as written and was then read as a grant.

A statement names one of the two effects the policy language defines or it names
none, and one that names none states nothing. An Effect that is absent, that is
not a string, or that is some other word is read as neither now: the statement
grants nothing, denies nothing, and the request is decided by the rest of the
document. That is already this package's reading of a role trust policy, where a
statement whose Effect names neither effect matches nothing.

The service list behind GetOrganizationsAccessReport read the same default the
other way round. Walking the service control policy levels, every statement that
was not a Deny was counted as an allow, so a statement naming no effect, or
naming some word that is neither, left a service reachable through a statement
that permits nothing. Only an Allow counts there.

No document is held to a shape here: what is stored is read exactly as it was,
and this changes only what reading it comes to.
2026-11-14 01:07:34 -04:00
Vũ Thế Huy b658720afe feat: map Redshift IAM credentials to PostgreSQL roles (#8211)
* feat(redshift): map Redshift IAM credentials to PostgreSQL roles
* docs(redshift): document IAM database identity for Redshift services
* fix(redshift): harden Redshift IAM role handover and DbGroups lifecycle
* fix(redshift): grant public schema usage on auto-create and resolve latest credential
* fix(redshift): log in as the IAM-derived role so PostgreSQL blocks the switch back
* fix(redshift): restore the role's own password once the backend login completes
* chore(redshift): write the password tracker lock comment in English
2026-11-14 01:06:59 -04:00
Yang Hao 5f03ff975d feat(account): implement GetContactInformation and PutContactInformation (#8262) 2026-11-14 01:04:49 -04:00
Priamo Germosen 16ff5a2c74 feat(emr): give a cluster a bootstrap failure ended its ErrorDetails (#8267)
A cluster whose bootstrap action failed in the docker runner mode ended with
BOOTSTRAP_FAILURE and AWS's message, but DescribeCluster and ListClusters gave
no Status.ErrorDetails, which the Management Guide's error code pages point to
for the failed action, its return code and its script.

- An action that exits with another code than 0 gives
  BOOTSTRAP_FAILURE_PRIMARY_WITH_NON_ZERO_CODE, with the ErrorData keys its page
  lists: primary-instance-id, bootstrap-action, return-code, amazon-s3-path and
  public-doc. A script that cannot be read gives
  BOOTSTRAP_FAILURE_BA_DOWNLOAD_FAILED_PRIMARY, with the same keys but
  return-code. ErrorData is a list of maps and no source shows how AWS spreads
  the keys over them: Floci gives one map holding them all. ErrorMessage is the
  reason's message and the error code's page, in Floci's words.
- A bootstrap that cannot run at all, or that Floci stopped, ends with
  INTERNAL_ERROR as before and has no ErrorDetails: no documented code fits.
- The details are stored with the cluster, so they survive a restart with
  persistent storage, and emr.md says what Floci gives.
2026-11-14 01:03:43 -04:00
Priamo Germosen d9a43012de feat(codeartifact): retain versions from repository-to-repository upstreams (#8261)
Repositories can already declare up to 10 same-domain upstream repositories
via CreateRepository/UpdateRepository, but nothing ever consulted that list:
a native package-manager request for a version missing locally 404ed even
when an upstream had it, and CopyPackageVersions's includeFromUpstream flag
was accepted on the wire but documented as a no-op.

Adds a shared, cycle-safe breadth-first resolver over the upstreams graph
(UpstreamRepositoryResolver), reused by validateUpstreams (now rejecting
transitive cycles, not just direct self-reference, with an independent
uncapped reachability check so a cycle whose closing edge sits beyond the
resolution search cap still gets caught), by four new per-format importers
(Maven/npm/pypi/NuGet) wired into each native controller's existing "local
miss" hook, and by CopyPackageVersions's includeFromUpstream flag for both
generic and container-backed formats.

Widens the existing external-connection claim/fence/origin machinery with a
RetentionOriginKind (EXTERNAL_CONNECTION vs UPSTREAM_REPOSITORY) so the same
mechanism now also backs same-domain retention, and wires the previously
unused INTERNAL_UPSTREAM package-group restriction type through
isUpstreamRetentionBlocked the same way EXTERNAL_UPSTREAM already was.

Each upstream-repository importer brackets every candidate it reads with the
same beginUse/endUse lease DeleteRepository's own cleanup already respects,
so a concurrent delete of a candidate can't race a read of it; resolves a
version from its real staged byte count rather than an optional, sometimes
-1 Content-Length header; and, for Maven, continues past a candidate whose
own metadata names nothing eligible instead of stopping the whole search
there, and allows SNAPSHOT versions through the metadata merge the same way
the asset path already does. pypi's candidate selection also now checks for
the exact requested filename, not just a version match, and never swallows
a sidecar read failure silently. A generic version's upstream-origin claim
is now cleared on delete, republish, or a later direct overwrite copy, so
it never keeps reporting a stale source. npm's "treat a retained version as
the package default" guard now also catches an upstream-repository claim,
not just an external-connection one.
2026-11-14 00:22:31 -04:00
Jackson PriceandAndre Kurait e201709363 fix(storage): preserve account namespaces during legacy fallback (#8251)
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
Co-authored-by: Andre Kurait <AndreKurait@gmail.com>
2026-11-13 23:39:06 -04:00
Ghassan Gedeon Achi 01d61afd8a fix(athena): take templated partition values from the object path (#8242) 2026-11-13 23:16:19 -04:00
Murtuza Chhil 4cd8ab991e feat(paymentcryptography): the TR-34 key block (#8136)
* feat(paymentcryptography): the TR-34 key block
* fix(paymentcryptography): the rules a TR-34 key block has to follow
* docs(paymentcryptography): what a TR-34 key block is
* test(paymentcryptography): the TR-34 round trip shows the key that came back
* test(paymentcryptography): one exchange for the TR-34 tests
* fix(paymentcryptography): the nonce and the token a TR-34 import names
* docs(paymentcryptography): the nonce and the token a TR-34 import names
* fix(paymentcryptography): a TR-34 key block is read whatever follows it
* fix(paymentcryptography): a TR-34 header carries the optional blocks
* chore(paymentcryptography): the imports of the round-trip test in order
* fix(paymentcryptography): the TR-34 header is the reference's header
* fix(paymentcryptography): the TR-34 header, stale comments
* fix(paymentcryptography): the TR-34 comments match the code
2026-11-13 23:10:35 -04:00
Ghassan Gedeon Achi 8185a340c4 fix(athena): report a HUGEINT result column as bigint (#8254) 2026-11-13 23:05:50 -04:00
Priamo Germosen ea4427ca58 fix(elbv2): hold a listener's default certificate apart from its list (#8240)
A listener kept one certificate list with its default at the head, which left
four readings of the reference unanswered. DescribeListenerCertificates names
"the default certificate and the certificate list", telling them apart by
IsDefault and naming a default the list holds as well twice, "once with
IsDefault set to true and once with IsDefault set to false", where Floci
answered one flat list and no IsDefault at all. A listener's own Certificates
member is "the default certificate for the listener", and IsDefault "is not
included in the output when describing a listener", where Floci named every
certificate the listener held there. ModifyListener replaces the default alone,
the Application Load Balancers guide saying of a default added to the
certificate list that it "is used with the SNI protocol even if it is replaced
as the default certificate", where Floci dropped the list with the replacement.
And a listener made through the API starts with an empty certificate list,
which the same guide says of every listener not made in the console.

The default and the list are two members of the listener now, with the served
set, the default first and the list behind it, derived for the data plane and
for the certificate references. A listener saved before this reads the head of
its one list as the default and the rest as its certificate list.

The member create and modify take is held to one certificate, the reference
saying of it on both operations "You must provide exactly one certificate." No
published sentence gives the code a longer list is answered with, so it is the
ValidationError this service answers a request shape with, which is Floci's
reading rather than a sentence of AWS's.

AddListenerCertificates is left taking a list. Its member reads "You can
specify one certificate per call", while the Application Load Balancers guide
adds three certificates in one call of its own, so the sentence and the example
disagree and the example is the behaviour to keep. The operation answers with
the certificate list the add leaves behind now, which is what its output member
describes, rather than with the certificates the call named.

TooManyCertificates is answered for the first time. The published quota is
"Certificates per Application Load Balancer (excluding default certificates):
25", the number DescribeAccountLimits has been reporting all along, so the
listeners of one load balancer share that ceiling, their default certificates
are left out of the count, and the add that would pass it is refused. The
ceiling is the load balancer's rather than the listener's, so it is counted
where the write is made, under the lock a listener's certificate write takes:
two adds on sibling listeners would otherwise each count the other's list as it
stood before the other wrote and pass it together. Create reaches no quota, a
default certificate not being counted, and modify reaches it through its
default alone, a default the certificate list holds as well not being counted
while it is the default, so replacing it starts counting that entry. The number
in hand is the Application Load Balancer one, and a TLS listener on a Network
Load Balancer is held to the same ceiling, which is Floci's reading rather than
a published number of its own.

Removing a default certificate the certificate list holds as well stays
refused: "You can't remove the default certificate for a listener" names no
exception for that case.
2026-11-13 22:40:59 -04:00
Priamo Germosen 58930c9278 fix(iam): derive the request resources without corrections (#8187)
The request-resources generator carried 106 CORRECTIONS over 22
namespaces, each a hand-written entry for one operation. They are gone,
and no Floci service states what an operation acts on either: a service
only looks up what it holds where an entry asks it to. Every operation
the corrections covered is now read from botocore's shapes and
documentation and the Service Reference, or, in two places, from a fix
to the handler whose behavior the correction worked around.

One table stays stated by hand, MEASURED, for what AWS was measured to
check where neither botocore nor the Service Reference says it. The
generator admits an entry only when it links to its measurement, names
types the reference does not list for the action, and gives what the
rules do not; review admits only real AWS evidence. It holds DynamoDB
ListTables, on table/* (#7336's probes and AWS's recorded denial), and
Step Functions SendTaskSuccess, SendTaskFailure and SendTaskHeartbeat,
on the token's activity or state machine (#7277's probes and AWS's
recorded denial). The generator's older hand tables (FOUND_BY, THROUGH,
MINTED_IDS, UNQUALIFIED, QUALIFIED_MEMBERS, ID_TARGETS,
CLIENTS_NOT_READ, READ_IN_HAND_BUILT) are unchanged.

Generator rules: documentation naming the type fills it when it says the
member is a name or an id as the variable is; an ARN head noun, or a
name ending in ArnList, makes an ARN member; fields of a top-level
structure and of the structures in a map are members; the id a create
answers beside another type's ARN is that type's (RunJobFlow's JobFlowId
and ClusterArn); an account-id member fills AccountId; a qualified
member fills first, and a ResourceId variable is the type's own id,
filled by a member named ResourceId before one named after the type. An
ARN member whose pattern names another service, or which its
documentation gives as the ARN of another type of the service, is not
read unless named after a type the action acts on. Each SDK client's
model is read apart, resources the clients disagree on carry their
endpoint, and a v2 load balancer's type is picked by its Type enum and
documented default. A variable no member fills is fixed to the one
value of an enum named after it that the operation's name gives
(CodePipeline's Custom action type owner), and a type named only by an
optional member documented as holding what the operation is about is
reached through that thing when the member is left out (EMR's
ModifyInstanceGroups, through its instance groups).

Reader and service changes: a member left out, or a JSON null, names
the service's default where it has one (Athena's primary workgroup and
AwsDataCatalog, EventBridge's default bus, per PutEvents entry); two
types whose formats differ by one variable are told apart by whether the
member names that default (EventBridge rules); a name for an id variable
is found by the service (Rekognition stream processors, Logs
deliveries); a bare id of the type an operation is about reaches the
acted-on type through its service (the project CodeBuild holds a build
under, the delivery destinations of the source a Logs
DeleteDeliverySource deletes). A member given a JSON null names nothing,
as the handlers read it, wherever the reader fills a variable from it,
so an EMR ClusterId or an IAM Identity Center TargetId of null no
longer names cluster/null or account/null. The table no longer has
absent or before, and the reader refuses a resource key it does not
know.

Checks that change where the old correction had no evidence of AWS
behind it: a Step Functions Local <stateMachineArn>#<test case> is
checked as given; Macie CreateMember on member/*; IAM Identity Center
ProvisionPermissionSet for ALL_PROVISIONED_ACCOUNTS on its instance and
permission set alone, the request-scoped account pinning that served the
account check removed; Logs DeleteDeliverySource on its delivery
destinations; a CodeBuild build id of no build Floci holds on *.

Handler fixes: Athena's ListDatabases, ListTableMetadata and
GetTableMetadata read Glue whichever catalog was named, so they were
also checked on AwsDataCatalog. They now refuse a catalog whose metadata
is not the account's Glue Data Catalog with MetadataException and are
checked on the catalog they name. Cost Explorer's cost reads ignored
BillingViewArn, so they were checked on *. They now answer the primary
billing view alone, refuse another with ResourceNotFoundException, and
are checked on the view they name.

The passed-roles table had drifted from the Service Reference and is
regenerated. AWS now passes CreateTrainingSession's role to
training-session.sagemaker alone, so its RoleArn is read rather than
left unread for naming two services, and AWS lists Secrets Manager's new
AssociateCrossAccountReplica, which the pinned botocore does not model
yet. The generator now leaves an operation no pinned model has unread on
its own, until a bump brings it in, in place of a hand-written entry for
each, so the two there were are gone.

The tag-on-create table had drifted too: AWS no longer lists a tagging
action for Network Firewall's CreateProxy, CreateProxyConfiguration and
CreateProxyRuleGroup, and lists five operations the pinned botocore
does not model yet. It is regenerated.
2026-11-13 22:40:31 -04:00
TATSUNO “Taz” Yasuhiro 4313fc5fac fix(lambda): leave out the children of a durable context closed without ReplayChildren (#8248)
Floci listed every operation in the invocation event and in
GetDurableExecutionState. AWS leaves out the operations under a child
context closed without ReplayChildren=true, and everything below them.
Both now use one filtered view, and a context closed without
ContextOptions shows ReplayChildren: false. The checkpoint answer is
unchanged.
2026-11-13 22:37:23 -04:00
Priamo Germosen 3e02ff995f fix(docker): launch an image in Floci's own ECR without the registry base (#8243)
With floci.docker.image-registry-base set, ContainerBuilder.resolveImage put
the base in front of every image, so an ECR image Floci had rewritten to its
loopback registry (localhost:<port>/<account>/<region>/<repo>), or a
repositoryUri it handed out, became <base>/localhost:<port>/...: a reference
Docker refuses, and no image a mirror holds. An ECS task, an image-backed
Lambda function or an EMR Serverless application with a custom image could not
run from Floci's ECR with the base set.

- An image in a registry on the Docker host's loopback (localhost, a
  .localhost name, Floci's localhost.floci.io alias or a loopback address in
  any spelling, checked with NetworkExposureGuard.isLoopback, with or without
  a port) is launched as it is; every other image still goes under the base.
- The setting's Javadoc, its environment variable row and the ECR page say so.
2026-11-13 22:28:27 -04:00
Niels Kootstra 68a5f2a7f0 fix(cur): check every request against the model's constraints (#8236)
* fix(cur): check every request against the model's constraints
* fix(cur): refuse report names the emitter cannot write to S3
* test(iam): modify a report definition with a billing view ARN the model accepts
2026-11-13 17:10:30 -04:00
Oleksandr Nikolaichuk b4b659bd88 fix(cloudformation): replace exactly what the change set says for AppConfig profiles and ElastiCache clusters (#8204) 2026-11-13 17:00:32 -04:00
Mark a827daebfc fix(cognito): accept the sign-in alias in challenge responses (#8229)
In a pool with UsernameAttributes the challenge sessions keep the user's own
username (the sub), while the user signs in with, and answers with, the email.
NEW_PASSWORD_REQUIRED, MFA_SETUP, SOFTWARE_TOKEN_MFA and the SMS and email MFA
codes compared USERNAME with that stored sub, so a response that carried the
email was rejected with "Invalid session for the user." or "Session does not
match user".

The AWS Developer Guide ("Working with user attributes") says that with
username attributes the email address or phone number can be used in place of
the username in all APIs except ListUsers. Only the SRP password verifier is
documented to need USER_ID_FOR_SRP (AdminInitiateAuth ChallengeParameters), so
the SRP paths stay as they are.

isSessionUser first compares the sign-in keys, so a pool without aliases and
its case sensitivity behave as before. Only when they differ is the supplied
value resolved to its user and compared with the user of the session, which is
what the custom-auth challenges already do. The alias of another user is still
rejected.

Tests: CognitoAliasMfaIntegrationTest covers TOTP (MFA_SETUP and
SOFTWARE_TOKEN_MFA), SMS MFA and NEW_PASSWORD_REQUIRED in an alias pool, each
with a response for another user that must be rejected. docs/services/cognito.md
lists the behaviour next to the custom-auth rule.

applyNewPasswordAttributes read the user back with the USERNAME of the
response. That value can now be the email the user signed in with, so a
userAttributes.email in the same response made it stop naming the user once
the attribute was applied. The password had been changed and the session
consumed by then, and the response failed with UserNotFoundException without
a way to retry. It now takes the username of the user from the session. The
custom-auth challenge, which already accepted the alias, gets the same.

isSessionUser also looked up the username of the session. Every session holds
the username of its user already, and adminGetUser scans the pool, so that
lookup was a second scan for nothing. The supplied value is resolved once and
compared with the username of the session.

The new test answers NEW_PASSWORD_REQUIRED with the email and a new email,
then signs in with the new one.

validateCustomUsername and the CUSTOM_CHALLENGE check now use isSessionUser,
so a single check decides whether a USERNAME names the session's user.
Move latestSms into CognitoRestAssuredUtils and share it between the
alias and message MFA tests.

Closes #8228
2026-11-13 16:58:05 -04:00
Kal Cramer f1a6260a94 feat(cloudformation): add AWS::EFS::FileSystem, MountTarget and AccessPoint (#8074)
A template can now create the three EFS types. They are provisioned
through EfsService, so a stack and a direct API call see the same
file systems, mount targets and access points.

- Ref and Fn::GetAtt resolve for every type.
- Updates change ThroughputMode, ProvisionedThroughputInMibps,
  BackupPolicy, LifecyclePolicies, FileSystemPolicy,
  FileSystemProtection and tags in place; create-only properties
  replace the resource, and a failed update puts back what it changed.
- Backups are off on create unless BackupPolicy is ENABLED or the file
  system is One Zone, and ThroughputMode provisioned requires
  ProvisionedThroughputInMibps.
- Required properties are validated from the registry schema.

Ref #7972
2026-11-13 16:30:10 -04:00
Vũ Thế Huy eea61cd42a feat(redshift): project DynamoDB zero-ETL changes into a current-state table (#8180) 2026-11-13 16:18:31 -04:00
mrfelek 25811dd4c6 fix(eks): share a cluster node's mounts so CSI drivers can mount volumes (#8207) 2026-11-13 16:09:32 -04:00
Mario Toffia 6341708315 fix(cloudformation): delete a custom resource a committed update replaced (#8223) 2026-11-13 16:05:42 -04:00
irodotos7 2dc93aa087 fix(iam): derive EC2 instance authorization from AWS metadata (#8150)
Authorize generated instance targets with their own stored tags before mutation. Return malformed Query errors as XML HTTP 404, reuse enforcement group cleanup, and update generated-target regression coverage. Regenerate IAM metadata on current main.

Closes #8159
2026-11-13 16:05:26 -04:00
Kenshin Okinaka 898fee8bb1 fix(ses): validate the topic in SetIdentityNotificationTopic (#8202)
* fix(ses): validate the topic in SetIdentityNotificationTopic
* test(ses): share the SNS topic helpers in the notification topic test
* refactor(ses): build the notificationType enum violation with the shared helper
2026-11-13 15:58:23 -04:00
Priamo Germosen d3c8412977 fix(emr-serverless): run a job's containers for its application's architecture (#8208)
An EMR Serverless run's driver and executors ran on the Docker host's own
platform whatever architecture the application named, so an ARM64
application ran amd64 images on an x86 host, and its arm64-only
dependencies with them.

- With floci.services.emrserverless.honour-architectures on, a run's
  containers run the image for its application's architecture,
  linux/amd64 for X86_64 and linux/arm64 for ARM64: the release's
  images, published for both, and a custom image, pulled for that
  platform.
- Off by default, as Lambda's honour-architectures: tools such as
  Terraform name X86_64 unless told otherwise, so on an arm64 host
  every run would move to emulation. Off, or for an application that
  names none, a run stays on the Docker host's own platform.
- DockerPlatforms.forArchitecture is the one mapping from an AWS
  architecture name, in either case, to its Docker platform. ECS task
  definitions, Lambda functions, EC2 images and the AMI build tool had
  a copy each and now use it, keeping their own special cases: EC2's
  i386, the tool's amd64 and its refusal of anything else.

A host of another architecture needs emulation to run the image.
2026-11-13 15:35:33 -04:00
Priamo Germosen a852078fc9 feat(codeartifact): add Package Groups support (#8206) 2026-11-13 15:33:11 -04:00
Jimmy Liu Jia 9ee8ba4e11 fix(kinesis): route partition keys by MD5 hash range (#8198)
* fix(kinesis): route partition keys by MD5 hash range

* fix(kinesis): preserve reshard ranges and index writes
2026-11-13 09:18:30 -04:00
Jimmy Liu Jia 19a1742761 fix(s3): reject unrestored archived GetObject reads (#8196) 2026-11-13 09:06:05 -04:00
Tyler Webb e41cc9b88d fix(sqs): reject empty and malformed message attribute values (#8061)
SendMessage and SendMessageBatch on both the JSON and query protocols now answer InvalidParameterValue for a message attribute whose StringValue or BinaryValue is empty or whose BinaryValue is not base64, instead of storing an empty value or failing with a 500 on the decode. In a batch, only the entry carrying the bad attribute fails; the other entries are still sent.

An attribute missing its DataType, or carrying neither a StringValue nor a
BinaryValue, was silently dropped while an empty value was rejected. Both now
fail with InvalidParameterValue, using the wording LocalStack's snapshot tests
record: 'Missing required parameter DataType' and the existing non-empty value
message.

SendMessageBatch now writes the failed entry as soon as its attributes fail
to parse and skips it, rather than carrying the exception to the send loop.
The query handler parses SendMessage and SendMessageBatch attributes through
one helper.

A batch entry with an invalid message attribute was left out of the batch
payload total, so a batch over MaximumMessageSize only because of that
entry was accepted and the bad entry reported as a per-entry failure.
LocalStack and moto both sum every entry before any per-entry check, so the
total now comes from each entry's raw body and attributes, independent of
attribute validation, and such a batch fails whole with BatchRequestTooLong.

The empty-value error derived the base type with split("\\.")[0], which
throws ArrayIndexOutOfBoundsException, surfacing as a 500, for a DataType
of "." or "..". Take the substring before the first '.' instead.

A DataType whose base type (the part before the first period) is not
String, Number or Binary, such as "Strin", "Foo" or ".", was accepted.
SendMessage now rejects it with InvalidParameterValue, and SendMessageBatch
fails only that entry. The match is case-sensitive, and the message follows
LocalStack's check_attributes in localstack-core/localstack/services/sqs/
provider.py, which names the parameter literally as
MessageAttributes.Attribute_name.DataType. LocalStack's f-string drops the
space in "prefixed with"; the space is kept here.

The empty-String-value, missing-DataType and DataType-prefix messages come
from LocalStack's check_attributes. The empty Number and Binary value and
invalid base64 messages are Floci's own wording, unconfirmed against AWS,
so those cases now assert the error code only.

computeMessageSize now counts each attribute through the same helper the batch payload check uses on raw wire fields, so the name, type and value byte rule lives in one place.

Adds JSON and Query batches whose bodies fit the 1 MiB limit but whose invalid entry's attribute pushes the batch over it, plus service tests for UTF-8 byte lengths, decoded binary lengths, the invalid-base64 fallback and computeMessageSize.

Signed-off-by: Tyler Webb <tyler.webb@verkada.com>
2026-11-13 09:01:59 -04:00
Niels Kootstra 236e20003f fix(ssm): keep document and association tags and tag them by resource type (#8132)
CreateDocument and CreateAssociation now keep their Tags, and AddTagsToResource, ListTagsForResource and RemoveTagsFromResource pick a document by name or an association by ID from ResourceType instead of always looking up a parameter. A document's tags are returned in its DocumentDescription and ListDocuments entry.

Read the SSM tag calls, CreateDocument and CreateAssociation from the
generated request-resource table instead of building their ARNs by hand.
A ResourceType enum value now picks its resource type ignoring case and
hyphens, ResourceId fills it whatever its kind, and a variable named for
leaving out the leading slash drops it, as a parameter ARN does.

Closes #7959
2026-11-13 08:56:30 -04:00
TATSUNO “Taz” Yasuhiro ede4ebf6b0 feat(lambda): pass the X-Ray trace header through durable chained invokes (#8189)
* feat(lambda): pass the X-Ray trace header through durable chained invokes

* fix(lambda): give a PassThrough invocation a new Parent for an unsampled header without one
2026-11-13 08:30:31 -04:00
Suja Shaj 7d7c87338f fix(cloudformation): register a target group's Targets and keep them in step on update (#8199) 2026-11-13 08:27:19 -04:00
Priamo Germosen f5fd41a6ac fix(emr): list an instance fleet's instances (#8183)
ListInstances listed only instance groups' instances, so a cluster made
of instance fleets listed none, though its core and task nodes run as
containers named by the private DNS names its instances would have.

- A fleet has an instance for each unit of its capacity, as its nodes
  do, its on-demand ones first, each of the first instance type in its
  InstanceTypeConfigs, which Floci now keeps, and with its
  InstanceFleetId.
- The primary fleet's instance is numbered first, i-00000000000000001
  at 10.0.0.1, as MasterPublicDnsName names it, and every other fleet's
  are at 10.<fleet>.0.<n>, the names its nodes run under, kept while
  another fleet resizes. One helper numbers groups and fleets for both.
- An ended fleet's instances stay listed as TERMINATED for 30 days, as
  an ended group's do, from its target capacities, which it can no
  longer change.
- InstanceGroupId, InstanceGroupTypes, InstanceFleetId and
  InstanceFleetType now narrow the listing, all given ones together;
  they were ignored.

A call lists at most 2,000 instances, building only that page, with a
Marker for the rest, so a fleet of any capacity costs one page, counted in longs, as a fleet's
two capacities add up past an int. A
cluster has instance groups or instance fleets, never both, as they
"cannot coexist in a cluster": RunJobFlow with both, AddInstanceGroups
on a cluster with fleets and AddInstanceFleet on one with groups are
refused, and so is a fleet without its required InstanceFleetType or an
InstanceTypeConfigs member without its required InstanceType.
2026-11-13 07:14:19 -04:00
Priamo Germosen 9b24a38afe fix(iam): hold every policy document a write is handed to being a policy (#8175)
Seven writes take an IAM policy document and every one of them models
MalformedPolicyDocument, "the request was rejected because the policy document was
malformed". None of them answered it, so a document that was no policy at all was
stored and told apart only later, when something tried to decide with it. A role's
trust policy was the sharpest case: the trust evaluator reads a document it cannot
parse as matching nothing, so a role written that way could no longer be assumed.

The reading goes in IamService rather than at the Query front door, for two reasons.
Three CloudFormation provisioners write these documents straight through the service
and would otherwise be held to nothing. And the order AWS answers in differs per
operation, which only the service can express: CreateRole, CreatePolicy,
CreatePolicyVersion and UpdateAssumeRolePolicy read the document before the name
clash or the entity lookup, where PutUserPolicy, PutGroupPolicy and PutRolePolicy
answer NoSuchEntity for a holder that is not there whatever document the request
carried.

Which reading an operation asks for follows what the document is. A trust policy is
held to the grammar alone and under its own validator's wording, "This policy
contains invalid Json" for a text that does not parse as a JSON object and "Policy
has no statements" for an object carrying no Statement, the element the grammar
requires; its statements name a principal rather than resources, so an identity
statement's elements are not asked of it. An inline policy is held to that grammar
under the identity validator's one sentence for both, "Syntax errors in policy.",
and to the values the language defines: a Version outside 2012-10-17 and 2008-10-17,
an Effect that is not literally Allow or Deny, and a resource named neither by ARN
nor by the wildcard. A managed policy is held to those and to each statement's own
elements, "Policy statement must contain actions." and "Policy statement must
contain resources.".

None of those sentences is published and none is captured. They are the ones AWS's
own emulator answers, a first-party implementation rather than a recording, and the
split between the two validators' wordings is its reading too, which
docs/services/iam.md records.

The grammar is read in one place, not two. #8164 landed
IamPolicyEvaluator.readsAsPolicyDocument for a document a request supplies to the two
simulators or the two context-key readers, which asks exactly what the writes ask of
the top level: parses as a JSON object, and carries Statement. The writes need to know
which of the two failed in order to word their refusal, so the reading lives here and
that method is now its boolean face rather than a second copy of it.

Putting a document back is not a new write. A failed CloudFormation update restores
the trust policy, the inline policy or the policy version it captured before the
attempt, and a document an earlier release accepted must not be refused on the way
back: that would leave the role or the policy without what the rollback had just
removed, and the stack unable to roll back at all. So those three writes keep the
reading on their public entry point and the provisioners restore through
restoreAssumeRolePolicy, restoreRolePolicy and restorePolicyVersion, which apply the
same write without it. The inline-policy provisioner already restored by writing the
captured document straight back, so it needed nothing. This is the same rule as
reading a stored document exactly as it was, applied to the one path that writes one.

The whole text has to be the document. A member taking one takes "the complete, valid
JSON text of an IAM policy", and Jackson reads the first value and stops unless it is
told otherwise, so an object with anything after it parsed as a policy. The reader
enables FAIL_ON_TRAILING_TOKENS, which is what the reference implementation's parser
does by construction.

A null document is nothing to judge: a required member the request leaves out is
answered as absent by the constraints ahead of the operation. What is already stored
is read exactly as it was, so a document an earlier version accepted still decides
what it decided.

Holding every caller means holding the fixtures too, the compatibility suites
included: a Python and a Java SDK test each wrote an inline policy carrying only
Version, and two roles in the EKS access-entry test were created with a trust policy
of {}. All three are documents IAM refuses, the first two being the case recorded for
a document that is valid JSON carrying only Version.

Holding every caller means holding the fixtures too. Filler documents across the test
tree, "{}" as a trust policy chief among them, were documents real AWS refuses; they
now come from one place, io.floci.aws.testing.IamTestPolicies, which also answers a
distinct document per marker for a test that needs several. Two fixtures changed in
substance rather than in spelling: a Step Functions policy meant to name another
event bus named it by bare name, which an identity policy may not, and a managed
policy version's statements named no action.
2026-11-13 00:18:02 -04:00
Jimmy Liu Jia 1686f29e04 feat(s3): track archived object restore state (#8166)
* feat(s3): track archived object restore state

* fix(s3): validate restore options and report version restore status
2026-11-13 00:08:10 -04:00
Andre Kurait c3551d351e feat(kms): list completed key rotations (#8146)
Record completed rotation history, validate filtering and pagination, preserve concurrent key updates, and publish primary and replica material as one atomic storage batch.

Revalidate the initially resolved key before atomically publishing import parameters, preserving deletion safety and alias identity. Share the malformed rotation request fixture.

Use shared striped monitors keyed by resolved key ID, preserving replica publication and import identity while permitting unrelated key operations. Reuse shared concurrency and SDK fixtures.

Signed-off-by: Andre Kurait <akurait@amazon.com>
2026-11-13 00:00:10 -04:00