DOP-C02 Configuration Management and IaC Practice Question
A company is designing a CI/CD pipeline for a microservices architecture using AWS CodePipeline. They want to use infrastructure as code to manage the pipeline itself. Which TWO services can be used together to achieve this?
⚠ Common exam trap
DOP-C02 often tests whether candidates confuse CodePipeline (the CI/CD service) with the IaC tool that defines it (CloudFormation), and whether they mistakenly pick CodeDeploy or Elastic Beanstalk as pipeline-definition tools.
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
AWS CloudFormation [CORRECT] is the infrastructure-as-code service that lets you define and provision AWS resources, including the CodePipeline pipeline itself, in a declarative template so the pipeline is version-controlled and reproducible. AWS CodePipeline [CORRECT] is the CI/CD orchestration service that is being managed as code; CloudFormation supports an AWS::CodePipeline::Pipeline resource type, so the two services work together to define and run the pipeline from a template. AWS Service Catalog is a catalog of approved products for governed provisioning, not a way to author the pipeline as code, so it does not belong. AWS CodeDeploy is a deployment service used as a pipeline action provider, not the IaC mechanism for managing the pipeline. AWS Elastic Beanstalk is a PaaS application-hosting service, not a pipeline-definition or IaC tool.
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 Service Catalog
Why it's wrong here
AWS Service Catalog governs approved product portfolios for end users; it does not define pipeline resources as code. It is tempting because it is an AWS governance service, but CodePipeline-as-code requires CloudFormation or CDK to declare the pipeline and its stages.
- ✓
AWS CodePipeline
Why this is correct
CodePipeline is the orchestration service whose own pipeline definition can be declared as code, letting the team version and recreate the pipeline itself. It satisfies the requirement by acting as the managed resource that CloudFormation templates provision and update.
- ✓
AWS CloudFormation
Why this is correct
AWS CloudFormation defines the pipeline as declarative templates, satisfying the infrastructure-as-code requirement. Combined with AWS CodePipeline, it provisions and updates the pipeline's stages, actions and resources reproducibly, rather than relying on manual console configuration. This makes the pipeline itself version-controlled and auditable.
- ✗
AWS CodeDeploy
Why it's wrong here
CodeDeploy deploys application revisions to compute targets; it does not declare pipeline infrastructure as code. It is tempting because it is a core CI/CD service, but the requirement is defining the pipeline itself declaratively, which CloudFormation or CDK provides.
- ✗
AWS Elastic Beanstalk
Why it's wrong here
AWS Elastic Beanstalk deploys application code to managed compute environments; it cannot define CodePipeline stages, actions or IAM roles as code. It is tempting because it provisions infrastructure automatically, and would suit hosting the microservices themselves, but the stem requires declarative pipeline definition via CloudFormation or CDK.
Go deeper
Related to this question
About these practice questions
Courseiva writes every DOP-C02 question from scratch — 1,298 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Amazon Web Services exam blueprint
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.