DOP-C02 Question 330
Single answerYour organization is running a CI/CD pipeline in AWS that deploys containerized applications to Amazon ECS using AWS CodePipeline and AWS CodeBuild. However, deployments are failing intermittently due to network connectivity issues during the image pull operation from Amazon ECR. You have been tasked with ensuring reliable deployments without compromising security. What should you do to address this issue?
- A
Configure a VPC endpoint for Amazon ECR in your VPC to avoid public internet dependency during image pulls.
- B
Enable multi-region replication for your Amazon ECR repositories to improve availability.
- C
Use an Amazon S3 bucket for storing container images instead of Amazon ECR.
- D
Increase the timeout settings in AWS CodeBuild to handle intermittent network connectivity issues.
Show answer and explanation
Correct answer: A
Explanation
The intermittent deployment failures are caused by network connectivity issues when pulling container images from Amazon ECR. By configuring a VPC endpoint for Amazon ECR, you ensure that the ECS tasks can pull images directly over the AWS network without relying on the public internet, thus improving reliability and maintaining security. Other options either do not address the root cause or are not suitable for the scenario.
- A. Correct.
Configuring a VPC endpoint for Amazon ECR ensures that communication between your ECS tasks and ECR happens securely within the AWS network, avoiding exposure to public internet connectivity issues.
- B. Incorrect.
While enabling multi-region replication for ECR can improve availability across regions, it does not directly address network connectivity issues within a VPC during deployments.
- C. Incorrect.
Amazon S3 is not designed to store and manage container images. Amazon ECR is purpose-built for this functionality, and moving to S3 would be a misconfiguration.
- D. Incorrect.
Increasing the timeout settings in AWS CodeBuild may temporarily reduce failures but does not solve the root cause of network connectivity issues.