Target the AWS-RestartEC2Instance Automation runbook from an AWS Health event rule for termination and retirement events
Short answer
A Use an AWS Health event rule for termination and retirement events targeting the AWS-RestartEC2Instance Automation runbook.
Question
Key Takeaways
AWS Health is the event source that emits instance retirement and scheduled termination events, so the rule must be bound to it with those specific event types (A). Systems Manager Automation runbooks such as AWS-RestartEC2Instance perform the restart natively, which removes the need for the Lambda function that options C and D introduce to register a maintenance window task. Option B uses Systems Manager as the event source, which does not emit AWS Health notifications, so it would never fire for these events.
The remediation must be driven by AWS Health notifications about EC2 instance retirement and scheduled termination, and must be executed by AWS Systems Manager Automation. Configuring an EventBridge rule with AWS Health as the event source, selecting the event types that indicate scheduled instance termination and retirement, and targeting the AWS-RestartEC2Instance Systems Manager Automation runbook restarts the instances in response to those notifications.
Common mistake: Configuring a Systems Manager event source with a maintenance window event type (B) — Systems Manager is not the source of EC2 retirement notifications, so a rule on that source never receives the AWS Health events described in the scenario. Using an AWS Lambda function to register a Systems Manager maintenance window task (C and D) — this adds a function to invoke and maintain, whereas the AWS-RestartEC2Instance Automation document restarts the instance directly. Note that several commenters preferred C on the grounds that it respects the maintenance window, but the requirement's trigger is the AWS Health notification and the Automation runbook is the native remediation path.
Expert Analysis
Why the Answer Is Correct
The notifications that drive this automation are AWS Health events, so the EventBridge rule must use AWS Health as its event source and select the event types indicating scheduled instance termination and instance retirement. The remediation itself is a Systems Manager Automation document, and AWS-RestartEC2Instance is the provided runbook for restarting EC2 instances, so the rule targets that runbook (A). This wires the Health notification directly to a managed remediation document, which is the smallest possible amount of automation for the stated requirement.
Why the Other Options Are Wrong
B configures Systems Manager as the event source with a maintenance window event type. Systems Manager does not emit EC2 retirement or scheduled termination notifications, so a rule bound to that source would never receive the events described. D configures EC2 as the event source with an instance state-change event type and routes to a Lambda function. Instance state-change events do not carry the AWS Health retirement and termination notifications that trigger this workflow, and using a Lambda adds code to maintain. C uses the correct AWS Health event source and event types but routes to a newly created Lambda function that registers a Systems Manager maintenance window task, which is an unnecessary indirection compared with invoking the Automation runbook directly; c87b433 and gildzeee preferred C because they read the maintenance-window constraint as requiring a scheduled task, but the requirement's stated trigger is the Health notification and the Automation document is the native remediation mechanism. A is the correct answer.
Community Comment Notes
Community voted A (69), with C a 31 percent minority. Srikantha and tinyshare supported A, noting that AWS Health provides event types for scheduled instance termination and instance retirement and that the Automation runbook performs the restart. devops_1, c87b433, and gildzeee preferred C on the grounds that it honors the maintenance window, which is a reasonable reading of the wording, but A is the AWS-native remediation path with the least overhead.
Official Reference
https://docs.aws.amazon.com/health/latest/ug/aws-health-events-event-bridge.html
This link opens the official vendor documentation in a new tab.
Community Votes
69% of anonymous learners picked answer A. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 8 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 8
-
tinyshare 👍 4 Answered ASame as the question 20, A is correct.
-
phu0298 👍 3 Answered AC. Lambda Function to Register a Maintenance Window Task • While this approach could work, it unnecessarily complicates the solution. AWS Systems Manager and EventBridge provide native integrations that eliminate the need for a custom Lambda function. Therefore the answer should be A
-
Changwha 👍 3 Answered AAWS Health provides notifications for events such as scheduled instance termination and decommissioning.
-
Impromptu 👍 2 Answered CAlthough a bit more complex than A, I think C is best. Option A would just restart the instance when the event was received, and not withing the company's maintenance windows.
-
Srikantha 👍 1 Answered AEvent Source of AWS Health: The DevOps engineer wants to act on AWS Health notifications. AWS Health provides event types for scheduled instance terminations and instance retirements, which are common reasons for needing to restart EC2 instances during a maintenance window. Event Types: EventBridge can be configured to listen for event types like EC2 Instance Termination or EC2 Instance Retirement to automate instance restarts when these events occur. Target Systems Manager Automation Runbook: AWS Systems Manager Automation runbooks such as AWS-RestartEC2Instance are pre-defined automation workflows that can restart EC2 instances. When triggered by EventBridge, this runbook can automatically restart the EC2 instances that need remediation.
Show 3 more comments
-
c87b433 👍 1 Answered CC is the right answer. A will do action immediately but using lambda we can create a maintenance window according to organization downtime activity. A could have been the right answer, but it takes immediate action on an event that is not required. We have to do this in a particular time.
-
gildzeee 👍 1 Answered Cquestion states during the maintenance window not immediately
-
devops_1 👍 1 Answered COption A does not satisfy the maintenance window requirement
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All DOP-C02 Questions
Access 85 questions with complete answers and detailed explanations.
View Full DOP-C02 Practice Test →