Q82 — AWS DOP-C02 Ch.3

Question 82 of 100 | ← Chapter 3

A company has a legacy application. A DevOps engineer needs to automate the process of building deployable artifacts for the legacy application. The solution must store the deployable artifacts in an existing Amazon S3 bucket for future deployment reference.

Correct Answer: A. Create a custom Docker image that includes all dependencies of the legacy application. Store the custom Docker image in a new Amazon Elastic Container Registry (Amazon ECR) repository. Configure a new AWS CodeBuild project to use the custom Docker image to build deployable artifacts and save the artifacts to the S3 bucket.

Explanation

Amazon CodeBuild is a fully managed continuous integration service that compiles source code, runs tests, and produces deployable software packages. Custom Docker images managed via ECR pre-provision build environment dependencies, avoiding repeated installation per build. CodeBuild natively supports outputting build results to an S3 bucket. Options B and C rely on manually managed EC2 instances, resulting in resource waste and operational overhead. Option D introduces unnecessary complexity with EKS and Fargate, which does not align with the simplicity required for a legacy application build pipeline. The correct answer aligns with AWS CI/CD best practices documentation recommending managed services for build pipelines.