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

A DevOps engineer uses AWS CodeBuild to frequently produce software packages. The CodeBuild project builds large Docker images that the DevOps engineer can use across multiple builds.

The DevOps engineer wants to improve build performance and minimize costs.

Which solution will meet these requirements?

Answer options

Correct answer: A

Explanation

Enabling local Docker layer caching in AWS CodeBuild significantly improves build performance and minimizes costs by reusing cached layers on the build host instead of rebuilding or downloading them each time. Amazon Elastic Container Registry (Amazon ECR) is the standard and optimized service for storing and retrieving Docker images in AWS. Other solutions, such as using S3 for layer caching or spinning up custom EC2 instances from AMIs, introduce unnecessary complexity, latency, and increased costs.