SAA-C03Chapter 182 of 189Objective 4.4

Cost Anomaly Detection

This chapter covers AWS Cost Anomaly Detection, a managed service that uses machine learning to continuously monitor your AWS spending and detect unusual cost spikes. For the SAA-C03 exam, this topic appears in approximately 2-3% of questions, typically as part of the Cost Optimized domain (Objective 4.4: Implement cost anomaly detection). Understanding how this service works, its components, and how to interpret alerts is essential for identifying cost inefficiencies and preventing unexpected charges.

25 min read
Intermediate
Updated May 31, 2026

The Bank Fraud Detection System

Cost anomaly detection works like a bank's fraud detection system. The bank monitors your typical spending patterns — average daily transactions, typical amounts, frequent merchants, and geographic locations. It establishes a baseline of 'normal' behavior over time. When a transaction occurs that deviates significantly — say a $10,000 purchase at a foreign electronics store when you normally spend $200 at local groceries — the system flags it as anomalous. It doesn't block the transaction immediately but sends an alert to the fraud department, which can investigate and take action, such as freezing the card or contacting you. Similarly, AWS Cost Anomaly Detection monitors your AWS spending patterns, builds a baseline using machine learning, and alerts you when costs deviate from expected norms. You can set custom thresholds for alert sensitivity and configure actions like sending notifications via SNS or creating a support case. Just as the bank continuously learns your spending habits over time, AWS Cost Anomaly Detection adapts to your evolving cloud usage patterns, reducing false positives as it gathers more data. The key is that it's proactive — catching anomalies early before they become large financial issues, much like how early fraud detection prevents significant account losses.

How It Actually Works

What is AWS Cost Anomaly Detection?

AWS Cost Anomaly Detection is a fully managed service that uses machine learning models to analyze your AWS cost and usage data, establish a baseline of normal spending, and detect anomalous cost spikes or dips. It is part of the AWS Cost Management suite and helps you identify unexpected cost increases early, allowing you to investigate and remediate before the charges grow. The service is proactive — it continuously learns from your historical spending patterns and adapts to changes in your cloud usage, such as new deployments or seasonal variations.

The service is not a budgeting tool (like AWS Budgets) but a detective control. It answers the question: "Is my spending behaving normally based on my historical patterns?" It can detect anomalies at various granularities — by service, linked account, cost allocation tag, or cost category. Once an anomaly is detected, you can configure alerts to be sent via Amazon SNS, email, or even automatically create an AWS Support case.

How It Works Internally

AWS Cost Anomaly Detection uses a proprietary machine learning algorithm that analyzes your historical cost and usage data from AWS Cost Explorer. The algorithm is trained on up to 90 days of historical data. It builds a baseline model that captures daily, weekly, and monthly patterns, including trends and seasonality. For example, if your EC2 costs typically spike on Mondays due to batch processing, the model learns that pattern and does not flag it as anomalous.

The detection process works as follows:

1.

Data Collection: The service continuously ingests your cost and usage data from AWS Cost Explorer, which aggregates billing data from all your accounts (if using AWS Organizations).

2.

Baseline Modeling: The ML model analyzes the historical data to establish an expected range of costs for each monitored entity (e.g., a specific service or tag). The model outputs a predicted cost and a confidence interval (upper and lower bounds).

3.

Anomaly Scoring: When new cost data arrives (typically daily), the service compares the actual cost to the predicted range. If the actual cost falls outside the expected range, it is assigned an anomaly score. The score indicates how unusual the anomaly is — higher scores mean more severe deviations.

4.

Alerting: If the anomaly score exceeds a threshold you define (low, medium, or high sensitivity), an alert is generated. You can then review the anomaly in the AWS Cost Management console, see the impacted services, tags, or accounts, and investigate the root cause.

The service does not require any manual configuration of thresholds — you simply choose a sensitivity level. However, you can also create custom anomaly monitors that target specific cost allocation tags, cost categories, or linked accounts for more granular monitoring.

Key Components, Values, Defaults, and Timers

Monitors: The core entity that defines what costs to monitor. You can create multiple monitors, each with a specific scope (e.g., all costs, a specific service, a tag). Each monitor has a sensitivity setting: Low, Medium, or High. The sensitivity determines how far from the baseline a cost must deviate to be flagged. Low sensitivity means only large anomalies are flagged (fewer alerts), while High sensitivity flags even small deviations (more alerts, potentially more false positives). The default is Medium.

Alert Frequency: Alerts are generated daily as new cost data becomes available. AWS Cost and Usage Reports (CUR) are typically updated once per day, so anomaly detection runs on that same cadence. There is no real-time detection — it is near-real-time with a delay of up to 24 hours.

Historical Data Window: The model uses up to 90 days of historical data to establish the baseline. If you have less than 14 days of data, the service cannot create a model and will not generate alerts. This means new accounts or accounts with very recent activity will not have anomaly detection until at least 14 days of data accumulate.

Anomaly Score: A numeric value (0-100) that indicates the severity. The service uses this internally to determine whether to alert based on sensitivity. You cannot directly configure the score threshold; instead, you choose sensitivity which maps to a score threshold.

Cost Categories and Tags: You can create monitors that track costs by cost allocation tags (user-defined tags that are activated for cost tracking) or cost categories (a feature in AWS Cost Management that allows grouping costs by custom rules). This is useful for monitoring specific projects, departments, or environments.

Integration with AWS Organizations: If you use AWS Organizations, the service can monitor costs across all member accounts (if enabled). You can also create monitors for specific linked accounts.

Notifications: Alerts can be sent via Amazon SNS topics (which can then trigger email, SMS, Lambda, etc.) or you can configure the service to automatically create an AWS Support case for high-severity anomalies. There is no default notification — you must configure it.

Configuration and Verification

To set up Cost Anomaly Detection:

1.

Open the AWS Cost Management console.

2.

Under "Cost Anomaly Detection," choose "Create monitor."

3.

Define the scope: choose to monitor all costs, a specific service, a linked account, a cost allocation tag, or a cost category.

4.

Set the sensitivity: Low, Medium, or High.

5.

Configure alerting: select an existing SNS topic or create a new one. Optionally, enable automatic creation of an AWS Support case.

6.

Review and create.

After creation, the monitor will begin analyzing data. It may take up to 24 hours to see initial results because it needs to collect data and build the baseline.

To verify that the service is working:

Check the "Anomalies" tab in the Cost Anomaly Detection console. It lists recent anomalies with their score, impacted services, and cost impact.

You can also use the AWS CLI with the ce (Cost Explorer) service. For example:

aws ce get-anomalies --monitor-arn arn:aws:ce::123456789012:anomalymonitor/abcdef-1234 --time-period Start=2025-01-01,End=2025-01-31

This returns a list of anomalies for the specified monitor and time period.

Interaction with Related Technologies

AWS Budgets: While AWS Budgets allow you to set hard cost thresholds and receive alerts when you exceed them, Cost Anomaly Detection is dynamic — it adapts to your spending patterns. Budgets are static; they do not account for normal seasonal variations. The two services complement each other: Budgets for hard limits, Anomaly Detection for unexpected deviations.

AWS Cost Explorer: Cost Anomaly Detection uses Cost Explorer data as its source. You can also use Cost Explorer to drill into the specific services and resources that contributed to an anomaly.

AWS Organizations: Anomaly detection can be enabled at the management account level to monitor all member accounts. This is critical for enterprises with multiple accounts to detect cost spikes in any account.

Amazon SNS: Alerts are delivered through SNS. You can integrate SNS with Lambda to automate remediation actions, such as stopping an EC2 instance that is causing a cost spike.

AWS Support: Automatic case creation for high-severity anomalies ensures that your support team is immediately engaged.

Exam-Relevant Details

The service is free to use (no additional cost beyond standard AWS billing data storage). However, SNS notifications and Support cases may incur charges.

Anomaly detection requires at least 14 days of historical data to start generating alerts.

The service is available in all commercial AWS regions (not in China or GovCloud by default, but check current documentation).

Sensitivity levels: Low (fewest alerts, large anomalies only), Medium (default, balanced), High (many alerts, small anomalies).

You can create up to 100 monitors per account (soft limit, can be increased).

Alerts are generated once per day after the daily cost data is processed.

The ML model is continuously retrained as new data arrives, so it adapts to changes in your spending patterns over time.

Walk-Through

1

Enable Cost Anomaly Detection

Navigate to the AWS Cost Management console and select 'Cost Anomaly Detection' from the left navigation. If you have not used the service before, you may need to click 'Get started' to enable it. There is no upfront configuration — the service automatically begins ingesting your cost data from Cost Explorer. Ensure that you have activated AWS Cost Explorer, as anomaly detection relies on its data. This step is a one-time setup per account or per management account in AWS Organizations.

2

Create a Monitor

Click 'Create monitor' to define what costs you want to track. You specify a name and a scope. The scope can be 'All costs' (monitor everything), a specific AWS service (e.g., EC2, Lambda), a linked account (if using Organizations), a cost allocation tag (e.g., Project=Alpha), or a cost category. Choose the sensitivity level: Low, Medium, or High. Low sensitivity flags only large deviations (e.g., >50% above baseline), Medium flags moderate deviations (e.g., >20%), High flags small deviations (e.g., >10%). There is no exact percentage documented; these are approximations.

3

Configure Alerting

After setting the monitor scope and sensitivity, you must configure how you want to be notified. You can select an existing Amazon SNS topic or create a new one. The SNS topic can send email, SMS, or trigger a Lambda function. Optionally, you can enable 'Create AWS Support case' for high-severity anomalies. If enabled, the service automatically opens a support case with a description of the anomaly. This is useful for organizations that have a formal incident response process.

4

Review and Create Monitor

Review the monitor configuration. The service will then start analyzing historical data. It may take up to 24 hours for the first baseline to be established because the service needs to process at least one full day of cost data. After creation, you can view the monitor's status in the console. If there is insufficient historical data (less than 14 days), the monitor will be in a 'Pending' state until enough data accumulates.

5

Investigate Anomalies

When an anomaly is detected, you will receive an alert via the configured SNS topic or see it in the console under 'Anomalies.' Click on the anomaly to see details: the anomaly score (0-100), the estimated monthly impact (cost difference), the impacted services, accounts, tags, and a time series graph showing the actual vs. expected cost. You can use AWS Cost Explorer to drill down into the specific resources driving the cost. For example, if the anomaly is in EC2, you might find a new instance type or a spike in data transfer.

What This Looks Like on the Job

Enterprise Scenario 1: Multi-Account Organization with DevOps Teams

A large enterprise uses AWS Organizations with 50+ accounts for different teams and environments (dev, test, prod). The finance team wants to be alerted if any account's spending deviates significantly from its normal pattern. They create a monitor for each linked account (or use a monitor scoped to 'All costs' at the management account level). They set sensitivity to Medium to balance between noise and missed anomalies. Alerts are sent to a central SNS topic that triggers an email to the finance team and a Lambda function that posts a message to a Slack channel. When an anomaly is detected, the finance team can quickly identify which account and service caused the spike, and contact the responsible team. Without this, they would only discover the cost overrun at the end of the month. Common misconfiguration: creating monitors with too high sensitivity (Low) and missing critical anomalies, or too low sensitivity (High) and being flooded with false positives from normal usage spikes.

Enterprise Scenario 2: Tag-Based Cost Allocation for Projects

A SaaS company uses cost allocation tags to track costs per customer or project. They want to monitor each project's spending for anomalies. They create monitors for each active cost allocation tag (e.g., CustomerID=123). The sensitivity is set to High for critical customers and Low for internal projects. Alerts are sent to the project manager's email. When a spike occurs, the manager can investigate if a new deployment or misconfiguration caused the increase. For example, an engineer may have accidentally launched expensive GPU instances for a non-critical test. The anomaly detection catches this within 24 hours, allowing the team to shut down the instances and avoid a large bill. Without tags, the anomaly would be visible only at the service level, making it harder to attribute to a specific project.

Performance Considerations and Pitfalls

Data Latency: Cost data is updated once per day, so anomalies are detected with up to 24-hour delay. For real-time cost control, use AWS Budgets with actions (e.g., stop EC2 instances) but be aware that budgets are static.

False Positives: New deployments or seasonal promotions can cause expected cost increases that the model may initially flag as anomalies. Over time, the model adapts. To reduce false positives, adjust sensitivity or exclude specific services/tags from monitoring.

Monitor Limits: You can create up to 100 monitors per account. If you need more, request a limit increase.

Cost Allocation Tags: Only tags that are activated for cost tracking in the Billing and Cost Management console are available for monitoring. Inactive tags are ignored.

New Accounts: Accounts with less than 14 days of history cannot use anomaly detection. For new accounts, consider using AWS Budgets as a temporary measure.

How SAA-C03 Actually Tests This

SAA-C03 Exam Focus on Cost Anomaly Detection (Objective 4.4)

The exam tests your understanding of Cost Anomaly Detection as a tool for proactive cost management. Key areas:

Purpose: You should know that it uses ML to detect anomalies in cost and usage data, not just static thresholds.

Sensitivity Levels: Be able to differentiate Low, Medium, and High. Low = fewer alerts, large anomalies only. High = more alerts, including small deviations.

Data Requirements: At least 14 days of historical data to generate alerts. New accounts won't have alerts until then.

Integration: Alerts can go to SNS or create a Support case. You may be asked which service to use for notification (SNS).

Scope: Monitors can be scoped to all costs, a service, a linked account, a cost allocation tag, or a cost category.

Cost: The service itself is free, but SNS and Support case creation may incur charges.

Common Wrong Answers and Traps

1.

Choosing AWS Budgets instead of Cost Anomaly Detection: A question may describe a scenario where spending patterns vary seasonally and the company wants to detect unusual spikes. Candidates often choose AWS Budgets because it's more familiar, but Budgets use static thresholds and cannot adapt to patterns. The correct answer is Cost Anomaly Detection.

2.

Setting up a monitor with 'All costs' when a specific tag is needed: The question might ask for monitoring a specific project. Some candidates choose 'All costs' because it's simpler, but the correct approach is to create a monitor scoped to the cost allocation tag for that project.

3.

Assuming real-time detection: The exam may present a scenario needing immediate action. Candidates might think Cost Anomaly Detection provides real-time alerts, but it updates daily. The correct answer might involve AWS Budgets with actions for near-real-time control.

4.

Overlooking the 14-day data requirement: A question about a new account may ask why no alerts are generated. The correct answer is insufficient historical data.

5.

Confusing sensitivity levels: A question might ask which sensitivity setting would generate the most alerts. Candidates might choose Low because it sounds more sensitive, but Low actually means fewer alerts (only large anomalies). High generates the most alerts.

Edge Cases

AWS Organizations: If the management account enables anomaly detection, it can monitor all member accounts. However, individual member accounts cannot see the management account's monitors unless they have appropriate permissions.

Service-linked roles: The service uses a service-linked role named AWSServiceRoleForCostAnomalyDetection to access your cost data. You do not need to create this role manually; it is created automatically when you first use the service.

Multiple monitors: You can have multiple monitors with overlapping scopes. For example, you can have a monitor for 'All costs' with Medium sensitivity and another for 'EC2' with High sensitivity. Alerts are generated independently for each monitor.

How to Eliminate Wrong Answers

If the question mentions 'historical patterns' or 'baseline,' it's likely Cost Anomaly Detection.

If the question mentions 'static threshold' or 'fixed budget,' it's AWS Budgets.

If the question asks for 'real-time' or 'immediate' action, look for Budgets with actions (e.g., stop instances) or AWS Config rules.

If the question involves 'ML' or 'machine learning,' it's Cost Anomaly Detection.

Remember: Cost Anomaly Detection is a detective control, not a preventive one. It alerts you after the fact (within 24 hours).

Key Takeaways

AWS Cost Anomaly Detection uses ML to automatically detect cost anomalies based on historical patterns, not static thresholds.

The service requires at least 14 days of historical cost data to generate alerts.

Sensitivity levels: Low (fewest alerts, large anomalies only), Medium (default), High (most alerts, including small deviations).

Alerts are sent via Amazon SNS or can automatically create an AWS Support case.

Monitors can be scoped to all costs, a specific service, linked account, cost allocation tag, or cost category.

The service itself is free; you only pay for SNS notifications and Support cases if used.

Cost Anomaly Detection is a detective control; use AWS Budgets for proactive, automated cost control.

Data is processed once per day, so anomalies are detected within 24 hours.

Easy to Mix Up

These come up on the exam all the time. Here's how to tell them apart.

AWS Cost Anomaly Detection

Uses ML to dynamically detect anomalies based on historical patterns

Requires at least 14 days of historical data

Alerts are generated daily (up to 24-hour delay)

Sensitivity levels: Low, Medium, High

Cannot take automated actions (only alerts)

AWS Budgets

Uses static thresholds you define (e.g., $1000 monthly)

Works immediately after creation (no historical data needed)

Alerts can be near-real-time (within hours depending on data refresh)

No sensitivity levels; you define exact amounts or % of budget

Can trigger automated actions (e.g., stop EC2 instances) via Budget Actions

Watch Out for These

Mistake

Cost Anomaly Detection can detect anomalies in real-time.

Correct

Cost Anomaly Detection processes cost data once per day, typically within 24 hours of the data being generated. It is not real-time. For near-real-time cost control, use AWS Budgets with actions.

Mistake

You must manually train the ML model with historical data.

Correct

The service automatically uses up to 90 days of historical data from Cost Explorer to build a baseline. No manual training is required. You only need to configure the monitor scope and sensitivity.

Mistake

Higher sensitivity (High) means fewer alerts.

Correct

High sensitivity means the service flags smaller deviations from the baseline, resulting in more alerts. Low sensitivity means only large anomalies trigger alerts, resulting in fewer alerts. The naming can be counterintuitive.

Mistake

Cost Anomaly Detection replaces AWS Budgets.

Correct

The two services complement each other. Budgets are for static thresholds and can take automated actions (e.g., stop resources). Anomaly Detection is for dynamic, ML-based detection. They are often used together.

Mistake

You can monitor costs at the resource level (e.g., a specific EC2 instance).

Correct

Cost Anomaly Detection monitors aggregated costs at the service, account, tag, or cost category level. It does not drill down to individual resource IDs. To investigate a resource, use Cost Explorer after an anomaly is detected.

Do You Actually Know This?

Reveal each answer, then mark whether you got it right. Score 60%+ to unlock the next chapter.

Frequently Asked Questions

What is the difference between AWS Cost Anomaly Detection and AWS Budgets?

AWS Cost Anomaly Detection uses machine learning to dynamically detect unusual spending patterns based on your historical data. It adapts to seasonal changes and does not require manual threshold setting. AWS Budgets, on the other hand, uses static thresholds you define (e.g., a monthly budget of $1000). Budgets can trigger automated actions like stopping EC2 instances when exceeded. Use both together: Budgets for hard limits and automated responses, Anomaly Detection for early warning of unexpected spikes.

How long does it take for AWS Cost Anomaly Detection to start generating alerts?

After you create a monitor, the service needs at least 14 days of historical cost data to build a baseline. If you have less than 14 days of data, the monitor will remain in a 'Pending' state. Once sufficient data is available, alerts can be generated within 24 hours of cost data being processed.

Can I monitor costs for a specific project using cost allocation tags?

Yes. You can create a monitor scoped to a specific cost allocation tag (e.g., Project=Alpha). Ensure the tag is activated for cost tracking in the Billing and Cost Management console. The monitor will then detect anomalies only for costs associated with that tag.

What sensitivity level should I choose to minimize false positives?

Choose Low sensitivity to minimize false positives. Low sensitivity only flags large deviations from the baseline, reducing the number of alerts. However, you may miss smaller anomalies. Medium is a good balance for most use cases. High sensitivity generates many alerts, including for minor fluctuations, which can lead to alert fatigue.

Does AWS Cost Anomaly Detection work with AWS Organizations?

Yes. If you enable it in the management account, you can create monitors that cover all member accounts or specific linked accounts. This allows centralized monitoring of costs across the organization. Individual member accounts can also use the service independently if they have their own Cost Explorer data.

Can I get real-time alerts from Cost Anomaly Detection?

No. Cost data is updated once per day, so alerts are generated daily with up to 24-hour delay. For near-real-time cost control, use AWS Budgets with budget actions that can automatically stop or terminate resources when a threshold is exceeded.

How are anomalies scored?

Each anomaly has a score from 0 to 100, indicating how unusual it is compared to the baseline. Higher scores mean more severe deviations. The score is used internally to determine whether to trigger an alert based on the sensitivity level. You cannot directly configure the score threshold; you choose sensitivity instead.

Terms Worth Knowing

Ready to put this to the test?

You've just covered Cost Anomaly Detection — now see how well it sticks with free SAA-C03 practice questions. Full explanations included, no account needed.

Done with this chapter?