DynamoDB also supports batch reads using batch-get-item.
batch-get-item has the following characteristics:
- Can provide one or more keys. Each key should contain all key fields (partition or partition and sort), similar to get-item.
- You may retrieve items from multiple tables.
- Maximum number of returned documents is 100. If more than 100 items are requested, a ValidationException occurs.
- Maximum size of returned record is 16 MB. The remaining items' keys are returned as unprocessed items, and we can retry them.
- ProvisionedThroughputExceededException occurs if all items fail. If only some fail, the failed items' keys are returned, along with the results, and we can retry them.
- Items can be retrieved in parallel, but the order may not be guaranteed.
- We can filter the attributes that are returned. It will not affect the cost, but it will allow more items to be returned within the 16 MB limit.