dynamodb

Design DynamoDB schemas with access patterns, GSIs, LSIs, and capacity modes.

12|5|Updated Apr 17, 2026
One-click install
npx skills add https://github.com/aws-samples/sample-claude-code-plugins-for-startups --skill dynamodb-aws-samples
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dynamodb
Source: https://github.com/aws-samples/sample-claude-code-plugins-for-startups/tree/main/plugins/aws-dev-toolkit/skills/dynamodb
Command: npx skills add https://github.com/aws-samples/sample-claude-code-plugins-for-startups --skill dynamodb-aws-samples

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

DynamoDB schema design is complex due to single-table design patterns, access pattern optimization, and capacity planning; this skill provides structured guidance to design scalable, cost-efficient DynamoDB tables with appropriate GSIs/LSIs and best practices.

Core Features & Use Cases

  • Guidance on selecting partition and sort keys to satisfy common access patterns (e.g., user profiles, orders, inventory)
  • Strategies for single-table design, leveraging Global Secondary Indexes (GSIs) and Local Secondary Indexes (LSIs) to support multiple query patterns
  • Capacity mode recommendations (on-demand vs provisioned) with guidance on auto-scaling and cost optimization
  • Real-world use cases including e-commerce, multi-tenant SaaS data modeling, and time-series event data
  • Operational best practices (streams, TTL, backups) to ensure durability and performance

Quick Start

Illustrate a simple example: model a user profile table with USER#<id> as the PK and a PROFILE item, then add a GSI for email lookup.

Frequently Asked Questions about dynamodb

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I design a DynamoDB schema for multiple access patterns?

To design a DynamoDB schema for multiple access patterns, identify all required query patterns first, then structure partition and sort keys to satisfy them efficiently. This approach leverages single-table design and Global Secondary Indexes to support diverse workloads without full table scans.

What is single-table design in DynamoDB and when should I use it?

Single-table design in DynamoDB is a modeling strategy where multiple entity types coexist in one table using generic key attributes. Use this approach to optimize query performance and reduce costs when supporting many complex access patterns across different entities within the same application.

How do I choose between Global Secondary Indexes and Local Secondary Indexes?

Choose DynamoDB Global Secondary Indexes (GSIs) to query on alternate partition keys, or Local Secondary Indexes (LSIs) to query on alternate sort keys within the same partition. GSIs offer flexibility for broad lookups, while LSIs maintain strong consistency for items sharing a partition key.

Should I use on-demand or provisioned capacity mode for DynamoDB?

Use DynamoDB on-demand capacity mode for unpredictable workloads to handle sudden spikes automatically, or provisioned capacity with auto-scaling for steady traffic to optimize costs. The best choice depends on your real-world traffic volume and predictability.

What are the limitations of DynamoDB Local Secondary Indexes?

DynamoDB Local Secondary Indexes (LSIs) are limited to 10 per table, must be created at table creation time, and only support queries against items sharing the same partition key. They also consume provisioned throughput from the base table, unlike Global Secondary Indexes.

How do I model multi-tenant SaaS data in DynamoDB?

To model multi-tenant SaaS data in DynamoDB, structure partition keys to isolate tenant data while using sort keys and Global Secondary Indexes to handle tenant-specific access patterns. This ensures secure data segregation and scalable query performance across tenants.