Home > OS >  How to test Lambda publishing a message via AWS cloud console?
How to test Lambda publishing a message via AWS cloud console?

Time:11-14

I have a problem with testing the Lambda destination - SNS.

Message is not published after Lambda has successfully run. I invoked the lambda in AWS cloud console using a test event.

Destination and topics are properly configured.

enter image description here

enter image description here



Side note, I can programmatically publish a message via sns.publish().


Question:
Is there a way to publish a message automatically to SNS once Lambda has successfully run via AWS console (using a test event)?

CodePudding user response:

No. The console "synchronously invokes your function with the test event". It must be invoked asynchronously to use the destinations.

Call the lambda invoke API with --invocation-type Event for asynchronous invocation.

  • Related