dynamodb_skill
- Python
976
GitHub Stars
2
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill itsmostafa/aws-agent-skills --skill dynamodb- query-patterns.md9.0 KB
- SKILL.md9.7 KB
Overview
This skill provides practical guidance and code patterns for designing, operating, and troubleshooting Amazon DynamoDB. It focuses on table schema design, query and batch operations, index configuration, capacity modes, and performance troubleshooting. The content includes CLI and boto3 examples to accelerate implementation and debugging.
How this skill works
I inspect common DynamoDB tasks and translate them into concise, ready-to-run examples and troubleshooting steps. The skill covers table creation, CRUD, queries, batch operations, GSIs/LSIs, conditional writes, and capacity handling with recommended CLI and Python (boto3) snippets. It also highlights best practices for data modeling, performance tuning, cost control, and operational diagnostics.
When to use it
- Designing table schemas and access patterns before development
- Implementing queries, batch reads/writes, and conditional writes with boto3
- Configuring GSIs, LSIs, and capacity (on‑demand vs provisioned)
- Troubleshooting throttling, hot partitions, slow scans, or missing query results
- Optimizing cost with TTL, archiving, and capacity autoscaling
Best practices
- Design for access patterns: model keys and indexes around queries you need
- Prefer Query over Scan; use projections and sparse indexes to reduce data transfer
- Distribute partition keys evenly to avoid hot partitions and use write sharding if needed
- Use on‑demand for unpredictable traffic and provisioned+autoscaling for predictable workloads
- Use batch operations and DAX for heavy read/write workloads to reduce latency and API calls
Example use cases
- Single-table design for related entities using composite PK/SK and item type attributes
- Creating a Users table with a PK/SK schema and implementing profile CRUD with boto3
- Adding an email GSI to support lookup by email address without restructuring the table
- Handling transient throttling with exponential backoff and adaptive retries
- Performing parallel scans to migrate or analyze large datasets while minimizing wall time
FAQ
Use on-demand for unpredictable or spiky workloads to avoid capacity planning. Use provisioned capacity with autoscaling when traffic is stable and you want lower cost per request.
Why does my Query return no items even though data exists?
Verify exact key values and types (case-sensitive and attribute data types), confirm the table or index name, and remember filter expressions are applied after reading items.