You are currently viewing How To Configure Email Notification Using SNS

How To Configure Email Notification Using SNS

How to configure email notification using SNS

Hello Everyone

Welcome to CloudAffaire and this is Debjeet.

In the last blog post, we have discussed AWS RDS Multi-AZ deployment.

https://cloudaffaire.com/aws-rds-multi-az/

In this blog post, we will discuss how to configure email notification using SNS.

What is SNS?

Simple Notification Service or SNS is a web service that sends messages from publisher to subscriber. A publisher can be any event source like CloudWatch or CloudTrail and a subscriber can be SMS, email, http\https endpoints, lambda, SQS etc. Publisher act as message source and subscriber as destination and SNS coordinate the message delivery from source to destination.

When using Amazon SNS, you create a topic and control access to it by defining policies that determine which publishers and subscribers can communicate with the topic. A publisher sends messages to topics that they have created or to topics they have permission to publish to. Instead of including a specific destination address in each message, a publisher sends a message to the topic. Amazon SNS matches the topic to a list of subscribers who have subscribed to that topic and delivers the message to each of those subscribers. Each topic has a unique name that identifies the Amazon SNS endpoint for publishers to post messages and subscribers to register for notifications. Subscribers receive all messages published to the topics to which they subscribe, and all subscribers to a topic receive the same messages.

How to configure email notification using SNS:

Step 1: Login to AWS console and navigate to ‘SNS’.

How To Configure Email Notification Using SNS

Step 2: Provide a topic name and click ‘Next step’.

How To Configure Email Notification Using SNS

Step 3: Provide a display name and click ‘Create topic’.

How To Configure Email Notification Using SNS

How To Configure Email Notification Using SNS

Note: You can provide additional configurations like encryption, policy, logging, and tagging for your SNS topic.

Our SNS topic successfully created.

How To Configure Email Notification Using SNS

Next, we are going to create a subscriber for this topic.

Step 4: In the SNS topic page, click on ‘Subscriptions’ tab and then click ‘Create subscription’.

How To Configure Email Notification Using SNS

Step 5: Select your SNS topic ARN and provide protocol and endpoint details for an email subscription. Click ‘Create subscription’.

How To Configure Email Notification Using SNS

Our SNS subscription successfully created.

How To Configure Email Notification Using SNS

Note: In order to use this subscription, you need to confirm the subscription first to prove that the email account belongs to you.

Step 6: Login to the email account that you have provided and click on ‘Confirm subscription’.

How To Configure Email Notification Using SNS

Our email subscription for the SNS topic confirmed successfully.

How To Configure Email Notification Using SNS

Hope you have enjoyed this article. We are ready to use this SNS topic for email notification. Next, you need to integrate this SNS topic with a publisher and subscriber. We have already covered several use cases of this integration in previous blogs which you can go through.

https://cloudaffaire.com/cloudwatch-alarm/

https://cloudaffaire.com/cloudwatch-events/

https://cloudaffaire.com/lambda-function-trigger/

To get more details on AWS SNS, please refer below AWS documentation

https://docs.aws.amazon.com/sns/index.html

 

Leave a Reply