Deploy DynamoDB
A self-hosted DynamoDB for application development and testing.
dynamodb
Just deployed
/home/dynamodblocal/data
Deploy and Host DynamoDB Local on Railway
DynamoDB Local is a self-hosted Amazon DynamoDB environment for application development and testing. It provides a DynamoDB-compatible API that can be used with AWS SDKs, AWS CLI, automated tests, and local development workflows without connecting to the managed DynamoDB service.
About Hosting DynamoDB Local
This deployment runs the official DynamoDB Local container on Railway.
DynamoDB Local exposes an HTTP API compatible with common DynamoDB development workflows and can persist local database files on a Railway Volume.
The deployment uses shared database mode so clients can work against a single local DynamoDB database regardless of the AWS access key or region used by the client.
No PostgreSQL, Redis, MySQL, MongoDB, or external database is required.
Common Use Cases
- Develop applications that use DynamoDB
- Test DynamoDB reads, writes, queries, and scans
- Run integration tests without connecting to AWS
- Test AWS SDK integrations
- Test table creation and schema workflows
- Create isolated DynamoDB environments for CI/CD
- Develop against DynamoDB-compatible APIs without cloud usage costs
- Share a reusable DynamoDB testing environment across development teams
Dependencies for DynamoDB Local Hosting
This deployment requires:
- Official DynamoDB Local container image
- Railway networking
- A Railway Volume for persistent database storage
- AWS CLI, AWS SDK, or another DynamoDB-compatible client
DynamoDB Local does not require:
- PostgreSQL
- Redis
- MySQL
- MongoDB
- A real AWS account
- Real AWS access credentials
Networking
DynamoDB Local listens on port:
8000
Generate a Railway public domain for this port.
The resulting API endpoint will look similar to:
https://your-dynamodb-local.up.railway.app
This endpoint is intended for DynamoDB API requests.
DynamoDB Local does not provide a built-in web dashboard or graphical user interface.
Opening the root domain directly in a browser should therefore not be expected to display a web application.
Persistent Storage
Add a Railway Volume and mount it at:
/home/dynamodblocal/data
DynamoDB Local stores its local database files in this directory.
Using persistent storage allows local tables and items to survive supported container restarts and redeployments.
No external database is required for persistence.
Shared Database Mode
This deployment uses DynamoDB Local shared database mode.
With shared database mode enabled, clients connect to the same local DynamoDB database instead of creating separate database files based on AWS access key and region.
This makes the deployment easier to share across:
- Development applications
- CI pipelines
- Test suites
- Multiple SDK clients
- Team environments
Connecting with AWS CLI
AWS CLI can connect to DynamoDB Local using a custom endpoint.
Configure test credentials:
export AWS_ACCESS_KEY_ID=test
export AWS_SECRET_ACCESS_KEY=test
export AWS_DEFAULT_REGION=us-east-1
Then list available tables:
aws dynamodb list-tables \
--endpoint-url https://your-dynamodb-local.up.railway.app
A new deployment typically returns:
{
"TableNames": []
}
The credentials do not need to belong to a real AWS account when communicating with DynamoDB Local.
Creating a Table
Example:
aws dynamodb create-table \
--table-name Users \
--attribute-definitions AttributeName=id,AttributeType=S \
--key-schema AttributeName=id,KeyType=HASH \
--billing-mode PAY_PER_REQUEST \
--endpoint-url https://your-dynamodb-local.up.railway.app
Verify the table:
aws dynamodb list-tables \
--endpoint-url https://your-dynamodb-local.up.railway.app
Connecting Applications
Applications can configure their AWS SDK to use the Railway domain as a custom DynamoDB endpoint.
Example endpoint:
https://your-dynamodb-local.up.railway.app
Applications running inside the same Railway project can alternatively use Railway private networking.
For a service named dynamodb-local:
http://dynamodb-local.railway.internal:8000
Use test credentials and the same endpoint configuration supported by your AWS SDK.
Example Node.js Client
Example using AWS SDK for JavaScript:
import { DynamoDBClient } from "@aws-sdk/client-dynamodb";
const client = new DynamoDBClient({
region: "us-east-1",
endpoint: "https://your-dynamodb-local.up.railway.app",
credentials: {
accessKeyId: "test",
secretAccessKey: "test"
}
});
No real AWS credentials are required for DynamoDB Local.
Persistence Test
To verify persistent storage:
- Create a DynamoDB table.
- Insert one or more items.
- Restart the Railway service.
- List the tables again.
- Confirm that the previously created table still exists.
If the table remains available after restart, the Railway Volume is being used correctly.
Service Architecture
Application / AWS SDK / AWS CLI
│
│ DynamoDB API
▼
DynamoDB Local
:8000
│
▼
/home/dynamodblocal/data
│
▼
Railway Volume
Important Notes
- DynamoDB Local is intended for development, testing, and CI workflows.
- It is not a production replacement for Amazon DynamoDB.
- DynamoDB Local does not provide a built-in web UI.
- Use AWS CLI, AWS SDKs, or another DynamoDB-compatible client to interact with the service.
- Persistent database files are stored under
/home/dynamodblocal/data. - A Railway Volume is recommended when tables and items need to survive restarts.
- No PostgreSQL, Redis, MySQL, or MongoDB service is required.
- Real AWS credentials are not required.
- Some DynamoDB cloud features may behave differently or may not be available in DynamoDB Local.
- Advanced application behavior should be validated against the managed DynamoDB service before production deployment.
Why Deploy DynamoDB Local on Railway?
Railway provides a managed platform for running DynamoDB Local without requiring users to maintain dedicated development servers.
Deploying DynamoDB Local on Railway provides a reusable DynamoDB-compatible endpoint for application development, integration testing, CI pipelines, and team environments without connecting directly to production AWS resources.
Template Content
dynamodb
amazon/dynamodb-local:latest