Amazon

DOP-C02 practice question 15

AWS Certified DevOps Engineer - Professional (DOP-C02) · free question 15 of 20

Question

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?
  • A. Launch the instances in a public subnet with Elastic IP addresses attached. Once the application is installed and running, run a script to disassociate the Elastic IP addresses afterwards.
  • B. Set up a NAT gateway. Deploy the EC2 instances to a private subnet. Update the private subnet's route table to use the NAT gateway as the default route.
  • C. Publish the application artifacts to an Amazon S3 bucket and create a VPC endpoint for S3. Assign an IAM instance profile to the EC2 instances so they can read the application artifacts from the S3 bucket. Correct
  • D. Create a security group for the application instances and allow only outbound traffic to the artifact repository. Remove the security group rule once the install is complete.

Explanation

Option C correctly addresses the requirement of installing the application without internet access by using an Amazon S3 bucket with a VPC endpoint, which allows private communication between the EC2 instances and S3 without exposing them to the public internet. Assigning an IAM instance profile ensures that the EC2 instances have the necessary permissions to read from the S3 bucket.

Need the theory? Learn it free in the DOP-C02 course on Godlike Academy

Practice the whole free set

Answer all 20 free DOP-C02 questions with instant feedback, or unlock all 429 questions with Learn and Exam modes.