Skip to content

Does AWS Cost Anomaly Detection take yearly trends into account when detecting anomalies?

0

We experience a higher load every September in one of our accounts, yet we still receive alerts for this. We have been using Cost Anomaly Detection for over two years now. However, earlier this year, adjustments were made to the thresholds. Could this be affecting the detection of anomalies related to predictable, yearly trends?

asked a year ago240 views

3 Answers
1

Hi Lorenz,

This is a great question and a common pain point for organizations with annual seasonal patterns. Here's the direct answer:

No, Cost Anomaly Detection Does NOT Account for Yearly/Annual Trends

Per the AWS Cost Anomaly Detection FAQs and the GA announcement blog, the ML model considers:

  • Weekly seasonality (e.g., weekend vs. weekday patterns)
  • Monthly seasonality (e.g., beginning-of-month spikes)
  • Organic growth trends (gradual increases over time)

However, it does not explicitly model annual/yearly seasonality. The model primarily uses recent historical spending patterns (weeks to months) to establish baselines. This means your predictable September spike will likely trigger alerts every year, because the model doesn't "remember" last September's spike from 12 months ago.

Why the Threshold Changes Made It Worse

You mentioned threshold adjustments were made earlier this year. AWS introduced percentage-based thresholds and also made changes to how alerts are configured. If your thresholds were tightened or reset, this could make the model more sensitive to your September spike — a spike that was previously within the old threshold may now exceed the new one.

Workarounds for Annual Seasonal Patterns

Since you can't teach the model about annual seasonality directly, here are practical approaches:

1. Adjust Thresholds Before the Seasonal Period

Before September each year, temporarily increase your anomaly detection thresholds (either the absolute dollar amount or percentage) to accommodate the expected increase. Reset after the seasonal period ends.

Example: If your normal monthly spend is $10,000 but September is $25,000:
- Normal threshold: $2,000 above expected
- September threshold: $15,000 above expected (or use a percentage like 200%)

2. Use SNS Topic Filtering

Instead of changing thresholds, configure your SNS subscription filter policy to suppress alerts during September. This way the anomalies are still detected and logged, but you don't get noisy alerts.

3. Create Separate Monitors with Different Thresholds

Create two Cost Anomaly Detection monitors:

  • Monitor A (year-round): Standard threshold for non-seasonal services/accounts
  • Monitor B (seasonal account): Higher threshold specifically for the account that spikes in September

4. Combine with AWS Budgets for Seasonal Control

Set up an AWS Budget with a monthly budget amount that varies by month. AWS Budgets supports per-month budget amounts, so you can set September's budget to $25,000 while other months remain at $10,000. Budget alerts complement anomaly detection by providing a "ceiling" rather than deviation-based alerting.

5. Automate Threshold Adjustment with EventBridge + Lambda

For a more sophisticated approach, create an EventBridge scheduled rule that fires on September 1st and adjusts your anomaly detection monitor thresholds via the UpdateAnomalyMonitor API, then another rule on October 1st to reset them.

Summary

FeatureWeeklyMonthlyAnnual
Cost Anomaly Detection MLYesYesNo
AWS Budgets (variable monthly amounts)N/AYesYes
Manual threshold adjustmentYesYesYes (manual)
Automated threshold with EventBridgeYesYesYes

Recommended approach: Use AWS Budgets with monthly-varying amounts for the seasonal account as your primary alert, and either suppress or widen Cost Anomaly Detection thresholds during September.

References:

Hope this helps manage those September alerts!

AWS

answered 7 months ago

0

AWS Cost Anomaly Detection uses machine learning models that automatically determine thresholds each day by adjusting for organic growth and seasonal trends. The service is designed to account for patterns such as usage increases from Sunday to Monday or increased spend at the beginning of the month.

However, your issue with receiving alerts for predictable September increases despite using the service for over two years could be related to several factors:

  1. Threshold adjustments: You mentioned that earlier this year, adjustments were made to the thresholds. This could indeed be affecting how the system interprets your yearly September spike. AWS Cost Anomaly Detection added support for percentage-based thresholds in December 2022, which might have changed how your alerts are triggered.

  2. Configuration changes: In March 2023, AWS implemented automatic configuration of Cost Anomaly Detection for all new Cost Explorer users. If your organization's configuration was affected by this change or other updates, it might have reset some of your customized settings.

  3. Monitor limits: In September 2023, AWS increased the number of anomaly monitors that can be created for various monitor types. If your monitoring setup was modified around this time, it could affect detection patterns.

To address this issue, you might want to review your current threshold settings and consider implementing a more customized approach that accounts for your known seasonal patterns. You could also consider setting different thresholds specifically for September to accommodate your expected higher usage during that month.
Sources
FSICOST05: How do you track anomalies in your ongoing costs for AWS services? - Financial Services Industry Lens
Determining the Right Threshold for Alerts in AWS Cost Anomaly Detection | AWS re:Post
Document history - AWS Cost Management

answered a year ago

0

Yes, AWS's machine learning methods for cost analysis include evaluation of weekly and monthly seasonality patterns and natural growth in spending. The system uses machine learning models to detect anomalous spend patterns while minimizing false positive alerts by considering these regular patterns in cost fluctuations. To effectively monitor costs, the service requires 10 days of historical service usage data before it can begin detecting anomalies for any new service. https://aws.amazon.com/aws-cost-management/aws-cost-anomaly-detection/faqs/

AWS

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.