Courseiva
SDLC AutomationeasyMultiple ChoiceObjective-mapped

DOP-C02 SDLC Automation Practice Question

A team wants to automate the creation of a CI/CD pipeline using a JSON/YAML file that defines source, build, and deploy stages. Which AWS service should they use?

⚠ Common exam trap

Many exam-takers confuse the service that defines the pipeline (CloudFormation) with the service that runs the pipeline (CodePipeline), leading them to select CodePipeline because it is directly associated with CI/CD, but the question explicitly asks for the service that uses a JSON/YAML file to automate the creation of the pipeline, which is CloudFormation.

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 CloudFormation

AWS CloudFormation is the correct service because it allows you to define infrastructure as code (IaC) using JSON or YAML templates, which can include the creation of a CI/CD pipeline by defining resources like AWS CodePipeline, CodeBuild, and CodeDeploy. This enables full automation of the pipeline's source, build, and deploy stages through a declarative template, rather than manually configuring each service. The question specifically asks for automating the creation of the pipeline itself using a JSON/YAML file, which is exactly what CloudFormation does.

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 CloudFormation

    Why this is correct

    AWS CloudFormation is the correct choice because it allows the CI/CD pipeline to be defined declaratively as infrastructure as code. A CloudFormation template can specify the source stage, build actions, deployment providers (including CodeDeploy), IAM roles, S3 buckets, and event triggers, then create or update the pipeline in a repeatable and version-controlled manner. This makes it a true automation mechanism for pipeline creation, unlike the other services listed, which either are the pipeline itself or operate within it.

  • AWS Elastic Beanstalk

    Why it's wrong here

    AWS Elastic Beanstalk is a Platform-as-a-Service (PaaS) offering that automates the provisioning of compute resources and the deployment of web applications, not the definition or orchestration of a CI/CD pipeline. While Elastic Beanstalk environments can serve as a deployment target invoked by a CodePipeline action, Elastic Beanstalk has no native capability to author, manage, or create the CodePipeline structure itself. Therefore, it is incorrect for this requirement because it operates at the application deployment layer, not the pipeline definition layer.

  • AWS CodePipeline

    Why it's wrong here

    AWS CodePipeline is the service that would be created—it orchestrates the CI/CD workflow—but it cannot bootstrap itself. Although CodePipeline provides an API and console to create a pipeline, these are imperative, point-in-time actions that do not provide a reusable, declarative template for automating pipeline creation across environments. The requirement specifically asks for automation, which is best achieved with AWS CloudFormation rather than the service being created. CodePipeline being the resource means it cannot be the tool that defines its own infrastructure.

  • AWS CodeDeploy

    Why it's wrong here

    AWS CodeDeploy is a deployment service that automates software releases to EC2 instances, Lambda functions, or on-premises servers, and it has no construct for defining the overall pipeline graph, stages, or actions. In a CodePipeline context, CodeDeploy acts as a provider in a deployment stage that consumes artifacts produced by earlier build stages; it does not possess the ability to create or manage other CodePipeline components. Thus, it is wrong for automating pipeline creation because it is an execution engine for a single phase, not a pipeline definition tool.

About these practice questions

One of 1,013 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 →

How Courseiva writes practice questions · Editorial policy

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.