Steps to configure E-mail notification for EC2 instance

Steps to configure E-mail notification for EC2 instance

In this blog, we will show you the steps to configure E-mail notification for EC2 Instance in AWS.

ENVIRONMENT OVERVIEW

  • We created a t2, micro EC2 windows instance for this demo.
Steps to configure E-mail notification for EC2 instance

CREATING SNS (SIMPLE NOTIFICATION SERVICE) TOPIC

  • Login in to your AWS account and search for SNS service.
Steps to configure E-mail notification for EC2 instance
  • Select the Topics option.
  • Click on Create Topic button.
  • Provide the Name and Display Name and click on Create topic.
  • Under Subscription topic, select the Create subscription option.
  • From the create subscription window, select the protocol as E-mail from the drop-down list.
  • Provide your e-mail address and click on create the subscription.
  • You will receive a confirmation E-mail to your inbox. Click on the confirm subscription link.
  • Once you confirmed the subscription, the status will be changed to confirmed in SNS.

CREATING RULES IN CLOUDWATCH

  • From the services page, search for cloudwatch.
Steps to configure E-mail notification for EC2 instance
  • Select the Rules link and click on create rule button.
  • Under Event Source, select the service name as EC2 and event type as EC2 Instance State-change Notification.
Steps to configure E-mail notification for EC2 instance
  • We select EC2 state as stopped and terminated for the drop-down list.
Steps to configure E-mail notification for EC2 instance
  • In the target section, click on Add target.
Steps to configure E-mail notification for EC2 instance
  • From the drop-down list, select SNS topic and select our newly created topic.
Steps to configure E-mail notification for EC2 instance
  • Review all the selected settings and click on Configure details. Provide the name and description for this rule and click on create rule button.
Steps to configure E-mail notification for EC2 instance
  • The rule created successfully.
Steps to configure E-mail notification for EC2 instance
VERIFICATION
  • For testing purpose, Goto EC2 Instance page, and shut down the machine.
Steps to configure E-mail notification for EC2 instance
  • Once the instance state has been changed to stop, you will receive the notification mail to your inbox.
Steps to configure E-mail notification for EC2 instance
REFERENCE

E-mail Notification

Thanks for reading this blog. We hope it was useful for you to learn about the steps to configure E-mail notification for EC2 instance.

Loges

Leave a Reply

Your email address will not be published. Required fields are marked *