Courseiva
DeploymenthardMultiple ChoiceObjective-mapped

DVA-C02 Deployment Practice Question

A developer is deploying a microservices application on Amazon ECS using Fargate. The application uses an Application Load Balancer (ALB) to distribute traffic. The developer needs to perform a blue/green deployment with automatic rollback if health checks fail. What should the developer use?

⚠ Common exam trap

It's easy for candidates to confuse ECS service auto scaling or CloudFormation updates with deployment strategies, but neither provides the built-in blue/green traffic shifting and automatic health-check-based rollback that CodeDeploy offers.

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

Use AWS CodeDeploy with a blue/green deployment configuration.

AWS CodeDeploy natively supports blue/green deployments for Amazon ECS, allowing you to specify a blue/green configuration that automatically shifts traffic from the old (blue) task set to the new (green) task set. It integrates with the ALB to perform health checks and can automatically roll back the deployment if the health checks fail, meeting the requirement without manual intervention.

Answer analysis

Option-by-option breakdown

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

  • Configure ECS service auto scaling to replace tasks gradually.

    Why it's wrong here

    Configuring ECS service auto scaling primarily manages the desired task count based on resource utilization or custom metrics to handle varying application load. It is a capacity management tool, not a deployment mechanism for introducing new application versions. Auto scaling does not facilitate controlled traffic shifting, pre-deployment validation, or automated rollback strategies essential for safe application updates.

  • Manually update the ECS service using the AWS Management Console.

    Why it's wrong here

    Manually updating an ECS service through the AWS Management Console involves directly changing the task definition or desired count. This approach lacks automation for critical deployment steps such as incremental traffic shifting, comprehensive health checks on new tasks, or a predefined, automated rollback process. Manual updates are prone to human error and can lead to significant downtime or service disruption if issues arise post-deployment.

  • Use AWS CloudFormation to update the ECS service with a new task definition.

    Why it's wrong here

    While AWS CloudFormation can define and update ECS service resources, including pointing to a new task definition, it typically performs an in-place update by replacing existing tasks. CloudFormation itself does not inherently orchestrate advanced deployment strategies like blue/green, which involve creating a parallel environment, shifting traffic, and performing automated rollbacks based on application health checks. It manages infrastructure state, not application deployment lifecycle with traffic management.

  • Use AWS CodeDeploy with a blue/green deployment configuration.

    Why this is correct

    AWS CodeDeploy, when configured for blue/green deployments with Amazon ECS, provides a robust and automated solution for deploying new application versions. It creates a new 'green' environment with the updated tasks alongside the existing 'blue' environment, allowing for thorough testing before traffic is shifted. CodeDeploy manages the traffic routing via a load balancer and can automatically roll back to the stable 'blue' version if deployment health checks fail, ensuring minimal downtime and risk.

About these practice questions

Courseiva writes every DVA-C02 question from scratch — 724 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 →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

1 more way this is tested on DVA-C02

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. A developer is deploying an application to Amazon ECS using AWS CodeDeploy with a blue/green deployment strategy. After the new task set is created, it fails health checks. The developer wants to immediately route traffic back to the original task set without waiting for CodeDeploy to complete the rollback process. Which action should the developer take?

medium
  • A.Update the ECS service to set the desired count of the new task set to zero.
  • B.Use the CodeDeploy console to stop the deployment and then choose to reroute traffic.
  • C.Delete the new task set.
  • D.Update the Application Load Balancer listener rule to forward traffic to the original target group.

Why B: In AWS CodeDeploy blue/green deployments for ECS, if you need to immediately revert to the original task set, you must stop the deployment. Stopping an in-progress deployment automatically triggers a rollback, which reroutes traffic back to the original (blue) task set and deletes the replacement (green) task set. The 'Reroute traffic' button is only used to manually fast-track shifting traffic forward to the new task set.

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.