Skip to content

Instantly share code, notes, and snippets.

@jorgetovar
Created December 30, 2022 18:20
Show Gist options
  • Save jorgetovar/e23084202380fcb19e40cd689fe8097f to your computer and use it in GitHub Desktop.
Save jorgetovar/e23084202380fcb19e40cd689fe8097f to your computer and use it in GitHub Desktop.
CloudFormation template to setting up alert billing in AWS
---
AWSTemplateFormatVersion: "2010-09-09"
Description: "Simple budget example"
Parameters:
Email:
Type: String
Default: email@example.com
Description: Please enter the email address to which budget notifications should be addressed.
Resources:
BasicBudget:
Type: "AWS::Budgets::Budget"
Properties:
Budget:
BudgetLimit:
Amount: 10
Unit: USD
TimeUnit: MONTHLY
BudgetType: COST
NotificationsWithSubscribers:
- Notification:
NotificationType: ACTUAL
ComparisonOperator: GREATER_THAN
Threshold: 99
Subscribers:
- SubscriptionType: EMAIL
Address: !Ref Email
- Notification:
NotificationType: ACTUAL
ComparisonOperator: GREATER_THAN
Threshold: 80
Subscribers:
- SubscriptionType: EMAIL
Address: !Ref Email
Outputs:
BudgetId:
Value: !Ref BasicBudget
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment