A public JavaScript package for tracking and suppressing duplicate invocations of AWS Lambda Functions.
- Each Lambda invocation includes an
event
object. - Depending on the
event
source, a unique identifier can usually be extracted. - The
DynamoMessageValidator
saves these unique identifiers to DynamoDB (using a conditional writes). - Failure indicates another Lambda has already processed the same event and processing should be suppressed.
This package is typically used with a simple framework found in the @barchart/common-node-js library.
- First, instantiate a
LambdaEventValidator
and add aDynamoMessageValidator
instance. - Then, plug the
LambdaEventValidator
into yourLambdaHelper
by overriding itsgetValidator
function.
This software is provided under the MIT license.