PROVIDER Β· AWS fully managed key-value NoSQL service
Amazon DynamoDB
Amazon DynamoDB is AWS's fully managed key-value NoSQL service promising single-digit millisecond latency at any scale, with on-demand capacity near zero cost at zero traffic as the default serverless data layer.
4.5pts
Pros
Cons
Product Information
Detailed Notes
Overview
Amazon DynamoDB launched in 2012 as AWS's fully managed NoSQL service with key-value and document models and vendor-promised single-digit millisecond latency at any scale, evolving from the Dynamo paper's engineering experience into the default data layer for serverless on AWS.
For Backend & Database work the advantage is operations-free hosting with predictable latency, since no instance selection, patching, or shard planning is needed, tables partition automatically, on-demand capacity falls to zero cost at zero traffic, and pairing with Lambda and API Gateway is the simplest serverless data stack.
The key constraint is access patterns, because only primary key and secondary index queries are supported with no free-form SQL conditions or joins, and billing follows read and write capacity units or on-demand requests, so a wrong capacity mode or a table scan inflates cost quickly.
Core Strengths
- Fully managed with automatic partitioning and no operations work
- Vendor-promised single-digit millisecond latency at any scale
- On-demand capacity approaches zero cost without traffic, fitting bursty workloads
- Streams capture changes for triggers and downstream sync with global tables for multi-region
Product Ecosystem
Tables, indexes, and access patterns
Partition and sort keys form the primary key with GSIs and LSIs for secondary access, and every query must use keys, making denormalisation and redundant indexes normal.
Capacity modes and billing
On-demand avoids forecasting, provisioned with autoscaling costs less at steady load, and reserved capacity locks one to three year discounts.
Streams, TTL, and global tables
Streams capture changes, TTL expires items automatically, and global tables provide active-active multi-region replication.
Drawbacks
- No free-form queries or joins, so changing access needs means new tables or indexes
- Table scans and inefficient queries multiply capacity consumption and cost
- Items cap at 400 KB, forcing large objects into S3
- Available only on AWS, so cross-cloud migration rewrites the data layer
Use Cases
- Serverless and event-driven apps (β β β β β ) - Natural fit with Lambda
- Carts, sessions, and game state (β β β β β ) - Low-latency point access
- High-concurrency IoT and telemetry writes (β β β β ) - Capacity scales automatically
- Complex queries and reporting (β ) - Export to analytics services
Pricing
| Plan | Price | Scope |
|---|---|---|
| On-demand | Per request, about USD 1.25 per million writes | No forecasting, fits variable load |
| Provisioned | Per RCU/WCU-hour | Cheaper at steady load with autoscaling |
| Reserved capacity | One or three year commitment | Up to roughly 50 to 70 percent off on-demand |
DynamoDB cost tracks access patterns rather than data volume, since point reads are cheap and scans expensive, and reserved capacity typically halves steady-state bills while development should stay on-demand to avoid paying for idle capacity.
FAQ
-
DynamoDB or MongoDB? DynamoDB for fixed low latency, operations-free hosting, and serverless integration, MongoDB for flexible queries, aggregation, and cross-cloud deployment.
-
Are more GSIs better? No, each global secondary index replicates data and consumes write capacity, so keep indexes aligned with real query patterns.
-
How are hot partitions avoided? Pick high-cardinality partition keys, avoid timestamp or status prefixes, and add random suffixes to spread writes when needed.