AWS DynamoDB
AWS serverless NoSQL database with single-digit millisecond latency at any scale, ideal for applications requiring high performance and automatic scalability.
What it is
DynamoDB is AWS's serverless NoSQL database. It offers consistent single-digit millisecond latency regardless of data size or request volume. No servers to manage, patches to apply, or capacity to manually plan.
Data model
- Tables: collections of items
- Items: individual records (similar to rows)
- Attributes: fields within an item (flexible schema)
- Partition Key: primary key for distribution
- Sort Key: optional, for ordering within a partition
Capacity modes
| Mode | Characteristics |
|---|---|
| On-demand | Pay per request, auto-scales, ideal for unpredictable workloads |
| Provisioned | Reserved capacity, cheaper for predictable workloads |
Key features
- Global Tables: automatic multi-region replication
- Streams: change capture for event-driven architectures
- TTL: automatic item expiration
- DAX: in-memory cache for microsecond latency
- Transactions: ACID operations across items
Access patterns
DynamoDB requires designing schema around access patterns, not entities. Single-table design is common to minimize queries.
Why it matters
DynamoDB is the default serverless database in AWS. Its per-request pricing model and millisecond latency make it ideal for high-traffic applications, but its data model requires thinking about access patterns before designing the schema — a mental shift from relational databases.
References
- DynamoDB Documentation — Official documentation.
- The DynamoDB Book — Alex DeBrie. Definitive modeling guide.
- DynamoDB Best Practices — AWS, 2024. Modeling and performance best practices.