Simple Async AWS Lambda Function Example

module.exports.handler = async event => {
 return event;

We want to ship this to an SQS queue onSuccess.

  • give the Lambda Execution Role rights to sqs:SendMessage to that queue
  • set the onSuccess destination to the SQS queue ARN.

Note: the “Test” button in the console does not trigger to the configured destinations because console invocations are synchronous.