A runaway process is consuming 100% of a CPU on an EC2 instance. A SysOps admin wants the instance to automatically reboot if this condition lasts longer than 2 minutes. How can this be achieved?
Choose an answer
Tap an option to check your answer.
Correct answer: Create an Amazon CloudWatch alarm for the EC2 instance using detailed monitoring, and attach an action to restart the instance..
Why this is the answer
The correct answer is to create an Amazon CloudWatch alarm with detailed monitoring and an action to restart the instance. Detailed monitoring provides data at 1-minute intervals, which is necessary to detect a condition lasting longer than 2 minutes accurately. Basic monitoring only provides data at 5-minute intervals, which would be too slow to meet the 2-minute requirement. CloudWatch alarms can directly trigger actions like rebooting an EC2 instance. Lambda functions are not the most direct or efficient solution for this specific problem. While a Lambda function could restart an instance, invoking it on a schedule every 2 minutes wouldn't react to the CPU condition, and relying on EC2 health check events wouldn't provide the granular CPU utilization monitoring needed.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed