Trigger CodePipeline with GitHub webhooks and deploy with blue/green CodeDeploy
Short answer
B Trigger CodePipeline with GitHub webhooks, run tests through the CodeBuild Jenkins plugin, alert via SNS, and deploy blue/green.
Question
Key Takeaways
GitHub webhooks are the supported trigger for a CodePipeline source action, and a blue/green CodeDeploy deployment configuration provisions a separate environment and shifts traffic only after the new version passes its tests, which is what delivers both zero downtime and fast rollback.
Engineers manage code in a private GitHub repository and use Jenkins for builds and unit testing, and they have chosen AWS CodePipeline to manage build and deployment. They need notifications for bad builds, zero downtime during deployment, and rollback if a release causes a major issue.
Common mistake: Using GitHub websockets. CodePipeline integrates with GitHub through webhooks, not websockets, so a pipeline configured with websockets would never be triggered by repository activity. Another common error is choosing X-Ray in place of the Jenkins integration.
Expert Analysis
Why the Answer Is Correct
A CodePipeline source stage is configured with GitHub webhooks, which is the documented integration, and each commit triggers the pipeline. The Jenkins plugin for AWS CodeBuild runs the existing Jenkins build and unit test steps, so the team keeps its current tooling, and a failure can publish to an Amazon SNS topic to notify the engineers of a bad build. For deployment, a blue/green CodeDeploy configuration creates a separate environment with the new version, runs any tests against it, and then shifts production traffic to it only after it passes. Because the old environment remains intact, rolling back is a traffic shift back to the previous version, which gives zero downtime and a fast recovery path.
Why the Other Options Are Wrong
A and D: GitHub websockets are not a CodePipeline trigger, so the pipeline would not start on a commit, and an in-place all-at-once deployment replaces the running version in place, which causes downtime and has no previous environment to roll back to. C: Amazon X-Ray is a tracing and debugging service for request paths through distributed systems, not a build, test, or static analysis tool, so it cannot perform the unit testing the team currently runs in Jenkins.
Community Comment Notes
The community voted 100 to 0 for B, and the reasoning was concise and consistent: webhooks rather than websockets trigger CodePipeline, X-Ray is for debugging rather than unit testing, and seamless deployment with rollback is the definition of a blue/green deployment.
Official Reference
https://docs.aws.amazon.com/codedeploy/latest/userguide/configuration-options.html
This link opens the official vendor documentation in a new tab.
Community Votes
100% of anonymous learners picked answer B. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 8 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 8
-
kejam 👍 5 Answered BThey use Jenkins. X-Ray is for debugging not unit testing. Seamless deploys and rollbacks mean blue/green deployments. That leaves Answer B: https://aws.amazon.com/blogs/devops/setting-up-a-ci-cd-pipeline-by-integrating-jenkins-with-aws-codebuild-and-aws-codedeploy/
-
AzureDP900 👍 2The correct answer is B. This solution meets the requirements: Receive notifications for bad builds: Using GitHub webhooks to trigger the CodePipeline pipeline ensures that build failures are detected and notified via Amazon SNS topic. Zero downtime during deployments: Using a blue/green deployment with AWS CodeDeploy allows for zero downtime deployments, as changes are made to the new environment while the old one remains available. Seamless rollbacks in case of major issues: The blue/green deployment architecture enables seamless rollbacks by simply switching traffic back to the previous version.
-
master9 👍 2 Answered BAWS CodeBuild can be used to conduct unit testing. CodeBuild is a managed service that compiles your source code, runs tests, and produces deployable application artifacts. You can create reports in CodeBuild that contain details about tests that are run during builds. These tests can include unit tests, configuration tests, and functional tests
-
onlyvimal2103 👍 1Correct Answer B https://aws.amazon.com/about-aws/whats-new/2018/05/aws-codepipeline-supports-push-events-from-github-via-webhooks/ https://docs.aws.amazon.com/codebuild/latest/userguide/jenkins-plugin.html
-
alexis123456 👍 1Correct Answer is C
Show 3 more comments
-
ele 👍 1 Answered BB, no-brainer
-
aabdlmouna 👍 1 Answered BAnswer is B
-
career360guru 👍 1 Answered BOption B
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All SAP-C02 Questions
Access 85 questions with complete answers and detailed explanations.
View Full SAP-C02 Practice Test →