Courseiva

DOP-C02 Resilient Cloud Solutions Practice Question

An application running on Amazon ECS with Fargate experiences intermittent failures. The task definition includes a single container with a health check command. Despite the health check passing, the application occasionally returns HTTP 500 errors. The application logs are sent to CloudWatch Logs. What is the MOST likely root cause?

⚠ Common exam trap

It's easy for candidates to assume a passing health check guarantees the application is fully functional, but AWS specifically tests the distinction between container-level health (process running) and application-level health (HTTP response correctness), which is a key concept for the DOP-C02 exam.

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 health check command only checks the process status, not the application's ability to serve requests.

A health check command in an ECS task definition typically checks the container process status (e.g., via a shell command or a simple TCP check), not the application's HTTP layer. If the health check passes but the application returns HTTP 500 errors, it indicates the container is running but the application logic is failing (e.g., unhandled exceptions, database connection issues). This mismatch between process-level health and application-level health is a common cause of intermittent failures in containerized applications.

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 health check command only checks the process status, not the application's ability to serve requests.

    Why this is correct

    Using a process-only health check (e.g., checking that the PID exists) means the ECS/ALB considers the container healthy whenever the runtime is alive, regardless of whether the app can actually serve HTTP traffic. As a result, intermittent 500 errors caused by a hung worker, exhausted connection pool, or an unhandled exception inside request handling remain invisible to the health check, so the task stays in service and keeps receiving traffic. A valid health check should send a real request to the application's endpoint and verify the response code.

  • ✗

    The application is missing environment variables that are required for certain requests.

    Why it's wrong here

    A missing environment variable—such as DATABASE_URL, API_KEY, or feature-flag configuration—typically causes deterministic failures: each request that depends on that variable will fail the same way until the task is redeployed with the correct value. Because the symptom is intermittent 500s while other requests apparently succeed, an environment variable gap is an unlikely root cause; such a misconfiguration would not randomly change behavior per request. ECS also injects environment variables at task start, so the failure pattern would be consistent across all tasks and requests.

  • ✗

    The ECS service is configured with a target tracking scaling policy that reacts too slowly.

    Why it's wrong here

    A target tracking scaling policy responds to CloudWatch metrics like CPUUtilization or ALBRequestCountPerTarget, and its reaction time is measured in minutes due to metric aggregation and cooldown periods; but scaling lag alone does not cause individual healthy tasks to return intermittent 500s. Slow scaling would instead create a gradually worsening capacity deficit, where errors would become more frequent as load grows and then subside as new tasks register. Since the health check still passes and the question points to a health-check defect, a scaling policy that reacts too slowly explains sustained under-provisioning, not the intermittent HTTP 500s.

  • ✗

    The container port and host port in the task definition do not match the ALB target group port.

    Why it's wrong here

    A port mismatch between the task definition's containerPort and the ALB target group's port is a static configuration error: the ALB health check will connect to the wrong port and consistently mark every target unhealthy, causing the service to cycle tasks and fail to route traffic at all. The inconsistency described (intermittent 500s) cannot result from a port mismatch, because the behavior is binary—either the health check succeeds and traffic is delivered, or it fails and the target is deregistered. With Fargate's awsvpc network mode, host port mapping is not relevant, further confirming this option is not the culprit.

Visual reference

Client Server SYN (seq=100) SYN-ACK (seq=200, ack=101) ACK (ack=201) Connection established — data transfer begins

About these practice questions

This DOP-C02 question is part of Courseiva's 1,298-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 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.