@architect/plugin-budget-watch

0.0.4 • Public • Published

@architect/plugin-budget-watch

GitHub CI status

There are many ways a serverless app could run up your bill. Maybe you hit the top of hacker news, or you might have an infinite loop. The simplest way to stop a runaway app is to shut down the compute resources. By setting reserved concurrency (how many simultaneous executions can run) on all lambdas to zero, you can effectively stop the app. The budget-watch plugin can be added to an Architect app to accomplish this.

Install

npm i @architect/plugin-budget-watch

Add these lines to your Architect project manifest:

# app.arc
@plugins
architect/plugin-budget-watch
    
@budget
limit $40
email "notify@example.com"

Once deployed, there is a budget alert scoped to just the resources of the app. If the cost of those resources exceeds the limit set, a shutdown is triggered. To restart the app, the budget limit can be increased or removed and the app redeployed. This resets the lambda concurrencies, and the app will resume operation.

Readme

Keywords

none

Package Sidebar

Install

npm i @architect/plugin-budget-watch

Weekly Downloads

1

Version

0.0.4

License

Apache-2.0

Unpacked Size

50.3 kB

Total Files

8

Last publish

Collaborators

  • brianleroux
  • dam
  • kborchers
  • ryanblock
  • architectci
  • filmaj