AWS DynamoDB
What it is: AWS fully managed serverless NoSQL database. Key-value and document data models. Single-digit millisecond performance at any scale.
What It Does Best
Zero operations. No servers to manage. Auto-scaling, backups, encryption built-in. True serverless.
Consistent performance. Single-digit millisecond reads/writes at any scale. No performance cliffs.
Event-driven architecture. DynamoDB Streams trigger Lambda functions. Real-time data processing.
Key Features
Global tables: Multi-region, multi-active replication
DynamoDB Streams: Change data capture for event-driven apps
Transactions: ACID transactions across multiple items
Auto-scaling: Automatically adjust capacity based on traffic
Point-in-time recovery: Restore to any second in last 35 days
Pricing
On-demand: $1.25 per million writes, $0.25 per million reads
Provisioned: $0.47 per write capacity unit/month, cheaper for steady workloads
Storage: $0.25 per GB/month
Free tier: 25 GB storage, 25 WCU, 25 RCU forever
When to Use It
โ AWS-native applications
โ Serverless architectures
โ Gaming leaderboards, session stores
โ Mobile app backends with spiky traffic
โ Need predictable single-digit millisecond latency
When NOT to Use It
โ Complex queries and joins (limited query patterns)
โ Analytics and aggregations (no GROUP BY)
โ Multi-cloud or hybrid deployments
โ Need flexible schema changes frequently
โ Budget very tight (can get expensive at scale)
Common Use Cases
User sessions: Fast, scalable session stores for web apps
Gaming: Player profiles, game state, leaderboards
Mobile backends: User data, app state with offline sync
Shopping carts: E-commerce cart and order management
IoT data: Device state and telemetry at massive scale
DynamoDB vs Alternatives
vs MongoDB: DynamoDB simpler ops, MongoDB more flexible queries
vs Cassandra: DynamoDB fully managed, Cassandra more control
vs Redis: Redis faster for caching, DynamoDB better for persistence
Unique Strengths
True serverless: Zero infrastructure management
Predictable performance: Guaranteed single-digit millisecond latency
Global tables: Multi-region replication in minutes
AWS integration: Native integration with Lambda, IAM, CloudWatch
Bottom line: Best serverless database for AWS. Design your access patterns upfrontโDynamoDB rewards good data modeling. Perfect for microservices, terrible for ad-hoc analytics.