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

A company runs a workload on Amazon EC2 instances. The company needs a control that requires the use of Instance Metadata Service Version 2 (IMDSv2) on all EC2 instances in the AWS account. If an EC2 instance does not prevent the use of Instance Metadata Service Version 1 (IMDSv1), the EC2 instance must be terminated.

Which solution will meet these requirements?

Answer options

Correct answer: A

Explanation

Option A is correct because using AWS Config with a managed rule allows for continuous monitoring and remediation of EC2 instances that do not comply with the IMDSv2 requirement. The other options, while they involve some level of control or inspection, do not directly enforce the requirement to terminate instances that do not meet the IMDSv2 specifications.