@barchart/aws-lambda-suppressor
A public JavaScript utility for tracking and suppressing duplicate AWS Lambda invocations.
Operation
When a Lambda function at AWS is invoked, it's passed an event
object. The event
may contain a unique identifier.
If a unique identifier can be determined, the DynamoLambdaValidator
will attempt to create a record in a DynamoDB table, using a conditional write. If the write fails, we know this event has already been processed and the Lambda function's processing should stop.
Usage
The DynamoLambdaValidator
extends LambdaValidator
-- a class from the @barchart/common-node-js library.
As a result, the DynamoLambdaValidator
can be plugged into a LambdaHelper
by overriding its getValidator
function.