This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { DynamoDB } from "aws-sdk"; | |
import * as _ from "lodash"; | |
import { RateLimit } from 'async-sema'; | |
const MAX_BATCH_ITEMS = 25; // AWS hard limit | |
const MAX_PARALLEL_WRITES = 50; | |
export async function batchWrite( | |
documentClient: DynamoDB.DocumentClient, | |
tableName: string, |