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

A company uses an AWS CodeCommit repository to store its source code and corresponding unit tests. The company has configured an AWS CodePipeline pipeline that includes an AWS CodeBuild project that runs when code is merged to the main branch of the repository.

The company wants the CodeBuild project to run the unit tests. If the unit tests pass, the CodeBuild project must tag the most recent commit.

How should the company configure the CodeBuild project to meet these requirements?

Answer options

Correct answer: A

Explanation

The correct answer is A because it specifies using native Git to not only clone the CodeCommit repository but also to create and push the tag, which is necessary for version control. Options B and D mention using AWS CLI commands to tag, which is not the typical approach for Git operations. Option C incorrectly states that AWS CLI commands should be used to create a Git tag, which is not standard practice.