It the repo showing how to create a billing alarm when the threshold in the billing crossed the limit. Now it is set for 5 USD.
The code is a part of blog post on securing and optimising AWS account usage. Read on dev.to
There are several steps to achieve a calm mind regarding your expenses in the cloud:
- Set email with SSM, like:
aws ssm put-parameter --name "/billing/email" --type "String" --value "<your email>"
- Clone the repo and install dependencies (in Linux/macOS case)
git clone https://github.com/Grenguar/cdk-billing-alert.git
cd cdk-billing-alert
cd infra
npm i
- If you want to change the threshold, do it in the
infra/bin/infra.ts
file. There is a parameter calledmonetaryLimit
- Do the deployment:
npx cdk deploy