Identify all access patterns before designing the table; DynamoDB requires you to model around queries, not around entities — map each access pattern to a primary key (PK) and sort key (SK) combination, using prefixes like USER#<id> or ORDER#<id> to namespace item types
Use sparse Global Secondary Indexes (GSIs) for additional access patterns: only project the attributes you query, and only write the GSI keys on items that actually need that index to keep GSI size and cost minimal
Distribute writes across many partition key values — avoid keys like a static status code, date-only strings, or sequential IDs that funnel traffic to a small number of partitions; add a random suffix or shard number to high-cardinality hot keys
For known high-traffic partitions (e.g., a celebrity user), use write sharding: append a random integer (0–N) to the PK at write time and read from all N shards with parallel queries or a scatter-gather pattern
Enable DynamoDB auto-scaling or use on-demand capacity mode for unpredictable workloads; set separate read and write capacity targets and watch the ConsumedWriteCapacityUnits and ThrottledRequests CloudWatch metrics
Use condition expressions (ConditionExpression) and transactional writes (TransactWriteItems, max 100 items) to enforce consistency without application-level locking
Known gotchas
A single partition can sustain up to 3,000 RCU and 1,000 WCU per second — exceeding this causes throttling even if your total provisioned capacity is higher; hot partitions are the most common DynamoDB performance issue
GSI writes consume write capacity on the GSI in addition to the base table; a table with many GSIs can multiply your effective write cost significantly and amplify hot-partition problems
DynamoDB item size limit is 400 KB including attribute names and values — large attribute names count against this limit; keep attribute names short in high-volume tables
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp