Commit Graph
1088 Commits
Author SHA1 Message Date
jwoa95 69b4d17c67 fix(cognito): run the PreSignUp trigger on AdminCreateUser (#5149)
* fix(cognito): run the PreSignUp trigger on AdminCreateUser

AWS invokes the pre sign-up trigger when AdminCreateUser creates a user,
with triggerSource PreSignUp_AdminCreateUser, the request's ValidationData
and ClientMetadata, and ignores the response's autoConfirmUser,
autoVerifyEmail and autoVerifyPhone. A trigger error refuses the user.

The trigger runs before anything is stored, so a refused ForceAliasCreation
request no longer moves the alias off the existing user.

* fix(cognito): invoke PreSignUp outside the user lock on AdminCreateUser

AdminCreateUser held the lock stripe of the requested username while
the pre sign-up trigger ran. A function that called back into the pool
for an identifier on the same stripe, such as AdminCreateUser for the
same username, waited for that lock until the invocation timed out.

The trigger now runs with no lock held. A taken username or alias is
still refused before the trigger is invoked, and the checks run again
under the lock once it accepts, so a user created while the trigger ran
still fails the request with UsernameExistsException.

With ForceAliasCreation, the alias holder was read before the trigger
and written back after it, which could undo a change made to the holder
in the meantime or restore a deleted holder. The holder is now looked up
under the lock after the trigger, just before its alias is moved.

* fix(cognito): run PreSignUp once per in-flight AdminCreateUser username

With the pre sign-up trigger running outside the user lock, two
overlapping AdminCreateUser requests for the same free username could
both pass the existence check and both invoke the trigger. The later
one was then refused under the lock after its function had already run,
or failed with the function's own error instead of
UsernameExistsException.

AdminCreateUser now claims the username before checking it and gives
the claim up once the user is stored or the request fails. An
overlapping request for the same username, including one the function
makes for the username it was given, is refused with
UsernameExistsException before it invokes the trigger.
2026-10-06 08:18:14 -04:00
TATSUNO “Taz” Yasuhiro 6e6ce61eea feat(lambda): durable function chained invokes (#5164)
* feat(lambda): durable function chained invokes

A CHAINED_INVOKE operation runs another function. A durable target
needs a version or alias and runs as its own durable execution with a
random name; its close completes the operation as SUCCEEDED, FAILED,
TIMED_OUT ("CHAINED_INVOKE timed out after N seconds.") or STOPPED. Any
other function is invoked once, and an output over 1 MB fails the
operation. A missing function or an unqualified durable one fails the
operation at once. Stopping the parent leaves the child running.

A plain chained invoke lost with the process runs again after a restart,
and a durable child that closed before its report reaches the parent
reports then.

* fix(lambda): close the gaps in durable chained invokes

A durable child that closes during a restart reports to its parent
under its own lock, and recovery triggers an execution once. A durable
target invoked without Payload starts its child with no input, while a
plain target gets {}. A target started in the batch that closes the
execution still runs and its result is ignored, as on AWS.

* fix(lambda): reject a chained invoke of another account or region

AWS rejects the checkpoint with InvalidParameterValueException "Cannot
start a CHAINED_INVOKE on a function in another account." or "... in
another region." Cross-account chained invocations are not supported.

* fix(lambda): keep durable chained invokes across a crash

The parent is saved before the child it starts, so a crash in between
leaves no child the parent does not know. On restart a child the parent
recorded but the store lost is started again under the same ARN, and a
plain target started by the checkpoint that closed the execution runs
again until its result is recorded. A child reports only to the
operation that started it.

* fix(lambda): recreate a lost durable child on the version its ARN names

An alias the chained invoke named may point to another version after a
restart, and a child recreated there would not match the ARN the parent
saved.
2026-10-06 08:17:51 -04:00
Priamo Germosen 8fee66ae61 fix(s3): stream UploadPartCopy ranges into the part (#5162)
UploadPartCopy read the copied range into a byte array and stored it
through the byte-array UploadPart path, so one copied part was capped
near 2 GiB with EntityTooLarge, while S3 allows a part of up to 5 GiB.

The range is now read from the source stream as it is needed, by a new
CopyRangeInputStream that skips to the range on its first read and ends
after its last byte, and written straight into the part through the
streaming UploadPart path, so neither the source nor the part has to
fit in memory in the disk-backed modes. A range over S3's 5 GiB part
limit is rejected with EntityTooLarge, as the S3 API Reference error
table words it, before anything is copied. Memory mode keeps its limit
of about 2 GiB.
2026-10-05 23:04:48 -05:00
Priamo Germosen 9c0102559d feat(iam): model service-specific credentials (#5084)
Adds CreateServiceSpecificCredential, ListServiceSpecificCredentials,
UpdateServiceSpecificCredential, ResetServiceSpecificCredential and
DeleteServiceSpecificCredential, the five the wire model defines.

A credential takes one of two shapes, decided by the service: CodeCommit and
Keyspaces get a ServiceUserName and a ServicePassword, while the long-term API
key services get a ServiceCredentialAlias and a ServiceCredentialSecret and
accept CredentialAgeDays. The quota is two per service rather than two per user,
and the version behind a service user name's +n suffix is the lowest one free
rather than a count, so deleting out of order cannot mint a name already in use.

A credential blocks DeleteUser until it is removed, the last item on AWS's list
of what to delete first, and follows the user across an UpdateUser rename.
2026-10-05 22:57:54 -05:00
Kenshin Okinaka 3f6fb371d1 feat(ses): add the S/MIME identity certificate operations (#5111)
* feat(ses): add the S/MIME identity certificate operations

Implement AssociateEmailIdentityCertificate,
DisassociateEmailIdentityCertificate and ListEmailIdentityCertificates
as a control plane only: associations are stored per region and Floci
never signs mail.

Request validation, messages and precedence follow real SES: a domain
identity needs a FromAddress in the domain or a subdomain, one
certificate per address regardless of case, the request members are
checked before the identity, and the certificate is not inspected on
association. The reported status is Floci's own rule: ACTIVE while the
ARN names an issued, unexpired ACM certificate (with its expiry as
CertificateExpiryTime), FAILED otherwise. Disassociation is immediate
and idempotent, and the list pages through SesListPaging.

DeleteEmailIdentity now refuses an identity that still has a
certificate associated, as SES does. The v1 DeleteIdentity and
DeleteVerifiedEmailAddress share the identities and refuse it too.

* fix(ses): apply the documented S/MIME certificate requirements

ListEmailIdentityCertificates now reports ACTIVE only when the
association meets the SES Developer Guide's S/MIME certificate
considerations: the identity is verified, and the certificate is
currently valid, has an allowed key (RSA 2048/3072/4096 or EC P-256,
P-384, P-521, read from the certificate itself since ACM's stored key
algorithm folds other sizes into those) and an RFC822Name SAN equal to
the From address, case-sensitively. The docs link that section instead
of calling the criteria undocumented.

* fix(ses): require an email-signing end-entity S/MIME certificate

A probe against SES found requirements beyond the Developer Guide's
list: a CA certificate fails even with the right usages, and the
certificate needs both a key usage including digitalSignature and an
extended key usage including emailProtection, while other usages may
sit alongside them. ListEmailIdentityCertificates now applies them, and
the docs list them next to the guide's link.

* refactor(ses): reuse SesIdentityService's verified-identity check
2026-10-05 20:24:51 -04:00
Priamo Germosen a3118eb42b fix(sts): evaluate GetSessionToken and GetFederationToken sessions as the user that minted them (#5081)
Under IAM enforcement, credentials from the two STS operations that mint a
session from a long-term key were evaluated as the wrong identity:

- A GetSessionToken session was stored with no role ARN, which
  resolveCallerContext answered with null, and the enforcement filter lets a
  known credential it cannot map to policies through. A user allowed only
  sts:GetSessionToken got credentials that passed every check, IAM calls
  included, and since the session had no caller ARN, AssumeRole took it for
  the account root and let it assume any role whose trust policy names the
  account. AppSync's IAM authorization and RDS IAM database authentication
  also read a null context as allowed, so they let these sessions through too.
- A GetFederationToken session was stored with the federated user's ARN where a
  role session keeps its role's, and its permissions were read from the role
  whose name followed the last slash. A user allowed only
  sts:GetFederationToken that federated under an existing role's name got that
  role's permissions; any other name got none, even with a session policy.

The STS API Reference says GetSessionToken credentials "have the same
permissions as the IAM user", and that a GetFederationToken session with no
session policy "has no permissions", and otherwise the intersection of "the IAM
user policies and the session policies". Both handlers now record the identity
whose key signed the request. An active key of a user in the request's account
names that user, by ARN and unique ID. A key no account holds, the legacy test
key or the account id among them, names the account root, which is how Floci
already treats such a key.

A GetSessionToken session is evaluated as that user, policies and boundary
included, or as the root, whose context the filter still bounds by the
account's service control policies. A federated session is evaluated as that
user intersected with its session policy. Without one it has no permissions of
its own, but keeps the Deny statements of its user's policies and boundary: a
resource policy naming the federated user grants to the session past implicit
denies, not past explicit ones (IAM User Guide, "Resource-based policies for AWS
STS federated user principal sessions"). Whatever its policies allow, a
federated session cannot call any IAM operation, nor any STS operation except
GetCallerIdentity (STS API Reference, GetFederationToken), so its context
always carries an explicit Deny for iam:* and sts:*; the filter answers
GetCallerIdentity before reading any policy.

A session whose issuer is gone is no credential at all, refused like an unknown
access key, so neither a resource policy nor S3's fallback to the account root
acts on its behalf. That covers a session minted with any other key IAM holds
(another session's, which AWS does not accept here, or an inactive key or
another account's, which account routing can land in the default account), a
session whose user was deleted and recreated under the same name, and one
stored before the issuer was recorded.

The caller identity follows: a GetSessionToken session's caller and principal
ARN are its user's, and a federated session's are its federated-user ARN, with
account:name as its user ID, as GetCallerIdentity reports for a federated user.

The unit test that pinned the GetSessionToken bypass now checks that a session
stored without an issuer is no credential; unit tests cover each kind of
issuer, the deny-only context of a federated session without a policy, and
that the issuer survives persistence. Integration tests (IAM and S3
enforcement, real SigV4) cover the role-name federation, the intersection, the
no-policy session, the GetSessionToken session and its AssumeRole, a
bucket-policy Deny keyed on the user's aws:PrincipalArn, both kinds of session
staying within the user's permissions boundary, a session of a recreated user
under a bucket policy granting everyone, and a bucket policy naming a federated
user against its user's explicit Deny, and a federated session refused IAM
and AssumeRole although both its user and session policy allow them; the SCP integration test now also checks
a root-minted session. All of them fail on main. Tests that built an STS
session credential as a role-less session with no issuer, a shape Floci no
longer creates, now build one the account root minted, or a presigned-URL
session, as production does.
2026-10-05 17:12:00 -05:00
Priamo Germosen 583de3010c fix(s3): stream PutObject and UploadPart bodies to disk (#5106)
The object PUT endpoint took its body as a byte array, so a single
PutObject or UploadPart was held whole in the heap and capped near 2 GiB.

The body is now read as a stream. A streaming aws-chunked payload is
decoded as it arrives, and Content-MD5 and x-amz-checksum-* are checked
on the way through. In the disk-backed modes the body is staged under
.multipart/.incoming with no lock held, then a part is moved into its
upload under the upload's lock and an object is stored like an
assembled multipart object. Checks the request alone decides (bucket,
SSE-C headers, checksum algorithm, write preconditions, a malformed
Content-MD5) run before any of the body is read. Memory mode reads the
body into a capped array and fails past about 2 GiB with EntityTooLarge.
2026-10-05 17:11:47 -05:00
David f157d354f2 feat(rds): Aurora custom cluster endpoints (#5090)
Serve CreateDBClusterEndpoint, DescribeDBClusterEndpoints,
ModifyDBClusterEndpoint and DeleteDBClusterEndpoint.

A custom endpoint is stored per Region with the rules from the API
reference and the Aurora user guide: type READER or ANY, a static or an
exclusion member list but not both, members that are instances of the
cluster, no writer in a READER endpoint, an RDS identifier stored lower
case and unique in the Region, and at most five per cluster. Its ARN
(cluster-endpoint:<id>) works with the tagging actions.

DescribeDBClusterEndpoints lists each cluster's built-in WRITER and
READER endpoints with its custom ones, and supports the cluster and
endpoint identifiers, the four documented filters and paging. Deleting a
cluster deletes its custom endpoints, and a deleted instance drops out of
the member lists.

Custom endpoints are modelled, not routed: one reports the cluster's own
endpoint host, so connections through it go where the cluster endpoint
sends them.

Closes #5072
2026-10-05 14:48:06 -04:00
Mario Toffia 4be8309e8d feat(cloudformation): provision AWS::IoT::Authorizer (#4830)
* test(cloudformation): cover AWS::IoT::Authorizer against AWS

* feat(cloudformation): provision AWS::IoT::Authorizer

CloudFormation stubbed AWS::IoT::Authorizer with a fake ARN and created
nothing. IotAuthorizerCfnProvisioner now creates a real authorizer
through IotAuthorizerService.

Ref is the authorizer name and Fn::GetAtt Arn the ARN. A missing
AuthorizerFunctionArn fails with the registry's model validation error
before any call. Status, EnableCachingForHttp, AuthorizerFunctionArn and
the token settings update in place, sending only the declared
properties, tags are reconciled, and a failed stack update restores
them from a snapshot. Changing AuthorizerName or SigningDisabled
replaces the authorizer and deletes the old one once the update
commits; a replacement that keeps an explicit name is refused. Delete
deactivates the authorizer first and tolerates one already gone.

Closes #4822

* chore(cloudformation): move the IoT authorizer snapshot constant

It sat at the same insertion point as other pull requests' snapshot constants, so they could not be merged together.

* fix(cloudformation): treat only an empty intrinsic result as AWS::NoValue for IoT authorizers

* fix(cloudformation): undo an IoT authorizer update whose tag reconcile fails

* fix(cloudformation): report a SigningDisabled change on an IoT authorizer as a replacement

* fix(cloudformation): create an IoT authorizer over a dispatcher stub and refuse declaring its generated name

* fix(cloudformation): refuse an IoT authorizer boolean that is neither true nor false

* fix(cloudformation): never delete a dispatcher stub's id in replacement cleanup

* fix(cloudformation): tell a stub from a migrated resource and roll back a stub migration that kept its id

* fix(cloudformation): name an unnamed IoT authorizer <LogicalId>_<12 chars> as CloudFormation does
2026-10-05 14:37:54 -04:00
Allen Sanborn e7ca2ece22 feat(dms): add endpoint, replication instance and replication task lifecycles (#5001)
* feat(dms): add endpoint, replication instance and replication task lifecycles

DMS dispatched only replication subnet groups and tagging, so CreateEndpoint,
CreateReplicationInstance, CreateReplicationTask and their siblings answered
UnknownOperationException and no aws_dms_endpoint, aws_dms_s3_endpoint,
aws_dms_replication_instance or aws_dms_replication_task could be applied.

Adds Create/Describe/Modify/Delete for endpoints, replication instances and
replication tasks, plus Start/StopReplicationTask, which the provider calls for
start_replication_task and before modifying or deleting a running task.

- Resources are ARN-addressed (endpoint:, rep:, task:) with a 26-character
  generated id or the caller's ResourceIdentifier, and tagged through the
  existing tagging operations.
- Instances are available and tasks ready from creation, the states the
  provider's waiters target; describe filters follow the API reference and a
  filter that matches nothing is ResourceNotFoundFault.
- Endpoint settings structures round-trip, minus every SecretString member;
  ModifyEndpoint merges them unless ExactSettings is true.
- Deleting an endpoint or instance a task uses, a subnet group an instance
  uses, or a running task is InvalidResourceStateFault.

The unsupported-operation test now uses CreateReplicationConfig, which is still
unimplemented.

* style(dms): order DmsService imports alphabetically

* docs(dms): list CdcStartTime and the missing describe actions as unimplemented

* test(dms): cover tag add and remove on endpoint, instance and task ARNs

* fix(dms): runtime-init DmsService, resolve the default subnet group, reject reversed task endpoints

- Register DmsService under --initialize-at-run-time: its static SecureRandom
  otherwise lands in the native image heap (guard test and native builds).
- Store only the three members KerberosAuthenticationSettings models instead of
  a deep copy of whatever the caller sent.
- An instance created without a subnet group now describes the "default" group
  in full (VPC, subnets, status) from the region's default-VPC subnets.
- CreateReplicationTask rejects a source ARN that is not a SOURCE endpoint and a
  target ARN that is not a TARGET endpoint.

* fix(dms): name the swallowed default-subnet exception, sync the DMS matrix count

The default-subnet fallback deliberately swallows AwsException; name it
`ignored` and say why that is safe, per AGENTS.md.

docs/services/index.md listed DMS at 6 operations; the handler dispatches 20.

Add the reverse of the reversed-endpoints test: a source endpoint passed as
TargetEndpointArn, which is the only test reaching the TARGET type check.
2026-10-05 14:14:15 -04:00
vamsiakandVamsi Akavarapu d508a4e197 fix(apigateway): return embedded resource methods (#5109)
* fix(apigateway): return embedded resource methods

* fix(apigateway): guard method maps during concurrent reads

---------

Co-authored-by: Vamsi Akavarapu <16164447+vamsiak@users.noreply.github.com>
2026-10-05 11:44:40 -04:00
Vũ Thế Huy 840d1bb6c1 fix(sqs): set SenderId from caller principal instead of queue owner (#5066)
* feat(sqs): thread accessKeyId through RequestContext and AccountContextFilter

* fix(iam): resolve caller user id and align assumed role id with role id

* feat(sqs): stamp senderId on Message model and in SqsService

* feat(sqs): return message-specific senderId in SQS query and JSON handlers

* test(sqs): add integration tests for SenderId caller principal (#4829)

* fix(sqs): guard against unsatisfied CDI instance in resolveCurrentSenderId

* fix(sqs): address review findings and fix CI for caller principal SenderId

- Catch RuntimeException in SqsService to prevent compiler incompatibility
- Fallback SenderId to queue owner account when outside request context
- Deliver SNS fanout messages with SNS service principal SenderId
- Support presigned requests without X-Amz-Algorithm in AccountContextFilter
- Populate assumedRoleId and roleSessionName for ECS, EKS and Lambda sessions

* fix(sqs): validate session token for temporary credentials and fix CI regressions

- Validate session token matching when resolving caller principal for temporary credentials
- Generate unique session names for EKS Pod Identity to avoid sender ID collision
- Restore default floci-session session name for Lambda execution role sessions
- Align SqsService mock in SnsServiceTest with 9-parameter sendMessage signature

* fix(sts,lambda): pass sessionToken to resolveCallerUserId and scope Lambda assumed role IDs

* fix(lambda): align execution role session name and assumed role ID with function name

* fix(sqs): resolve SenderId caller in SQS handlers, not in sendMessage

Internal producers (S3 notifications, EventBridge, SNS) call sendMessage
on the thread of the request that triggered them, so SenderId picked up
that caller's role session. Resolve the caller in the SQS Query/JSON
handlers where a real SendMessage call is known, and pass it down.
sendMessage without an explicit senderId now defaults to the queue owner.
2026-10-05 11:36:34 -04:00
TATSUNO “Taz” Yasuhiro a1ed65c51d feat(lambda): durable function callbacks (#5100)
* feat(lambda): durable function callbacks

A CALLBACK operation started at checkpoint gets a callback id that
SendDurableExecutionCallbackSuccess, Failure and Heartbeat complete or
keep alive, after which the function is invoked again to see it.
TimeoutSeconds and HeartbeatTimeoutSeconds time it out with
Callback.Timeout or Callback.Heartbeat. A completed, timed out or
stopped callback answers CallbackTimeoutException, an unreadable id
"Invalid callback id". The callback id carries the execution ARN, which
IAM authorizes the callback actions against.

Option range errors now name the update, as AWS does
("updates.1.member.waitOptions.waitSeconds").

* fix(lambda): name a repeated durable update as AWS does

AWS rejects two updates of one operation in a batch, other than a START
closed by its STEP or CONTEXT action, with "Cannot update the same
operation twice in a single request."

* fix(lambda): leave a durable execution waiting after a body-less callback failure

AWS marks a callback failed with an empty request body as FAILED but does
not invoke the function again, so the execution keeps waiting. The SDKs
send {} when Error is omitted, which does invoke it.

* fix(lambda): bound a durable callback failure's error at 1 MB

AWS rejects an Error over 1048576 bytes, measured as compact JSON, with
InvalidParameterValueException "Error object size must be less than or
equal to 1048576 bytes."

* test(lambda): keep a pending durable callback across a restart

* fix(lambda): reject a durable callback failure body that is not a JSON object

AWS treats only an empty body as a failure with no Error. Whitespace,
null or broken JSON get 400 SerializationException and leave the
callback open.

* docs(lambda): note the durable callback result limit AWS enforces
2026-10-05 10:27:50 -04:00
Kenshin Okinaka 1d44b5fc7c feat(ses): add UpdateConfigurationSet and MessageSecurityOptions (#5092)
The SES v2 model release of 2026-09-01 (botocore 1.43.86) added
UpdateConfigurationSet, a partial update whose only member is
MessageSecurityOptions, the S/MIME signing scheme of a configuration
set. CreateConfigurationSet accepts the same member and
GetConfigurationSet returns it.

Floci stores and returns the setting but never signs a message. Where
the API reference is silent, the request handling follows what SES
answered in us-west-2: an absent SigningScheme leaves the stored value
alone, an empty one resets it to DefaultScheme, both union members
store SmimeScheme, and a missing SignatureFormat stores DETACHED.
2026-10-05 01:06:59 -04:00
Priamo Germosen d97b21ae62 fix(s3): copy objects over 2 GiB without reading them into memory (#5080)
CopyObject read the whole source into a byte array with getObject and
wrote it back out for the copy, so a source of 2 GiB or more failed as an
internal error, even though S3 copies objects up to 5 GiB in one call.

In the disk-backed modes the source is now pinned with a temporary hard
link to the file generation its metadata describes, taken through the
same optimistic snapshot GetObject uses, and that link is moved into
place as the copy's file. The copy's ETag and checksum are prepared
before any bucket monitor is taken, and the pinned file is read, once and
streamed, only for what cannot carry over: a single-part source's ETag is
the MD5 of its bytes and is kept, while a multipart source needs the MD5
computed, and a requested or composite checksum becomes a full-object one
through a new incremental S3Checksum.Calculator. A failed copy removes its
pinned link. Memory mode still copies the byte array.

As on S3, a CopyObject source larger than 5 GiB (5368709120 bytes) is now
rejected with InvalidRequest, "The specified copy source is larger than
the maximum allowable size for a copy source: 5368709120"; such an object
is copied with UploadPartCopy.
2026-10-04 21:25:51 -05:00
Abhigya 1320995d70 fix(apigatewayv2): evaluate HTTP and WebSocket authorizer policies (#5020)
* fix(apigateway): evaluate Lambda authorizer policies with one evaluator

HTTP API (payload 1.0 and 2.0) and WebSocket $connect authorizers now
evaluate every policy statement against the execute-api ARN, instead of
reading only the first statement's Effect.

REST, HTTP and WebSocket APIs share AuthorizerPolicyEvaluator: one
validator and one set of condition keys (aws:SourceIp from the transport
address, aws:SecureTransport, aws:CurrentTime). IAM CIDR conditions now
match IPv6 ranges.

* fix(apigateway): reject malformed authorizer policy conditions

A Condition operator IAM does not know, an operator without keys, or a key
without values evaluated as a non-match or an unconditional match, so a
malformed Deny could be skipped and a malformed Allow could grant access.
Validate each operator and its values and return 500 instead. Numeric and
boolean condition values are now compared rather than dropped.

* fix(iam): leave scalar condition values to #5086

The numeric and boolean condition-value parsing moves to its own pull
request, together with the numeric and date comparison fixes it needs.

* docs: update the IAM operation count in the Service Matrix
2026-10-04 20:59:04 -05:00
Simone Primarosa b2e3870c06 feat(logs): deliver log events through subscription filters (#5021) 2026-10-04 20:43:00 -05:00
iam-ssrivastav 8ea033d9fd feat(cognito): implement DeleteUser self-service API action (#4493) 2026-10-04 20:09:58 -04:00
TATSUNO “Taz” Yasuhiro 6a3bc12769 feat(lambda): run durable functions with checkpoints, waits and step retries (#5047)
* feat(lambda): run durable functions with checkpoints, waits and step retries

Invoking a durable function starts a durable execution, through Invoke or through an ARN (EventBridge, Scheduler, function URLs, destinations). The function checkpoints through CheckpointDurableExecution and GetDurableExecutionState, and Floci re-invokes it when a wait or a step retry comes due. GetDurableExecution, GetDurableExecutionHistory, ListDurableExecutionsByFunction and StopDurableExecution read and stop executions. Timers are persisted deadlines fired by a background sweep, so an execution survives a restart. Callbacks and chained invokes are rejected at checkpoint time.

* fix(iam): authorize durable execution actions against the owning function

A durable execution route has no /functions/ segment, so its resource fell back to *. The function name now comes from the execution ARN in the path.

* fix(lambda): keep durable executions inside their account

The execution APIs took the account from the ARN in the path, so another account could read or stop an execution. An ARN of another account is now ResourceNotFoundException.

* fix(lambda): limit the error size of an EXECUTION checkpoint too

* fix(lambda): reject an EXECUTION close that carries the other result kind

AWS rejects SUCCEED with an Error and FAIL with a Payload on the EXECUTION operation, as it does for steps.

* fix(lambda): spend a durable wake-up when a failed invocation schedules its retry

* fix(lambda): keep a durable crash retry's backoff across a restart

* fix(lambda): bound the durable execution locks

A lock per execution ARN was kept forever, even for an ARN that did not exist. A fixed set of striped locks replaces it. Locks are never nested, so a shared stripe cannot deadlock.

* fix(lambda): accept PAUSED, PAUSING and DELETING as durable status filters

AWS accepts them and answers an empty list, since Floci never puts an execution in those states.

* fix(lambda): reject a non-finite durable list timestamp

* test(lambda): resume a durable execution from its JSON file after a restart

* fix(lambda): keep durable executions inside their region

An execution ARN of another region now answers ResourceNotFoundException "Function not found", as AWS does, instead of reaching the execution past the IAM check of the request region.

* fix(lambda): validate durable list parameters before an empty status filter answers

Statuses of only PAUSED, PAUSING or DELETING still checks MaxItems and Marker, as AWS does. The bad Marker message is "Invalid Marker".

* perf(lambda): skip the execution scan for a status filter that matches nothing

Statuses of only PAUSED, PAUSING or DELETING now checks MaxItems and Marker without listing the account's executions.

* test(lambda): drop durable tests that repeat other coverage

The in-memory restart test repeats the persistence test, and the Docker success case repeats the compat suite's checkpoint loop. The Docker test keeps the failure case.

* fix(lambda): re-attach a durable execution name only on the same version

AWS keeps execution names unique per function across versions. A sync Invoke of another version with the same name and payload is DurableExecutionAlreadyStartedException, not the existing execution.

* chore(lambda): simplify the durable execution engine

Drop stored fields nothing reads, share the unseen-operations and
page-cursor helpers, skip the name scan for a generated name, and save
an execution once per invocation instead of twice.

* fix(lambda): reject a non-integer durable MaxItems as AWS does

AWS answers MaxItems=x on the durable execution APIs with
SerializationException "'x' can not be converted to Integer".

* docs(lambda): list the durable execution size limits as not emulated

* fix(iam): authorize durable execution actions against the execution ARN

The durable execution actions take the durable execution resource,
function:name:version/durable-execution/name/id. A role allowed on
function:name:* may checkpoint, one allowed only on the unqualified
function ARN is denied.

* fix(lambda): answer an unknown durable execution on checkpoint as a bad token

CheckpointDurableExecution and GetDurableExecutionState do not model
ResourceNotFoundException. AWS answers InvalidParameterValueException:
"Checkpoint token is not valid for the durable execution ARN" for a
token minted for another execution, "Invalid checkpoint token" otherwise.

* fix(lambda): replay a durable checkpoint retried with the same ClientToken

AWS answers a retry of the last checkpoint with the same ClientToken
with the same state and a usable next token, even though the request
token is spent. A different ClientToken, a retry after the next
checkpoint, or a retry of the checkpoint that closed the execution is
still an invalid checkpoint token.

* fix(lambda): validate durable list filters as AWS does

ListDurableExecutionsByFunction takes one status at most and answers
more with InvalidParameterValueException "Cannot filter by more than one
status". An unreadable StartedAfter or StartedBefore is
SerializationException "'<value>' can not be converted to Date", and a
plain date is accepted. Type errors come first, then MaxItems and status
values, then the single-status rule, then the function lookup.

* docs(lambda): note the history IncludeExecutionData default

* fix(lambda): report durable MaxItems and Statuses errors as AWS does

AWS puts an invalid MaxItems and an invalid Statuses into one
ValidationException ("2 validation errors detected: ...; ..."), MaxItems
first. A negative MaxItems must be greater than or equal to 0. MaxItems
is checked before the execution or function is looked up.

* refactor(lambda): share one durable execution ARN pattern with IAM

IAM and the durable execution service now recognize an execution ARN
with the same pattern, the one AWS validates it with.

* fix(lambda): replay a durable checkpoint answer as it was sent

On AWS a retry with the same ClientToken returns the operations as the
first answer had them: a WAIT stays STARTED in the retry even after it
has elapsed, while a fresh checkpoint reports it SUCCEEDED.
2026-10-04 20:08:39 -04:00
Simone Primarosa 383c32443d feat(eks): apply nodegroup labels, taints and capacity type to the node (#5063)
* feat(eks): apply nodegroup labels, taints and capacity type to the node

* fix(eks): address review feedback on nodegroup metadata injection

* fix(docs): sync IAM operation count in service matrix

* fix(eks): use single string literals without concatenation in log messages

* chore(eks): resolve phantom nodegroup review finding

* docs(eks): document CAPACITY_BLOCK capacity type for nodegroups
2026-10-04 18:29:03 -04:00
Matheus Oliveira c6304a26c8 feat(cloudformation): provision AWS::Transfer::User (#5076)
* feat(cloudformation): provision AWS::Transfer::User

Adds the user type to TransferCfnProvisioner with in-place update and replacement.

* Fix #4655

Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>

* docs: count the IAM SSH public key operations in the service matrix

Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>

---------

Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>
2026-10-04 18:19:43 -04:00
Vũ Thế Huy 108f2b54bf feat(eventbridge): add ApiDestination target support (#4702) (#5009)
* feat(eventbridge): add ApiDestination target support (#4702)

- Add ApiDestination, ApiDestinationState, and HttpParameters models

- Implement CRUD operations for API destinations in EventBridgeService

- Add CreateApiDestination, DescribeApiDestination, UpdateApiDestination, DeleteApiDestination, ListApiDestinations actions in EventBridgeHandler

- Support HttpParameters on targets in PutTargets and ListTargetsByRule

- Implement HTTP delivery to API destinations in EventBridgeInvoker with connection auth and SSRF protection

- Add CloudFormation provisioning for AWS::Events::ApiDestination in EventsCfnProvisioner

- Update docs and tests

* fix(eventbridge): harden ApiDestination delivery and CloudFormation lifecycle

- Throw on delivery failure so TargetDispatcher retries 429/5xx and connection
  errors and dead-letters permanent failures
- Enforce InvocationRateLimitPerSecond per destination
- Run the OAuth client-credentials exchange for OAUTH_CLIENT_CREDENTIALS connections
- Reject non-http(s) endpoints and wildcard hosts, encode path parameter values,
  keep the query before any fragment, and stop logging URLs that may carry secrets
- Resolve destination and connection ARNs only when they match the stored ARN
- Validate every UpdateApiDestination field before applying any of them
- Paginate ListApiDestinations with Limit and NextToken
- Keep HttpParameters on AWS::Events::Rule targets and roll back
  AWS::Events::ApiDestination updates from a snapshot

* fix(eventbridge): keep connection credentials authoritative and require a valid endpoint host

- Apply target headers and query parameters before the connection's so a target
  cannot override its credentials, and replace header names that differ only by case
- Reject endpoints without a parsed host (for example https://:8080/path)
- Sweep stale rate-limit windows once the map grows

* fix(eventbridge): make the ApiDestination rate limit check atomic

Count permits inside ConcurrentHashMap.compute on an immutable window so the
stale-window sweep can no longer remove a window another delivery is using,
which let concurrent deliveries exceed InvocationRateLimitPerSecond.

* refactor(eventbridge): drop the in-service InMemoryStorage constructor and tidy tests

- Remove the compatibility constructor that instantiated InMemoryStorage inside
  EventBridgeService; tests pass the ApiDestination store explicitly
- Import classes instead of qualifying them inline in the ApiDestination integration test
- Surface worker failures in the concurrent rate limit test by checking each Future

* docs: correct the EventBridge and IAM operation counts in the service matrix
2026-10-04 18:03:31 -04:00
Mario Toffia fabcd6baf8 feat(iot): manage custom authorizers (#4826)
* test(iot): cover custom authorizer management against AWS

* feat(iot): manage custom authorizers

Serve CreateAuthorizer, DescribeAuthorizer, UpdateAuthorizer,
DeleteAuthorizer, ListAuthorizers, SetDefaultAuthorizer,
DescribeDefaultAuthorizer and ClearDefaultAuthorizer on the AWS REST-JSON
paths, with the validation, messages, defaults, key merge, delete rules,
ordering and paging measured against AWS. Authorizer ARNs are tagged
through the existing IoT tag routes. Authorizers are stored, not evaluated.

Closes #4821

* fix(iot): read authorizer public key PEM line by line like AWS

A key without its PEM header line, or with an indented or inline header, is not a valid RSA key, a header without its end line cannot convert, and text before the header is skipped, as measured on AWS.

* fix(iot): validate authorizer names like AWS, SetDefaultAuthorizer included

A name member reports every violated constraint in one message, the pattern first, and a missing one must not be null. SetDefaultAuthorizer validates authorizerName before the lookup, as measured on AWS.

* fix(iot): validate the authorizer name on describe, update and delete like AWS

DescribeAuthorizer, UpdateAuthorizer and DeleteAuthorizer now reject a malformed or overlong authorizerName path member with AWS's 400 InvalidRequestException messages instead of a 404, measured on eu-west-1.

* fix(iot): route tag calls to the authorizer service on the ARN resource

IotTagHandler matched ":authorizer/" anywhere in the ARN, so an ARN with that text outside the resource field reached the authorizer service and failed with a 500. It now routes on the parsed resource prefix, and any other IoT ARN goes through IotService as before.
2026-10-04 17:20:12 -04:00
Mario Toffia 2749cd6fcd feat(cognito): provision user group attachments (#4806)
* feat(cognito): provision user group attachments

Serve AWS::Cognito::UserPoolUserToGroupAttachment through a new per-service
provisioner. Ref is <UserPoolId>|<GroupName>|<Username>, as measured on AWS.
Every property is createOnly, so a change replaces the membership and the old
one is removed in cleanup; delete tolerates a membership that is already gone.

* test(cognito): read stack outputs with XmlPath

* fix(cognito): attach users to groups from their recorded parts, as AWS does

* test(cognito): cover pipe group names and alias updates, delete seeded pools

* fix(cognito): remove an unrecorded attachment named unambiguously by its id

* test(cognito): pin that a failed rollback keeps the replacement's recorded parts

* fix(docker): finish a failed tar copy's writer before retrying

* test(docker): wait for each attempt's tar writer instead of racing it

Restores RetryingTarCopier.copyStreamed to its state on main: joining a failed attempt's writer could block on a writer stalled outside the pipe.

* docs(cloudformation): note the no-op delete of a short membership id

The class Javadoc said an unrecorded id that does not split into exactly three parts is refused. An id of fewer parts names no membership and its delete does nothing; only more parts is refused.

* fix(cloudformation): keep __Floci attributes out of Fn::GetAtt

Provisioners keep private state under __Floci attribute keys. Fn::GetAtt and Fn::Sub resolved them like any attribute, so a template could read, for example, an attachment's recorded pool, group and username, while AWS resolves no such attribute. They now resolve as unresolved, like any attribute a type does not have.

* docs(cloudformation): note that custom resource Data keys under __Floci are reserved
2026-10-04 17:00:35 -04:00
Vũ Thế Huy 99a6b4050c feat(redshift-serverless): add running workgroups and Data API WorkgroupName support (#5012)
* feat(redshift-serverless): add running workgroups and Data API WorkgroupName support

Redshift Serverless workgroups get full CRUD (Create/Get/List/Update/Delete),
tagging by ARN, and the AWS::RedshiftServerless::Namespace and ::Workgroup
CloudFormation types with dotted Fn::GetAtt keys taken from the registry
schema. A namespace has at most one workgroup, and DeleteNamespace is refused
while one is attached.

Each workgroup runs a PostgreSQL container behind an authenticating proxy,
sharing the managers and the proxy port pool with provisioned Redshift. Add
GetCredentials, accept WorkgroupName (name or ARN) in the Redshift Data API,
and push a changed namespace adminUserPassword down to the running backend.
The runtime is re-attached when Floci restarts.

Not covered: snapshots, usage limits, endpoint access, and COPY/UNLOAD/Spectrum
on workgroups.

* fix(redshift-serverless): stop the runtime when workgroup creation fails after it started

If persisting the workgroup record failed after the container and proxy were
already running, the runtime was left behind with no record. createWorkgroup
now stops it (best effort) and releases the endpoint on the failure path.

Fix the CloudFormation error for a NamespaceName change: suggesting a new
WorkgroupName can never succeed because a namespace holds only one workgroup.

* fix(redshift-serverless): reset omitted CloudFormation properties and order startup observers

When UpdateStack drops a property from the template, the provisioner now sends
its default (BaseCapacity, EnhancedVpcRouting, PubliclyAccessible, Port,
TrackName, PricePerformanceTarget) instead of keeping the stored value, which
matches CloudFormation semantics. MaxCapacity has no default and keeps its
stored value.

Give the workgroup StartupEvent observer a @Priority after RedshiftService so
every persisted cluster has reserved its proxy port before workgroups restore
theirs.

Also remove an unused import and move DEFAULT_DATABASE to the top of
RedshiftContainerManager.

* fix(redshift-serverless): address review findings on password rotation and namespace updates

- Roll the backend password back when a rotation cannot be completed or stored, and apply
  it last so validation failures never leave the backend ahead of the stored namespace.
- Keep a workgroup endpoint reserved when its runtime cannot be stopped during clear().
- Reject an in-place DbName change in CloudFormation, since it is fixed at creation.
- Reset an omitted KmsKeyId and DefaultIamRoleArn on CloudFormation updates.

* fix(redshift-serverless): keep rollback failures from masking errors and drop stale GetAtt role

- Do not reset the proxy password when the role restore fails, and attach restore
  failures to the original exception instead of replacing it.
- Remove Namespace.DefaultIamRoleArn from the stack resource when an update no
  longer declares a default role.

* docs: correct the Redshift Serverless operation count in the service matrix

* fix(redshift-serverless): expose Workgroup.ConfigParameters through Fn::GetAtt

* fix(redshift-serverless): parse ConfigParameters resolved from a GetAtt attribute

* docs(redshift-serverless): list every unsupported operation group
2026-10-04 15:34:24 -04:00
Matheus Oliveira a84a8a0435 fix(iam): resolve server certificate references in ELB and CloudFront (#5075)
Resolve certificate ids on the way in and refuse deleting one in use.

* Fix #4875

Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>
2026-10-04 15:29:11 -04:00
Mario Toffia 66f04cde25 feat(eventbridge): provision AWS::Events::Archive (#4818)
* fix(eventbridge): make UpdateArchive a partial update

UpdateArchive reset the event pattern to null and the retention to 0
whenever a request omitted them. On AWS an omitted Description,
EventPattern or RetentionDays keeps the stored value, an empty
Description or EventPattern clears it, and RetentionDays 0 sets 0.

* feat(eventbridge): provision AWS::Events::Archive

CloudFormation stubbed AWS::Events::Archive with a fake ARN and created
nothing. EventsArchiveCfnProvisioner now creates a real archive through
EventBridgeService.

Ref is the archive name and Fn::GetAtt Arn the archive ARN. ArchiveName
is generated when omitted and kept across updates. Description,
EventPattern and RetentionDays update in place, sending only the
properties the template declares, and a failed stack update restores
them from a snapshot. Changing SourceArn or ArchiveName, or dropping an
explicit name, replaces the archive and deletes the displaced one once
the update commits. A replacement that keeps an explicit name is refused
with CloudFormation's custom-named resource error before any change.
KmsKeyIdentifier is ignored.

Closes #4815

* fix(eventbridge): reject an archive source that is not an existing bus of the account and region

CreateArchive now checks EventSourceArn as AWS does, before the archive
name: a bus in another account fails with AccessDeniedException, one in
another region with ValidationException, and a bus that does not exist
with ResourceNotFoundException. The AWS::Events::Archive provisioner goes
through the same service call, so a stack can no longer reach
CREATE_COMPLETE with an archive that could never capture an event.

* test(eventbridge): roll back an in-place archive update when a later resource fails

A stack update changes an archive's description and retention in place,
then fails on a second archive whose source bus does not exist. The stack
ends UPDATE_ROLLBACK_COMPLETE, DescribeArchive shows the original values
and the second archive was never created. The golden case passes on AWS
and is mirrored in the Floci integration test.

* fix(cloudformation): refuse declaring a generated archive name explicitly

Adding ArchiveName with the name CloudFormation generated for an unnamed
archive asks AWS to replace the archive under the same custom name, which
it refuses with the custom-named resource error and rolls the stack back.
Floci took the in-place path and reached UPDATE_COMPLETE; the existing
refusal now also fires when the previous name was generated.

* fix(cloudformation): provision a real archive when updating a stack whose archive was stubbed

A stack created before AWS::Events::Archive had a provisioner holds the dispatcher's stub, whose physical id names no archive. Its next update now creates the archive instead of failing to describe that id, and the stub id is left to the replacement cleanup.

* fix(eventbridge): validate archive description, pattern and retention as CreateArchive and UpdateArchive do

CreateArchive and UpdateArchive now reject a description over 512 characters, an event pattern over 4096 characters and a negative retention with the ValidationException AWS returns, all violations reported together. The check runs before the source, existence and duplicate checks, so it also fails the AWS::Events::Archive resource in a stack.
2026-10-04 13:39:49 -04:00
Simone Primarosa dc3e9cacec feat(eks): stop shipping a default storage class in clusters (#5061)
* feat(eks): stop shipping a default storage class in clusters

* test(eks): verify coredns rollout status and preserve cluster storage on restore

* test(eks): assert storage class absence after coredns rollout completes

* docs(eks): clarify stock storage class and provisioner behavior
2026-10-04 13:36:41 -04:00
Matheus Oliveira 30be71c56e fix(ecs): run ECS Exec sessions as root like the real agent (#5074)
The exec ignored the container's user; it now always runs as uid 0.

* Fix #4850

Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>
2026-10-04 13:29:09 -04:00
Matheus Oliveira 665603e8f4 feat(ram): add ListResourceSharePermissions (#5073)
Returns the default AWS managed permission per resource type in a share.

* Fix #4883

Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>
2026-10-04 12:19:41 -04:00
Priamo Germosen d8728ac4d4 fix(s3): promote a version on delete without reading its body (#5064)
Deleting the current version in a versioned bucket made the previous
version current by reading its whole file into a byte array and writing
it out again as the current file, under the bucket lock. A version over
2 GiB could not be read that way, and because the new current version's
metadata was published before the file, the failure left the key pointing
at the promoted version while its current file still held the deleted
version's bytes.

The current file is now a hard link to the promoted version's file, the
way a versioned multipart upload already stores its current file, so a
version of any size is promoted without being read; in memory both
entries share the version's array, as they already did. The body is also
put in place before the metadata is published, the order PutObject
writes in, so a concurrent GET can no longer pair the promoted version
with the deleted version's bytes.
2026-10-04 10:37:49 -05:00
Priamo Germosen fe296fda69 feat(iam): model SSH public keys (#5051)
UploadSSHPublicKey, GetSSHPublicKey, ListSSHPublicKeys, UpdateSSHPublicKey
and DeleteSSHPublicKey, stored per user with the documented quota of five.

AWS accepts the body in ssh-rsa form or as PEM, so both are read, and the
body is kept exactly as it arrived: a caller that uploaded PEM gets that PEM
back rather than a re-encoding. GetSSHPublicKey converts, because Encoding is
required and decides the form of the response.

Fingerprint is the MD5 of the OpenSSH blob, confirmed by reproducing the
worked example in the IAM API Reference rather than assumed. It is not the
digest EC2 reports for the same key, which is taken over the DER: both are
sixteen bytes of colon hex, so the wrong one would look right.

The two rejection errors are kept apart the way the model separates them. A
body in neither accepted encoding is UnrecognizedPublicKeyEncoding; one in a
recognised encoding that will not parse, or that carries a key type other
than ssh-rsa, is InvalidPublicKey. An OpenSSH line is recognised by its
key-type token rather than by whether part of it base64-decodes, since a
short word often does.

DuplicateSSHPublicKey is per user, unlike the account-wide rule for signing
certificates, and compares fingerprints so the same key in the other
encoding still counts. A key blocks DeleteUser until removed and follows the
user across an UpdateUser rename, both under a lock taken in the same order
DeleteUser takes it.
2026-10-04 10:37:38 -05:00
David 82977a7f03 feat(emr): resize instance groups and fleets, list bootstrap actions (#4900) 2026-10-04 09:52:41 -04:00
Aymen JAMAAOUI 2c544fdb9f feat(cloudformation): provision AWS::ApiGatewayV2::VpcLink (#5008)
* feat(apigatewayv2): implement UpdateVpcLink and VPC link tagging

* feat(cloudformation): provision AWS::ApiGatewayV2::VpcLink

* fix(cloudformation): keep VPC link and integration connection state on updates

* fix(cloudformation): restore the integration connection when its own update fails
2026-10-04 09:09:18 -04:00
Kenshin Okinaka db40361a3c feat(ses): apply the ListTenants filter (#5060)
ListTenants now honours Filter.TENANT_NAME_CONTAINS and Filter.SENDING_STATUS
the way SES v2 matches them, with the validation messages and precedence SES
answers: the filter's keys and values, then the page size and an empty token,
then the filter's values. The filter is applied before the page is cut, and a
token continues only the filter it was taken with.
2026-10-04 08:42:33 -04:00
Aswin A 4d980a361f fix(docs): prevent stale service action counts (#5018)
* fix(docs): prevent stale service action counts

* test(docs): validate composite service action counts

* fix(docs): clarify action count validation coverage

* fix(docs): derive shared tagging route counts

* fix(docs): align service action counts
2026-10-04 08:18:53 -04:00
Abhigya 3f591f853d fix(apigateway): share REST request context and complete mappings (#5035)
* fix(apigateway): share REST request context and complete parameter mappings

* fix(apigateway): resolve wildcard request body mappings

* fix(apigateway): distinguish scalar and multi-value mapping sources
2026-10-04 06:02:49 -04:00
Priamo Germosen d400ea6b7e fix(s3): read only the copied range in UploadPartCopy, with offsets past 2 GiB (#5034)
UploadPartCopy loaded the whole source object into a byte array and parsed
x-amz-copy-source-range with Integer.parseInt, so a source of 2 GiB or
more, or any range offset past 2 GiB, failed as an internal error. A range
that ran past the end of the source was silently padded with zero bytes.

The source is now opened as a stream, the way GetObject serves it, and
only the requested range is read, with offsets parsed as longs. A bad
range gets the error S3 returns, as recorded in LocalStack's AWS-validated
snapshot for UploadPartCopy: anything but one bytes=first-last range with
first <= last is InvalidArgument naming the expected form, a range that
ends past the source is InvalidArgument naming its size, and one that
starts past it is InvalidRequest; the InvalidArgument errors carry
ArgumentName and ArgumentValue. A copied part is still held in a byte
array on its way into the upload, so a range over that limit returns
EntityTooLarge until UploadPart can store a part without one.
2026-10-03 22:56:00 -05:00
Hector Ventura 546b5cef64 fix(marketplace): serve Entitlement and Agreement in every region AWS publishes (#5028)
* fix(marketplace): serve Entitlement and Agreement in every region AWS publishes

GetEntitlements and the Marketplace Agreement API refused every region but
us-east-1, on the assumption that AWS Marketplace is commercial-only. AWS
publishes more endpoints than that: Entitlement also runs in cn-northwest-1
and eusc-de-east-1, and Agreement in us-iso-east-1, us-isob-east-1,
us-isof-south-1 and eusc-de-east-1 (botocore endpoints.json). Both now accept
exactly those regions and keep refusing the rest with AWS's message and error
code, so cn-north-1, which has neither endpoint, is still rejected.

* fix(marketplace): name the served regions in the Entitlement and Agreement refusals

Both refusals still said "available only in us-east-1" after the region sets
grew, so a caller in an unserved ISO, EUSC or China region was pointed at a
commercial region it cannot reach. Each message now lists the regions its
API serves, as Marketplace Discovery's already does. No reference source
carries AWS's text for these refusals, so the comment no longer calls it
AWS's.
2026-10-03 22:04:03 -04:00
Abhigya ae3adfe992 fix(apigateway): validate and cache REST Lambda authorizers (#5002)
* fix: evaluate and cache REST Lambda authorizer policies

* fix: share REST request context and complete parameter mappings

* fix: prevent stale REST authorizer caching after stage flush

* fix: use valid authorizer policies in REST import tests

* chore: align API Gateway imports with repository style

* fix(apigateway): isolate authorizer contracts and validate cached identities

* chore(apigateway): align restored context code with style guide

* chore: order API Gateway SDK test imports
2026-10-03 21:54:36 -04:00
Hector Ventura 6568700e02 test(partition): positive China Lambda layer test, partitions.md gaps, drop AwsRegions.ALL (#5023)
Close-out items of the multi-partition initiative (#4272):

- Lambda layers were only tested across partitions negatively. A layer
  published under a cn-north-1 scope now has its own test: the returned ARN
  is arn:aws-cn:lambda:cn-north-1:..., GetLayerVersionByArn resolves it, and
  a China function attaches it (BL-104).
- partitions.md names FLOCI_PARTITIONS_ALLOW_UNKNOWN_REGIONS under Related and
  lists two more unsourced values: the EKS Pod Identity token audience
  outside the commercial partition, and the exact error AWS WAF returns for
  the CLOUDFRONT scope where the partition has no CloudFront (BL-105).
- AwsRegions.ALL, the commercial advertised list kept as a deprecated alias
  during the partition sweep, had no caller left in src/main. It is removed
  and its three tests call advertised("aws"); the KNOWN_IDS javadoc no longer
  points at it (BL-106).
2026-10-03 21:43:28 -04:00
Robin BaeckmanandRobin Baeckman 7822b2c396 fix(eks): resolve the token webhook's access keys from any account (#5003)
The EKS token webhook looked long-term keys up through findSecretKey,
which is account-scoped. k3s calls the webhook with no account routing,
so it saw only the default account's keys. A correctly signed
`aws eks get-token` from a user in any other account was rejected:
kubectl reported "the server has asked for the client to provide
credentials".

The webhook now uses a new IamService.findSecretKeyInAnyAccount. It
tries the request's account first and scans the other accounts only on
a miss. Inactive keys are still refused, and temporary (ASIA) keys never
reach the scan. findSecretKey itself stays account-scoped: the
ElastiCache, MemoryDB and RDS IAM-auth proxies verify through it and do
not compare the key's account with the cluster's.

Because a long-term key can now reach the webhook from any account, the
legacy identity (system:masters) is limited to long-term keys owned by the
cluster's account, or by the default account on unscoped webhook paths
that predate per-account clusters. This also tightens one existing case:
a default-account key used to get system:masters on clusters of every
account, and now gets it only on the default account's clusters.

Session credentials without an instance ID still map to the legacy
identity on any cluster; that predates this change and is left alone.

Co-authored-by: Robin Baeckman <27041454+RobinBaeckman@users.noreply.github.com>
2026-10-03 15:55:34 -05:00
Priamo Germosen 290f952cb1 feat(iam): model signing certificates (#5024)
UploadSigningCertificate, ListSigningCertificates, UpdateSigningCertificate
and DeleteSigningCertificate, stored per user with the documented quota of
two and account-wide duplicate detection compared on the encoded form.

The body is parsed on upload, because MalformedCertificate cannot be
answered without reading it. Status accepts Active, Inactive and Expired:
the API Reference gives all three as valid values even though the
parameter's prose explains only the first two. UserName is optional on
every operation and resolves from the access key that signed the request.

A certificate blocks DeleteUser until it is removed, which AWS lists as a
prerequisite, and follows the user across an UpdateUser rename rather than
being stranded on a name that no longer exists. The credential report's
cert_1 and cert_2 columns are backed by the store instead of always
reporting FALSE, reporting N/A for the rotation date unless the
certificate is Active, as the User Guide defines them.
2026-10-03 15:46:37 -05:00
vamsiakandVamsi Akavarapu f074dd3c40 feat(lambda): allow per-runtime image reference overrides (#4552)
* feat(lambda): allow per-runtime image reference overrides

* test(lambda): cover runtime image YAML configuration

* docs(lambda): show quoted runtime image env key

* test(lambda): verify quoted runtime image env key

---------

Co-authored-by: Vamsi Akavarapu <16164447+vamsiak@users.noreply.github.com>
2026-10-03 15:46:28 -05:00
Mario Toffia ae0a591bb1 feat(cognito): provision user pool users (#4805)
* feat(cognito): provision user pool users

Add a CloudFormation provisioner for AWS::Cognito::UserPoolUser. Ref is the
username Cognito reports (the sub in an email-as-username pool). Every property
is createOnly: a changed custom-named user is refused as on AWS, any other change
replaces the user, and each delete targets the pool the user was created in.

* fix(cognito): refuse a RESEND user pool user that already exists

* fix(cognito): keep the user's pool out of Fn::GetAtt

* fix(cognito): keep only owed users in the pool record
2026-10-03 15:15:50 -05:00
Mario Toffia 9e178d77a0 feat(wafv2): provision web ACL associations (#4804)
* feat(wafv2): provision web ACL associations

WafV2CfnProvisioner now serves AWS::WAFv2::WebACLAssociation with Ref
ResourceArn|WebACLArn, as measured on AWS. Any property change replaces
the pair through ReplacementCleanup. Delete disassociates only while the
resource still uses that ACL, so cleanup of an old pair keeps the new one.
Rollback re-associates the restored pair.

* test(wafv2): cover ResourceArn replacement and read stack outputs with XmlPath
2026-10-03 15:01:18 -05:00
Sam Fakhreddine 1531537559 fix(docker): retry transient daemon I/O at the transport seam and split streaming pools (#4614)
Under fan-out load the single Docker socket drops connections mid-call
(Broken pipe, Connection reset) and the operation fails. Split out of #2707.

- Retry transient I/O at the transport: RetryingDockerHttpClient retries
  replay-safe control-plane calls with capped backoff (policy in
  DockerRetry). Interrupted I/O is not retried, except
  SocketTimeoutException, and the interrupt flag is kept.
- Split log-follow streams onto their own @StreamingDocker client and pool
  (floci.docker.streaming-max-connections, default 512) so they cannot
  starve create/start/stop calls. Exec and wait streams stay on the main
  pool for now.
- Adopt the container a replayed named create already made (409 matched by
  a per-attempt label) instead of failing and leaking it. Unnamed container
  creates, network creates, restart and network connect/disconnect are
  never replayed.
- Retry tar copies at the call site with RetryingTarCopier (Lambda
  launcher, EC2 authorized_keys, EKS webhook kubeconfig and registries.yaml,
  MWAA); a local tar-writer failure is reported at once.
- Send Connection: close on control-plane requests, since the Apache
  transport reuses pooled sockets the daemon has already closed (Podman).
  Hijacked requests and the streaming pool are unchanged.
2026-10-03 14:56:35 -05:00
Kenshin Okinaka 32f2788c9c fix(ses): serve the POST list bindings and Filter of ListEmailIdentities and ListConfigurationSets (#5010)
* fix(ses): serve the POST list bindings and Filter of ListEmailIdentities and ListConfigurationSets

Since AWS SDK for Java 2.55.8 and botocore 1.43.105 the SES v2 model sends
ListEmailIdentities as POST /v2/email/list-identities and ListConfigurationSets
as POST /v2/email/list-configuration-sets, each with a new Filter member.
Floci only served the GET bindings, so these lists failed for current SDKs.

Both lists now answer on both bindings. The filter follows real SES, probed
on 2026-10-03: what it matches, its validation messages and their precedence,
and a NextToken that continues only the filter it was taken with. The filter
is applied before the page is cut, so filtered pages are exact.

* fix(ses): bind identity list tokens to an unambiguous filter scope

A name filter of "null" produced the same token scope as an absent name, so a
token from one filter continued the other. The scope now leads with the type
and status, which never hold the separator, and ends with the name. The name
filter also runs before the status refresh, so domains it excludes are not
checked against Route 53.

* docs(ses): mark the GET list bindings as the pre-Filter ones
2026-10-03 15:52:01 -04:00
David 9c49ecf255 feat(rds): restore DB instances and clusters to a point in time (#4963)
Serve RestoreDBInstanceToPointInTime and RestoreDBClusterToPointInTime,
and report the restorable window: LatestRestorableTime on
DescribeDBInstances, EarliestRestorableTime and LatestRestorableTime on
DescribeDBClusters.

Requests are checked as the API reference describes: exactly one of
RestoreTime (RestoreToTime) and UseLatestRestorableTime, a time inside
the window or InvalidRestoreFault, PointInTimeRestoreNotEnabled for an
instance with backups off, and exactly one source. An instance source is
named by identifier or DbiResourceId, a cluster source by identifier, ARN
or DbClusterResourceId; automated backups ARNs answer
DBInstanceAutomatedBackupNotFound since no automated backups are kept.

Floci keeps no transaction log, so the target is seeded from a
pg_dumpall of the source taken when the request arrives, as read
replicas are. The restored data is the source's latest state for any
time in the window, and LatestRestorableTime is the current time. Only
PostgreSQL sources are accepted, as for CreateDBSnapshot.

Closes #4952
2026-10-03 15:43:02 -04:00
TATSUNO “Taz” Yasuhiro 823f8751de feat(lambda): store DurableConfig on functions (execution later) (#5007)
* feat(lambda): accept and echo DurableConfig on functions

CreateFunction and UpdateFunctionConfiguration take DurableConfig, PublishVersion snapshots it, and every read echoes it. ExecutionTimeout is required on create, RetentionPeriodInDays defaults to 14, a durable function's Timeout defaults to min(ExecutionTimeout, 900) and its logging to JSON. Update merges the members, and a function created without DurableConfig cannot gain one. KMSKeyArn is validated against its pattern and stored, the key itself is not looked up.

* chore(lambda): trim the DurableConfig tests to one case per rule

* feat(lambda): durable functions log in JSON format only

A durable function rejects LogFormat Text on create and update, and a LoggingConfig without LogFormat reads back as JSON. An empty KMSKeyArn means no key.

* chore(lambda): let the logging helpers own the durable JSON rule

validateLoggingConfig and applyLoggingConfig take the durable flag, so a durable function's default format and the Text rejection live in one place and a LoggingConfig without LogFormat keeps its log levels. applyDurableConfig sets the retention default and merges, and the test uses chainable helpers.

* chore(lambda): say why the durable compat test ignores a failed cleanup
2026-10-03 14:35:12 -05:00