Amazon DynamoDB (50 Qs)•Part 2: Intermediate Data Modeling & API Operations (Mid-Level)
What is BatchGetItem and BatchWriteItem and what are their limitations?
junior LevelHTTP & REST APIs
In Simple Words:
- BatchGetItem: Retrieves up to 100 items (max 16 MB) across one or more tables in parallel.
- BatchWriteItem: Puts or deletes up to 25 items (max 16 MB) in a single request.
- Crucial Caveat: Batches do not support condition expressions and are not atomic (some items can succeed while others fail).
- Always inspect
UnprocessedKeysorUnprocessedItemsand implement exponential backoff retry.