What is Amazon DynamoDB and what problems does it solve?
Learn what Amazon DynamoDB is, how this serverless NoSQL database scales automatically, and the operational and scaling problems it solves, with examples.
Expected Interview Answer
Amazon DynamoDB is a fully managed, serverless NoSQL key-value and document database that delivers single-digit millisecond performance at virtually any scale, with automatic partitioning, replication and no servers for you to manage.
It solves the operational and scaling pain of running your own database: DynamoDB handles hardware provisioning, patching, replication across three Availability Zones, and horizontal scaling automatically. Because data is spread across partitions by a hash of the partition key, throughput and storage grow without a fixed ceiling, so it stays fast whether you store megabytes or petabytes. It offers on-demand or provisioned capacity, built-in encryption, point-in-time recovery, TTL expiry, DynamoDB Streams for change data capture, and global tables for multi-region active-active workloads.
- Fully managed — no servers, patching or replication to run yourself
- Predictable single-digit millisecond latency at any scale
- Automatic horizontal scaling via partitioning
- High availability with data replicated across three Availability Zones
- Flexible schema suited to fast-changing application data
- Pay-per-use on-demand or provisioned capacity billing
AI Mentor Explanation
Think of DynamoDB as the stadium's automated ticketing turnstiles instead of a single manual gate. As a packed crowd surges in, more turnstiles open by themselves so nobody waits, and each fan is routed by their seat block. You never staff or resize the gates yourself; the system absorbs a sold-out final as easily as a quiet league match, keeping entry fast no matter how many people arrive.
Step-by-Step Explanation
Step 1
Create a table
Define a table with a partition key (and optional sort key); no fixed column schema beyond the keys is required.
Step 2
Choose capacity mode
Pick on-demand (pay per request, auto-scaling) or provisioned (set read/write capacity units, optionally with auto scaling).
Step 3
Write items
Put JSON-like items; DynamoDB hashes the partition key to place the item on a partition automatically.
Step 4
Read by key
GetItem or Query by key returns items in single-digit milliseconds without you managing indexes on disk.
Step 5
Scale and protect
Add global secondary indexes, enable Streams, TTL, PITR backups or global tables as the application grows.
What Interviewer Expects
- Knows DynamoDB is a managed serverless NoSQL key-value/document store
- Understands automatic partitioning and horizontal scaling
- Mentions single-digit millisecond latency and high availability
- Can name the problems it solves: operations, scaling, resilience
- Aware of on-demand vs provisioned capacity
Common Mistakes
- Calling DynamoDB a relational/SQL database
- Thinking you must provision and manage servers
- Assuming it supports joins and complex ad-hoc queries like SQL
- Ignoring the importance of a well-chosen partition key
- Confusing it with Amazon RDS or Aurora
Best Answer (HR Friendly)
“Amazon DynamoDB is a database service from AWS that stores data and scales automatically without you managing any servers. It stays extremely fast even under huge, unpredictable traffic, which is why it is popular for high-scale apps like shopping carts, gaming and IoT.”
Code Example
import { DynamoDBClient } from '@aws-sdk/client-dynamodb'
import { DynamoDBDocumentClient, PutCommand } from '@aws-sdk/lib-dynamodb'
const ddb = DynamoDBDocumentClient.from(new DynamoDBClient({ region: 'us-east-1' }))
await ddb.send(new PutCommand({
TableName: 'Orders',
Item: {
orderId: 'O-1001', // partition key
createdAt: '2026-07-21', // sort key
customer: 'alice',
total: 42.5,
status: 'PENDING'
}
}))Follow-up Questions
- What is a partition key and why does its choice matter?
- When would you choose on-demand vs provisioned capacity?
- How does DynamoDB achieve high availability?
- What are DynamoDB Streams used for?
- When would you NOT use DynamoDB?
MCQ Practice
1. DynamoDB is best described as which type of database?
DynamoDB is a fully managed, serverless NoSQL database supporting key-value and document data models.
2. How does DynamoDB scale to handle more data and traffic?
DynamoDB automatically spreads data across partitions using a hash of the partition key, scaling horizontally.
3. Which is a core benefit DynamoDB provides out of the box?
DynamoDB automatically replicates data across three Availability Zones for durability and high availability.
Flash Cards
What is DynamoDB? — A fully managed, serverless NoSQL key-value and document database on AWS with single-digit millisecond latency.
How does DynamoDB scale? — Automatically and horizontally, by partitioning items across nodes using a hash of the partition key.
What operational work does DynamoDB remove? — Server provisioning, patching, replication and manual scaling — all handled by AWS.
Which capacity modes exist? — On-demand (pay per request) and provisioned (set read/write capacity units, optional auto scaling).