nerdexam
Amazon

DVA-C02 · Question #90

A developer is writing unit tests for a new application that will be deployed on AWS. The developer wants to validate all pull requests with unit tests and merge the code with the main branch only whe

The correct answer is C. { "source": "[aws.codecommit]", "detail": { "event": "[pullRequestSourceBranchUpdated]", "event": "[pullRequestCreated]" } }. Option C is correct because it captures both scenarios needed: 'pullRequestCreated' fires when a new pull request is opened, and 'pullRequestSourceBranchUpdated' fires when new commits are pushed to an existing pull request's source branch (i.e., the PR is updated). Together, the

Submitted by haru.x· Mar 5, 2026Development with AWS Services - Implementing CI/CD pipelines and event-driven automation using CodeCommit event triggers with EventBridge to invoke Lambda functions for pull request validation workflows.

Question

A developer is writing unit tests for a new application that will be deployed on AWS. The developer wants to validate all pull requests with unit tests and merge the code with the main branch only when all tests pass. The developer stores the code in AWS CodeCommit and sets up AWS CodeBuild to run the unit tests. The developer creates an AWS Lambda function to start the CodeBuild task. The developer needs to identify the CodeCommit events in an Amazon EventBridge event that can invoke the Lambda function when a pull request is created or updated. Which CodeCommit event will meet these requirements? A. B. C. D.

Exhibits

DVA-C02 question #90 exhibit 1
DVA-C02 question #90 exhibit 2

Options

  • A{ "source": "[aws.codecommit]", "detail": { "event": "[pullRequestMergeStatusUpdated]" } }
  • B{ "source": "[aws.codecommit]", "detail": { "event": "[pullRequestApprovalRuleCreated]" } }
  • C{ "source": "[aws.codecommit]", "detail": { "event": "[pullRequestSourceBranchUpdated]", "event": "[pullRequestCreated]" } }
  • D{ "source": "[aws.codecommit]", "detail": { "event": "[pullRequestUpdated]", "event": "[pullRequestSourceBranchCreated]" } }

How the community answered

(35 responses)
  • A
    31% (11)
  • B
    14% (5)
  • C
    46% (16)
  • D
    9% (3)

Explanation

Option C is correct because it captures both scenarios needed: 'pullRequestCreated' fires when a new pull request is opened, and 'pullRequestSourceBranchUpdated' fires when new commits are pushed to an existing pull request's source branch (i.e., the PR is updated). Together, these two events cover the full requirement of triggering the Lambda function whenever a pull request is created or updated with new code changes.

Topics

#AWS CodeCommit#Amazon EventBridge#AWS CodeBuild#CI/CD Automation

Community Discussion

No community discussion yet for this question.

Full DVA-C02 Practice