Skip to main content

DynamoDB

Amazon DynamoDB

Pronunciation
dy-NAM-oh dee-BEE
Updated 2 min read

Share this page

Send the link, quote the definition with a link back, or show it as a card on your own site.

https://softwaredictionary.org/terms/dynamodb

In short

Amazon DynamoDB is a fully managed NoSQL database on AWS that stores items by key, scales automatically and answers lookups in single-digit milliseconds.

What is DynamoDB?

AWS launched DynamoDB in 2012, building on ideas from Amazon's earlier internal Dynamo system. There are no servers to run: you create a table, choose how to pay for capacity, either on demand per request or provisioned in advance, and AWS handles storage, replication across availability zones, backups and scaling.

Every item is found by its primary key. A simple key is a partition key alone, such as userId; a composite key adds a sort key, such as orderDate, so one partition can hold many related items in order. DynamoDB spreads partitions across many machines by hashing the partition key, which is what lets it grow to huge sizes while keeping lookups fast.

Queries work best along the keys: get one item, or read a range of items in one partition. Global and local secondary indexes add other access patterns, DynamoDB Streams emits a change feed for triggers and pipelines, and global tables replicate data across regions. Transactions are supported across multiple items.

A common misconception is that DynamoDB can be designed like a relational database. It has no joins and ad hoc queries are expensive, so you design tables around the queries you know you'll need, often storing several entity types in one table. Choosing a partition key with many distinct values also matters, because a hot key that receives most of the traffic can be throttled.

Key takeaways

  • DynamoDB is a fully managed key-value and document database on AWS.
  • Items are found by a partition key, optionally with a sort key.
  • It scales horizontally by spreading partitions across many machines.
  • Secondary indexes, streams, global tables and transactions are built in.
  • Tables are designed around access patterns; there are no joins.

Example

Writing and querying items with the AWS SDK (Node.js)javascript
import { DynamoDBClient } from "@aws-sdk/client-dynamodb";
import { DynamoDBDocumentClient, PutCommand, QueryCommand } from "@aws-sdk/lib-dynamodb";

const db = DynamoDBDocumentClient.from(new DynamoDBClient({ region: "eu-central-1" }));

// Partition key: userId, sort key: orderDate
await db.send(new PutCommand({
  TableName: "Orders",
  Item: { userId: "u42", orderDate: "2026-10-03", total: 49 },
}));

// All of one user's orders since October, in date order
const { Items } = await db.send(new QueryCommand({
  TableName: "Orders",
  KeyConditionExpression: "userId = :u AND orderDate >= :d",
  ExpressionAttributeValues: { ":u": "u42", ":d": "2026-10-01" },
}));

Readers ask

Is DynamoDB SQL or NoSQL?

NoSQL. It is a key-value and document store. AWS offers a SQL-compatible query language called PartiQL for it, but the data model and performance still follow keys, not relational tables.

What is the difference between DynamoDB and MongoDB?

Both store documents. MongoDB has richer ad hoc queries and aggregations and can run anywhere. DynamoDB is AWS-only and fully serverless, with predictable performance as long as queries follow the keys and indexes you designed.

What is single-table design?

A DynamoDB pattern where several related entity types, such as customers and their orders, share one table and are told apart by their keys, so related data can be read in a single query.

See also

Spotted a mistake or something missing on this page?Suggest an edit

Read a random page
Open today's review
Switch to the dark theme
Read this page in Türkçe

More

Settings