Courseiva

DOP-C02 Resilient Cloud Solutions Practice Question

A company runs a critical microservices architecture on Amazon ECS with Fargate. They want to ensure that if a task fails, it is automatically restarted, and the service remains available across multiple Availability Zones. How should they configure the ECS service?

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

✓

Define an ECS service with a task definition, set desired count across multiple Availability Zones, and use Service Auto Scaling

An ECS service configured with a task definition, desired count across multiple Availability Zones, and Service Auto Scaling ensures resilience. The ECS service scheduler automatically restarts failed tasks, and distributing tasks across AZs provides high availability. Option A is wrong because placing all tasks in a single AZ creates a single point of failure. Option B is wrong because a standalone Fargate task does not have automatic restart; a CloudWatch alarm can restart it but lacks the built-in resilience of an ECS service. Option C is wrong because using a single EC2 instance is a single point of failure and does not provide multi-AZ resilience.

Answer analysis

Option-by-option breakdown

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

  • ✗

    Place all tasks in the same Availability Zone to reduce latency

    Why it's wrong here

    Collocating every task in a single Availability Zone trades resilience for the negligible latency saved over inter-AZ network hops. If that AZ experiences an outage, the entire service becomes unavailable because ECS cannot place replacement tasks elsewhere, and the service scheduler's default spread placement is overridden. A production microservice must tolerate an AZ failure, which requires distributing tasks across multiple AZs rather than pinning them to one.

  • ✗

    Run a standalone Fargate task and use a CloudWatch alarm to restart it

    Why it's wrong here

    A standalone Fargate task is a one-shot invocation: ECS does not track its health or restart it if it exits, because only tasks managed by an ECS service benefit from desired-count reconciliation. A CloudWatch alarm can only notify or trigger another action (such as a Lambda function), not directly restart a Fargate task, and the intervention window leaves the service down. This approach lacks the automatic replacement that an ECS service provides, and also does not support multi-AZ distribution.

  • ✗

    Use an EC2 launch type with a single instance to reduce complexity

    Why it's wrong here

    Running an EC2 launch type with a single instance creates a single point of failure: if that instance terminates, crashes, or is stopped for maintenance, every task on it is lost and the cluster has no registered container instance on which to place replacements. Even with an ECS service, desired count cannot be maintained because the service scheduler has no other instance in the cluster. Multi-AZ fault tolerance and enough capacity for tasks require a cluster of multiple instances, especially for a critical microservices workload.

  • ✓

    Define an ECS service with a task definition, set desired count across multiple Availability Zones, and use Service Auto Scaling

    Why this is correct

    An ECS service with a task definition and a multi-AZ placement strategy is the correct pattern because the service scheduler continuously maintains the desired count, automatically replacing tasks that fail, become unhealthy, or lose connectivity. Distributing tasks across multiple Availability Zones ensures the service remains available even if an entire AZ goes down, as the remaining AZs still host task copies. Service Auto Scaling independently adjusts the desired count based on CloudWatch metrics or target tracking, providing elasticity and capacity management without sacrificing the resilience built into the service model.

About these practice questions

Courseiva writes every DOP-C02 question from scratch — 1,298 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

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.