Ravi Sir's Cards › AWS
Why SNS for the alert?
This revision card explains Why SNS for the alert? It starts from the need that hard-coding SMTP in Lambda means passwords, ports, and spam filters. You only need “email me when someone writes”. It describes amazon SNS is a pub/sub service. Subscribe your email to a topic; Lambda publishes once; SNS delivers. The how-to section covers how to create topic , then Create subscription Email , then confirm the link , then put TOPIC_ARN in Lambda env , then sns:Publish in IAM. An example on the card is one publish can later also SMS or hit another Lambda without changing the contact handler.
Read card text
What this card says
Why do we need it?
Hard-coding SMTP in Lambda means passwords, ports, and spam filters. You only need “email me when someone writes”.
What is it?
Amazon SNS is a pub/sub service. Subscribe your email to a topic; Lambda publishes once; SNS delivers.
How to do it
Create topic → Create subscription Email → confirm the link → put TOPIC_ARN in Lambda env → sns:Publish in IAM.
TOPIC_ARN
Example
One publish can later also SMS or hit another Lambda without changing the contact handler.