Git Product home page Git Product logo

kaihendry / sam-cloudtrail-ec2 Goto Github PK

View Code? Open in Web Editor NEW
9.0 4.0 0.0 19 KB

Be notified of EC2 instance events πŸš€ from any region πŸ—ΊοΈ via a Cloudtrail CloudWatch Logs subscription filter !Rules

Home Page: https://youtu.be/uDbQ9zl7xoU

License: MIT License

Makefile 26.94% JavaScript 50.97% Shell 22.09%
aws-ec2 aws-cloudtrail aws-sns aws-billing serverless-application-model aws-sam serverless

sam-cloudtrail-ec2's Introduction

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.

sam-cloudtrail-ec2's People

Contributors

kaihendry avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

sam-cloudtrail-ec2's Issues

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.