Files
floci/docs/configuration
Mario Toffia c326dce977 feat(dynamodb): optional DynamoDB Local backend (#4504)
* feat(dynamodb): add the external Local operation client

Adds DynamoDbLocalClient, which forwards DynamoDB and DynamoDB Streams
wire calls to an external DynamoDB Local over SigV4-signed HTTP/1.1.
The caller's account becomes the access key and its region the signing
region, so Local keeps each account and region apart. Requests are
never retried.

Reply.successBody now owns the AWS error body conversion, which the
API stream reader reuses.

* feat(dynamodb): add the DynamoDB Local backend

Adds DynamoDbLocalBackend, a DynamoDbBackend that forwards every wire
call to an external DynamoDB Local through DynamoDbLocalClient.

- Namespaces: the caller's account and region select the Local
  namespace; table and stream ARNs from another account or region are
  rejected.
- Identities: table, index and stream ARNs in replies are rewritten
  from Local's fixed ddblocal shape to public ARNs, and stream records
  carry the caller's region.
- Metadata: tags live in a Floci store because Local keeps none;
  replica updates are refused; a global table is its single-region
  table; stream enable and disable are idempotent like native.
- Lifecycle: startup waits up to 30s for Local to accept connections,
  and emulator resets are refused because the data lives outside
  Floci.

DynamoDbBackend groups the four seam interfaces so one object is the
whole engine.

* feat(dynamodb): enable the optional Local backend

floci.services.dynamodb.backend selects the engine: native (default)
or local, which forwards to the DynamoDB Local at local-endpoint.
Both engines are client proxies, so the unselected one is never
constructed. With local selected, the stream reader keeps checkpoints
for the life of the stream, and /_floci/info reports the backend in
dynamodb_backend.

DynamoDbLocalBackendIntegrationTest runs against a real DynamoDB Local
when FLOCI_SERVICES_DYNAMODB_LOCAL_ENDPOINT is set.

* docs(dynamodb): document the DynamoDB Local backend

* fix(dynamodb): harden the Local backend endpoint check, stream paging and startup probe

Reject AWS endpoints in every partition, with a trailing dot, and endpoints with user info.
Translate ListStreams paging ARNs, retry any I/O failure until the startup deadline, and
call DescribeTable outside the tag lock.

* fix(dynamodb): tighten Local ARN ownership, batch table names and global TableId

A table ARN of another account or partition is ResourceNotFoundException, a stream ARN of
another partition is refused, and a batch naming one table twice is a ValidationException
instead of a dropped entry. A global table on Local has an empty TableId instead of a random
one. Document the Resource Explorer limit.

* fix(dynamodb): mark the Local readiness probe region as partition-invariant

* test(dynamodb): pin the table record of an untagged typed Local create

* docs(dynamodb): state the Local readiness bound and stack delete protection

* fix(dynamodb): lift deletion protection on the Local direct delete and cap the readiness probe

- DynamoDbTableAccess.deleteTable is the direct engine delete with no
  deletion-protection check. The Local backend now clears
  DeletionProtectionEnabled before DeleteTable, so CloudFormation deletes
  behave the same on both backends. The wire DeleteTable still enforces it.
- Each readiness probe is bounded by the remaining 30 second budget and never
  exceeds the configured request timeout, so startup fails within the budget.

* fix(dynamodb): align Local tag errors with the native wire path

- ListTagsOfResource on a missing table is AccessDeniedException, as on the
  native wire path.
- A table ARN whose partition is not an AWS partition is a
  ValidationException instead of a foreign resource.
- Tag operations report a table ARN of another region as
  ResourceNotFoundException, as native does; TableName fields keep the
  region-mismatch ValidationException.
- Document which regions Resource Explorer searches, and note that a failed
  direct delete leaves deletion protection off.

* docs(dynamodb): state the tested DynamoDB Local version
2026-09-28 22:54:00 -05:00
..