SNS (Simple Notification Service)
SNS is a service in AWS that enables us to receive notifications about almost anything that is happening in our AWS setup, like the state of the EC2 server, load balancer, code pipeline, etc., via email or SMS. The configuration of SNS is fairly simple.
Setting up SNS …
Log into your AWS console.
Navigate to the SNS dashboard—> Topics
Switch to standard type and enter the name of your topic here. I have used my_first_topic leave everything at default values, and hit Create Topic.
We have created a new topic; now we have to create a subscription to which the notifications will be sent.
Click “Create Subscription.”
- We can see that there are multiple protocols listed here; we are going to select email as we want to receive our notifications via email.
- At the endpoint, enter the mail ID to which we want the notification to be sent. and create subscriptions.
- Now we can see that the status is pending confirmation.
Check for emails from AWS in the mail ID we entered for subscription (also check for emails in the spam section). In the mail, we can find our topic name and then confirm our subscription.
Thus, we have created a new SNS topic and can attach it to any service and receive notifications in our email. The response will be in JSON format.
We can even Customise the notification from AWS and Maximise your productivity. Want to know how?? checkout here Maximizing Productivity with Personalized AWS SNS Notifications for Code Pipeline..