Here are the methods I use in order to achieve this end. I manage to do it, by first chucking the dataArray into small arrays:
const queryChunk = (arr, size) => { const tempArr = [] for (let i = 0, len = arr.length; i < len; i += size) { tempArr.push(arr.slice(i, i + size)); } return tempArr } const batchWriteManyItems = async (tableName, itemObjs, chunkSize = 25) => { return await Promise.all(queryChunk(itemObjs, chunkSize).map(async chunk => { await dynamoDB.batchWriteItem({RequestItems: {[tableName]: chunk}}).promise() })) }