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.
CodePudding user response:
I think Amazon EventBridge
is what you are looking for. With EventBridge
you can detect and react to different events such as EC2
instances scheduled for updates. You can, for example, create a rule for detecting a specific health event and in the target section choose to receive an email through SNS
or invoke a CloudWatch log group
, etc. Read more here.
CodePudding user response:
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:
- Capturing AWS Health events via EventBridge in spoke accounts and forward them to the event bus in my hub account
- 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.