Tuesday, April 12, 2022

[SOLVED] How to get forecasted AWS alerts/outages in email?

Issue

2 weeks back, I saw a notification in AWS saying, the one of the 3 AWS EC2 instance will be stopped because of the underlying hardware cause. I almost missed the dead line as I didn't the notification via email. Is there a way get these notification via email?

It would be much better if I can get the notifications using cloud watch to my email.


Solution

If you're on Business or Enterprise Support, AWS provides a solution named "AWS Health Aware" built on top of AWS Health API, it does exactly what you're after sends you notifications via several methods including emails regarding outages and planning maintenance that affect your account(s).

If you're on a Basic support plan you can easily built something similar yourself using based on [AWS Health events][2]

This is an example of capturing AWS Health events via EventBridge so they can be further send to a lambda or SNS https://docs.aws.amazon.com/health/latest/ug/cloudwatch-events-health.html

What I've done in the is following:

  1. Capturing AWS Health events via EventBridge in spoke accounts and forward them to the event bus in my hub account
  2. In the hub account I would subscribe a lambda function for all events with source "aws.health" and then send email or slack message whatever works for you.


Answered By - b.b3rn4rd
Answer Checked By - Senaida (WPSolving Volunteer)