AWS Certified DevOps Engineer – Professional (DOP-C02) — Question 66

A production account has a requirement that any Amazon EC2 instance that has been logged in to manually must be terminated within 24 hours. All applications in the production account are using Auto Scaling groups with the Amazon CloudWatch Logs agent configured.
How can this process be automated?

Answer options

Correct answer: D

Explanation

Option D is correct because it effectively automates the tagging and termination process by utilizing a CloudWatch Logs subscription and an EventBridge rule. Options A and C introduce unnecessary complexity with Step Functions and SQS, while option B relies on manual intervention from the operations team, which does not meet the automation requirement.