Menu
AWS CloudFormation
User Guide (API Version 2010-05-15)

AWS::Budgets::Budget

The AWS::Budgets::Budget resource creates, replaces, or deletes budgets for Billing and Cost Management. For more information, see Managing Your Costs with Budgets in the AWS Billing and Cost Management User Guide.

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

JSON

{ "Type" : "AWS::Budgets::Budget", "Properties" : { "NotificationsWithSubscribers" : [ NotificationWithSubscribers, ... ], "Budget" : BudgetData } }

YAML

Type: "AWS::Budgets::Budget" Properties: NotificationsWithSubscribers: - NotificationWithSubscribers Budget: BudgetData

Properties

NotificationsWithSubscribers

The notification that you want associated with the budget. A budget can have up to five notifications, and each notification can have one SNS subscriber and up to ten email subscribers.

Required: No

Type: List of Billing and Cost Management Budget NotificationWithSubscribers property types

Update requires: Replacement

Budget

The budget for tracking your service usage, costs, and RI utilization. Single accounts and master and member accounts in an organization can, by default, create budgets.

Required: Yes

Type: Billing and Cost Management Budget BudgetData

Update requires: No interruption

Return Values

Ref

When you pass the logical ID of an AWS::Budgets::Budget resource to the intrinsic Ref function, the function returns the name of the budget created by the template.

For more information about using the Ref function, see Ref.

Examples

Budget for 100 USD with two notifications

The following example creates a budget for 100 USD amount of costs, with notifications for when you have spent over 80 USD or over 99 USD. The notifications are sent to the subscribers email@example.com and email2@example.com.

JSON

{ "Description": "Basic Budget test", "Resources": { "Budget": { "Type": "AWS::Budgets::Budget", "Properties": { "Budget": { "BudgetLimit": { "Amount": "100", "Unit": "USD" }, "TimeUnit": "MONTHLY", "TimePeriod": { "Start": "1225864800", "End": "1926864800" }, "BudgetType": "COST", "CostFilters": { "AZ": [ "us-east-1", "us-west-1", "us-east-2" ] } }, "NotificationsWithSubscribers": [ { "Notification": { "NotificationType": "ACTUAL", "ComparisonOperator": "GREATER_THAN", "Threshold": 99 }, "Subscribers": [ { "SubscriptionType": "EMAIL", "Address": "email@example.com" }, { "SubscriptionType": "EMAIL", "Address": "email2@example.com" } ] }, { "Notification": { "NotificationType": "ACTUAL", "ComparisonOperator": "GREATER_THAN", "Threshold": 80 }, "Subscribers": [ { "SubscriptionType": "EMAIL", "Address": "email@example.com" } ] } ] } } }, "Outputs": { "BudgetId": { "Value": "BudgetExample" } } }

YAML

--- Description: "Basic Budget test" Resources: BudgetExample: Type: "AWS::Budgets::Budget" Properties: Budget: BudgetLimit: Amount: 100 Unit: USD TimeUnit: MONTHLY TimePeriod: Start: 1225864800 End: 1926864800 BudgetType: COST CostFilters: AZ: - us-east-1 - us-west-1 - us-east-2 NotificationsWithSubscribers: - Notification: NotificationType: ACTUAL ComparisonOperator: GREATER_THAN Threshold: 99 Subscribers: - SubscriptionType: EMAIL Address: email@example.com - SubscriptionType: EMAIL Address: email2@example.com - Notification: NotificationType: ACTUAL ComparisonOperator: GREATER_THAN Threshold: 80 Subscribers: - SubscriptionType: EMAIL Address: email@example.com Outputs: BudgetId: Value: !Ref BudgetExample

See Also