Code Monkey home page Code Monkey logo

aws-budget-killswitch's Introduction

AWS Budget Killswitch

Disable AWS services when budget is exceeded.
This project allows to create an AWS Budget and a Lambda which will disable services in an emergency - when a predefined budget limit is exceeded.
This is to prevent unexpected charges when your services are under DDoS attack or just the traffic is much higher than what you expected.
It's unadvisable to use it in production - it's more for personal accounts.
Better use something like AWS WAF for production.

How does it work?

A budget is created in AWS and upon reaching 99% it will send an email notification and will disable:

  1. Cloudfront distributions
  2. Will set throttling to 0 on all methods of Api Gateway

It's a very blunt tool and designed to stop charges from external traffic.

Deployment

  1. Install AWS SAM: https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install.html
  2. Run:
sam deploy -g

This will start a command-line wizard where you'd have to specify region, email and an emergency budget limit Settings will be saved into samconfig.toml

Next deployments can be done with

sam deploy

aws-budget-killswitch's People

Contributors

leonti avatar stevejarvis avatar

Stargazers

Aaron Yao-Smith 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.