DynamoDBMapper uses the BatchWriteItem
API behind the scenes for the batchSave
method. From the BatchWriteItem documentation:
each specified put and delete request consumes the same number of write capacity units whether it is processed in parallel [saved in a batch] or not [saved individually]. Delete operations on nonexistent items consume one write capacity unit.
If you are saving 100 items, you will use at least 100 WCU. A single item uses 1 WCU for each 1kb of data (including attribute names) in the item. The number of WCUs is always rounded up to the nearest whole number, and there’s no “sharing” of partial WCUs between items in the same request.
For example, if you had 10 items which were each 1.2 kb, then writing all of the items would consume 20 WCU.