0
0
AWScloud~30 mins

Budgets and cost anomaly detection in AWS - Mini Project: Build & Apply

Choose your learning style9 modes available
Budgets and Cost Anomaly Detection Setup in AWS
📖 Scenario: You are managing cloud costs for a small company. To keep spending under control, you want to set a monthly budget and get alerts if costs go over the budget or if unusual spending happens.
🎯 Goal: Build an AWS Budgets configuration with a monthly budget and enable cost anomaly detection alerts to monitor unexpected cost spikes.
📋 What You'll Learn
Create an AWS Budget with a fixed monthly amount of $500
Set the budget to track actual costs
Add an alert to notify when costs exceed 80% of the budget
Enable AWS Cost Anomaly Detection for the linked account
Configure anomaly detection to send alerts to an SNS topic
💡 Why This Matters
🌍 Real World
Companies use budgets and anomaly detection to control cloud spending and avoid surprises in their bills.
💼 Career
Cloud engineers and cost managers need to set budgets and monitor anomalies to optimize cloud costs and alert stakeholders.
Progress0 / 4 steps
1
Create the AWS Budget dictionary
Create a dictionary called budget with these exact keys and values: BudgetName set to "MonthlyCostBudget", BudgetLimit set to 500, and TimeUnit set to "MONTHLY".
AWS
Need a hint?

Use a Python dictionary with keys exactly as BudgetName, BudgetLimit, and TimeUnit.

2
Add alert threshold to the budget
Add a key Alerts to the budget dictionary. Set it to a list with one dictionary that has Threshold set to 80, ComparisonOperator set to "GREATER_THAN", and NotificationType set to "ACTUAL".
AWS
Need a hint?

Alerts is a list with one dictionary inside. Make sure to use the exact keys and values.

3
Create the anomaly detection configuration
Create a dictionary called anomaly_detection_config with keys: AccountId set to "123456789012", MonitorName set to "MonthlyCostAnomalyMonitor", and SnsTopicArn set to "arn:aws:sns:us-east-1:123456789012:CostAnomalyAlerts".
AWS
Need a hint?

Use the exact keys and values for the anomaly detection configuration dictionary.

4
Complete the AWS Budgets and Anomaly Detection setup
Add a key CostFilters to the budget dictionary and set it to a dictionary with LinkedAccount key set to a list containing "123456789012". Then add a key EnableAnomalyDetection set to True in anomaly_detection_config.
AWS
Need a hint?

CostFilters should filter by the linked account ID. Enable anomaly detection by setting the key to True.