Trigger CodePipeline with GitHub webhooks and deploy with blue/green CodeDeploy

Answer Correct answer: B — Trigger CodePipeline with GitHub webhooks, run tests through the CodeBuild Jenkins plugin, alert via SNS, and deploy blue/green.

A startup company recently migrated a large ecommerce website to AWS. The website has experienced a 70% increase in sales. Software engineers are using a private GitHub repository to manage code. The DevOps team is using Jenkins for builds and unit testing. The engineers need to receive notifications for bad builds and zero downtime during deployments. The engineers also need to ensure any changes to production are seamless for users and can be rolled back in the event of a major issue. The software engineers have decided to use AWS CodePipeline to manage their build and deployment process. Which solution will meet these requirements?

  1. Use GitHub websockets to trigger the CodePipeline pipeline. Use the Jenkins plugin for AWS CodeBuild to conduct unit testing. Send alerts to an Amazon SNS topic for any bad builds. Deploy in an in-place, all-at-once deployment configuration using AWS CodeDeploy.
  2. Use GitHub webhooks to trigger the CodePipeline pipeline. Use the Jenkins plugin for AWS CodeBuild to conduct unit testing. Send alerts to an Amazon SNS topic for any bad builds. Deploy in a blue/green deployment using AWS CodeDeploy. Correct Answer
  3. Use GitHub websockets to trigger the CodePipeline pipeline. Use AWS X-Ray for unit testing and static code analysis. Send alerts to an Amazon SNS topic for any bad builds. Deploy in a blue/green deployment using AWS CodeDeploy.
  4. Use GitHub webhooks to trigger the CodePipeline pipeline. Use AWS X-Ray for unit testing and static code analysis. Send alerts to an Amazon SNS topic for any bad builds. Deploy in an in-place, all-at-once deployment configuration using AWS CodeDeploy.

Community Votes

B
100%

100% of anonymous learners picked answer B. Votes are pick records left by other test-takers — they are not the verified answer.

Community Insight

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.

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.

Community Discussion (8 comments)

kejam 👍 5 Selected: B
They 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 👍 2
The 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.
career360guru 👍 1 Selected: B
Option B
ele 👍 1 Selected: B
B, no-brainer
aabdlmouna 👍 1 Selected: B
Answer is B
master9 👍 2 Selected: B
AWS 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 👍 1
Correct 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 👍 1
Correct Answer is C

Comments & Corrections

No comments yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Submitted for moderation before publishing. Keep it helpful and respectful.

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

Related Analysis

Practice All SAP-C02 Questions

Access 85 questions with complete answers and detailed explanations.

View Full SAP-C02 Practice Test →

← Back to SAP-C02 Study Guide