This is a stack of AWS billing alert functions built with Serverless. Once deployed, notifications would be delivered to a slack channel when the total cost exceeds specified threshold values. The scanning interval is once a day. Also monthly report will be delivered at the end of month.
- Enable
Cost Explorer
for the targeted AWS account
https://docs.aws.amazon.com/ja_jp/AmazonCloudWatch/latest/monitoring/monitor_estimated_charges_with_cloudwatch.html#turning_on_billing_metrics
$ git clone git@github.com:kamataryo/aws-billing-alert.git
$ cd aws-billing-alert
$ yarn # or npm install
$ cp .envrc.sample .envrc # Please fill the values
$ vi .envrc
$ source .envrc
$ npm run deploy
See .envrc.sample
and serverless.yml
.
$ node ./src/monthly.mjs --exec
$ node ./src/daily.mjs --exec