Commit Graph
3406 Commits
Author SHA1 Message Date
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
Niels Kootstra a11040e841 fix(s3): reject a malformed aws-chunked upload instead of storing its framing (#5082)
* fix(s3): reject a malformed aws-chunked upload instead of storing its framing

When an aws-chunked body could not be decoded, the decoder logged the
failure and returned the raw body, so PutObject and UploadPart stored
the chunk headers and signatures as the object's content. A body that
ended before its final zero-length chunk was silently truncated.

A request whose x-amz-content-sha256 declares a streaming payload is
always framed, so a body that does not decode, or that ends before its
final chunk, now fails with a 400 IncompleteBody and nothing is stored.
The SigV4a (ECDSA) streaming variants count as streaming payloads too.

A Content-Encoding naming aws-chunked without that declaration does not
guarantee framing, so a body that does not decode is still kept as
sent, rather than decoding to an empty object as before.

* fix(s3): require each chunk's line break and the closing line of a streaming upload

A streaming body whose chunk data was not followed by a line break, or
that ended right after its final chunk line or partway through its
trailer, was still accepted and stored. For a request that declares a
streaming payload, each chunk's data must now be followed by a line
break and the body must reach the empty line that ends it; otherwise
the upload fails with a 400 IncompleteBody.
2026-10-04 13:50:45 -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
Hector Ventura efa46548d3 fix(stepfunctions): resolve a Lambda task's function ARN in its own account and region (#5079)
* fix(stepfunctions): resolve a Lambda task's function ARN in its own account and region

A Lambda Task given a full function ARN was resolved by bare name in the
state machine's account and region, so an ARN in another region or account
failed as not found, or invoked a same-named function of the state machine's.
The ARN's account and region are now used: the legacy form (Resource is the
function ARN) invokes the function where the ARN says, and an ARN in another
account reaches that account's function. The optimized lambda:invoke
integration calls Lambda's Invoke in the state machine's region, which
refuses an ARN from another region, so that case fails the task with
Lambda.InvalidParameterValueException, Lambda's own error and message.

* fix(stepfunctions): refuse a cross-account Lambda task under IAM enforcement

Resolving a function ARN in its own account let a state machine invoke
another account's function. Floci evaluates no Lambda resource policy, and
under IAM enforcement its own Invoke API refuses such a call because no
resource-based policy allows it, so a Lambda task now fails the same way
(Lambda.AccessDeniedException) when enforcement is on. With enforcement off,
the default, the function is still invoked.
2026-10-04 13:25:15 -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
TATSUNO “Taz” Yasuhiro ace5cbfc63 chore(style): replace var in more files no open PR touches (#5071)
* chore: replace var with explicit types in src/main files no open PR touches

* chore: replace var with explicit types in src/test files no open PR touches

* chore: replace var with explicit types in sdk-test-java files no open PR touches
2026-10-04 10:08:48 -05:00
Matheus Oliveira 97906c09b9 fix(rds): keep instance available when the liveness probe fails (#5070)
Only a definite not-running answer from Docker marks an instance failed.

* Fix #4847

Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>
2026-10-04 10:53:42 -04:00
Matheus Oliveira 32f01ba13d fix(ecr): forward every Accept header to the backing registry (#5069)
The data plane proxy overwrote repeated Accept headers, so only the last one reached registry:2.

* Fix #4869

Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>
2026-10-04 10:05:40 -04:00
David 82977a7f03 feat(emr): resize instance groups and fleets, list bootstrap actions (#4900) 2026-10-04 09:52:41 -04:00
Vũ Thế Huy 06ceec2aee feat(redshift): materialize Glue external tables into PostgreSQL (#4996)
* feat(redshift): materialize Glue external tables into PostgreSQL

Add ExternalTableMaterializer, which loads a Glue-backed external table
into the cluster's PostgreSQL through a staging table, plus
SpectrumCatalogResolver (Glue binding first, phase-one catalog as a
fallback) and SpectrumGlueCsvAdapter (simple CSV tables keep the
streaming path and need no floci-duck sidecar).

The bound IAM role is enforced for every S3 object read, including
Iceberg metadata, manifests and data files, before DuckDB sees them.
SpectrumS3Reader now reads through the role as well, so a phase-one
external schema needs a real role associated with the cluster.

Spectrum semantics: hidden files and folder markers are ignored, a
partitioned table without registered partitions returns no rows, and a
sized string value wider than its column in bytes becomes NULL.

Also: PartitionProjection accepts IN lists for injected columns and
checks each table alias, S3Service hides the Spectrum scratch bucket from
ListBuckets, S3TransferException becomes public, and
FLOCI_SERVICES_REDSHIFT_SPECTRUM_MAX_ROWS is added.

* fix(redshift): harden external table loads against review findings

- A session outside a transaction waits for a slow load instead of
  failing after 30 seconds; only a session in a transaction keeps the
  timeout, since it can hold a PostgreSQL lock the Java lock cannot see.
- A missing S3 bucket is reported as XX000, not as access denied.
- A load failure goes to the log with its cause and returns a generic
  message, because the cause can carry DuckDB request text.
- The partition fingerprint includes input format and SerDe, so a format
  change at the same location reloads the table.
- A partition value wider than its sized string key becomes NULL, as a
  data column does, instead of failing the whole load.
- The first load of an account removes scratch objects left by a JVM
  that died mid-load, keeping those younger than an hour.
- Document why the phase-one reader enforces the role without the
  cluster association check.

* fix(redshift): use a real IAM role in the Spectrum compat test

The external schema now enforces its IAM role, so the compat test needs a
role that exists, trusts redshift.amazonaws.com and is associated with the
cluster. Create it through the IAM SDK client, pass it to CreateCluster and
delete it in the cleanup.

* fix(redshift): address review findings on the external table materializer

- PartitionProjection: a table name must end at an identifier boundary, comma
  separated sources are checked like FROM and JOIN sources, an unqualified
  injected column is accepted when exactly one source declares it, and a
  constant may be wrapped in parentheses.
- The partition fingerprint covers the whole descriptor (columns, formats,
  SerDe and parameters), and an Iceberg table is read on every query because
  its snapshot can change without any visible change to the Glue table.
- A transactional load that keeps the committed columns keeps the schema
  signature, so a view that depends on the table can still be refilled.
- Files under a hidden folder such as _temporary are ignored, not only
  hidden file names.
- The scratch bucket is told apart from a user bucket of the same name by a
  tag: a user bucket is listed, never written to, and never swept.
- Drop the SPECTRUM_MAX_ROWS row from the docs until routing makes the cap
  reachable.

* fix(redshift): verify slow-load wait with timeout
2026-10-04 09:20:44 -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
Niels Kootstra db2a67f122 fix(dynamodb): size() of a Binary counts its bytes, not its base64 text (#5058)
* fix(dynamodb): size() of a Binary counts its bytes, not its base64 text

size() on a B attribute returned the length of the base64 text, so a
3-byte value had size 4 and conditions and filters such as
size(b) = :three gave the wrong answer. It now decodes the value first.

begins_with on binaries now decodes through the same helper, so a value
that is not base64 fails with a 400 SerializationException, as the
binary comparisons already did, instead of an uncaught 500.

* test(dynamodb): cover begins_with matching a valid binary prefix
2026-10-04 08:12:56 -04:00
Daniël van Ziel d53ea39be9 fix(dynamodb): scope streams and sequence counters by account (#4116) 2026-10-04 07:39:38 -04:00
Vũ Thế Huy 008ddea054 fix(athena): accept IN lists and check each table in the injected-partition filter (#5004)
* fix(athena): accept IN lists and check each table in the injected-partition filter

The injected-partition check treated any mention of the column in a WHERE
clause as a filter, and it matched a table by name prefix.

- Accept col IN ('a', 'b'): Athena allows IN lists for injected columns, up to
  1,000 values.
- Check every source table on its own alias, so a filter on one table cannot
  stand in for another table's filter. A comma separated source counts like a
  FROM or JOIN source, and a table name must end at an identifier boundary so
  events_daily is not a reference to events.
- Accept an unqualified column when exactly one source in the query declares it.
- Accept a constant wrapped in parentheses, and reject a computed value such as
  'abc' || suffix, which is not a static value.
- NATURAL, LATERAL and TABLESAMPLE after a table name are not taken for its alias.

* fix(athena): address review feedback for injected partition projection filter

- Support comma-separated sources after JOIN ... ON or USING clauses
- Scope ambiguous column check to each subquery FROM clause
- Preserve quoted aliases and aliases specified with AS keyword
- Accept static literals wrapped in arbitrary balanced parentheses
- Enforce the 1,000 item limit on IN lists according to Athena spec

* fix(athena): mask subqueries in where clause to isolate partition filter scopes

* fix(athena): accept constant expressions in injected partition filter

* fix(athena): exclude function invocations and cast types from source column matching

* fix(athena): reject qualified CTE and source column references in partition filter

* fix(athena): allow multi-part function calls in static partition filter
2026-10-04 06:11:07 -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
Hector Ventura 971dc01f34 fix(core): let RequestScopes run background work in a given region (#5054)
* fix(core): let RequestScopes run background work in a given region

RequestScopes.runAs only set the account, so work running outside a
request resolved RegionResolver.getRegion() and getPartition() to the
deployment defaults. New runAs/callAs/callAsChecked overloads take a
region too and set it with its partition; a region outside every
published partition leaves the partition unset so it falls back to the
deployment's, as a request does. Inside an already active scope the
previous account, region and partition are restored. The account-only
methods keep their behaviour.

CloudFormationService's private runUnderScope, which did the same thing
for stack operations, now uses the shared method.

* test(core): fail the RequestScopes region test when the worker thread throws

The helper that runs each case on a fresh virtual thread joined it without
passing on the thread's exception, so a failure while a scope was restored
after the body could leave the recorded values intact and the test green.
It now captures anything the worker throws and fails the test with it.
2026-10-04 05:59:59 -04:00
Hector Ventura 1b138812fa fix: mint ARNs in the request region for Amazon MQ, MSK, EKS Fargate, AppSync and ElastiCache users (#5053)
* fix: mint ARNs in the request region for Amazon MQ, MSK, EKS Fargate, AppSync and ElastiCache users

Several create paths minted the new resource's ARN with the emulator's
default region instead of the region the request was signed for, so a
resource created in eu-west-1 reported a us-east-1 ARN:

- Amazon MQ CreateBroker (broker ARN)
- MSK CreateConfiguration (configuration ARN)
- EKS CreateFargateProfile, which now takes the cluster's own region
- AppSync CreateDomainName (ARN and the appsync-api host) and
  CreateChannelNamespace
- ElastiCache user ARNs in CreateUser/DescribeUsers responses, now
  rendered in the request region like the other user responses

RequestRegionArnIntegrationTest signs each request for eu-west-1 and
checks the ARN's region; all five cases fail without this change.

* fix: keep ElastiCache user and AppSync channel namespace ARNs in their resource's region

ElastiCache users are not stored per region, so DescribeUsers signed for
another region can read a user; rendering its ARN from each request's
region reported the same user under different ARNs. The ARN is now minted
once at CreateUser and stored on the user. Users persisted before keep the
default-region ARN they were always reported with.

A channel namespace now takes its region from its parent API's ARN rather
than from the request, since an API is still reachable by id from another
region.
2026-10-04 05:51:07 -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
Priamo Germosen 8d5cd2c6e7 refactor(core): extract the OpenSSH public key wire form from Ec2KeyMaterial (#5036)
Moves the parts of Ec2KeyMaterial that are key-format handling rather than
anything EC2 owns into core.common.SshPublicKeys: decoding an
"ssh-rsa AAAA..." line into its length-prefixed fields, reading the RSA key
they carry, writing that form back, and the colon-hex MD5 helper. The
field-length bound that keeps an attacker-declared length from being
allocated moves with it, comment included.

No behaviour change. EC2 keeps its own semantics where they are its own: the
DER-based ssh-rsa fingerprint, the ed25519 branch, and the SHA-1 private-key
fingerprint for a generated pair. The shared digest helper is named for what
it computes rather than for a fingerprint, because EC2 hashes the DER while
OpenSSH hashes the blob and both produce sixteen bytes of colon-hex, so a
function named for one would invite the other's caller to reuse it wrongly.

Step 1 of 2: IAM's SSH public key operations need the same parse, and the
PEM conversions they also need land with that code rather than uncalled here.
2026-10-03 21:05:31 -05:00
Priamo Germosen 8776c5fc3a fix(codeartifact): harden the pypi upload preflight's URI building and index match (#5029)
Follow-up from #5019 (noted by @hectorvent on that PR's review): the pypi
upload preflight built its sidecar request URIs with a raw string
concatenation into URI.create, and checked a filename against the simple
index with a plain substring search. Both have the same classes of bug the
GetPackageVersionAsset bridge's own pypi, npm, and Maven paths were already
fixed for in #5019: a #, ?, or / in a caller-supplied package name or
filename could truncate/reinterpret the request or splice in extra path
segments, and a shorter real filename that is a substring of a longer one
(e.g. a detached .asc signature file) could be wrongly treated as already
published.

Fixed by routing every caller-supplied segment through the same
SidecarUriUtils helpers #5019's bridge code uses (also pulled out into a
shared class there), and by matching the simple index's hrefs exactly
instead of searching the raw response body.
2026-10-03 21:05:20 -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
Matheus Oliveira f9a65581be fix(cloudformation): honor UsePreviousTemplate on updates (#5015)
Reuse the stored stack template and validate invalid combinations.

* Fix #4881

Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>
2026-10-03 21:57:01 -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
Niels Kootstra d5fd4d52f1 fix(eks): fail the delete when Docker cannot remove the cluster container (#4960)
* fix(eks): keep the API server port reserved when Docker cannot remove the container

stopAndRemove is best effort: it logs Docker errors and returns. Releasing the port regardless could hand it to another cluster while the old container still publishes it. stopAndRemove now reports whether Docker confirmed the container is gone, and stopCluster only releases the port then.

* fix(eks): fail the delete when Docker cannot remove the cluster container

Keeping the port reserved after an unconfirmed removal orphaned it once DeleteCluster dropped the cluster record: nothing released it until Floci restarted, so repeated failures could exhaust the API server port range. stopCluster now uses stopAndRemoveStrict, as it already does for the capacity backup, so the delete fails and keeps the record, and a retried delete releases the port once Docker confirms the container is gone. This reverts the boolean return on the best-effort stopAndRemove, which no longer has a caller that needs it.

* fix(core): close the log stream after the container stops in strict cleanup

stopAndRemoveStrict closed the log stream before stopping the container, so its follower could shut down while Docker was still stopping it and drop the final log lines. stopAndRemove already closes after the stop and remove; the strict variant now does the same. This keeps EKS control-plane logs intact now that stopCluster uses the strict variant, and fixes the same ordering for RDS.

* fix(eks): keep the log stream of a cluster whose container could not be removed

When Docker could neither stop nor remove the container, stopAndRemoveStrict still closed its log stream and stopCluster had already dropped the handle, so a container that kept running lost its control-plane and audit logs and the retried delete had nothing to close. The strict variant now closes the stream only once the container is stopped or gone, as stopAndRemove does, and stopCluster puts the handle back when removal fails.

* fix(eks): keep a failed cluster delete retryable without stale state

When Docker cannot remove the cluster container, the delete now leaves
everything a retry needs and nothing it could trip over:

- the log handle is never put back on failure; it is removed by value
  once the container is gone, so a delete that lost a race to a
  successful one cannot restore a handle under a deleted cluster's name
- attaching logs for a new or adopted container closes and replaces a
  handle still registered under the name instead of skipping the attach,
  so a recreated cluster always gets its control-plane logs
- the node stays registered on the metadata server until the container
  is confirmed gone
- the host port is read and cleared under the cluster lock, so it is
  released exactly once
- stopAndRemoveStrict leaves the log stream open on any removal failure
  and closes it only once the container is gone
- DeleteCluster restores the previous status instead of leaving the
  cluster stuck in DELETING; only the delete that set DELETING restores it

* fix(eks): reject a DeleteCluster that overlaps one still in progress

A delete that failed to remove the container restored the shared
cluster's status even while an overlapping delete had removed the
container and was still tearing the cluster down, so the cluster briefly
looked ACTIVE with no API server behind it.

Deletes of the same cluster now run one at a time: an overlapping
DeleteCluster fails with ResourceInUseException, so only the delete that
set DELETING can restore the previous status. The guard tracks the
delete in progress rather than the status, so a cluster left in
DELETING by an earlier failure can still be deleted again.
2026-10-03 17:35:02 -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 f8a721ce57 chore(codeartifact): share the sidecar request-URI encoding helpers (#5026)
ReposiliteSidecarClient, VerdaccioSidecarManager, and PypiserverSidecarManager
each carried an identical copy of combine/encodeSegment (added across the
GetPackageVersionAsset bridge's review cycle in #5019). Extracted into
SidecarUriUtils so the three clients can't drift apart on this again.
2026-10-03 15:53:52 -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
Matheus Oliveira b112c62949 fix(lambda): pass ClientContext to synchronous invocations (#5014)
Emit Lambda-Runtime-Client-Context from the decoded X-Amz-Client-Context header.

* Fix #4968

Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>
2026-10-03 15:16:00 -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
TATSUNO “Taz” Yasuhiro bdab4448d6 perf(kms): drop unused BouncyCastle curves from the native image (#4868)
* perf(kms): build the KMS curves directly so unused BouncyCastle curves leave the native image

Any BouncyCastle named curve lookup reaches every curve the tables know,
including the binary SecT curves. BcEcKeys now builds the five curves KMS
uses from their own BouncyCastle classes and encodes keys itself, in the same
DER layout as before. RsaKeyType builds the PSS signer's key parameters from
the JDK key instead of going through BouncyCastle's key factories.

* test(compat): cover the KMS key paths that call BouncyCastle directly

secp256k1 signing, EC key import for every curve, and RSA PSS digest signing
had no test in the suite that runs against the native image.

* chore(kms): note where each curve generator comes from
2026-10-03 15:05:07 -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
Mario Toffia 7ebbe868ca fix(route53): store CloudFormation record names fully qualified (#4734)
* fix(route53): store CloudFormation record names fully qualified

Route 53 always stores and lists a record name fully qualified, ending in a dot, even when the request leaves the dot off. Floci's ChangeResourceRecordSets API already adds the dot, but an AWS::Route53::RecordSet created through CloudFormation was stored exactly as the template wrote it, so ListResourceRecordSets returned it without the dot. The CloudFormation provisioner now stores the dotted name and compares dotted names when it looks up a record to replace on update or remove on stack delete. The resource's Ref is unchanged and still returns the name as the template wrote it.

* fix(route53): create CloudFormation record sets instead of upserting them

An AWS::Route53::RecordSet was always written with an UPSERT, on stack create as well as update. A stack could therefore overwrite a record that someone had already created through the Route 53 API under the same name, and deleting the stack then removed that record too.

Real CloudFormation sends CREATE for a record the resource does not own yet, so the stack fails with "already exists" and the other record is left alone. The provisioner now does the same: it sends CREATE on stack create and on an update that changes the record's zone, name, type or set identifier, and keeps UPSERT when an update re-applies the record it already wrote. A failed create records no zone and no physical id, so neither the rollback nor a later DeleteStack touches the existing record.

* fix(route53): treat a blank CloudFormation SetIdentifier as no identifier

A record set whose template gave SetIdentifier as an empty string was written with that empty identifier, but the value saved for later updates and deletes dropped it. The next ordinary UpdateStack therefore saw a different record, sent CREATE, and failed as a duplicate. DeleteStack also looked for a record without an identifier and left the empty-identifier record in the zone.

Route 53 requires a set identifier of at least one character, so the provisioner now reads a blank SetIdentifier as absent. The written record, the saved value and the update comparison then agree. The class and change comments now also say that an update keeping the same record sends UPSERT, which replaces whatever record holds that identity.

* fix(route53): match CloudFormation records an earlier version stored as written

Before this branch, the provisioner stored a record set with the template's Name and SetIdentifier as written, so an undotted name or an empty identifier. With persistent storage that record survives an upgrade, and the stricter lookup no longer matched it: DeleteStack and a rename left it in the zone, where it blocks the zone's own delete. An update keeping the same identity sent a fully qualified UPSERT, which the zone stored beside the old copy instead of replacing it.

The lookup now compares names fully qualified on both sides and reads a blank SetIdentifier as none, so it finds the old record. After a same-identity UPSERT, the provisioner deletes any copy of the identity that is not stored in the canonical form it just wrote.

* fix(route53): treat a trailing dot and a blank set identifier as the same record

Route 53 treats a record name with or without the trailing dot as the same record, and requires a set identifier of at least one character. The service compared both literally, so a record an earlier CloudFormation provisioner stored with the template's undotted Name or empty SetIdentifier could sit beside the fully qualified form: a CREATE of the dotted name succeeded instead of failing as a duplicate, and an UPSERT added a second record instead of replacing the first.

The CREATE, UPSERT and DELETE checks now share one identity comparison, sameRecord, which compares names fully qualified and reads a blank set identifier as none. The CloudFormation provisioner's record lookup uses it too, so DeleteStack and a rename find a record stored either way. This replaces the provisioner's own legacy-copy cleanup, which deleted any non-canonical copy without knowing who owned it, and could remove another stack's record.

* fix(route53): remove one record per DELETE

An earlier version compared record names literally, so persistent storage can hold the same record both undotted and dotted, possibly for two owners, with the same values. Now that DELETE matches both forms, removing every match would also delete the other owner's copy. A DELETE now removes a single record, preferring the copy named exactly as the request names it.

* fix(route53): find the CloudFormation record named as its physical id first

An earlier version stored a record's name as the template wrote it, and could leave another owner's copy in the other form beside it. The lookup for stack delete and rename took the first record with the same identity, and the zone listing sorts the undotted copy first, so it could delete the other owner's record. It now prefers the record named exactly as the physical id, and falls back to the identity match for records this version wrote fully qualified.
2026-10-03 15:01:09 -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
Priamo Germosen 583b2baf7f feat(codeartifact): bridge GetPackageVersionAsset to Maven, npm, and pypi sidecars (#5019) 2026-10-03 14:35:03 -05:00
Priamo Germosen 2e87534941 fix(s3): complete multipart uploads larger than 2 GiB in disk storage modes (#4976)
CompleteMultipartUpload built the whole object as one byte array, so an
object over Integer.MAX_VALUE bytes failed with an ArithmeticException,
and anything smaller still needed the full object in the heap.

In the persistent, hybrid and wal modes the parts are now copied file to
file into one assembled file in the upload's directory, before the bucket
lock is taken, and that file is renamed into place under the lock. A
versioned bucket hard-links the current file to the versioned one rather
than writing a second copy, which is safe because object files are only
ever replaced by a rename, never modified in place.

The full-object checksum is combined from each part's CRC and size,
which is how S3 linearizes full-object checksums and why it offers them
only for the CRC algorithms, so the object's bytes are never read for it
and a mismatched expected checksum is rejected before assembly.

Since the ETag and checksum now come from the part records, each
UploadPart stores its bytes under its own storage ID kept on the record
and drops the bytes it replaced only after publishing the new record.
CompleteMultipartUpload reads each record once and assembles exactly the
bytes those records name, so an UploadPart racing a Complete makes that
Complete fail with InvalidPart instead of storing a checksum that
describes different bytes.

Memory mode still holds an object in one byte array, so an UploadPart
that takes an upload past the largest array the JDK allocates, or a
CompleteMultipartUpload over it, now fails with EntityTooLarge instead of
exhausting the heap or overflowing the array size.

Multipart uploads are tracked only in memory, so the part files under
.multipart are removed at startup and on reset. Without that, a crash
during assembly would leave a file as large as the object on disk for
good. The S3 docs describe the memory-mode limit, the disk space a
completion needs, and the operations that still read a whole object into
memory.
2026-10-03 14:34:54 -05:00
Aniket Shukla ba944df922 fix(cloudformation): resolve change sets by ARN without stack name (#4885)
* fix(cloudformation): resolve change sets by ARN without stack name

* test(cloudformation): verify change set ARN execution with SDK

* test(cloudformation): wait for change set execution status

* fix(cloudformation): tighten change set ARN validation tests
2026-10-03 15:25:07 -04:00