Courseiva
DeploymenteasyMultiple ChoiceObjective-mapped

DVA-C02 Deployment Practice Question

A team uses AWS CodePipeline to automate deployments. They notice that a deployment to Amazon ECS fails because the task definition is not updated. The pipeline includes a source stage from CodeCommit, a build stage using AWS CodeBuild, and a deploy stage to Amazon ECS. What is the most likely missing step?

⚠ Common exam trap

Many exam-takers assume the task definition is automatically updated by the deploy action or that manual registration in the ECS console is required, when in fact the build stage must explicitly output the updated definition as an artifact for the pipeline to use.

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

The build stage does not output the updated task definition as an artifact.

In a CodePipeline that deploys to Amazon ECS, the build stage must output the updated task definition file (typically `imagedefinitions.json` or a task definition JSON) as an artifact. Without this artifact, the deploy stage cannot reference the new task definition revision, so it continues using the old one, causing the deployment to fail.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • The pipeline has a manual approval step before deployment.

    Why it's wrong here

    A manual approval step in AWS CodePipeline is designed to pause the pipeline's execution, awaiting explicit human intervention before proceeding to subsequent stages. It does not inherently cause a deployment failure or prevent an updated task definition from being used; rather, it simply holds the pipeline in a pending state. If approved, the pipeline would continue with the artifacts it received from prior stages, whether they are updated or not, making this an incorrect explanation for a failure to deploy the latest task definition.

  • The deploy stage action is set to 'Create a new ECS service'.

    Why it's wrong here

    Setting the deploy stage action to 'Create a new ECS service' would indeed instantiate a completely new Amazon ECS service based on the provided task definition. However, the typical goal in a continuous deployment pipeline is to update an *existing* service with new code, not to create a duplicate service every time. This configuration would not address the problem of an existing service failing to update its task definition; instead, it would result in multiple services or an unintended new deployment target.

  • The task definition is not registered in the Amazon ECS console.

    Why it's wrong here

    In an automated AWS CodePipeline setup for ECS deployments, the build stage (often powered by AWS CodeBuild) is typically responsible for generating and then registering the new ECS task definition with Amazon ECS. The deploy stage then references this newly registered definition by its ARN. Therefore, if the pipeline is executing, the task definition registration is an integral part of the automated process, making it highly unlikely that the definition simply isn't registered at all. The issue would rather be which version is being referenced or passed along.

  • The build stage does not output the updated task definition as an artifact.

    Why this is correct

    The build stage in AWS CodePipeline is responsible for compiling code, building container images, and crucially, generating output artifacts that subsequent stages will consume. For an Amazon ECS deployment, this often includes an updated task definition JSON file (referencing the new container image) or an `imageDetails.json` file. If the build stage fails to correctly output this updated task definition as a designated artifact, the deploy stage will not receive the necessary information to deploy the latest application version. Consequently, the deploy stage might either fail due to missing input or, more subtly, proceed by using an older, cached, or default task definition, resulting in the application not reflecting the most recent code changes.

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.