Skip to content

Latest commit

 

History

History
32 lines (19 loc) · 1.37 KB

README.md

File metadata and controls

32 lines (19 loc) · 1.37 KB

Prerequisites

Setup Cloudtrail to log to CloudTrail/DefaultLogGroup.

Setup an SNS Topic with subscribers who would like to be informed when an EC2 is launched in any AWS region.

SAM CLI and sam deploy -g.

How do I know if I have deployed this?

Cloudwatch subscription

There should be a subscription active upon CloudTrail/DefaultLogGroup.

Btw it takes ~15 minutes for Cloudtrail to capture and log the event in CloudWatch in my experience.

Why not use Cloudwatch events?

https://aws.amazon.com/premiumsupport/knowledge-center/ec2-email-instance-state-change/ is a good tip, but what they don't tell you, is that you need to deploy in EVERY REGION for it to work.

Maintenance consideration

Cloudtrail bucket isn't used by this function, so consider putting an expiration on the objects.

Similarly CloudTrail/DefaultLogGroup can get large, put a retention policy on it.