UNPKG

@aws-lambda-powertools/batch

Version:

The batch processing package for the Powertools for AWS Lambda (TypeScript) library.

24 lines (23 loc) 608 B
/** * Enum of supported event types for the utility */ const EventType = { SQS: 'SQS', KinesisDataStreams: 'KinesisDataStreams', DynamoDBStreams: 'DynamoDBStreams', }; /** * Default response for the partial batch processor */ const DEFAULT_RESPONSE = { batchItemFailures: [], }; /** * Mapping of event types to their respective data classes */ const DATA_CLASS_MAPPING = { [EventType.SQS]: (record) => record, [EventType.KinesisDataStreams]: (record) => record, [EventType.DynamoDBStreams]: (record) => record, }; export { EventType, DEFAULT_RESPONSE, DATA_CLASS_MAPPING };