Intermediate7 min read

ExtendDB: Run the DynamoDB API on Your Database

ExtendDB is an open-source adapter from AWS that speaks the DynamoDB wire protocol but stores the data in a database you run. It exists for code written against the DynamoDB API that has to run somewhere managed DynamoDB can't go: an on-prem network, an air-gapped site, a laptop with no internet.

What is ExtendDB?

ExtendDB is AWS's open-source adapter, written in Rust, that implements the DynamoDB JSON wire protocol on top of a database you run yourself, such as PostgreSQL. Your existing AWS SDKs and the AWS CLI keep working unchanged: only the endpoint URL and the credentials move, so you get the DynamoDB API without sending data to the managed cloud service.

It was written by AWS DynamoDB engineers and announced on the AWS Database Blog.

Behind the API sits a pluggable storage layer. PostgreSQL is the default backend; the repository also builds SQLite and MongoDB backends, one per binary, chosen at build time (differences from DynamoDB). The announcement names Apache Cassandra as a backend that could be added "without modifying the core".

So a request flows like this:

DynamoDB JSON wire protocolreads / writesYour app (unchanged AWS SDK)ExtendDB (Rust adapter)PostgreSQL (your data, your disk)

What it supports, and what it doesn't

Per the repository and the announcement, ExtendDB (v0.1) covers the operations most applications call:

  • Tables: Create, Delete, Describe, List, Update.
  • Items: Put, Get, Delete, Update (including the SET / REMOVE / ADD / DELETE update actions).
  • Query and Scan: key conditions, , projections, pagination, and secondary indexes.
  • Batch: BatchGetItem and BatchWriteItem.
  • : TransactGetItems and TransactWriteItems.
  • , and Tags.
  • Import/Export: to and from a local filesystem path, not S3.

What it does not implement returns UnknownOperationException:

  • Global Tables and cross-Region replication, which AWS calls "DynamoDB-specific managed features".
  • PartiQL (ExecuteStatement, BatchExecuteStatement, ExecuteTransaction). Write those reads and writes with the expression API instead.

vs DynamoDB Local

You may already use DynamoDB Local for offline development. That's a single JAR (or amazon/dynamodb-local Docker image) meant for tests on one machine, with no authentication and no throttling.

ExtendDB's README lists local development, CI, self-hosted deployments (on-prem, private cloud, edge), multi-cloud and air-gapped environments as its use cases. AWS scopes the current release more tightly: "This is a v0.1 release for development, testing, and experimentation."

vs managed DynamoDB

AWS draws the line in the announcement:

ExtendDB is not DynamoDB. It is a compatible implementation, not a replacement for the managed service. Performance characteristics, scaling behavior, and operational properties differ.

Concretely, when you run ExtendDB:

  • You own the database's availability and backups. There's no managed multi-AZ durability or point-in-time recovery; that's your PostgreSQL operations.
  • TLS is mandatory. extenddb init generates a self-signed certificate, and clients must trust it.
  • Access control is ExtendDB's own. It verifies SigV4 signatures and evaluates IAM-compatible users, groups, roles and policies, but these live in ExtendDB and "cannot be shared" with your AWS account's IAM.
  • Capacity is enforced. Throttling is on by default (a token bucket per table/partition, the throttling_enabled setting), and on-demand tables get a fixed burst of 4,000 WCU / 12,000 RCU with no auto-scaling.

It's v0.1 and licensed Apache 2.0. Benchmark it for your workload before you depend on it.

For a cloud comparison, the same calls on managed on-demand DynamoDB bill 1 write request unit for a 1 KB PutItem and 0.5 read request unit for an eventually consistent GetItem of up to 4 KB. Use the pricing calculator to price the same access pattern in the cloud.

Setup

ExtendDB runs on Linux and macOS and needs Rust 1.88+ and PostgreSQL 14+. Build it, initialize, then start the server (README):

cargo build --release
./target/release/extenddb init      # databases, admin credentials, TLS cert, config file
./target/release/extenddb serve --config extenddb.toml

serve daemonizes by default; add --foreground in a container or under a process supervisor. The repository also ships scripts/install-linux.sh and scripts/install-macos.sh. The server listens on https://127.0.0.1:18443.

Every request must be signed with a key from ExtendDB's own store, so create a user, grant it DynamoDB access, and issue a key. Use the admin password and the account ID that init prints (getting started):

./target/release/extenddb manage --user admin --password <admin-pw> \
    create-user --account-id <account-id> --user-name alice --user-password secret
./target/release/extenddb manage --user admin --password <admin-pw> \
    put-user-policy --account-id <account-id> --user-name alice --policy-name FullAccess \
    --policy-document '{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Action":"dynamodb:*","Resource":"*"}]}'
./target/release/extenddb manage --user <account-id>/alice --password secret create-access-key

Then trust the certificate and point the SDK at the endpoint with that key. For the AWS CLI and most SDKs, set AWS_CA_BUNDLE=~/.extenddb/tls/cert.pem; for Node, run with NODE_EXTRA_CA_CERTS="$HOME/.extenddb/tls/cert.pem":

import {DynamoDBClient} from '@aws-sdk/client-dynamodb';

const client = new DynamoDBClient({
  endpoint: 'https://127.0.0.1:18443',
  region: 'us-east-1',
  credentials: {accessKeyId: '<access-key-id>', secretAccessKey: '<secret-access-key>'}
});

Everything past the client config, PutItem, Query, TransactWriteItems, is identical to the code you'd write against managed DynamoDB. A single-table item layout works exactly as it does in the cloud:

PKSKtypebackendcreatedAt
TENANT#acmeAUDIT#2026-06-24eventpostgres2026-06-24T09:00:00Z
TENANT#acmeAUDIT#2026-06-24beventpostgres2026-06-24T09:01:12Z
TENANT#betaAUDIT#2026-06-24eventpostgres2026-06-24T09:02:40Z

Browsing ExtendDB data

ExtendDB's web console (https://127.0.0.1:18443/console/) manages accounts, users, policies and access keys, not items. To look at the data, use the AWS CLI with the environment from setup:

export AWS_CA_BUNDLE=~/.extenddb/tls/cert.pem
export AWS_ENDPOINT_URL_DYNAMODB=https://127.0.0.1:18443
export AWS_ACCESS_KEY_ID=<access-key-id> AWS_SECRET_ACCESS_KEY=<secret-access-key>
aws dynamodb scan --table-name AppData --region us-east-1 --max-items 25

DynoTable can't connect to ExtendDB today. Its Offline profile talks plain http://localhost:<port> and signs with a fixed throwaway key, while ExtendDB accepts only HTTPS requests signed with a key from its own store. Its PartiQL editor would also hit the missing ExecuteStatement.

Pitfalls

  • Don't treat v0.1 as production DynamoDB. Scaling, latency, and durability are your PostgreSQL's, not AWS's. Benchmark for your workload before you depend on it.
  • No Global Tables or cross-Region replication. For a second-site copy, use PostgreSQL's standard replication and HA tools, as the README advises (for example streaming replication to a standby); that gives one writer, not active-active. If you need multi-Region active-active writes, that's managed DynamoDB global tables.
  • Back up the underlying database yourself. There's no managed PITR; a dropped PostgreSQL volume is gone. Wire up pg_dump / WAL archiving like any other PostgreSQL.
  • Policies are ExtendDB's, not your AWS account's. Write them with extenddb manage … put-user-policy; an AWS IAM role or policy doesn't apply.

Next steps

By Dmitriy · Updated