AWS Certified SysOps Administrator – Associate (SOA-C03) — Question 48
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?
Answer options
- 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.
Correct answer: B
Explanation
The correct answer is B because detailed monitoring in Amazon CloudWatch provides more frequent status updates, allowing the alarm to trigger accurately when the CPU usage exceeds the threshold for 2 minutes. Option A lacks the granularity needed for timely alerts, while C and D do not address the requirement for a specific duration before taking action.