Menu
User

DropVPS Team

Writer: Cooper Reagan

How to install dynamodb on Debian 12

How to install dynamodb on Debian 12

Publication Date

10/10/2025

Category

Articles

Reading Time

3 Min

Table of Contents

Amazon DynamoDB is a powerful NoSQL database service built for performance, scalability, and flexibility. It’s widely used for real-time applications, analytics, and high-traffic workloads. While DynamoDB runs on AWS, developers can use DynamoDB Local to test and build apps on their own systems — without connecting to the cloud.

Update the System

Start by making sure your Debian server is up to date to avoid dependency issues:

sudo apt update && sudo apt upgrade -y

Install Java Runtime

DynamoDB Local requires Java to run. Install OpenJDK 17, which is fully compatible with DynamoDB:

sudo apt install openjdk-17-jdk -y

Check the version:

java -version

You should see output showing Java 17 or higher.

Create a Directory for DynamoDB

Create a dedicated folder to store DynamoDB files and move into it:

mkdir ~/dynamodb
cd ~/dynamodb

Download DynamoDB Local

Use wget to download the latest DynamoDB Local package from Amazon’s S3 repository:

wget https://s3.us-west-2.amazonaws.com/dynamodb-local/dynamodb_local_latest.tar.gz

Extract the downloaded archive:

tar -xvzf dynamodb_local_latest.tar.gz

Start DynamoDB Local

You can now start DynamoDB using Java:

java -Djava.library.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar -sharedDb

By default, DynamoDB runs on port 8000. Keep this terminal open while it runs.

Verify DynamoDB is Running

To confirm it’s active, open another terminal and check:

aws dynamodb list-tables --endpoint-url http://localhost:8000

If it returns an empty list ([]), DynamoDB is up and running locally.

Install AWS CLI (If Needed)

If you don’t already have the AWS Command Line Interface, install it using:

sudo apt install awscli -y

Configure it (you can enter dummy credentials for local use):

aws configure

Create a Test Table

Use the AWS CLI to create a simple test table and confirm that everything is working properly:

aws dynamodb create-table \
  --table-name Users \
  --attribute-definitions AttributeName=UserID,AttributeType=S \
  --key-schema AttributeName=UserID,KeyType=HASH \
  --provisioned-throughput ReadCapacityUnits=5,WriteCapacityUnits=5 \
  --endpoint-url http://localhost:8000

List your tables to verify:

aws dynamodb list-tables --endpoint-url http://localhost:8000

Run DynamoDB as a Background Service

If you want DynamoDB to start automatically on boot, create a systemd service file:

sudo nano /etc/systemd/system/dynamodb.service

Add this configuration:

[Unit]
Description=DynamoDB Local Service
After=network.target

[Service]
ExecStart=/usr/bin/java -Djava.library.path=/home/debian/dynamodb/DynamoDBLocal_lib -jar /home/debian/dynamodb/DynamoDBLocal.jar -sharedDb
Restart=always
User=debian

[Install]
WantedBy=multi-user.target

Save and close, then enable and start the service:

sudo systemctl enable dynamodb
sudo systemctl start dynamodb

You can verify it’s active:

sudo systemctl status dynamodb

Installing DynamoDB Local on Debian 12 gives developers a simple, fast, and fully functional NoSQL testing environment. You can build and test your applications locally without any AWS charges, then deploy them seamlessly to the AWS cloud.

Linux VPS
U
Loading...

Related Posts