DynamoDB is AWS's managed key-value/document store:
Core concepts:
- Partition key: Required, determines shard
- Sort key: Optional, enables range queries within partition
- Provisioned vs on-demand capacity
Single-table design: Store multiple entity types in one table using prefixes:
PK: USER#123, SK: PROFILE → user data
PK: USER#123, SK: ORDER#456 → order data
Global Secondary Indexes: Enable queries on non-key attributes. Cost additional capacity.
Best practices:
- Design for access patterns first
- Avoid hot partitions
- Use sparse indexes