Skip to content

architect/plugin-budget-watch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Monitor app spend and stop lambdas when the limit is reached

Resources

Code of conduct

Stars

Watchers

Forks

Packages

No packages published