Courseiva
Development with AWS ServiceseasyMultiple ChoiceObjective-mapped

DVA-C02 Development with AWS Services Practice Question

A company is using AWS CloudFormation to deploy infrastructure. The developer wants to update a stack and needs to know what changes will be made before executing the update. Which AWS CLI command should the developer use?

⚠ Common exam trap

Watch out — candidates often confuse `aws cloudformation update-stack` with a preview command, but it directly applies changes, whereas `create-change-set` is the correct command for reviewing changes before execution.

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 create-change-set

The `aws cloudformation create-change-set` command creates a change set, which is a summary of proposed changes to a CloudFormation stack. This allows the developer to review what resources will be added, modified, or deleted before executing the update, without making any actual changes. The change set can then be executed with `aws cloudformation execute-change-set` to apply the changes.

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 deploy

    Why it's wrong here

    The aws cloudformation deploy command is a high-level AWS CLI command designed to simplify the deployment of CloudFormation stacks, often used in CI/CD pipelines. While it handles both stack creation and updates, it directly executes the changes specified in the template without generating a change set for review. This command prioritizes immediate deployment over a detailed preview of resource modifications, making it inappropriate for a preview-first workflow.

  • aws cloudformation create-change-set

    Why this is correct

    Correct. The aws cloudformation create-change-set command creates a change set, which is a summary of proposed changes to a CloudFormation stack. This allows the developer to review what resources will be added, modified, or deleted before executing the update, without making any actual changes.

  • aws cloudformation validate-template

    Why it's wrong here

    The aws cloudformation validate-template command performs a syntax check on a CloudFormation template, ensuring it adheres to the JSON or YAML format and uses valid CloudFormation intrinsic functions and resource types. This command does not interact with any existing stack or evaluate the potential impact of the template on deployed resources. Its sole purpose is to verify the template's structural correctness before it is used for stack operations, not to preview changes.

  • aws cloudformation update-stack

    Why it's wrong here

    The aws cloudformation update-stack command directly applies changes defined in a new template to an existing CloudFormation stack. It immediately initiates the update process, modifying or replacing resources without an intermediate review step. This command is suitable when a developer is confident in the changes and does not require a prior preview of the proposed modifications, making it unsuitable for scenarios requiring a pre-execution review.

About these practice questions

This DVA-C02 question is part of Courseiva's 724-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.