How to automate an EC2 reboot after a failed instance health check?
Short answer
C Create a CloudWatch alarm on StatusCheckFailed_Instance dimensioned by instance ID, with an EC2 reboot action when the metric is greater than zero.
Question
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?
Key Takeaways
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.
Common mistake: 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.
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
- https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/UsingAlarmActions.html
- https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-system-instance-status-check-alarms.html
These links open the official vendor documentation in a new tab.
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?
Why does option D fail when it uses the AMI ID as the dimension?
Discussion 1 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 1
-
Bad_Mat 👍 1 Answered CWhy Option C is CorrectMetric Match: StatusCheckFailed_Instance tracks failures inside the instance itself (such as OS or software/configuration issues) which require a reboot.Action Match: Configuring a CloudWatch alarm action to reboot the EC2 instance mimics the manual resolution the CloudOps engineer performs.Dimension: Using the specific instance ID as a dimension targets the exact non-production instance.
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All SOA-C03 Questions
Access 100 questions with complete answers and detailed explanations.
View Full SOA-C03 Practice Test →