Jun 14, 2026 · kyo8.dev
Designing a single-table DynamoDB schema for a portfolio API
Access patterns first: how I modeled projects, skills, and careers in one DynamoDB table.
Before touching a single line of Terraform, I wrote down every access pattern this API actually needs: fetch a profile, list published projects, get one project by slug, list skills grouped by category, list careers in order. Nothing more.
That list is what decided the table design, not the other way around. A single table with a composite primary key covers every pattern above with a handful of Query calls, no scans, and no secondary tables to keep in sync.
The trade-off is that the schema reads like an implementation detail instead of a clean ER diagram — which is exactly the point. It's optimized for how the API is actually called, not for how it looks in a diagram.