Blog
DynamoDB schema patterns and single-table design guides.
-
DynamoDB On-Demand vs Provisioned: The Math, Not the Marketing
AWS makes on-demand sound effortless and provisioned sound risky. The pricing tells a different story. Here's the actual break-even math, the operational trade-offs, and when each is the right call.
-
DynamoDB Idempotency Keys: The Right Way to Deduplicate Writes
Stripe-style idempotency keys, implemented correctly with DynamoDB. The pattern, the failure modes, and how to combine the idempotency record with the actual write.
-
DynamoDB Pagination Done Correctly
LastEvaluatedKey is opaque, queries can return empty pages with more data behind them, and exposing the raw token to clients leaks your schema. The full pagination playbook.
-
DynamoDB Transactions vs Conditional Writes: When Each Is the Right Tool
Conditional writes give you single-item atomicity for free. Transactions give you multi-item atomicity at 2x the cost. Knowing which one to reach for is half the battle.
-
DynamoDB Streams: Fan-Out, CDC, and Projections
Streams turn DynamoDB into a source of truth for everything else. Three patterns - fan-out, change data capture, and read-model projections - that should be in every DynamoDB engineer's toolkit.
-
DynamoDB Schema Pattern: GraphQL Resolvers
A single-table DynamoDB schema designed for GraphQL APIs - field-level resolvers, DataLoader batching, and avoiding N+1 without giving up on a single-table design.
-
DynamoDB TTL: Soft Deletes, Expiry, and the Patterns Around Them
TTL is more than auto-expiry. Used right, it powers soft deletes, retention windows, and archival flows - for free. Used wrong, it deletes data you needed.
-
DynamoDB Schema Pattern: Event Sourcing
An append-only event log in DynamoDB - aggregates, events, snapshots, and cross-aggregate event-type queries. Plus the projection patterns that make event sourcing actually usable.
-
DynamoDB Hot Partitions and Write Sharding: A Practical Guide
Hot partitions throttle silently until they don't. The fix is write sharding - but only in the right places. Here's where, how, and what it costs.
-
DynamoDB Schema Pattern: Gaming Leaderboard
A DynamoDB schema for game leaderboards - daily, weekly, seasonal, and global - with player stats and session history. Includes the 'when to use Redis instead' tradeoff.
-
DynamoDB Sparse Indexes: The Highest-Leverage Pattern Nobody Explains
A sparse GSI indexes only the items where the key is set. That tiny detail unlocks workflow queues, soft deletes, flagged-content lists, and 'needs attention' dashboards - cheaply.
-
DynamoDB Schema Pattern: Marketplace (Two-Sided)
A complete single-table DynamoDB schema for a two-sided marketplace - buyers, sellers, listings, orders, and mutual reviews. Access patterns, GSIs, and ElectroDB code.
-
DynamoDB GSI Design: When to Add One vs Reshape Your Sort Key
Most teams reach for a GSI when a new access pattern shows up. Half the time, the cleaner answer is reshaping the sort key. A framework for deciding.
-
DynamoDB Single-Table Pattern: Analytics Events
A production-ready DynamoDB schema for high-volume analytics events with write-sharded ingestion, session aggregation, and TTL-based data lifecycle.
-
DynamoDB Single-Table Pattern: Workflow/State Machine
A production-ready DynamoDB schema for workflow execution with ordered steps, state transitions, and execution history.
-
DynamoDB Single-Table Pattern: Inventory Management
A production-ready DynamoDB schema for inventory management with atomic stock updates, warehouse tracking, and movement history.
-
DynamoDB Single-Table Pattern: Content Management (CMS)
A production-ready DynamoDB schema for a headless CMS with articles, authors, categories, tags, and content versioning.
-
DynamoDB Cost Optimization: The 5 Levers That Actually Matter
Practical DynamoDB cost optimization - from capacity mode selection to projection tuning - with real cost calculations.
-
DynamoDB Single-Table Pattern: Booking/Scheduling
A production-ready DynamoDB schema for booking and scheduling with atomic slot reservation, provider availability, and double-booking prevention.
-
ElectroDB vs DynamoDB-Toolbox vs Dynamoose: Which DynamoDB ORM?
A practical comparison of the three main DynamoDB ORMs for TypeScript - what each is best at and when to use it.
-
DynamoDB Single-Table Pattern: IoT Time-Series
A production-ready DynamoDB schema for IoT device readings with time-range queries, TTL-based data lifecycle, and pre-computed aggregations.
-
DynamoDB Single-Table Pattern: Chat/Messaging
A production-ready DynamoDB schema for chat and messaging with conversations, paginated messages, read receipts, and unread counts.
-
The 5 Most Common DynamoDB Single-Table Design Mistakes
Every one of these came from real schema reviews and community conversations. Here's what goes wrong and how to fix it.
-
When Order Duplication Is and Isn't Acceptable in DynamoDB
The e-commerce orders pattern writes each order to two partition keys. Is that always the right call? A clear framework for when to duplicate and when not to.
-
What Queries Your DynamoDB Schema Explicitly Doesn't Support
Every DynamoDB schema is a set of bets. The queries you're not supporting are as important as the ones you are - and most teams never write them down.
-
DynamoDB Schema Migrations: The Guide Nobody Wrote
Schema changes in DynamoDB are possible - they're just different from SQL migrations. A practical guide to attribute changes, key structure changes, GSI additions, and ElectroDB versioning.
-
Single-Table vs Table-Per-Tenant in DynamoDB: The Real Tradeoffs
Why not just give each tenant their own table? A cost comparison, operational analysis, and decision framework for SaaS multi-tenant DynamoDB.
-
DynamoDB Single-Table Pattern: Social Media Feed
Fan-out on write vs fan-out on read - the two approaches to social feeds in DynamoDB, when to use each, and a production-ready schema with ElectroDB.
-
DynamoDB vs Postgres for E-Commerce: An Honest Comparison
I've built e-commerce backends on both. Here's when each wins - and when you'll regret the choice.
-
DynamoDB Tenant Isolation: Application-Layer vs IAM LeadingKeys
Two approaches to tenant isolation in DynamoDB - and when the complexity of IAM actually pays off over application-layer scoping.
-
ULIDs vs UUIDs vs Timestamps for DynamoDB Sort Keys
Why your sort key choice determines which access patterns are possible - and when to use ULIDs to get the best of both worlds.
-
DynamoDB Single-Table Pattern: E-Commerce Orders
A production-ready DynamoDB schema for e-commerce orders with 8 access patterns, status-based GSI, and full ElectroDB entity definitions.
-
When DynamoDB Single-Table Design Is the Wrong Choice
A DynamoDB advocate's honest take on when single-table design hurts more than it helps - and a framework for deciding.
-
DynamoDB Fundamentals: The Mental Model Before the Schema
Before single-table design makes sense, you need to understand how DynamoDB actually constrains you. This is the post that makes everything else on this site legible.
-
DynamoDB Schema Pattern: SaaS Multi-Tenant
A complete single-table DynamoDB schema for SaaS multi-tenant apps. Access patterns, PK/SK design, GSIs, sample data, and ElectroDB entity code.
-
Why I'm Building a Visual DynamoDB Schema Designer
I've built production DynamoDB apps with 6+ GSIs per entity. The schema design process is still spreadsheets and guesswork. I'm fixing that.