Courseiva

SOA-C02 Reliability and Business Continuity Practice Question

A company runs a microservices architecture on Amazon ECS with Fargate. They need to ensure that if a task fails, it is automatically restarted. Which configuration is required?

⚠ Common exam trap

Test-takers frequently confuse the RunTask API (for one-off tasks) with ECS services (for long-running, self-healing tasks), or mistakenly think CloudWatch alarms or Auto Scaling groups are needed for task restart logic when the ECS service itself provides this capability.

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

✓

Create an ECS service with a desired count and task definition

An ECS service with a desired count and task definition ensures that Fargate tasks are automatically restarted if they fail. The ECS service scheduler monitors the desired count and replaces any stopped or failed tasks to maintain the specified number of running instances, providing built-in resilience without additional infrastructure.

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 a CloudWatch alarm to restart the task

    Why it's wrong here

    CloudWatch alarms can trigger only a limited set of actions: EC2 instance actions, Auto Scaling policies, and SNS notifications. They cannot directly stop, start, or restart an ECS task or service. To act on an alarm you would need a Lambda function or an SSM Automation document, which is an indirect workaround rather than a native ECS restart mechanism.

  • ✗

    Define tasks using the ECS RunTask API

    Why it's wrong here

    The ECS RunTask API is designed for standalone, one-off tasks such as batch jobs or maintenance operations. It launches a task, but no scheduler watches over it afterwards, so if the task exits, fails, or is terminated, nobody brings it back. It also does not register with a load balancer or provide service-level health monitoring, making it inappropriate for a microservices architecture that needs continuous availability.

  • ✗

    Use an Auto Scaling group for the Fargate tasks

    Why it's wrong here

    Auto Scaling groups manage a fleet of EC2 instances and are tied to either an EC2 launch configuration or a mixed instance policy. Fargate tasks run on serverless infrastructure managed by AWS, so they cannot be placed inside an Auto Scaling group. The correct way to scale Fargate tasks is through ECS Service Auto Scaling, which adjusts the desired count of the task definition within an ECS service.

  • ✓

    Create an ECS service with a desired count and task definition

    Why this is correct

    An ECS service is the correct mechanism for running a long-lived microservice: you specify a task definition, a desired count, and a cluster, and the service scheduler ensures that the desired number of tasks is always running. When a task crashes, is killed, or fails a health check, the service automatically replaces it by starting a new task from the same task definition. This provides self-healing and integrates with Application Load Balancers, target groups, and service discovery for production traffic.

About these practice questions

Courseiva writes every SOA-C02 question from scratch — 1,169 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 SOA-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 SOA-C02 exam.