DynamoDB Developer Playbook¶
A practical, production-grade guide to Amazon DynamoDB—from modeling to launch.
This playbook blends core concepts, repeatable patterns, and ready-to-use assets (diagrams, queries, checklists, sample data).
Start with Concepts, explore the Examples, and use Checklists before shipping.
Quick Nav¶
Quick Start (5 minutes)¶
- Skim Concepts → PK/SK, item collections, LSI vs GSI, idempotent writes.
- Open an example and browse Samples:
- E-commerce → Samples · Access Patterns · Diagrams · Queries
- Social/Feed → Samples · Access Patterns · Diagrams · Queries
- Copy payloads from
queries.httpand run against your AWS account. - Before prod, run Production Checklists.
Examples¶
-
E-commerce
Model: orders, lines, payments, shipments, inventory.
Paths: GSI1 OrdersByUser, GSI2 OrdersByStatus, conditional inventory updates.
Open: Overview · Samples · Access Patterns · Diagrams · Queries -
Social / Activity Feed
Model: posts, likes, comments, tags, followers, notifications.
Paths: GSI1 PostsByAuthor, GSI2 PostsByTag, GSI3 FeedByUser, fan-out/sharding.
Open: Overview · Samples · Access Patterns · Diagrams · Queries
What’s inside¶
- Mermaid diagrams: access-pattern matrices + key-design cheat sheets for both examples.
- Sample data: CSV + JSONL seeds to test queries quickly.
- HTTP queries: SigV4-ready
.httppayloads for Get/Query/Put/Update with conditions. - Checklists: design, cost & alarms, security/IAM, ops/observability, DR/backup, migration & evolution.
How to use this playbook¶
- List access patterns and SLAs; design keys first (generic
PK,SK; decorate values:USER#42,ORDER#123). - Ensure hot paths are Get/Query (no Scan). Add LSIs/GSIs only where needed.
- Prototype with Samples; exercise
queries.http; confirm RCUs/WCUs and item sizes. - Ship with guardrails: run the checklists and set alarms/dashboards.