New Year Sale 2026! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Amazon DOP-C02 Exam - Topic 9 Question 25 Discussion

Actual exam question for Amazon's DOP-C02 exam
Question #: 25
Topic #: 9
[All DOP-C02 Questions]

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?

Show Suggested Answer Hide Answer

Contribute your Thoughts:

0/2000 characters
Mattie
3 months ago
Is it really necessary to automate this? Seems like extra work.
upvoted 0 times
...
Pete
3 months ago
A and D both sound good, but I prefer D for clarity.
upvoted 0 times
...
Annice
3 months ago
Wait, why would we want to post a badge instead of actual results?
upvoted 0 times
...
Timothy
4 months ago
I disagree, I think C covers more scenarios.
upvoted 0 times
...
Kenneth
4 months ago
Option B seems like the best choice for automating tests.
upvoted 0 times
...
Oneida
4 months ago
I lean towards option C because it covers both the creation and updates of the pull request, which seems more comprehensive for testing.
upvoted 0 times
...
Daryl
4 months ago
I’m a bit confused about the difference between the pullRequestStatusChanged and pullRequestCreated events. I feel like both could be relevant.
upvoted 0 times
...
Whitney
4 months ago
I think we practiced a similar question where we had to automate testing in CodePipeline. I feel like option B makes sense since it focuses on the pull request creation.
upvoted 0 times
...
Wilburn
5 months ago
I remember we discussed using EventBridge for triggering actions based on events, but I'm not sure which event to choose here.
upvoted 0 times
...
Vincent
5 months ago
This is a great question to test our understanding of AWS CodePipeline and CodeBuild. I think Option A is the way to go - reacting to the pullRequestStatusChanged event and posting the test results as a comment seems like the most straightforward approach.
upvoted 0 times
...
Joanne
5 months ago
Hmm, I'm a bit confused by the different event types mentioned in the options. I'll need to review the AWS documentation on CodeCommit events to make sure I understand the differences before I can decide which option is best.
upvoted 0 times
...
Brunilda
5 months ago
This seems like a straightforward question. I think the key is to automate the testing process and make the results visible to the reviewers. Option B looks like the best approach to me.
upvoted 0 times
...
Danica
5 months ago
I like the idea of using EventBridge to trigger the testing pipeline. That way, the tests will run automatically whenever a new pull request is created or updated. Option C seems like a good comprehensive solution.
upvoted 0 times
...
Ezekiel
5 months ago
Ah, this is a good one. Stockholders have different needs since the company went public through an IPO. I'm pretty confident I can figure out the right answer here.
upvoted 0 times
...
Geraldine
5 months ago
I remember learning about OCTAVE in class, so I'm confident that option B is the correct answer.
upvoted 0 times
...
Kayleigh
9 months ago
Ah, the joys of CI/CD! Where the only thing faster than the pipeline is the rate at which developers can break the build.
upvoted 0 times
Kara
8 months ago
D) Create an Amazon EventBridge rule that reacts to the pullRequestStatusChanged event. Create an AWS Lambda function that invokes a CodePipeline pipeline with a CodeBuild action that runs the tests for the application. Program the Lambda function to post the CodeBuild test results as a comment on the pull request when the test results are complete.
upvoted 0 times
...
Holley
8 months ago
A) Create an Amazon EventBridge rule that reacts to the pullRequestStatusChanged event. Create an AWS Lambda function that invokes a CodePipeline pipeline with a CodeBuild action that runs the tests for the application. Program the Lambda function to post the CodeBuild badge as a comment on the pull request so that developers will see the badge in their code review.
upvoted 0 times
...
Alise
9 months ago
B) Create an Amazon EventBridge rule that reacts to the pullRequestCreated event. Create an AWS Lambda function that invokes a CodePipeline pipeline with a CodeBuild action that runs the tests for the application. Program the Lambda function to post the CodeBuild test results as a comment on the pull request when the test results are complete.
upvoted 0 times
...
Shawnda
9 months ago
A) Create an Amazon EventBridge rule that reacts to the pullRequestStatusChanged event. Create an AWS Lambda function that invokes a CodePipeline pipeline with a CodeBuild action that runs the tests for the application. Program the Lambda function to post the CodeBuild badge as a comment on the pull request so that developers will see the badge in their code review.
upvoted 0 times
...
...
Apolonia
10 months ago
This is a tough one, but I think I've got it. Option C seems to cover all the bases, with the EventBridge rule reacting to both pullRequestCreated and pullRequestSourceBranchUpdated events. Plus, posting the CodeBuild badge is a nice touch.
upvoted 0 times
Daron
8 months ago
Definitely, Option C covers all the necessary events and includes posting the CodeBuild badge for better visibility.
upvoted 0 times
...
Arminda
9 months ago
Yeah, Option C sounds like the best solution to ensure that automated tests are easily visible during pull request reviews.
upvoted 0 times
...
Alfred
9 months ago
I agree, Option C seems like the most comprehensive choice for automating testing of pull requests.
upvoted 0 times
...
Hoa
10 months ago
I think Option C is the way to go. It covers all the events and includes posting the CodeBuild badge.
upvoted 0 times
...
...
Linn
10 months ago
Hmm, I'm torn between options B and D. Both of them seem to involve posting the test results as a comment on the pull request, which is exactly what the question is asking for. I'll have to think this one through carefully.
upvoted 0 times
Youlanda
10 months ago
I see your point, but option D reacts to the pullRequestStatusChanged event, which could be more reliable for showing the test results.
upvoted 0 times
...
Arthur
10 months ago
I think option B might be the way to go. It reacts to the pullRequestCreated event and posts the test results as a comment.
upvoted 0 times
...
...
Minna
11 months ago
I'm not sure why the development team is merging pull requests that didn't pass the long-running tests. That seems like a recipe for disaster! Option B looks like the best way to catch those issues early on.
upvoted 0 times
Madelyn
9 months ago
Elsa: Definitely, it's important to catch issues early in the process.
upvoted 0 times
...
Doug
9 months ago
User 3: Yeah, automating tests with CodePipeline would save a lot of time.
upvoted 0 times
...
Elsa
9 months ago
User 2: Option B sounds like a good solution to prevent that.
upvoted 0 times
...
Ceola
10 months ago
User 1: I agree, merging untested code is risky.
upvoted 0 times
...
...
Nina
11 months ago
Wow, this question really tests our understanding of the AWS CodeCommit, CodePipeline, and CodeBuild integration. I think option D is the correct answer, as it directly addresses the requirement to automate testing and provide the results as part of the pull request review.
upvoted 0 times
...
Azzie
11 months ago
I also believe option A is the most efficient solution. It helps prevent merging pull requests that do not pass tests, saving time and effort for the development team.
upvoted 0 times
...
Annette
11 months ago
I agree with Antione. Option A automates testing and provides immediate feedback to developers during the pull request review process.
upvoted 0 times
...
Antione
11 months ago
I think option A is the best choice because it reacts to the pullRequestStatusChanged event and posts the CodeBuild badge as a comment on the pull request.
upvoted 0 times
...

Save Cancel