Courseiva
Resilient Cloud SolutionsmediumMultiple ChoiceObjective-mapped

ECS Fargate AZ Rebalancing: Surviving Availability Zone Failures

A company runs a critical application on Amazon ECS with Fargate launch type. The application is deployed across multiple Availability Zones. The DevOps team needs to ensure that if an entire Availability Zone fails, the application continues to serve traffic without manual intervention. What should the team do?

Quick Answer

The correct answer is to configure the ECS service to run tasks in at least two Availability Zones and enable the ECS service auto-recovery feature. This works because ECS Fargate AZ rebalancing is a built-in mechanism that automatically detects when tasks are concentrated in fewer AZs than intended—such as after an entire zone fails—and proactively launches replacement tasks in the remaining healthy zones to restore the desired count and distribution. On the AWS Certified DevOps Engineer Professional DOP-C02 exam, this concept tests your understanding of how ECS service auto-recovery differs from simply setting a multi-AZ deployment; a common trap is assuming that deploying across multiple AZs alone is sufficient, but without enabling auto-recovery, the service will not automatically replace tasks lost to a zone failure. For a memory tip, think of it as “two AZs plus auto-recovery” — the service needs both the spread and the self-healing trigger to survive an AZ outage without manual intervention.

⚠ Common exam trap

Many exam-takers confuse auto-scaling (which adjusts capacity based on demand) with AZ rebalancing (which redistributes tasks after an AZ failure), leading them to choose Option A or B, or they mistakenly think deployment configuration settings like minimum/maximum percent (Option D) can handle AZ failures.

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

Configure the ECS service to run tasks in at least two Availability Zones and enable the ECS service auto-recovery feature.

The ECS service's AZ rebalancing feature automatically redistributes tasks across Availability Zones when an imbalance is detected, such as after an AZ failure. By configuring the service to run tasks in at least two AZs and enabling this feature, the ECS service will automatically launch replacement tasks in the remaining healthy AZs to maintain the desired count, ensuring continued traffic serving 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.

  • Use an Amazon ECS service auto-scaling policy to automatically replace tasks in the failed AZ.

    Why it's wrong here

    Auto-scaling does not automatically redistribute tasks across AZs.

  • Configure the ALB to enable cross-zone load balancing and enable the ECS service's AZ rebalancing feature.

    Why it's wrong here

    ECS does not have an AZ rebalancing feature; ALB cross-zone is not enough.

  • Configure the ECS service to run tasks in at least two Availability Zones and enable the ECS service auto-recovery feature.

    Why this is correct

    Multi-AZ deployment plus auto-recovery ensures resilience.

  • Set the ECS service's minimum healthy percent to 100 and maximum percent to 200.

    Why it's wrong here

    This helps during deployments, not AZ failure.

About these practice questions

Courseiva writes every DOP-C02 question from scratch — 251 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 DOP-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 financial services company runs a critical application on Amazon ECS with Fargate launch type. The application has strict availability requirements and must survive an Availability Zone failure. The ECS service is configured with a desired count of 4 tasks, spread across two Availability Zones using a spread strategy. The service is fronted by an Application Load Balancer. During a recent AZ outage, one AZ became completely unavailable, but the application continued to serve traffic. However, after the AZ recovered, the ECS service did not automatically place new tasks in the recovered AZ to restore the desired count. The service remains with only 2 tasks in the remaining AZ. What is the most likely cause and solution?

hard
  • A.The ECS service does not automatically replace tasks in a recovered AZ because the spread strategy is static. Manually update the service (e.g., force new deployment) to trigger rebalancing.
  • B.The Application Load Balancer is not health-checking the recovered AZ. Configure cross-zone load balancing.
  • C.The ECS service uses a spread strategy that does not automatically rebalance after an AZ recovers. Update the service to use a 'rebalance' strategy.
  • D.The ECS service is configured with a minimum healthy percent of 50%, which prevents replacement. Lower the minimum healthy percent to 0%.

Why A: The ECS service uses a spread strategy, which maintains balance across AZs. When an AZ is unhealthy, ECS does not place tasks there. After recovery, the service may not automatically rebalance because the spread strategy is not proactive; it only ensures placement of new tasks. To force rebalancing, one can update the service (e.g., change desired count, then change back).

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.