This chapter covers AWS Cost Explorer and AWS Budgets, two essential tools for monitoring and controlling your AWS spending. They are part of the 'Billing, Pricing, and Support' domain, which makes up about 12% of the CLF-C02 exam. Understanding these services is critical because cost management is a top concern for organizations migrating to the cloud. You will learn how to visualize cost data, set spending limits, and receive alerts—skills that directly map to exam questions on cost governance and the AWS Well-Architected Framework's Cost Optimization pillar.
Jump to a section
Imagine you're the CFO of a growing company with multiple departments (engineering, marketing, sales) each spending money from a shared corporate account. You need to know exactly who spent what, when, and whether you're staying within budget. AWS Cost Explorer is like a GPS for your spending: it shows you historical routes (costs), predicts future traffic (forecasts), and lets you filter by vehicle type (service), region, or department (linked account/tag). AWS Budgets is the speed limit and fuel gauge alert: you set a threshold (e.g., $10,000/month for EC2), and if spending approaches or exceeds it, AWS sends you an alarm (email, SNS notification) or even takes action (stop resources). Together, they give you visibility and control. Just as a GPS doesn't drive the car for you, Cost Explorer doesn't control spending—it informs. Budgets can trigger actions, but you define the rules. Without these tools, you're driving blindfolded, only realizing you overspent when the credit card bill arrives.
What is AWS Cost Explorer and What Problem Does It Solve?
AWS Cost Explorer is a free, built-in AWS service that allows you to visualize, understand, and manage your AWS costs and usage over time. It solves the problem of 'cloud cost visibility' — without it, you'd have to manually parse the AWS Cost and Usage Report (CUR) or rely on third-party tools. Cost Explorer provides a graphical interface with default reports (e.g., monthly costs by service, daily costs by linked account) and allows you to create custom reports with filters and grouping. It also offers forecasting, so you can predict future spending based on historical data.
AWS Budgets is a complementary service that lets you set custom spending limits (budgets) and receive alerts when your actual or forecasted cost exceeds (or is forecasted to exceed) the budgeted amount. You can also create budgets for usage (e.g., 1000 GB of S3 storage) or reservation utilization (e.g., 80% RI utilization). Budgets can trigger actions such as sending an email notification, publishing to an SNS topic, or even applying an IAM policy to restrict further spending. Budgets are not free — you pay $0.10 per budget per month for the first 10 budgets, then $0.05 per budget per month after that (as of 2024).
How Cost Explorer Works
Cost Explorer pulls data from AWS's internal billing system (the same data that populates the Cost and Usage Report). It aggregates data at various granularities: hourly, daily, or monthly. You can filter by: - Service (e.g., Amazon EC2, AWS Lambda) - Region (e.g., us-east-1, eu-west-2) - Linked Account (for AWS Organizations) - Tags (cost allocation tags you define) - Usage Type (e.g., BoxUsage:m5.xlarge, DataTransfer-Out-Bytes) - Operation (e.g., RunInstances, CreateSnapshot)
You can group data by these dimensions to see cost breakdowns. For example, group by 'Service' to see which service costs the most, or group by 'Tag' to see costs by project or department. Cost Explorer also supports Savings Plans and Reserved Instance (RI) reporting, showing your coverage and utilization.
Forecasting in Cost Explorer uses machine learning models based on your historical usage patterns. It provides a forecast range (e.g., $5,000 - $5,500 for next month) with a confidence interval. This is useful for creating budgets.
How AWS Budgets Works
AWS Budgets lets you define a budget with the following components:
Budget type: Cost, Usage, RI Utilization, RI Coverage, Savings Plans Utilization, or Savings Plans Coverage.
Amount: The budgeted amount (e.g., $10,000) or usage (e.g., 1000 GB).
Time period: Monthly, quarterly, yearly, or a custom date range.
Filters: Optionally filter by service, region, linked account, or tags.
Alerts: Set up to 5 alert thresholds per budget (e.g., 50%, 80%, 100%, and 150% of budgeted amount). Each alert can send notifications to an SNS topic or email.
Actions (optional): You can configure an IAM policy or an SCP (Service Control Policy) to be applied when a threshold is exceeded. For example, you can deny the ability to create new EC2 instances if the budget is exceeded.
Behind the scenes, AWS Budgets checks your spending against the budget periodically (at least once per day, and more frequently for alerts near thresholds). It uses the same data as Cost Explorer. When a threshold is breached, it triggers the configured actions.
Key Tiers and Configurations
Cost Explorer: No cost to use. Data is available within 24 hours of incurring costs. Historical data is retained for 12 months. You can export reports as CSV.
AWS Budgets: First 10 budgets are free? Actually, as of 2024, the first 2 budgets are free, then $0.10/budget/month for the next 8, and $0.05/budget/month thereafter. However, this pricing is subject to change; check the official pricing page. Budgets are regional (must be created in the same region as your billing data, which is us-east-1 for consolidated billing).
Comparison to On-Premises
On-premises, you might have a fixed IT budget with annual hardware purchases and monthly utility costs. You typically know the cost in advance (capital expenditure). In AWS, costs are variable (operational expenditure) and can spike unexpectedly. Cost Explorer and Budgets provide the real-time visibility and control that on-premises doesn't need because costs are fixed. Without these tools, cloud costs can spiral out of control.
When to Use Cost Explorer vs. Alternatives
Cost Explorer: Use for ad-hoc analysis, historical trends, and forecasting. It's the primary tool for exploring cost data.
AWS Cost and Usage Report (CUR): Use for detailed, granular data that you want to analyze with external tools like Amazon Athena or QuickSight. CUR is more comprehensive but requires setup.
AWS Budgets: Use for proactive alerts and automated cost governance.
Third-party tools: Use if you need multi-cloud support or advanced analytics.
On the exam, remember that Cost Explorer is for visualization and analysis, while Budgets is for setting limits and alerts. They are often used together.
Enable Cost Explorer and Set Permissions
First, ensure Cost Explorer is enabled. In the AWS Billing and Cost Management console, navigate to Cost Explorer and click 'Enable Cost Explorer'. It may take up to 24 hours to populate data. Next, ensure your IAM user/role has the necessary permissions: `ce:GetCostAndUsage`, `ce:GetForecast`, `budgets:ViewBudget`, `budgets:ModifyBudget`. For admin users, the `AWSBillingReadOnlyAccess` managed policy includes these permissions. Without proper permissions, you'll see an access denied error when trying to view reports.
Create a Custom Cost Report in Cost Explorer
In the Cost Explorer dashboard, click 'Create report'. Choose a report type: 'Cost and Usage' (default) or 'RI Utilization' or 'RI Coverage'. For a simple monthly cost breakdown, select 'Cost and Usage'. Set the time period (e.g., last 3 months). Under 'Group by', select 'Service' to see costs per service. Under 'Filters', you can narrow down to specific services or regions. Click 'Save report' to keep it for later. The report updates daily with new data. You can also export the report as CSV for offline analysis.
Set Up a Monthly Cost Budget in AWS Budgets
In the Billing console, go to 'Budgets' and click 'Create a budget'. Select 'Cost budget' as the budget type. Give it a name like 'Monthly Cost Budget'. Set the period to 'Monthly' and the budget amount to, say, $5,000. Optionally, add filters to scope the budget (e.g., only EC2 costs). Under 'Alert settings', set a threshold of 80% with an email notification. You can also add another alert at 100% and 150%. Click 'Create budget'. AWS will now monitor your costs and send alerts when thresholds are breached. Note: Budgets are created in us-east-1 by default; if your billing data is in another region, you must create the budget there.
Create a Usage Budget for EC2 Instance Hours
Suppose you want to limit EC2 usage to 1000 instance-hours per month. Create a new budget, select 'Usage budget'. Under 'Usage type', select 'Amazon EC2' and then 'BoxUsage:m5.xlarge' (or any instance type). Set the budget amount to 1000 hours. Configure alerts at 80% and 100%. This budget will notify you if your instance usage approaches the limit. You cannot directly stop instances with a usage budget, but you can set up an action (IAM policy) to deny launching new instances. Usage budgets are useful for controlling non-cost metrics like data transfer or storage.
Set Up a Budget Action to Automatically Restrict Spending
When creating or editing a budget, under 'Actions', you can define an IAM action. For example, create an action that applies an IAM policy denying `ec2:RunInstances` when the budget threshold is exceeded. You specify the IAM role or user to apply the policy to. This is a powerful way to enforce cost controls automatically. However, be careful: the action applies to the specified IAM entity, not to all users in the account. For a more comprehensive approach, use an SCP (Service Control Policy) in AWS Organizations. Budget actions are an advanced feature and may incur additional costs (check pricing).
Scenario 1: Startup Monitoring Monthly AWS Spend
A startup with 20 employees uses multiple AWS services: EC2, RDS, S3, and Lambda. They have a monthly cloud budget of $10,000. The CTO uses Cost Explorer to create a dashboard showing costs by service and by team (using cost allocation tags like 'team:engineering'). They set up a monthly cost budget of $10,000 with alerts at 80% and 100%. One month, a developer accidentally leaves a large EC2 instance running over the weekend. On Monday, the CTO receives a 100% alert. They open Cost Explorer, filter by the last 3 days, and see a spike in EC2 costs. They identify the instance and stop it. Without the budget alert, they might not notice until the end of the month, risking a $3,000 overage.
Scenario 2: Enterprise with Multiple Accounts Using AWS Organizations
A large enterprise uses AWS Organizations with 50 linked accounts. They need to track costs per department and enforce spending limits. They enable Cost Explorer for the management account, which aggregates data from all linked accounts. They create cost allocation tags for each department (e.g., 'cost-center:marketing'). They then create budgets for each department's account. For the marketing department, they set a monthly budget of $50,000 with a budget action that applies an SCP to deny launching new resources if the budget is exceeded. This prevents the marketing team from overspending without approval. They also use Cost Explorer to generate monthly reports for each department head, showing their spend trends and forecasts.
Scenario 3: Misconfiguration Leading to Overspend
A company sets up a budget but forgets to add filters. The budget is for 'Total AWS costs' but they intended to budget only for production accounts. The budget alerts them when total costs exceed the threshold, but they ignore it because they think it's for production only. Meanwhile, a development account has a runaway resource that consumes $20,000. Because the budget wasn't scoped correctly, no targeted alert fired. They end up with a huge bill. Lesson: always scope budgets with filters (linked account, tags, service) to match your intent. Also, remember that budget alerts are not real-time; they can be delayed by up to 24 hours, so don't rely on them for immediate cost control.
What CLF-C02 Tests on This Objective
Domain 4: 'Billing, Pricing, and Support' includes Objective 4.2: 'Identify AWS services and tools for billing, cost management, and accounting.' Specifically, you need to know:
The purpose of AWS Cost Explorer: visualizing and analyzing costs and usage, forecasting future costs.
The purpose of AWS Budgets: setting spending limits and receiving alerts when thresholds are breached.
The difference between Cost Explorer and Budgets.
That Cost Explorer is free, while Budgets have a cost (first 2 budgets free, then per-budget fee).
That both services rely on the same underlying billing data.
That you can use cost allocation tags to filter and group data in both services.
Common Wrong Answers and Why Candidates Choose Them
'Cost Explorer is used to set budgets.' Wrong. Cost Explorer is for analysis and visualization, not for setting budgets. Candidates confuse the two because both deal with costs. Remember: Cost Explorer = explore; Budgets = set limits.
'AWS Budgets can automatically stop resources.' Partially true but misleading. Budgets can trigger actions like applying an IAM policy, but they cannot directly stop EC2 instances or delete resources. The action is policy-based, not direct resource manipulation. Candidates think 'stop resources' is too literal.
'Cost Explorer provides real-time data.' False. Data is delayed by up to 24 hours. Candidates assume 'visualization' means real-time, but AWS billing data is processed daily.
'You need to pay for Cost Explorer.' False. Cost Explorer is free. Candidates see 'Cost' in the name and assume it's a paid service.
Specific Terms That Appear on the Exam
Cost Explorer: 'visualize', 'understand', 'forecast', 'historical data', '12 months'.
AWS Budgets: 'set budgets', 'alerts', 'thresholds', 'actions', 'SNS notification'.
Cost Allocation Tags: 'tags', 'group by', 'filter'.
AWS Organizations: 'linked accounts', 'consolidated billing'.
Tricky Distinctions
Cost Explorer vs. AWS Budgets: Cost Explorer is for historical analysis and forecasting; Budgets is for proactive alerts and limits. They complement each other.
AWS Budgets vs. AWS Cost Anomaly Detection: Budgets are user-defined thresholds; Cost Anomaly Detection uses ML to detect unusual spending patterns automatically. The exam may ask which service to use for 'unexpected spending' — that's Cost Anomaly Detection, not Budgets.
Cost Explorer vs. Cost and Usage Report (CUR): Cost Explorer provides pre-aggregated visualizations; CUR provides raw, granular data for custom analysis.
Decision Rule for Multiple Choice
When asked which service to use for a given scenario:
If the question mentions 'visualizing', 'analyzing trends', 'forecasting', or 'historical costs' → choose Cost Explorer.
If the question mentions 'setting limits', 'receiving alerts', 'budget thresholds', or 'automated actions on overspend' → choose AWS Budgets.
If the question mentions 'detailed raw data for custom reporting' → choose Cost and Usage Report.
AWS Cost Explorer is a free tool for visualizing, analyzing, and forecasting AWS costs and usage.
AWS Budgets allows you to set custom cost or usage limits and receive alerts when thresholds are breached.
Cost Explorer data is updated within 24 hours; it is not real-time.
AWS Budgets can trigger actions like applying an IAM policy to restrict spending, but cannot directly stop resources.
Both services support filtering by cost allocation tags, linked accounts, services, and regions.
Cost Explorer retains historical data for 12 months.
The first 2 AWS Budgets are free; subsequent budgets cost $0.10/month each (pricing subject to change).
On the exam, distinguish between Cost Explorer (analysis) and Budgets (alerts/limits).
These come up on the exam all the time. Here's how to tell them apart.
AWS Cost Explorer
Free to use
Visualizes historical cost and usage data
Provides forecasts (predictions) of future costs
Allows filtering and grouping by service, region, linked account, tags
Data is delayed by up to 24 hours
AWS Budgets
Costs $0.10/budget/month after first 2 free budgets
Sets spending or usage limits (budgets)
Sends alerts when actual or forecasted costs exceed thresholds
Can trigger IAM policy actions to restrict resources
Checks budget status periodically (at least daily)
Mistake
AWS Cost Explorer provides real-time cost data.
Correct
Cost Explorer data is updated at least once per day, with a delay of up to 24 hours. It is not real-time.
Mistake
AWS Budgets can automatically shut down EC2 instances when a budget is exceeded.
Correct
Budgets can trigger actions such as applying an IAM policy that denies launching new instances, but they cannot directly stop or terminate existing resources. You would need a separate automation (e.g., Lambda) for that.
Mistake
Cost Explorer is a paid service.
Correct
Cost Explorer is free to use. There is no charge for accessing the console or API. However, AWS Budgets has a cost (first 2 budgets free, then $0.10/budget/month).
Mistake
You can only create cost budgets, not usage budgets.
Correct
AWS Budgets supports cost budgets, usage budgets, RI utilization budgets, RI coverage budgets, Savings Plans utilization budgets, and Savings Plans coverage budgets.
Mistake
Cost Explorer and Budgets use different data sources.
Correct
Both services pull data from the same underlying AWS billing system. Budgets rely on the same cost and usage data that Cost Explorer visualizes.
To enable Cost Explorer, go to the AWS Billing and Cost Management console, select 'Cost Explorer' from the navigation pane, and click 'Enable Cost Explorer'. It may take up to 24 hours for data to appear. There is no cost to enable or use Cost Explorer. You must have the appropriate IAM permissions (e.g., `ce:GetCostAndUsage`) to view reports. If you are using AWS Organizations, the management account can see costs for all linked accounts.
No, AWS Budgets cannot directly stop or terminate resources. However, you can configure a budget action that applies an IAM policy denying the ability to launch new resources (e.g., deny `ec2:RunInstances`). To automatically stop existing resources, you would need to use a custom solution such as an AWS Lambda function triggered by a budget alert via Amazon SNS. Budget actions are limited to IAM policy changes, not direct resource manipulation.
Cost Explorer provides pre-aggregated, visual data with filtering and grouping options. It is best for ad-hoc analysis and quick insights. The Cost and Usage Report (CUR) provides raw, granular data at the hourly or daily level, including line items for each usage record. CUR is ideal for custom reporting with tools like Amazon Athena or QuickSight. Cost Explorer is free; CUR has no additional cost but requires an S3 bucket for storage.
When creating a budget in AWS Budgets, you can add a filter for 'Linked Account' and select the specific account ID. This scopes the budget to only that account's costs. You can also create budgets in the individual linked account if it has its own billing data (if the account is not a management account). For consolidated billing, the management account can create budgets that cover all accounts or specific ones using filters.
Cost Explorer data is updated once per day, typically within 24 hours of incurring costs. If you see $0 for very recent days (e.g., today or yesterday), it means the data has not yet been processed. Check back after 24 hours. Also, ensure you have correctly set the time period and filters. If you have no usage for a particular day, it will show $0.
Yes, AWS Budgets supports RI Utilization budgets. You can create a budget of type 'RI Utilization' and set a threshold (e.g., 80%). When your actual RI utilization falls below that percentage, you will receive an alert. This helps you optimize your Reserved Instance usage. Similarly, you can create budgets for Savings Plans utilization.
Yes, by default you can create up to 20 budgets per account (including cost, usage, RI, and Savings Plans budgets). This limit can be increased by contacting AWS Support. Each budget can have up to 5 alert thresholds. Budgets are regional; you can create budgets in each region, but the default region for billing is us-east-1.
You've just covered AWS Cost Explorer and Budgets — now see how well it sticks with free CLF-C02 practice questions. Full explanations included, no account needed.
Done with this chapter?