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

To run an application, a DevOps engineer launches an Amazon EC2 instance with public IP addresses in a public subnet. A user data script obtains the application artifacts and installs them on the instances upon launch. A change to the security classification of the application now requires the instances to run with no access to the internet. While the instances launch successfully and show as healthy, the application does not seem to be installed.
Which of the following should successfully install the application while complying with the new rule?

Answer options

Correct answer: C

Explanation

Option C is correct because it allows the EC2 instances to access the application artifacts stored in S3 without requiring internet access, by using a VPC endpoint. Option A does not comply with the no-internet access requirement after installation, and Option B would still require internet access for the NAT gateway. Option D allows temporary internet access, which contradicts the new rule of no internet access.