Too many items requested for the BatchWriteItem call

TL;DR — BatchWriteItem accepts at most 25 put/delete actions per call (and ≤16 MB total). You sent more than 25, so DynamoDB rejected the whole request. Split your items into chunks of 25 or fewer and issue one BatchWriteItem per chunk.

What it means

ValidationException: 1 validation error detected: Value '<your request>' at 'requestItems' failed to satisfy constraint: Map value must satisfy constraint: [Member must have length less than or equal to 25, Member must have length greater than or equal to 1]

# on DynamoDB Local the same call is rejected with a shorter sentence:
ValidationException: Too many items requested for the BatchWriteItem call

The service echoes your entire serialized request where <your request> sits — around 12,000 characters for a 26-item batch.

BatchWriteItem batches individual PutRequest/DeleteRequest actions across one or more tables — but a single call is hard-capped at 25 actions and 16 MB of data. Cross either limit and DynamoDB rejects the entire request before writing anything. It's an HTTP 400 ValidationException, client-side, and not retryable until you resize the batch.

Why it happens

  • Writing a large collection in one call — passing an array of hundreds of items straight into BatchWriteItem without chunking.
  • A chunk loop with the wrong bound — batching by count but using a limit above 25, or an off-by-one that lets 26 through.
  • Counting tables, not actions — the 25 limit is total actions across all tables in the request, not per table.
  • Oversized payload — even at ≤25 actions the whole batch is rejected if any single item exceeds 400 KB or the total request exceeds 16 MB.

How to fix it

  1. Chunk into groups of ≤25 actions and send one BatchWriteItem per chunk.
  2. Handle UnprocessedItemsBatchWriteItem can return items it didn't process (throttling); retry those with exponential backoff. This is normal even within a valid 25-item batch.
  3. Keep each batch under 16 MB — with large items you may need fewer than 25 per call.
  4. Use a helper that buffers for you — boto3's Table.batch_writer() chunks writes and resends unprocessed items automatically (the Java SDK's Enhanced Client / v1 DynamoDBMapper retry unprocessed items too). The low-level clients and the JavaScript document client do not split an oversized batch.
  5. Size each chunk by bytes as well as count. Twenty-five large items can exceed 16 MB even when the action count is valid.

Measure in DynoTable

Before bulk-loading data, spot-check item sizes in DynoTable — open a sample item with ⌘K and confirm each fits under 400 KB. The item size calculator estimates batch payload size so you pick a safe chunk size before your loader runs.

Use staging (⌘S) to test a small batch write against a dev table before you run the full import. Switch profiles with ⌘P; configure them under Settings → Profiles with Test Connection. See Connect to AWS and Install.

Sources

References

Last verified 2026-07-13 against the official AWS documentation linked above.

Work with DynamoDB without the Console

A fast DynamoDB desktop client that runs the real SQL DynamoDB can’t — JOINs, GROUP BY, aggregates — with visual editing and an AI agent on your own Bedrock keys.

Free 30-day trial, no credit card — then the Free plan with no time limit.