DEV Community


AWS Lambda SNS Destinations not working on failure or success

Avinash Dalvi
AWS Community Builder | Full Stack Developer | PHP + Angular + Python + AWS | Speaker | Blogger | Leadership I write blog at
・1 min read

Reference :

Check this answer said : only async lambda execution only work for destination.

Lambda code :

const AWSManager = require('./AWSManager.js')
const request = require('request-promise'); 

exports.handler = async (event, context) => {
  var input = JSON.stringify(event, null, 2);
  //console.log("EVENT: \n" + JSON.stringify(event, null, 2))
  // TODO implement

Discussion (1)

aviboy2006 profile image
Avinash Dalvi Author

Updated answer in question.

Found answer it was mistake only.

As per explaination given in AWS Lambda w/ SQS trigger, SQS Lambda Destinations, never adds to destination queue is correct only for calling lambda async you have to run different command. And test input from UI doesn't work like async. It works as sync call.

aws lambda invoke \
--function-name lambdaname \
--invocation-type Event \
--payload '{ "name": "Bob" }' \