This is a services database inner function that uses [[ https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_BatchWriteItem.html | batch write to the DynamoDB ]].
Batch write can be used for batch putting or batch deleting items (D4220). The batch operations are much more effective than put/delete one-by-one in case of the network and database latency and DynamoDB WCU (Write Capacity Units) usage per second on a single partition.
This function splits the write requests into chunks sized by the constant from D4372 if needed and sends the write requests to the DynamoDB in chunks. Because DynamoDB has a [[ https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_BatchWriteItem.html | batch operations chunk size limit ]].
Linear task: [[ https://linear.app/comm/issue/ENG-1302/inner-database-function-to-use-batchwriteitem-in-dynamodb | ENG-1302 ]]