Amazon DynamoDB is a popular NoSQL database used to build applications that need flexible data models, predictable access patterns, and scalable storage. Developers can use AWS SDKs to create tables, insert records, retrieve items, update data, and execute queries without managing the underlying database infrastructure.
However, not every application needs to run directly on the managed DynamoDB service. Some organizations want to run applications in their own data centers, private cloud environments, edge locations, or networks with limited internet connectivity. Other teams want a DynamoDB-compatible environment for local development and automated testing.
This is where ExtendDB becomes useful.
ExtendDB is an open-source adapter that implements the DynamoDB wire protocol and connects it to a storage backend. PostgreSQL is its reference storage backend. It allows applications that already use DynamoDB APIs to communicate with a PostgreSQL-backed system without rewriting their database operations.
Instead of changing every database query in an application, developers can change the endpoint used by the AWS SDK. ExtendDB receives the DynamoDB request, processes the operation, translates it for the storage backend, and returns a DynamoDB-compatible response.
This article explains how ExtendDB works, how to run it with PostgreSQL, how to connect a Python application using Boto3, and what developers should consider before using it in a production environment.
What Is ExtendDB?
ExtendDB is an open-source DynamoDB-compatible API adapter maintained by AWS. It is released under the Apache 2.0 license and developed as an independent project.
It is important to understand that ExtendDB is not Amazon DynamoDB and is not a PostgreSQL extension. It is a separate application that implements the DynamoDB wire protocol and uses a supported database as its storage layer.
When an application sends a request to DynamoDB, the AWS SDK creates an HTTP request containing the operation name, request data, and authentication information. ExtendDB accepts the same type of request and processes it through its own implementation of the DynamoDB API.
With PostgreSQL as the backend, the general flow looks like this:
Python / .NET / Java Application
|
v
AWS SDK or CLI
|
v
DynamoDB API Request
|
v
ExtendDB
|
v
DynamoDB API Processing
|
v
PostgreSQL Storage
|
v
DynamoDB-Compatible
Response
|
v
Application
The application does not need to understand how ExtendDB stores its records internally. It continues using the DynamoDB programming model.
For example, an application can use the PutItem operation to insert an item. ExtendDB receives the request, validates it, processes the DynamoDB operation, and stores the data through its PostgreSQL backend.
This separation allows developers to keep the application interface while choosing a different storage environment.
Why Run DynamoDB-Compatible Applications on PostgreSQL?
PostgreSQL is already used by many development and operations teams. Organizations may have existing PostgreSQL infrastructure, monitoring systems, backup procedures, database administrators, and security policies.
ExtendDB allows these teams to use DynamoDB-compatible application interfaces while storing data in PostgreSQL.
There are several practical situations where this approach can help.
Local Development
Developers often need a database environment while building and testing an application.
Using a remote DynamoDB table during every development operation can introduce network dependencies and require access to an AWS account.
ExtendDB can provide a local DynamoDB-compatible endpoint. Developers can run the application against that endpoint and test common database operations without sending requests to the managed DynamoDB service.
For PostgreSQL-backed development, the developer can run ExtendDB with a local PostgreSQL instance.
Continuous Integration and Automated Testing
Automated tests frequently create tables, insert records, execute queries, and delete test data.
A shared development database can create problems when multiple test runs access the same tables. One test may modify data while another test expects the original values.
A dedicated ExtendDB environment can provide a separate database endpoint for integration testing.
This makes it easier to control test data and verify DynamoDB-compatible operations as part of a CI pipeline.
For short-lived CI jobs, the SQLite-based extenddb-dev image may be more convenient because it does not require an external PostgreSQL server. PostgreSQL-backed ExtendDB is more appropriate when the test environment needs to validate PostgreSQL-specific deployment and storage behavior.
On-Premises Deployments
Some organizations operate applications inside their own data centers because of infrastructure policies, connectivity requirements, or existing operational arrangements.
ExtendDB allows these applications to continue using DynamoDB-compatible APIs while running on infrastructure managed by the organization.
The organization remains responsible for operating PostgreSQL and ExtendDB, including availability, backups, replication, monitoring, and security.
Hybrid and Edge Environments
Applications running in remote locations may not always have reliable access to cloud services.
A DynamoDB-compatible adapter can provide a local database endpoint for supported workloads. This can be useful in edge environments, factories, retail locations, and private networks.
However, the application must still account for synchronization and data exchange between environments if information needs to be shared with other systems.
ExtendDB does not automatically provide the managed cross-Region features of DynamoDB.
Understanding the ExtendDB Architecture
ExtendDB separates the DynamoDB API implementation from the storage backend.
This design is important because the application-facing interface does not need to change when a supported storage backend is selected.
The architecture has several major components.
API and Request Processing
The API layer accepts DynamoDB-compatible HTTP requests.
An AWS SDK or AWS CLI sends requests using the DynamoDB wire protocol. ExtendDB identifies the requested operation and passes it to the appropriate processing component.
For example, the following operations use the DynamoDB API:
CreateTablePutItemGetItemUpdateItemDeleteItemQueryScanBatchGetItemBatchWriteItemTransactWriteItems
ExtendDB implements these operations and processes their request parameters.
DynamoDB Operation Engine
The engine handles DynamoDB-style behavior, including data validation, key conditions, expressions, and request processing.
For example, when an application executes an update expression such as:
SET status = :status
ExtendDB needs to interpret the expression and apply the requested change to the correct item.
This is different from simply passing the request directly to PostgreSQL.
The adapter must understand the DynamoDB operation and translate it into the appropriate storage behavior.
PostgreSQL Storage Backend
The PostgreSQL backend is responsible for persisting application data.
ExtendDB uses a storage interface to separate the main API and processing logic from the database implementation.
This architecture makes it possible to add other storage backends without rewriting the complete API engine.
With PostgreSQL, the organization can use familiar database administration tools for backups, monitoring, replication, and recovery.
However, the PostgreSQL database is still part of the ExtendDB deployment. Developers must manage its capacity, availability, performance, and maintenance.
Authentication and Authorization
ExtendDB verifies requests using AWS Signature Version 4 (SigV4).
It also provides its own IAM-like credential and policy management.
This is an important security distinction: ExtendDB credentials and policies are separate from AWS IAM. An AWS access key created for a real AWS account does not automatically become a valid ExtendDB user credential.
The application signs requests using the credentials configured for ExtendDB.
Prerequisites for Running ExtendDB With PostgreSQL
Before installing ExtendDB, prepare the development environment.
The current PostgreSQL-backed setup requires the following components:
Requirement | Purpose |
|---|
PostgreSQL 14 or later | Stores ExtendDB application data and catalog information |
Rust toolchain | Builds ExtendDB when installing from source |
AWS CLI v2 | Tests DynamoDB-compatible operations |
Python 3.10 or later | Used by the documented development and testing environment |
Docker | Optional, useful for container-based deployment |
Boto3 | Allows Python applications to communicate with ExtendDB |
The exact toolchain requirements can change between ExtendDB releases. Check the current project documentation before building from source.
You should also prepare a PostgreSQL user with the permissions required to initialize the ExtendDB databases.
For a local development environment, PostgreSQL can run on the same machine. For a shared deployment, use an appropriately secured PostgreSQL server.
Installing and Building ExtendDB
There are different ways to run ExtendDB. Docker Compose is convenient for local development because it can start PostgreSQL and ExtendDB together.
For a more controlled installation, you can build ExtendDB from source and connect it to an existing PostgreSQL instance.
The following example demonstrates the source-build approach.
Clone the Repository
First, clone the ExtendDB repository:
git clone https://github.com/ExtendDB/extenddb.git
Move into the project directory:
cd extenddb
Make sure the required Rust toolchain and PostgreSQL dependencies are installed.
Build the PostgreSQL Backend
The PostgreSQL backend is the default backend in the source build.
Run:
cargo build --release
After the build completes, the executable is available at:
target/release/extenddb
The release build produces an optimized executable that can be used to initialize and start the server.
For a production deployment, use a released and verified build rather than assuming that the latest development branch is suitable for every environment.
Initialize ExtendDB
Run the initialization command:
./target/release/extenddb init
During initialization, ExtendDB prepares the required database structures and generates its initial configuration.
The initialization process includes:
- Creating the ExtendDB catalog database.
- Creating the data database.
- Generating an encryption key for stored access-key information.
- Creating the initial account and administrator user.
- Generating a self-signed TLS certificate.
- Writing the
extenddb.toml configuration file.
The administrator credentials are displayed during initialization. Save them securely because the initial credentials are shown only once.
Do not commit these credentials or the generated secret material to source control.
Connect to a Remote PostgreSQL Server
If PostgreSQL is running on another machine or on a managed PostgreSQL service, provide the connection details during initialization.
For example:
./target/release/extenddb init \
--pg-host my-postgres.example.com \
--pg-user postgres \
--pg-pass <admin-password>
Replace the host and credentials with the actual PostgreSQL connection information.
The command shown here is an example. Use a secure method to supply passwords in production rather than exposing them in shell history or process listings.
For remote database connections, also review PostgreSQL network access, TLS configuration, firewall rules, and database permissions.
Verify the Deployment
After initialization, run the verification command:
./target/release/extenddb verify \
--config extenddb.toml
The verification process checks the catalog, database connection, migrations, and storage structures.
A successful verification indicates that ExtendDB can communicate with the configured PostgreSQL backend.
If verification fails, review the database connection settings, PostgreSQL permissions, and initialization logs before starting the server.
Starting the ExtendDB Server
Once initialization and verification are complete, start the server:
./target/release/extenddb serve \
--config extenddb.toml
The default API endpoint listens on port 18443 over HTTPS.
For a local development environment, the endpoint is:
https://127.0.0.1:18443
ExtendDB generates a self-signed TLS certificate during initialization.
The certificate is suitable for a controlled local development environment, but applications must trust it before making verified HTTPS requests.
You can check whether ExtendDB is running with:
./target/release/extenddb status \
--config extenddb.toml
For a Linux environment, logs can be inspected through the system journal:
journalctl -t extenddb -f
The server also provides a management interface for working with accounts, users, access keys, groups, and policies.
Configure Credentials for Application Access
The administrator account is used for management operations. Applications should use separate credentials with only the permissions they need.
A recommended setup is to create an application user and an access key.
The following command creates an account:
./target/release/extenddb manage \
--user admin \
--password <admin-password> \
create-account \
--account-name development
Use the account ID returned by the command when creating an application user.
./target/release/extenddb manage \
--user admin \
--password <admin-password> \
create-user \
--account-id <account-id> \
--user-name app-user \
--user-password <user-password>
Next, attach a policy that allows the application to access the required DynamoDB operations.
For a development example, the following policy grants DynamoDB access:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "dynamodb:*",
"Resource": "*"
}
]
}
In production, replace broad permissions with a policy that allows only the required operations and resources.
After creating the user and attaching the policy, create an access key:
./target/release/extenddb manage \
--user <account-id>/app-user \
--password <user-password> \
create-access-key
Save the access key ID and secret access key securely. The secret is displayed only when it is created.
These credentials are used by the AWS SDK when communicating with ExtendDB.
Connect a Python Application Using Boto3
One of the main benefits of ExtendDB is that existing DynamoDB-compatible SDKs can communicate with it.
You do not need to replace Boto3 or rewrite every database operation.
The primary application-side change is to configure a different endpoint and use the credentials created in ExtendDB.
Install Boto3
Create a Python virtual environment:
python -m venv venv
Activate it on Windows:
venv\Scripts\activate
On macOS or Linux:
source venv/bin/activate
Install Boto3:
pip install boto3
Configure the Certificate and Credentials
For local development, ExtendDB generates a self-signed certificate.
Set the AWS_CA_BUNDLE environment variable so Boto3 can verify the server certificate:
export AWS_CA_BUNDLE=~/.extenddb/tls/cert.pem
Configure the application credentials:
export AWS_ACCESS_KEY_ID=<extenddb-access-key>
export AWS_SECRET_ACCESS_KEY=<extenddb-secret-key>
export AWS_DEFAULT_REGION=us-east-1
The Region is included because AWS SDKs use Region information when signing requests.
The Region used by the client must be consistent with the ExtendDB configuration and the requests being tested.
Create a DynamoDB Client
Now create a Boto3 client that points to ExtendDB rather than the managed DynamoDB endpoint.
import boto3
dynamodb = boto3.client(
"dynamodb",
region_name="us-east-1",
endpoint_url="https://127.0.0.1:18443"
)
print("Connected to ExtendDB")
The endpoint_url parameter is the important part.
Without an endpoint override, Boto3 normally communicates with the AWS DynamoDB service for the selected Region.
With the endpoint configured, requests are sent to the local ExtendDB server.
The application continues using the standard DynamoDB client methods.
Create a DynamoDB Table in PostgreSQL
Let's create a simple table named Customers.
The table uses customer_id as its partition key.
import boto3
dynamodb = boto3.client(
"dynamodb",
region_name="us-east-1",
endpoint_url="https://127.0.0.1:18443"
)
response = dynamodb.create_table(
TableName="Customers",
AttributeDefinitions=[
{
"AttributeName": "customer_id",
"AttributeType": "S"
}
],
KeySchema=[
{
"AttributeName": "customer_id",
"KeyType": "HASH"
}
],
BillingMode="PAY_PER_REQUEST"
)
print(response["TableDescription"]["TableName"])
The application sends a standard DynamoDB CreateTable request.
ExtendDB receives the request and creates the corresponding storage structures through its PostgreSQL backend.
The application does not need to execute SQL statements to create the table.
This is one of the main benefits of using a DynamoDB-compatible adapter: the application continues working with the same API.
Insert Data Using PutItem
After creating the table, you can insert a customer record.
response = dynamodb.put_item(
TableName="Customers",
Item={
"customer_id": {
"S": "CUST-1001"
},
"name": {
"S": "John"
},
"email": {
"S": "[email protected]"
},
"status": {
"S": "Active"
}
}
)
print("Customer inserted successfully")
The PutItem operation inserts an item into the selected table.
DynamoDB uses typed attribute values. For example, S represents a string and N represents a number.
ExtendDB accepts this DynamoDB request format and stores the item through PostgreSQL.
The application does not need to know the PostgreSQL table structure used internally by ExtendDB.
Retrieve Data Using GetItem
You can retrieve the customer using its partition key.
response = dynamodb.get_item(
TableName="Customers",
Key={
"customer_id": {
"S": "CUST-1001"
}
}
)
customer = response.get("Item")
if customer:
print("Customer found")
print(customer)
else:
print("Customer not found")
The GetItem operation retrieves an item using its primary key.
This is different from running a SQL query directly against PostgreSQL. The application continues to use DynamoDB's key-based access pattern.
Update Data Using UpdateItem
Applications frequently need to update existing records.
For example, a customer may move from an Active status to an Inactive status.
Use the UpdateItem operation:
response = dynamodb.update_item(
TableName="Customers",
Key={
"customer_id": {
"S": "CUST-1001"
}
},
UpdateExpression="SET #status = :status",
ExpressionAttributeNames={
"#status": "status"
},
ExpressionAttributeValues={
":status": {
"S": "Inactive"
}
},
ReturnValues="ALL_NEW"
)
print(response["Attributes"])
The update expression identifies the attribute to modify.
The ExpressionAttributeNames parameter is useful when an attribute name conflicts with a reserved word or needs to be represented through an alias.
The ExpressionAttributeValues parameter provides the value used by the expression.
ExtendDB processes the expression using its DynamoDB-compatible implementation and persists the updated item in PostgreSQL.
Query Data Using a Partition Key
A DynamoDB query is designed around the table's key structure.
For example, the following operation retrieves a customer using its partition key:
response = dynamodb.query(
TableName="Customers",
KeyConditionExpression="customer_id = :customer_id",
ExpressionAttributeValues={
":customer_id": {
"S": "CUST-1001"
}
}
)
for item in response["Items"]:
print(item)
The Query operation is useful when the application knows the partition key and needs to retrieve matching records.
This is an important difference between DynamoDB access patterns and general SQL queries.
When using ExtendDB, the application continues to follow DynamoDB's key and expression model. It does not gain unrestricted SQL query access simply because PostgreSQL is the storage backend.
Understanding Supported DynamoDB Operations
ExtendDB supports many common DynamoDB operations, including table management, item operations, queries, batch requests, and transactions.
The following table summarizes the main operation groups.
Operation category | Examples | Purpose |
|---|
Table management | CreateTable, DescribeTable, DeleteTable | Create and manage tables |
Item operations | PutItem, GetItem, UpdateItem, DeleteItem | Insert, retrieve, update, and delete records |
Query and Scan | Query, Scan | Retrieve records using key conditions or broader scans |
Batch operations | BatchGetItem, BatchWriteItem | Process multiple item operations |
Transactions | TransactGetItems, TransactWriteItems | Execute supported transactional operations |
Streams | ListStreams, DescribeStream, GetRecords | Access stream-related operations |
TTL | UpdateTimeToLive, DescribeTimeToLive | Configure and inspect expiration behavior |
Import and Export | ImportTable, ExportTableToPointInTime | Work with supported import and export operations |
Support for an API operation does not automatically mean that every managed DynamoDB feature is available with identical behavior.
Developers should review the documented differences for the selected ExtendDB version and storage backend before relying on an operation in production.
ExtendDB Compared With Amazon DynamoDB
Although ExtendDB implements the DynamoDB API, it has a different architecture and operational model.
Amazon DynamoDB is a fully managed AWS database service. AWS operates the infrastructure, handles service availability, and provides managed scaling and other service capabilities.
ExtendDB runs on infrastructure managed by the organization.
Area | Amazon DynamoDB | ExtendDB with PostgreSQL |
|---|
Database management | Fully managed AWS service | Operated by the organization |
API | DynamoDB API | DynamoDB-compatible API |
Storage | AWS-managed storage infrastructure | PostgreSQL |
Application SDK | AWS SDKs | Compatible AWS SDKs |
Infrastructure | AWS-managed | Self-managed or managed PostgreSQL infrastructure |
Scaling | Managed scaling capabilities | Depends on PostgreSQL and ExtendDB deployment |
Backups | Managed DynamoDB backup capabilities | PostgreSQL backup and recovery processes |
IAM | AWS IAM | ExtendDB's separate IAM-like system |
Global tables | Supported by DynamoDB | Not equivalent to DynamoDB Global Tables |
Monitoring | AWS monitoring integrations | ExtendDB and PostgreSQL monitoring |
Operational responsibility | Primarily AWS | Organization operates the deployment |
The key difference is operational responsibility.
With DynamoDB, AWS manages the database service. With ExtendDB, the organization manages the PostgreSQL database, ExtendDB server, deployment environment, security, and recovery processes.
Important Compatibility Considerations
DynamoDB compatibility should not be confused with identical behavior in every situation.
ExtendDB implements the DynamoDB wire protocol, but it has its own implementation and operational characteristics.
Before migrating an application or using ExtendDB as a long-term backend, review the documented behavior differences.
Managed DynamoDB Features Are Not Automatically Available
Some DynamoDB capabilities depend on AWS-managed infrastructure.
For example, DynamoDB Global Tables provide managed multi-Region replication. ExtendDB does not automatically provide the same feature simply because it implements the DynamoDB API.
Similarly, managed auto scaling, DynamoDB Accelerator (DAX), and other AWS service integrations should not be assumed to work in the same way.
Performance Depends on PostgreSQL
DynamoDB is designed as a managed distributed database service.
ExtendDB uses PostgreSQL as its storage backend. Its performance therefore depends on PostgreSQL configuration, server resources, database indexes, network latency, and workload patterns.
A workload that performs well on DynamoDB may behave differently when executed through ExtendDB.
For example, applications that perform frequent writes to the same keys or execute large scans should be tested with realistic data volumes.
Do not assume that changing the endpoint will preserve the same latency or throughput.
Credentials Are Separate
ExtendDB implements its own credential and policy system.
AWS IAM users, roles, and policies are not automatically available inside ExtendDB.
Create the required users and policies through ExtendDB's management interface or command-line tools.
Also ensure that applications use the correct credentials for the selected endpoint.
Data Migration Requires Planning
Changing an application's endpoint does not automatically copy existing data from DynamoDB to PostgreSQL.
If an application already has production records in DynamoDB, you need a separate data migration process.
That process should account for table definitions, primary keys, secondary indexes, item data, TTL configuration, streams, and any application-specific assumptions.
Validate the migrated data before directing production traffic to the new environment.
Security Considerations for ExtendDB
Security is especially important when an application uses a self-hosted database adapter.
ExtendDB verifies requests using SigV4 and provides its own credential and policy management.
However, developers must configure the surrounding infrastructure correctly.
Use TLS in Shared and Production Environments
The initial installation generates a self-signed TLS certificate.
This is convenient for local development, but production deployments should use a certificate trusted by the systems connecting to ExtendDB.
Configure the certificate with the correct hostnames and IP addresses. The certificate must match the endpoint used by the application.
Never disable certificate verification as a permanent solution to a TLS error.
Apply Least-Privilege Policies
Do not use the administrator credentials in application code.
Create separate application users and grant only the required permissions.
For example, a service that only retrieves customer records should not automatically receive permission to delete tables or manage credentials.
Protect PostgreSQL
PostgreSQL is the actual storage backend, so its security is equally important.
Use strong database credentials, restrict network access, enable appropriate encryption, and apply regular security updates.
The ExtendDB server should have only the database permissions it requires.
Protect Configuration and Secrets
The configuration file, TLS private key, administrator password, and access keys must be protected.
Do not commit them to Git repositories or expose them through application logs.
Use an appropriate secret-management solution for shared and production deployments.
Testing ExtendDB in a Development Environment
Before using ExtendDB with an existing application, create a small integration test that verifies the operations the application depends on.
For example, a test can create a table, insert a record, retrieve it, and verify the returned value.
A simplified Python example looks like this:
import boto3
import uuid
dynamodb = boto3.client(
"dynamodb",
region_name="us-east-1",
endpoint_url="https://127.0.0.1:18443"
)
table_name = "IntegrationTests"
def test_customer_operations():
customer_id = str(uuid.uuid4())
dynamodb.put_item(
TableName=table_name,
Item={
"customer_id": {"S": customer_id},
"name": {"S": "Test Customer"}
}
)
response = dynamodb.get_item(
TableName=table_name,
Key={
"customer_id": {"S": customer_id}
}
)
item = response.get("Item")
assert item is not None
assert item["name"]["S"] == "Test Customer"
dynamodb.delete_item(
TableName=table_name,
Key={
"customer_id": {"S": customer_id}
}
)
This example assumes that the table already exists and that the test environment has valid ExtendDB credentials and certificate configuration.
For a complete test suite, also verify update expressions, conditional writes, queries, pagination, batch operations, and transactions if the application uses them.
The goal is to test the actual access patterns used by the application rather than checking only whether the server is reachable.
Common Problems and Troubleshooting
Several issues can occur when connecting an AWS SDK to ExtendDB.
Problem | Possible reason | Recommended solution |
|---|
Connection refused | ExtendDB is not running or the port is incorrect | Check the server status and endpoint |
TLS certificate error | The client does not trust the generated certificate | Configure AWS_CA_BUNDLE |
Signature mismatch | Incorrect credentials, Region, or signing configuration | Verify the access keys and Region |
Access denied | The ExtendDB user lacks the required policy | Review the user's permissions |
Table creation fails | Invalid key schema or table definition | Check the DynamoDB request parameters |
PostgreSQL connection failure | Incorrect database settings or unavailable server | Verify PostgreSQL connectivity and credentials |
Slow queries | Storage configuration or workload characteristics | Profile PostgreSQL and review query patterns |
Application data is missing | The application is using a different endpoint or database | Verify endpoint and storage configuration |
TLS Certificate Errors
A common local development issue is a certificate verification failure.
ExtendDB generates a self-signed certificate, which is not automatically trusted by every application.
Configure the certificate path:
export AWS_CA_BUNDLE=~/.extenddb/tls/cert.pem
Then run the application again.
For production, use an appropriate CA-signed certificate and configure the client to trust the relevant certificate chain.
Signature Mismatch Errors
SigV4 signatures depend on the credentials, Region, service name, request details, and signing time.
If the client uses incorrect credentials or an unexpected Region, ExtendDB may reject the request.
Verify that the application uses the access key created in ExtendDB and that the SDK is signing requests for the DynamoDB service.
Also check the system clock if signature-related errors continue.
PostgreSQL Connection Errors
If ExtendDB cannot connect to PostgreSQL, check the database hostname, port, username, password, database permissions, and network configuration.
Run the ExtendDB verification command again after correcting the settings.
Do not assume that a successful PostgreSQL connection from a developer's machine means the ExtendDB process has the same network access. Test connectivity from the environment where ExtendDB actually runs.
Best Practices for Using ExtendDB
A reliable ExtendDB deployment requires more than a successful API connection.
Consider the following practices:
- Use the same DynamoDB access patterns that the application already relies on.
- Test all required operations against the selected ExtendDB version.
- Use a dedicated PostgreSQL database environment for each deployment where appropriate.
- Keep PostgreSQL backups and recovery procedures tested.
- Use separate ExtendDB credentials for applications and administrators.
- Apply least-privilege access policies.
- Use trusted TLS certificates in shared and production environments.
- Monitor both ExtendDB and PostgreSQL.
- Measure performance using realistic application workloads.
- Validate data before migrating production traffic.
- Pin released container image versions or image digests.
- Review backend-specific compatibility limitations before deployment.
For production use, the team should also define an operational plan for PostgreSQL maintenance, server upgrades, failover, backups, and disaster recovery.
ExtendDB does not remove these responsibilities. It provides a DynamoDB-compatible interface on top of infrastructure that the organization operates.
Advantages and Disadvantages of ExtendDB
Advantages
ExtendDB allows existing DynamoDB applications to use a different storage environment without rewriting their API calls.
It supports common DynamoDB operations, including item management, queries, batch operations, transactions, streams, and TTL-related operations.
Using PostgreSQL as the backend allows organizations to use familiar database administration tools and existing operational knowledge.
The open-source Apache 2.0 license also allows organizations to inspect, modify, and deploy the project according to their requirements.
ExtendDB can be useful for local development, automated testing, private infrastructure, hybrid environments, and edge deployments.
Disadvantages
ExtendDB is not a fully managed replacement for Amazon DynamoDB.
The organization must operate PostgreSQL and ExtendDB, including backups, replication, monitoring, security, and availability.
Performance depends on the selected storage backend and infrastructure. It should not be assumed to match DynamoDB's managed performance or scaling characteristics.
Some DynamoDB features that depend on AWS-managed infrastructure are not available with the same behavior in ExtendDB.
Applications also need to account for differences in API behavior, backend capabilities, and operational configuration.
Finally, migrating an existing application does not automatically migrate its data. A separate data migration and validation process is required.
Conclusion
ExtendDB provides a useful way to run DynamoDB-compatible applications on infrastructure that an organization manages itself.
By implementing the DynamoDB wire protocol, it allows existing AWS SDKs and tools to communicate with a different storage environment. When PostgreSQL is selected as the backend, application data is stored in a database that many development and operations teams already understand.
The most important advantage is that application code can continue using DynamoDB operations such as PutItem, GetItem, UpdateItem, and Query. In many cases, the main application-side change is configuring a different endpoint and using the appropriate ExtendDB credentials.
However, ExtendDB and Amazon DynamoDB are different systems. Their performance, scaling, security management, and managed-service capabilities are not identical.
Before using ExtendDB for an important application, test its supported operations, review the documented behavior differences, and measure performance with realistic workloads.
For local development, CI testing, on-premises deployments, and environments where a self-managed database is required, ExtendDB provides an interesting option for keeping the DynamoDB programming model while using PostgreSQL as the storage backend.
Join the conversation! Your thoughts help the community grow.