Skip to content

Instantly share code, notes, and snippets.

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,