A development team uses AWS CodeCommit for version control for applications. The development team uses AWS CodePipeline, AWS CodeBuild. and AWS CodeDeploy for CI/CD infrastructure. In CodeCommit, the development team recently merged pull requests that did not pass long-running tests in the code base. The development team needed to perform rollbacks to branches in the codebase, resulting in lost time and wasted effort. A DevOps engineer must automate testing of pull requests in CodeCommit to ensure that reviewers more easily see the results of automated tests as part of the pull request review. What should the DevOps engineer do to meet this requirement?
Select one answer.
Marked answer: C
Community Discussion
Written by other learners. Comments can disagree with the marked answer — check the official documentation when in doubt.
Chose C2
C triggers on both pullRequestCreated and pullRequestSourceBranchUpdated events ensures tests are re-run when a PR is first made or when new commits are pushed to the PR branch. triggers on both creations and updates is just good practice IMO. not handling updated PRs isn't ideal. why not A: triggers only on pullRequestStatusChanged, which typically means opened/closed/merged — too late to catch new commits pushed to a PR B Similar to A, but at least uses pullRequestCreated but doesn't handle updated PRs (new commits to the source branch)which is a major gap D again, pullRequestStatusChanged misses the moment when new code is pushed to the PR
Chose C1
C covers both event scenarios: PR creation and update (when updating the source branch, for example, with a new commit.