DynamoDB Single-Table Design Template
CloudFormation table definition plus a documentation pack covering single-table design access patterns with working query examples in Node.js and Python.
DynamoDB Single-Table Design Template
A CloudFormation table definition paired with a complete documentation pack for single-table design. Covers the access patterns you actually need — by primary key, GSI queries, begins-with range queries, and paginated scans — with working code examples in both Node.js and Python.
What's Included
- CloudFormation Table — DynamoDB table with composite key, two GSIs, and pay-per-request billing
- Access Pattern Reference — documented patterns: get item, query by PK, query by GSI, paginate results, and transactional writes
- Node.js Examples — working query code using the AWS SDK v3 DynamoDB Document Client
- Python Examples — equivalent queries using boto3 with type annotations
- Entity Design Guide — how to model multiple entity types in a single table with pk/sk conventions
What You Get
dynamodb-table.yml— CloudFormation templatedocs/access-patterns.md— full access pattern catalogdocs/entity-design.md— single-table entity modeling guideexamples/nodejs/— Node.js query examples (get, query, scan, transact)examples/python/— Python equivalent examplesREADME.md— quickstart and pattern index
Requirements
AWS CLI configured. Node.js 20+ or Python 3.12+ for the example code. No custom Lambda or provisioned capacity required — uses on-demand billing.