AWS Certified DevOps Engineer – Professional (DOP-C02) — Question 35
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 an Amazon CloudWatch alarm for the StatusCheckFailed System metric allows for immediate recovery of the instance, minimizing downtime and data loss. Options A and B involve scaling and lifecycle management, which do not directly address quick recovery from failures. Option D also focuses on rebooting rather than recovering, which may not resolve the underlying issue.