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

A company runs an application for multiple environments in a single AWS account. An AWS CodePipeline pipeline uses a development Amazon Elastic Container Service (Amazon ECS) cluster to test an image for the application from an Amazon Elastic Container Registry (Amazon ECR) repository. The pipeline promotes the image to a production ECS cluster.

The company needs to move the production cluster into a separate AWS account in the same AWS Region. The production cluster must be able to download the images over a private connection.

Which solution will meet these requirements?

Answer options

Correct answer: D

Explanation

The correct answer is D because it combines the use of Amazon ECR VPC endpoints and an S3 gateway endpoint with appropriate repository policies, allowing the production ECS tasks in a separate account to pull images securely from the main account. Option A lacks the necessary repository policy for cross-account access, while option B does not address the need for VPC endpoints. Option C does not meet the requirement for a private connection through VPC endpoints.