Code Monkey home page Code Monkey logo

instance-watcher's Introduction

Instance Watcher ๐Ÿ‘€

Description

This AWS Lambda function will send you once a day a recap email with the list of the running EC2/RDS instances on all AWS region for a giver AWS Account. I'm using this for non-prod, lab, sandbox, and personal AWS accounts, to get a kindly reminder of what I've left running. ๐Ÿ’ธ

Core features

  • List running EC2 instances across all AWS Regions.
    • Check name, instance-id, instance_type, key_name, region, launch_time
  • List running RDS instances across all AWS Regions.
    • Check db_instance_name, db_engine, db_type, db_storage, region, launch_time
  • White list capability using the iw tag
  • Send summary by email once a day
  • Serverless Architecture using Lambda, Lambda layer and SES

Requirements

  • Verify your sender SES email
  • Create <your_project_name>-artifacts s3 bucket (default is instance-watcher-artifacts)

Deployment

Change emails settings in Makefile or use command-line

Nb: Recipients are space-delimited

You will need to validate email received from AWS SES.

    $ make layer
    $ make package project=<your_project_name>
    $ make deploy \
            ENV=<your_env_name> \
            AWSREGION=<your_aws_region> \
            PROJECT=<your_project_name> \
            [email protected] \
            RECIPIENTS='[email protected] [email protected]'

Nb: Use emails in command line is optional if your already setup the Makefile

Destroy

    $ make tear-down

Whitelisting

If you want to whitelist a specific EC2 instance to be hidden from the daily report, you will need to add the following tag to the EC2 instance.

Key Value
iw off

Todo

  • Add SES setup built-in
  • Whitelist for RDS Instances
  • Add unit tests
  • Multi-Account Support
  • Add Instance Profile column
  • Add pricing column

instance-watcher's People

Contributors

z0ph avatar

Stargazers

Aaron Rea avatar Agustin Rivera avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.