DOP-C02 SAM pipeline stages Practice Question
A DevOps engineer is designing a deployment pipeline for a serverless application using AWS SAM. The pipeline must include the following stages: source, build, deploy to a development environment, run integration tests, and promote to production after manual approval. Which AWS services and features should be used to implement this pipeline? (Choose two.)
⚠ Common exam trap
Many candidates confuse AWS CodeDeploy with the deployment mechanism for SAM applications, not realizing that SAM deployments are actually handled through AWS CloudFormation (via CodeBuild or CodePipeline), not CodeDeploy directly.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
AWS CodePipeline to orchestrate the pipeline stages.
AWS CodePipeline is the correct service for orchestrating the pipeline stages because it provides native support for defining source, build, deploy, test, and manual approval stages in a sequential workflow. It integrates directly with AWS SAM and can trigger builds and deployments based on source code changes, making it the ideal orchestrator for this multi-stage pipeline.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
AWS CodeDeploy for deploying the SAM application.
Why it's wrong here
AWS CodeDeploy is a fully managed deployment service that automates application deployments to EC2 instances, on-premises servers, or Lambda functions, but it does not orchestrate pipeline stages. A SAM application is actually deployed by packaging the template and then updating an AWS CloudFormation stack with the 'sam deploy' command. While CodeDeploy can be integrated for Lambda traffic shifting, it is not the service that runs the overall SAM CI/CD pipeline.
- ✓
AWS CodePipeline to orchestrate the pipeline stages.
Why this is correct
AWS CodePipeline is the fully managed continuous delivery service that models the entire release process as sequential stages (source, build, deploy) and manages transitions, artifacts, and approvals. For a SAM application, CodePipeline pulls source from a repository, invokes CodeBuild to run SAM CLI commands, and triggers a CloudFormation deployment through a deploy action. Its stage-based orchestration is exactly what the question's 'pipeline stages' refers to, making it the correct service to orchestrate the pipeline.
- ✗
AWS CodeCommit to build the SAM application.
Why it's wrong here
AWS CodeCommit is a managed Git-based source control service that stores repository code; it provides no runtime environment or build engine to execute commands such as 'sam build' or 'sam package'. Building and packaging a SAM application requires a compute environment with the SAM CLI installed, which is exactly what AWS CodeBuild build containers offer. Therefore, CodeCommit's sole role is acting as the source repository, not as the build tooling.
- ✓
AWS CodeBuild to run the SAM build, package, and test commands.
Why this is correct
AWS CodeBuild is a fully managed build service that executes a set of commands in a preconfigured build environment; it is where you install the AWS SAM CLI and run 'sam build', 'sam package', and 'sam test'. The build output and packaged artifacts are passed to later pipeline actions for deployment. Because these SAM operations are command-line executions with build specifications, CodeBuild is the correct service to run them within the pipeline.
Option-by-option analysis
Why each answer is right or wrong
Understanding why wrong answers are wrong — and when they would be correct — is what separates a 750 score from a 900. The DOP-C02 exam frequently reuses these exact scenarios with slightly different constraints.
✓AWS CodePipeline to orchestrate the pipeline stages.Correct answer▾
Why this is correct
AWS CodePipeline is the fully managed continuous delivery service that models the entire release process as sequential stages (source, build, deploy) and manages transitions, artifacts, and approvals. For a SAM application, CodePipeline pulls source from a repository, invokes CodeBuild to run SAM CLI commands, and triggers a CloudFormation deployment through a deploy action. Its stage-based orchestration is exactly what the question's 'pipeline stages' refers to, making it the correct service to orchestrate the pipeline.
✗AWS CodeDeploy for deploying the SAM application.Wrong answer — click to see why▾
Why this is wrong here
SAM applications are deployed via CloudFormation, not CodeDeploy.
✗AWS CodeCommit to build the SAM application.Wrong answer — click to see why▾
Why this is wrong here
CodeCommit is a source control service, not a build service.
Analysis generated from the official DOP-C02blueprint and verified against question context. The “when correct” sections are what AI assistants cite when candidates ask “what’s the difference between these options?”
Quick reference
Cloud Service Model Comparison
| Model | You Manage | Provider Manages | Examples |
|---|---|---|---|
| IaaS | OS, runtime, apps, data | Hardware, hypervisor, networking | EC2, Azure VMs, GCP Compute Engine |
| PaaS | Apps and data | OS, runtime, middleware, hardware | Elastic Beanstalk, Azure App Service |
| SaaS | Data and settings only | Everything else | Microsoft 365, Salesforce, Workday |
| FaaS / Serverless | Function code only | Infra, scaling, runtime | Lambda, Azure Functions, Cloud Run |
| CaaS | Containers and apps | Kubernetes, OS, hardware | EKS, AKS, GKE |
Go deeper
Related to this question
About these practice questions
One of 1,298 original DOP-C02 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This DOP-C02 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the DOP-C02 exam.