Add DynamoDbRuntime and a DynamoDbBackendLifecycle seam so the emulator lifecycle starts, resets and stops only the selected backend.
Native start initializes the engine before persisted stream consumers and schedules the TTL sweep, which never ran because its bean was unused.
Reset gains a checkReset preflight that runs before anything is stopped or cleared, and native reset now drops streams, item caches, idempotency tokens and forwarder queues.
Reset also pauses the TTL sweep and waits out in-flight zero-ETL writes before Floci storage is cleared.
Shutdown stops the Lambda DynamoDB poller, the Redshift zero-ETL consumer and the Kinesis forwarding drains before the final flush, and the Redshift consumer is now Resettable.
* feat(dynamodb): add the 2017.11.29 global table operations
CreateGlobalTable, DescribeGlobalTable, UpdateGlobalTable and ListGlobalTables
were all UnknownOperationException, so a legacy global table could not be
created at all. The 2019.11.21 path through UpdateTable ReplicaUpdates already
worked, and these four now run on the same replica metadata.
Constraints come from the model. CreateGlobalTable builds on a table that
already exists, so an absent one is TableNotFoundException rather than the
item operations' ResourceNotFoundException, and a second create is
GlobalTableAlreadyExistsException. The one replica precondition a
single-process emulator can test is the stream, so a table joins only with
DynamoDB Streams enabled and a view type of NEW_AND_OLD_IMAGES.
DynamoDbIntegrationTest used CreateGlobalTable as its example of an
unsupported operation. It now uses DescribeGlobalTableSettings, which is still
unimplemented.
* fix(dynamodb): use the model's fault shapes on the global table surface
Two gaps on the new operations.
requireStreamWithBothImages raised InvalidParameterValue, which is not a
DynamoDB shape at all. Every other rejection in this file raises
ValidationException, seventy-six of them, so a client catching that one missed
this rejection alone. The test asserted only the status, never the code, which
is why nothing caught it.
UpdateGlobalTable delegated straight to applyReplicaUpdates, and that helper is
deliberately idempotent for UpdateTable and CloudFormation re-applies: a
duplicate add is skipped and an absent removal is a no-op. The model declares
ReplicaAlreadyExistsException and ReplicaNotFoundException for
UpdateGlobalTable and declares neither for UpdateTable, so sharing the path
dropped both. The membership check now lives in updateGlobalTable and the
helper keeps its idempotence.
Tests assert the codes rather than the status, cover both replica faults
including a re-add of the home region, and pin that UpdateTable still accepts
the same re-add.
* feat(dynamodb): define vector indexes on the table control plane
* feat(dynamodb): serve SearchVectors against vector indexes
* feat(dynamodb): validate vector attributes on write
* feat(dynamodb): report vector write capacity on writes
* fix(dynamodb): reject a PartiQL read of a vector index
* test(dynamodb): cover vector search in Floci's own suite
* fix(dynamodb): match AWS on vector member paths and the f32 number format
* fix(dynamodb): match AWS on the vector search validation gaps
* perf(dynamodb): stop retaining and recomputing per candidate in vector search
* docs(dynamodb): document that indexes are not stored
* fix(dynamodb): honor MICROSECOND ApproximateCreationDateTimePrecision for Kinesis destinations
Store the precision requested in EnableKinesisStreamingConfiguration, echo it in the
enable response, and return it from DescribeKinesisStreamingDestination, so Terraform
no longer destroys and recreates the destination on every apply.
Stamp ApproximateCreationDateTime in epoch microseconds for MICROSECOND destinations,
with a shared eventID per change across destinations.
Reject precisions other than MILLISECOND and MICROSECOND with ValidationException.
Add forwarder unit and end-to-end integration coverage, and document the behavior.
* fix(dynamodb): stop enabling DynamoDB Streams with a Kinesis destination
EnableKinesisStreamingDestination turned on DynamoDB Streams for the table.
Kinesis forwarding does not need it, and Terraform saw stream_enabled drift
on aws_dynamodb_table on every run.
Leave the table's stream setting as the caller configured it.
* test(dynamodb): add Terraform compat test for Kinesis destination precision
Apply a Kinesis streaming destination with MICROSECOND precision and check that
it reads back, that a second plan is clean, and that a precision change
replaces the destination once and then settles.
* feat(dynamodb): import tables from S3 and report new exports as IN_PROGRESS
ExportTableToPointInTime handed its worker the same description object it
returned, so a small export could already read COMPLETED in the initial
response. The worker now mutates a copy and runs under the request account.
ImportTable creates the table in CREATING, loads DynamoDB JSON lines from
every object under the S3 prefix on a virtual thread, and flips the table
to ACTIVE when done. DescribeImport and ListImports report it. DYNAMODB_JSON
with NONE or GZIP compression is accepted. CSV, ION and ZSTD are rejected
with a ValidationException.
* fix(dynamodb): item calls on a CREATING table return ResourceNotFoundException
* fix(dynamodb): concurrent ImportTable calls with one ClientToken share one import
* fix(dynamodb): import reads S3 as the caller and denies another account's bucket
* fix(dynamodb): resolve Kinesis CDC forwards against the table owner's account
DynamoDB->Kinesis CDC forwarding resolved the target stream against the ambient
account. Out of request scope -- notably the TTL sweep, which forwards a REMOVE per
expired item after the request completes -- the ambient account falls back to the
default, so CDC records could be written into the default account's same-named stream
(a cross-tenant leak) or dropped as ResourceNotFound. This was a live bug on the TTL
path.
- Add KinesisService.putRecordForAccount: resolve, append and persist against a
specified account (a null account preserves the ambient behavior). It keeps the
per-stream append lock keyed on region+stream (not account) so explicit-account
appends stay serialized with request-path producers, preserving the concurrent-
append fix; and it migrates a legacy unprefixed stream into the account partition on
write (ownership validated by the stream's ARN/account) so installs upgraded from
pre-multi-account storage keep forwarding.
- KinesisStreamingForwarder.forward now takes the table owner account and forwards via
putRecordForAccount.
- DynamoDbService passes the owner account at every forward site: the request paths use
the request account; the TTL sweep uses the account it derives from the storage key.
AWS Compatibility: CDC records land in the table owner's stream, matching AWS
per-account isolation. Known residual: the DynamoDB Streams subsystem
(DynamoDbStreamsService) has the same ambient-account exposure and is not addressed
here.
* fix(dynamodb): retry and park failed Kinesis CDC forwards instead of dropping them
Change data capture forwarding to a Kinesis streaming destination dropped the
change event whenever putRecord threw, so a transient Kinesis error silently
lost DynamoDB INSERT/MODIFY/REMOVE (and TTL) events.
Forwarding is now a bounded best-effort, in-process retry queue. The write path
only enqueues (it never blocks or throws), and a per-destination single-flight
background drain performs the send outside the lock:
- transient/unknown failures retry with capped exponential backoff (250ms->8s,
up to 10 attempts) instead of dropping on the first exception;
- deterministic terminal failures (Validation/InvalidArgument) drop only the
poison record without wedging the queue behind it;
- per-destination FIFO is preserved across retries;
- the buffer is bounded (1000 records per destination, oldest evicted on
overflow);
- after the retry budget is exhausted the episode gives up, and a later event
starts a fresh episode that self-heals once the stream recovers.
Disabling a destination or deleting the table discards its buffered records and
stops all future sends for it (a send already in flight may still complete).
Dropped records are counted and per-destination delivery health
(forwarded/retried/dropped, queue depth, last error) is tracked for inspection.
Buffered records are in memory only and are not durable across restarts.
* style(dynamodb): remove em dashes from lines this branch adds
AGENTS.md requires colons, commas or periods instead of em dashes. Comment,
javadoc and docs prose only; no code or string literals change.
* fix(kinesis): resolve the stream inside the append lock, not before it
putRecordInternal resolved the stream before taking the per-stream monitor. That
resolve is not a read: for a legacy unprefixed stream it migrates the entry, and
the two migration paths disagree. The explicit-account path moves it into the
account partition behind an ownership predicate and is synchronized on the
backend, while AccountAwareStorageBackend.get adopts it into the request account
with no ownership check and no synchronization. Racing outside the monitor, an
ambient producer and the owner's CDC producer could migrate the same stream
concurrently, forking it across partitions or adopting it into the default
account, which is the cross-account leak this branch set out to close.
Resolve and validate inside the monitor instead. The separate pre-lock resolve is
gone, so there is one resolve rather than two, and deleteStream holding the same
monitor still makes a concurrently deleted stream fail cleanly.
Residual, pre-existing and not addressed here: AccountAwareStorageBackend.get
still adopts an unprefixed entry into the request account unchecked and
unsynchronized for callers that do not hold a per-resource lock.
* fix(storage): migrate a legacy unprefixed entry under the account monitor
AccountAwareStorageBackend has two migrate-on-read paths that disagree.
getForAccountMigratingLegacy is synchronized and ownership-gated; get is neither.
Because get does not take the monitor the migrating variants hold, two readers
resolving the same pre-multi-account key from different account contexts can each
copy it into their own partition, and the two copies then diverge independently.
The migration branch now runs under that same monitor and re-checks the prefixed
key inside it, so a reader that lost the race returns the winner's entry instead
of migrating again. The hit path stays outside the monitor, so only a miss pays
for it.
This closes the fork for every caller rather than one at a time. The preceding
commit fixed it for KinesisService.putRecordInternal by resolving inside the
append lock, but the Kinesis batch PutRecords handler and roughly twenty read
paths (DescribeStream, GetRecords, GetShardIterator, tag reads) resolve without
any per-resource lock and were still exposed.
Not addressed here: get still adopts an unprefixed entry into whatever account
the request context resolves to, with no ownership check. get is generic over the
stored type and has no notion of an owner, which is why getForAccountMigratingLegacy
takes the predicate from its caller. Gating it generically needs a per-resource-type
predicate and is filed separately.
* test(dynamodb): add tests asserting single persistence flush per table in batch and transact writes
* fix(dynamodb): flush persistence once per affected table in batch and transact writes (#2995)
* docs(dynamodb): document batch persistence and recommend wal/hybrid for write workloads (#2995)
* fix(dynamodb): pre-validate operations and guarantee persistence flush in batch and transact writes (#2995)
* fix(dynamodb): reject duplicate items in transaction and rollback partial writes on failure
CHANGELOG.md was empty for the 1.1.0-1.5.2 release cycle and service docs
had drifted from code behaviour. This sweep reconciles docs against the
current codebase on upstream/main.
- Backfill CHANGELOG.md for 1.1.0 through 1.5.2 from git history
- Correct exact operation counts in docs/services/index.md: S3 (~30 -> 58),
Lambda (~25 -> 30), API Gateway v1 (~24 -> 62). Counts now come from the
actual dispatch handlers rather than @Path annotation counts.
- Rewrite README "Supported Services" table to drop per-service op counts
(they drift too fast); point readers at docs/services/index.md
- Update 24 service docs for accuracy, add "Not Implemented" sections
where relevant (s3.md, lambda.md, api-gateway.md)
- Refresh configuration and getting-started docs
- Add EventBridge Scheduler and AppConfig to mkdocs nav
- Add AppConfig / AppConfigData rows to README and services index
following the 1.5.2 upstream release