How to automate an EC2 reboot after a failed instance health check?
A company has a non-production application that runs on an Amazon EC2 instance. The instance has an Amazon EBS volume attached. Each time an instance health check fails, a CloudOps engineer resolves the issue by rebooting the instance. The CloudOps engineer must implement an automated solution to reboot the instance after a failed health check. The CloudOps engineer creates a service-linked IAM role for Amazon EventBridge. What should the CloudOps engineer do next to meet the automation requirement?
Community Insight
You are being tested on matching the correct status-check metric to the correct EC2 alarm action: instance-level failures call for a reboot, not a recover, stop/start, or an ALB metric.
This scenario tests whether you can pair the right CloudWatch status-check metric with the right EC2 alarm action to automate the manual reboot a CloudOps engineer performs today. The answer establishes that a StatusCheckFailed_Instance alarm dimensioned by instance ID, with a reboot action, reproduces that manual fix.
Choosing the recover action (option B) because it sounds like a stronger fix, or picking the stop-then-start approach in option D, which is not a reboot and is keyed on an invalid AMI dimension.
Community Discussion (1 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Why the Answer Is Correct
StatusCheckFailed_Instance reports failures that originate inside the guest OS, such as a hung kernel, exhausted memory, or a corrupted network stack, and the standard remediation for that class of failure is a reboot. Option C builds the alarm on exactly that metric, uses the instance ID as the dimension so the alarm targets only this non-production instance, and configures an EC2 reboot action when the value is greater than zero. That precisely mirrors the manual workflow described in the scenario. No EventBridge service-linked role is actually needed for a CloudWatch alarm-to-EC2 action, but its presence in the stem is a distractor rather than a blocker.Why the Other Options Are Wrong
Option A uses HealthyHostCount, which is an Elastic Load Balancing metric, not an EC2 status check, and firing a reboot when the count is greater than zero would reboot a healthy target. Option B selects the correct metric but pairs it with the recover action, which is intended for StatusCheckFailed_System host-level failures and cannot repair an instance-level OS problem. Option D uses the AMI ID as the dimension, which will never match a StatusCheckFailed_Instance datapoint, disables the benefit of detailed monitoring (status checks are always published at one-minute granularity), and performs a stop/start, which is a different operation from the required reboot.Community Comment Notes
As Bad_Mat noted, StatusCheckFailed_Instance "tracks failures inside the instance itself" such as OS or software/configuration problems, which is why a reboot is the appropriate remediation. The same comment stresses that the alarm action should mirror the engineer's manual reboot, and that the instance ID dimension scopes the automation to the single non-production instance. That reasoning aligns with the vendor's documented guidance for instance status-check alarms.Official Reference
Exam Strategy
When a stem describes a manual remediation that a CloudOps engineer already performs, look for the option that reproduces that exact action rather than a stronger-sounding one. Then verify two things: the metric actually exists for the resource (StatusCheckFailed_Instance, not HealthyHostCount) and the dimension is valid (instance ID, not AMI ID).
Frequently Asked Questions
Why is the EC2 recover action in option B wrong for StatusCheckFailed_Instance?
Recover is designed for StatusCheckFailed_System host failures; instance-level failures such as an OS hang usually require a reboot instead.
Why does option D fail when it uses the AMI ID as the dimension?
StatusCheckFailed_Instance is published per instance ID, so an AMI ID dimension would never match a datapoint and the alarm would never fire.
Related Analysis
Practice All SOA-C03 Questions
Access 100 questions with complete answers and detailed explanations.
View Full SOA-C03 Practice Test →