Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DynamoDB Batch Write Item Limits

I am currently doing a batch load to DynamoDB and dividing our data items into batch units:

According to the limits documentation: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_BatchWriteItem.html

Some of the limits are:

There are more than 25 requests in the batch.

Any individual item in a batch exceeds 400 KB.

The total request size exceeds 16 MB.

The big unknown for me is how is possible with 25 items of a maximum of 400 Kb, the payload will exceed 16Mbs. Accounting for table names of less than 255 bytes, etc. I don't understand the limit or am I missing something simple.

Thanks.

like image 522
Pegerto Avatar asked Nov 06 '22 16:11

Pegerto


1 Answers

The 16MB size is actually the total size of the request. Consider an object with many many small objects, the DynamoDB request map could be larger than the size of the combined items.

like image 168
Vinay Agarwal Avatar answered Dec 25 '22 21:12

Vinay Agarwal