← ClaudeAtlas

typescript-dynamodb-toolboxlisted

DynamoDB single-table design using dynamodb-toolbox v2. Use when creating entities, defining key patterns, designing GSIs, writing queries, implementing pagination, or working with any DynamoDB data layer in TypeScript projects.
martinffx/atelier · ★ 27 · AI & Automation · score 85
Install: claude install-skill martinffx/atelier
# DynamoDB with dynamodb-toolbox v2 Type-safe DynamoDB interactions with Entity and Table abstractions for single-table design. ## When to Use DynamoDB ✓ **Use when:** - Access patterns are known upfront and stable - Need predictable sub-10ms performance at scale - Microservice with clear data boundaries - Willing to commit to single-table design ✗ **Avoid when:** - Prototyping with fluid requirements - Need ad-hoc analytical queries - Team lacks DynamoDB expertise - GraphQL resolvers drive access patterns > DynamoDB inverts the relational paradigm: design for known access patterns, not flexible querying. ## Modeling Checklist Before implementing: 1. **Define Entity Relationships** - Create ERD with all entities and relationships 2. **Create Entity Chart** - Map each entity to PK/SK patterns 3. **Design GSI Strategy** - Plan secondary access patterns 4. **Document Access Patterns** - List every query the application needs See [references/modeling.md](references/modeling.md) for detailed methodology. ## Table Configuration ```typescript import { Table } from 'dynamodb-toolbox/table' const AppTable = new Table({ name: process.env.TABLE_NAME || "AppTable", partitionKey: { name: "PK", type: "string" }, sortKey: { name: "SK", type: "string" }, indexes: { GSI1: { type: "global", partitionKey: { name: "GSI1PK", type: "string" }, sortKey: { name: "GSI1SK", type: "string" }, }, GSI2: { type: "global", partitionKey: { name: "