In a DynamoDB table, what does the partition key uniquely identify?
Think about how partition keys group data in DynamoDB.
The partition key groups items into partitions. Multiple items can share the same partition key but differ by sort key.
You want to design a DynamoDB table to store customer orders. Each customer can have multiple orders. Which key design allows efficient retrieval of all orders for a single customer?
Think about grouping orders by customer for fast lookup.
Using CustomerID as partition key groups all orders per customer. Sort key OrderID uniquely identifies each order within that customer.
In a DynamoDB table with a composite primary key (partition key + sort key), what happens if you try to put an item without specifying the sort key?
Consider the requirement of composite keys in DynamoDB.
DynamoDB requires both partition and sort keys for tables with composite keys. Missing sort key causes a validation error.
You want to restrict users to access only items with a specific partition key value in a DynamoDB table. Which IAM policy condition key helps enforce this?
Look for a condition key related to partition key values.
The dynamodb:LeadingKeys condition key restricts access to items with specified partition key values.
You have a DynamoDB table storing IoT sensor data with a high write rate. Which key design helps avoid hot partitions?
Think about spreading writes across partitions by combining keys.
Combining SensorID and Date in partition key distributes writes across partitions daily, reducing hot partition risk.