Skip to content

Latest commit

 

History

History
30 lines (20 loc) · 918 Bytes

README.md

File metadata and controls

30 lines (20 loc) · 918 Bytes

CDK v2 Billing Alert

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:

  1. Set email with SSM, like:
aws ssm put-parameter --name "/billing/email" --type "String" --value "<your email>"
  1. 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
  1. If you want to change the threshold, do it in the infra/bin/infra.ts file. There is a parameter called monetaryLimit
  2. Do the deployment:
npx cdk deploy