How is the number consumed write capacity units calculated in case of BatchWriteItems?
E.g. If I batch write 25 items, each with the size of 0.1 KB, would the operation consume 25 WCUs, or 3 WCUs?
How is the number consumed write capacity units calculated in case of BatchWriteItems?
E.g. If I batch write 25 items, each with the size of 0.1 KB, would the operation consume 25 WCUs, or 3 WCUs?
Here is the relevant documentation. Based on the description below, it would be 25 WCUs.
BatchWriteItem — Writes up to 25 items to one or more tables. DynamoDB processes each item in the batch as an individual PutItem or DeleteItem request (updates are not supported). So DynamoDB first rounds up the size of each item to the next 1 KB boundary, and then calculates the total size. The result is not necessarily the same as the total size of all the items. For example, if BatchWriteItem writes a 500 byte item and a 3.5 KB item, DynamoDB calculates the size as 5 KB (1 KB + 4 KB), not 4 KB (500 bytes + 3.5 KB).