While working with an enterprise finance department to establish planned budget alarms in their multi-account environment, I reached for Cloudformation to help me avoid manually entering 1200 monthly budgets.
The AWS documentation for planned budgets is fine, but the lack of an example and some explicit call-outs caused me to spin wheels while trying to find examples that would explain the error messages I kept getting.
It's my hope the following sample will prove helpful to anyone else trying to do the same:
Resources:
# If you're managing multiple accounts, you'll probably want this resource name
# to reflect the name of the target account.
BudgetAccountNameHere:
Type: "AWS::Budgets::Budget"
Properties:
Budget:
TimeUnit: MONTHLY
BudgetType: COST
PlannedBudgetLimits:
# Unix Timestamp of Start of Month, UTC.
# You must provide a full 12-month list, starting with the current month.
"1648771200":
Amount: 100.00
Unit: USD
"1651363200":
Amount: 100.00
Unit: USD
"1654041600":
Amount: 100.00
Unit: USD
"1656633600":
Amount: 100.00
Unit: USD
"1659312000":
Amount: 100.00
Unit: USD
"1661990400":
Amount: 100.00
Unit: USD
"1664582400":
Amount: 100.00
Unit: USD
"1667260800":
Amount: 100.00
Unit: USD
"1669852800":
Amount: 100.00
Unit: USD
"1672531200":
Amount: 100.00
Unit: USD
"1675209600":
Amount: 100.00
Unit: USD
"1677628800":
Amount: 100.00
Unit: USD
CostFilters:
LinkedAccount:
- YOUR_ACCOUNT_ID_HERE
NotificationsWithSubscribers:
- Notification:
NotificationType: ACTUAL
ComparisonOperator: GREATER_THAN
Threshold: 99
Subscribers:
- SubscriptionType: EMAIL
Address: YOUR_EMAIL_HERE
Top comments (0)