Giter Club home page Giter Club logo

cfn-drift-detector's Introduction

CloudFormation Drift Detector

Perform regular drift detection on every stacks and report drifts by email automatically.

email-screenshot

โ— Drift detection triggers way to many false positive for now, this project might spam you with emails where you can't do anything. There are many bug issues open, see https://github.com/aws-cloudformation/cloudformation-coverage-roadmap/issues?q=is%3Aissue+is%3Aopen+drift+detection+label%3Abug


How does it work ?

  • Detection

    1. The DetectionSchedule scheduler triggers the DetectStackDrifts lambda. By default, it runs every 15 minutes between 6 AM and 7 AM everyday. (It allows retries in case of Throttling by CloudFormation).
    2. For each selected Regions the lambda lists all the stacks and filters the ones matching IgnoreStackIdRegex and the ones that have already have a drift detection with a age smaller than DriftAgeCheckHours (23 hours by default).
    3. Loop over all the stacks and call the DetectStackDrift API.
  • Notification

    1. The NotificationSchedule scheduler triggers the NotifyStackDrifts lambda. By default, it runs at 7:45 AM everyday, this should leave enough time for the drift detection and potential retries to finish.
    2. For each selected Regions the lambda lists all the stacks and filters the ones matching IgnoreStackIdRegex or the ones that are not drifted.
    3. Depending on NotifierService, the lambda will send an HTML or text report to the Destination email.

architecture

Development

Copy .env.example to .env and replace with your desired configuration. Then run npm i && npm run build && ./deploy.sh

Testing

Run test/deploy.sh for a stack with drifts or test/deploy_many.sh for 1000 stacks to test with CloudFormation throttling.

cfn-drift-detector's People

Contributors

bourgoismickael avatar

Stargazers

 avatar

Watchers

 avatar  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.