Output: To receive email notif everytime your EC2 instances changes its status. (Terminated, Stopped, etc)
What is Amazon SNS?
Amazon SNS enables you to send notifications directly to your customers.
What is Amazon EventBridge?
Amazon EventBridge is a serverless event bus that makes it easier to build event-driven applications at scale using events generated from your applications, integrated Software-as-a-Service (SaaS) applications, and AWS services.
- Setup SNS topic
- Create email subscription on topic
- Setup EC2 Instance State-change Notification eventbridge rule
For Protocol, select Email.
For Endpoint, enter the email address where you want to receive the notifications.
If you want to change this to a SMS notif, you can simple select SMS for protocal then enter mobile number on endpoint where you want to receive notifications.
It should show that your email is now confirmed.
Enter a Name and description for your rule.
On rule type, select rule with an event pattern
You can test this rule by terminating your instance. This rule generates an email notification every time an instance is terminated. You can select other states as well.