CloudWatch and monitoring
20 questions about monitoring and logging with CloudWatch for exam preparation.
A web application on EC2 experiences unpredictable traffic spikes. The team needs to be notified when CPU usage exceeds 80% for 5 consecutive minutes. Which solution implements this with LOWEST operational overhead?
Category: Design High-Performing Architectures
Explanation
Detailed breakdown of the correct answer
CloudWatch Alarms
CloudWatch Alarms monitors metrics and executes actions when the value crosses a threshold during a specified period.
You can configure the number of consecutive datapoints that must violate the threshold before triggering the alarm. With 1-minute period and 5 datapoints, the alarm activates if CPU > 80% for 5 consecutive minutes.
Therefore, the correct answer is: Create CloudWatch Alarm with 1-minute period and 5 datapoints.
The option that says: Cron script on EC2 is incorrect because it requires custom development and maintenance, doesn't scale, and if the instance fails monitoring is lost.
The option that says: Systems Manager automation is incorrect because it's overly complex for simple metric monitoring, Systems Manager is for more complex management tasks.
The option that says: Lambda querying API is incorrect because it adds unnecessary complexity, Lambda invocation costs and isn't CloudWatch's native way for alerts.