Difference between DynamoDbEnhancedClient.BatchWriteItem(Dynamo DB Version2) and DynamoDBMapper.BatchSave(Version 1)

Viewed 69

I have upgraded to DynamoDB Version 2 from Version 1.

In Version1, DynamoDBMapper.BatchSave() method has no batch size limitations I guess. Even if I pass 100+ records it will run successfully.

In Version2, I'm using DynamoDbEnhancedClient.BatchWriteItem(). It has batch size limitations. Up to only 25 records are processed by a Batch. So, for processing 100+ records I'm doing iterations.

Reference documentation on Batch Size limitations: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_BatchWriteItem.html

Does anyone have an Idea, why on Version1 it is handled dynamically, and on Version2 we have to do separate iterations?

Are there any other efficient ways to do Batch operations in Version2?

0 Answers
Related