AWS Certified DevOps Engineer – Professional — Question 31
A company hosts its staging website using an Amazon EC2 instance backed with Amazon EBS storage. The company wants to recover quickly with minimal data losses in the event of network connectivity issues or power failures on the EC2 instance.
Which solution will meet these requirements?
Answer options
- A. Add the instance to an EC2 Auto Scaling group with the minimum, maximum, and desired capacity set to 1.
- B. Add the instance to an EC2 Auto Scaling group with a lifecycle hook to detach the EBS volume when the EC2 instance shuts down or terminates.
- C. Create an Amazon CloudWatch alarm for the StatusCheckFailed_System metric and select the EC2 action to recover the instance.
- D. Create an Amazon CloudWatch alarm for the StatusCheckFailed_Instance metric and select the EC2 action to reboot the instance.
Correct answer: C
Explanation
Option C is correct because creating a CloudWatch alarm for the StatusCheckFailed_System metric and selecting the EC2 action to recover the instance allows for quick recovery from system-level issues. Options A and B do not provide a direct mechanism for recovery during outages, while option D only reboots the instance instead of recovering it, which may not address the underlying problem effectively.