
Answer-first summary for fast verification
Answer: Create an Amazon CloudWatch alarm for the EC2 instance with detailed monitoring. Add an action to restart the instance.
To detect a problem that occurs for more than 2 minutes, you need CloudWatch metrics at a 1-minute granularity, which requires enabling detailed monitoring on the EC2 instance. Basic monitoring only provides metrics at 5-minute intervals. The alarm can then trigger an EC2 reboot action.
Author: Ritesh Yadav
Ultimate access to all questions.
Question #60
An errant process is known to use an entire processor and run at 100%. A CloudOps engineer wants to automate restarting an Amazon EC2 instance when the problem occurs for more than 2 minutes.
How can this be accomplished?
A
Create an Amazon CloudWatch alarm for the EC2 instance with basic monitoring. Add an action to restart the instance.
B
Create an Amazon CloudWatch alarm for the EC2 instance with detailed monitoring. Add an action to restart the instance.
C
Create an AWS Lambda function to restart the EC2 instance, invoked on a scheduled basis every 2 minutes.
D
Create an AWS Lambda function to restart the EC2 instance, invoked by EC2 health checks.
No comments yet.