AWS Certified DevOps Engineer – Professional (DOP-C02) — Question 363
A company is developing code and wants to use semantic versioning. The company's DevOps team needs to create a pipeline for compiling the code. The team also needs to manage versions of the compiled code. If the code uses any open source libraries, the libraries must also be cached in the build process.
Which solution will meet these requirements?
Answer options
- A. Create an AWS CodeArtifact repository and associate the upstream repositories. Create an AWS CodeBuild project that builds the semantic version of the code artifacts. Configure the project to authenticate and connect to the CodeArtifact repository and publish the artifact to the repository.
- B. Use AWS CodeDeploy to upload the generated semantic version of the artifact to an Amazon Elastic File System (Amazon EFS) file system.
- C. Use an AWS CodeBuild project to build the code and to publish the generated semantic version of the artifact to AWS Artifact. Configure build caching in the CodeBuild project.
- D. Create a new AWS CodeArtifact repository. Create an AWS Lambda function that pulls open source packages from the internet and publishes the packages to the repository. Configure AWS CodeDeploy to build semantic versions of the code and publish the versions to the repository.
Correct answer: A
Explanation
AWS CodeArtifact is the ideal service for managing, publishing, and storing software packages, and its upstream repository feature automatically caches external open-source dependencies. AWS CodeBuild can compile the code and publish the semantically versioned artifacts to CodeArtifact after proper authentication. AWS CodeDeploy is used for deploying applications rather than building them, and AWS Artifact is a portal for compliance reports, making the other choices incorrect.