Courseiva
Deployment →mediumMultiple Select

DVA-C02 Deployment Practice Question

A company is using AWS CloudFormation to deploy and manage infrastructure. The developer wants to implement a CI/CD pipeline that automatically deploys CloudFormation stacks. The pipeline should be able to create, update, and delete stacks. Which THREE AWS services should the developer use together?

⚠ Common exam trap

A common mix-up: candidates assume AWS CodeDeploy is needed for any deployment scenario, but CodeDeploy is for application deployments, not infrastructure provisioning via CloudFormation stacks.

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 CodeBuild

AWS CodeBuild is correct because it can be used as a build and test action within a pipeline to run custom scripts (e.g., using the AWS CLI) that create, update, or delete CloudFormation stacks. In a CI/CD pipeline, CodeBuild can execute `aws cloudformation deploy` or `aws cloudformation delete-stack` commands, providing the flexibility to handle stack operations beyond simple template deployment.

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 CodeBuild

    Why this is correct

    AWS CodeBuild is essential in a CloudFormation CI/CD pipeline for compiling source code, running unit tests, and crucially, for validating and packaging CloudFormation templates. It can execute `cfn-lint` for template validation, transform SAM templates into CloudFormation, and package application assets (like Lambda code) into S3 buckets, preparing them for CloudFormation deployment. This ensures template syntax and best practices are adhered to before deployment.

  • ✗

    AWS CodeDeploy

    Why it's wrong here

    AWS CodeDeploy is primarily designed for automating application deployments to various compute services like Amazon EC2 instances, AWS Fargate, AWS Lambda, and on-premises servers. While it manages application revisions and deployment strategies (e.g., blue/green, in-place), it does not directly deploy or manage AWS CloudFormation stacks themselves. CloudFormation handles the infrastructure provisioning, making CodeDeploy redundant for the stack operations.

  • ✗

    AWS Lambda

    Why it's wrong here

    AWS Lambda functions can be deployed *by* CloudFormation as part of an application's infrastructure, or used as custom resources within a CloudFormation template to extend its capabilities. However, AWS Lambda itself is not a core service for *deploying and managing* CloudFormation stacks or orchestrating the CI/CD pipeline for CloudFormation templates. Its role is typically within the deployed application logic or for specific custom resource operations, not the deployment mechanism itself.

  • ✓

    AWS CloudFormation

    Why this is correct

    AWS CloudFormation is the foundational service for defining, provisioning, and managing AWS infrastructure as code. It directly performs the creation, update, and deletion of AWS resources by processing templates, ensuring that the infrastructure remains consistent and auditable. When deploying and managing infrastructure, CloudFormation is the ultimate execution engine that translates the desired state defined in templates into actual AWS resources.

  • ✓

    AWS CodePipeline

    Why this is correct

    AWS CodePipeline is crucial for orchestrating the entire continuous integration and continuous delivery (CI/CD) workflow for CloudFormation deployments. It defines the stages, such as source, build, and deploy, and automates the flow of changes through these stages. CodePipeline integrates with services like CodeCommit for source control, CodeBuild for validation and packaging, and CloudFormation for executing stack operations, ensuring an automated and consistent deployment process.

About these practice questions

This DVA-C02 question is part of Courseiva's 1,135-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. 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 DVA-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 DVA-C02 exam.