Q80 — AWS DOP-C02 Ch.2
Question 80 of 100 | ← Chapter 2
An e-commerce company uses Amazon EC2 instances backed by Amazon Elastic Block Store (Amazon EBS). To reduce manual effort required to handle instance retirement, a DevOps engineer must automatically perform a restart operation when an EC2 instance retirement event is scheduled.
- A. Create a scheduled Amazon EventBridge rule to run an AWS Systems Manager Automation runbook that checks weekly for any EC2 instances scheduled for retirement. If an instance is scheduled for retirement, the runbook puts the instance into hibernation.
- B. Enable EC2 Auto Recovery on all instances. Create an AWS Config rule to restrict recovery operations to approved maintenance windows only.
- C. Restart all EC2 instances during approved maintenance windows outside standard business hours. Configure Amazon CloudWatch alarms to notify when any instance fails an EC2 instance status check.
- D. Set up an AWS Health Amazon EventBridge rule to run an AWS Systems Manager Automation runbook that stops and starts EC2 instances when a scheduled retirement event occurs. ✓
Correct Answer: D. Set up an AWS Health Amazon EventBridge rule to run an AWS Systems Manager Automation runbook that stops and starts EC2 instances when a scheduled retirement event occurs.
Explanation
AWS Health integrates with Amazon EventBridge to trigger automated actions upon scheduled EC2 retirement events. AWS documentation states that AWS Health emits events when instances are scheduled for retirement; EventBridge rules capture these events and invoke Systems Manager Automation runbooks. Option D stops and starts the instance, typically causing migration to new hardware and avoiding retirement impact. Option A uses fixed-interval polling rather than event-driven response. Option B’s Auto Recovery addresses hardware failures, not planned retirements. Option C relies on scheduled restarts without integration to actual retirement events. Correct answer D aligns with AWS best practices for automated responses to scheduled infrastructure events.