Too many items requested for the BatchGetItem call
TL;DR — BatchGetItem retrieves at most 100 items per call (and ≤16 MB of data). You requested more than 100 keys, so DynamoDB rejected the request. Split your keys into chunks of 100 or fewer and issue one BatchGetItem per chunk.
What it means
ValidationException: Too many items requested for the BatchGetItem callBatchGetItem fetches items by primary key across one or more tables, but a single call is capped at 100 keys and 16 MB of returned data. Request more than 100 and DynamoDB rejects the whole call. Even within the limit, a response may return fewer items than asked (the 16 MB ceiling), reporting the rest in UnprocessedKeys. The over-limit case is an HTTP 400 ValidationException, not retryable until resized.
Why it happens
- Requesting a large key set in one call — passing hundreds of keys straight into
BatchGetItem. - A chunk bound above 100 — batching by count but using the 25-item BatchWrite limit's sibling incorrectly, or an off-by-one letting 101 through.
- Counting tables, not keys — the 100 limit is total keys across all tables in the request.
- Not paging
UnprocessedKeys— assuming one call returns everything, so you never chunk.
How to fix it
- Chunk keys into groups of ≤100 and send one
BatchGetItemper chunk. - Handle
UnprocessedKeys— retry any returned keys with exponential backoff; this happens even inside a valid 100-key batch when the 16 MB cap is hit. - Keep responses under 16 MB — with large items, request fewer than 100 per call.
- Use a batching helper (the SDK document-client batch getters chunk and retry for you) instead of a hand-rolled loop.
Related errors
- Too many items requested for the BatchWriteItem call — the write-side limit (25 items).
- Provided list of item keys contains duplicates — the same key twice in one BatchGetItem.
- ProvisionedThroughputExceededException — throttling that surfaces as UnprocessedKeys.