Lambda function that on success sends message to another function and on failure to SQS using Lambda destinations with SAM
Visit the GitHub repo for this pattern.
git clone https://github.com/aws-samples/serverless-patterns/ cd serverless-patterns/lambda-destinations-sam
sam deploy
sam delete
.