AWS Certified DevOps Engineer – ProfessionalMonitoring and LoggingMedium
A DevOps team manages a critical application running on Amazon EC2 instances. They want to proactively detect when the CPU utilization of an EC2 instance significantly deviates from its normal historical pattern, rather than relying on static thresholds. This detection should trigger an alert to the operations team. Which CloudWatch feature should they use?
- ACloudWatch Logs Insights.
- BCloudWatch Alarms with static thresholds.
- CCloudWatch Anomaly Detection.
- DCloudWatch Events (now Amazon EventBridge).
Show answer & explanationAnswer & explanation
Correct answer: C. CloudWatch Anomaly Detection.
CloudWatch Anomaly Detection is specifically designed to identify when a metric deviates from its normal baseline. It uses machine learning to continuously analyze past metric data, create a baseline, and identify anomalous behavior. This is precisely what's needed to detect significant deviations from historical CPU utilization patterns, rather than using fixed thresholds which might generate too many false positives or negatives.
Why the other options are wrong
- A. CloudWatch Logs Insights is a query service for analyzing log data, not for detecting anomalies in metrics like CPU utilization.
- B. Static thresholds are not suitable for detecting deviations from dynamic normal patterns, as they can lead to false alarms or missed anomalies when the 'normal' behavior changes over time.
- D. CloudWatch Events (EventBridge) is used for routing events between AWS services or to targets, not for analyzing metric patterns and detecting anomalies.
CloudWatch Anomaly Detection
A CloudWatch feature that uses machine learning to analyze historical metric data, identify a normal baseline, and alert when current metric values deviate significantly from this baseline.
- Dynamically learns normal metric patterns.
- Reduces false positives compared to static thresholds.
- Ideal for fluctuating metrics like CPU utilization or network traffic.
Memory trick: Anomaly Detection: CloudWatch's AI for 'what's normal?'