Skill 24 · Architect For Startups
Subchapter 24.11
references/dynamodb.mdMarkdown6 KBView on GitHub
DynamoDB is the right default database for startups when:
DynamoDB is the WRONG choice when:
This is the #1 DynamoDB mistake startups make: choosing DynamoDB for operational simplicity, then discovering 6 months later that a new feature requires a query pattern the table design doesn’t support.
Mitigation: Before committing to DynamoDB, write down your top 10 access patterns. If you can’t, you don’t know enough about your product to choose DynamoDB. Use PostgreSQL/Aurora until patterns stabilize, then migrate hot paths to DynamoDB.
On-Demand mode at scale without noticing: On-Demand is correct at the start (zero cost at zero traffic). But at sustained load, it’s 5-7x more expensive than provisioned. Trigger to switch: when your DynamoDB bill exceeds $100/month with predictable traffic patterns, switch to provisioned with auto-scaling.
GSI proliferation: Each GSI copies all projected attributes and consumes write capacity on every write to the base table. Startups add GSIs reactively (“we need to query by email too”) without budgeting the cost. At 5+ GSIs with full projections, you may be paying 5x your base table cost in GSI writes.
Scan-based “analytics”: Teams build admin dashboards that Scan the entire table. At 1M items, a full Scan costs ~$1.25 and takes seconds. At 100M items, it’s $125 per scan. Export to S3 + Athena for analytics — never Scan production tables repeatedly.
DAX when you don’t need it: DAX clusters start at ~$50/month (t3.small) and require VPC placement. Don’t add DAX until you’ve confirmed: (a) reads are the bottleneck, (b) the same items are read repeatedly, (c) eventual consistency is acceptable. Most startups don’t need DAX.
DynamoDB Streams + Lambda at high volume: Each Lambda invocation from Streams counts against your Lambda concurrent execution limit AND costs per invocation. At 10K writes/second, that’s 10K Lambda invocations/second. Use Kinesis Data Streams as the consumer if write volume is high.
Don’t do single-table design at the start. It’s an optimization for scale and reduced table management. At pre-PMF with 2-3 entities, separate tables are more readable, easier to reason about, and trivial to change. Single-table design is a one-way door that’s painful to refactor.
DynamoDB is often MORE expensive than Aurora for typical CRUD apps. A startup with a standard web app (users, posts, comments, likes) paying $50/month for a db.t4g.micro Aurora Serverless v2 instance would pay $200+/month for the same data in DynamoDB with GSIs for all query patterns. DynamoDB wins on latency and ops burden, not on cost for relational-shaped data.
Free tier covers you longer than you think. DynamoDB free tier (25 RCU, 25 WCU, 25 GB) is permanent and enough for ~200 reads/sec and ~25 writes/sec. Most pre-PMF startups never exceed this.
| Signal | Direction |
|---|---|
| Constantly needing new GSIs for new features | Your data is relational — use PostgreSQL |
| Admin dashboards Scanning tables | Export to S3, query with Athena |
| Need full-text search | Add OpenSearch (or use PostgreSQL) |
| Monthly bill > $500 with Reserved Capacity still too expensive | Data model mismatch — evaluate alternatives |