This AWS Lambda function will send you once a day a recap email with the list of the running EC2 instances on all AWS region for a giver AWS Account. I'm using this for non-prod, lab, and personal AWS accounts, to get a kindly reminder of what I've left running.
- List running EC2 instances across all AWS Regions
- Filter / White list capability using a tag
- Send summary by email once a day
- Serverless Architecture using Lambda, Lambda layer, SES
- Verify your sender SES email
<your_project>-artifactss3 bucket (default is instance-watcher)
change emails settings in
# Email Settings recipients = ['firstname.lastname@example.org', 'email@example.com'] subject = '<your email subject>' sender = 'Instance Watcher <firstname.lastname@example.org>' charset = "UTF-8"
$ make layer $ make package project=<your_project> $ make deploy project=<your_project>
If you want to whitelist a particular EC2 instance to by hidden from the daily report, you will need add the following tag to the instance.
- Create input file for settings or param store (recipients, sender, etc..)
- Add RDS Instances table
- Add Detached EBS table
- Add Detached EIP table
- Multi-Account Support
- Add instance role