nerdexam
AmazonAmazon

DOP-C02 · Question #33

DOP-C02 Question #33: Real Exam Question with Answer & Explanation

The correct answer is B: Create an Amazon EventBridge rule to match pullRequestCreated events from CodeCommit. To run the unit and integration tests on each pull request before it is merged, a solution that listens to pullRequestCreated events and runs a CodeBuild project to execute tests would be the most appropriate option. Option B describes a solution that creates an Amazon EventBridg

Submitted by paula_co· Mar 6, 2026SDLC Automation

Question

A development team uses AWS CodeCommit, AWS CodePipeline, and AWS CodeBuild to develop and deploy an application. Changes to the code are submitted by pull requests. The development team reviews and merges the pull requests, and then the pipeline builds and tests the application. Over time, the number of pull requests has increased. The pipeline is frequently blocked because of failing tests. To prevent this blockage, the development team wants to run the unit and integration tests on each pull request before it is merged. Which solution will meet these requirements?

Options

  • ACreate a CodeBuild project to run the unit and integration tests. Create a CodeCommit approval
  • BCreate an Amazon EventBridge rule to match pullRequestCreated events from CodeCommit
  • CCreate an Amazon EventBridge rule to match pullRequestCreated events from CodeCommit.
  • DCreate a CodeBuild project to run the unit and integration tests. Create a CodeCommit notification

Explanation

To run the unit and integration tests on each pull request before it is merged, a solution that listens to pullRequestCreated events and runs a CodeBuild project to execute tests would be the most appropriate option. Option B describes a solution that creates an Amazon EventBridge rule to match pullRequestCreated events from CodeCommit and configures a CodeBuild project to run the unit and integration tests, passing the CodeCommit repository and branch information from the event as a custom payload.

Topics

#CodeCommit#Pull Requests#EventBridge#CodeBuild#Pre-merge Testing

Community Discussion

No community discussion yet for this question.

Full DOP-C02 PracticeBrowse All DOP-C02 Questions