DOP-C02 exam dumps

DOP-C02 practice question 285 of 411

AWS Certified DevOps Engineer - Professional. Professional level, Amazon Web Services. Free question with the correct answer and a full explanation.

DOP-C02 Question 285

Single answer

You are managing an application hosted on Amazon ECS behind an Application Load Balancer (ALB). The ALB is configured with a target group that includes ECS tasks as targets. Recently, you noticed that requests to some unhealthy ECS tasks are still being routed by the ALB, causing intermittent failures. How can you ensure that requests are only routed to healthy ECS tasks?

  1. A

    Configure a health check for the target group associated with the ALB, specifying the appropriate path and success codes.

  2. B

    Enable Route 53 health checks on the ECS tasks and associate them with the ALB's DNS entry.

  3. C

    Use Amazon CloudWatch Alarms to detect unhealthy ECS tasks and manually remove them from the target group.

  4. D

    Enable ECS task auto-recovery to replace unhealthy tasks automatically.

Show answer and explanation

Correct answer: A

Explanation

To ensure that the ALB routes traffic only to healthy ECS tasks, you need to configure health checks at the target group level. These health checks allow the ALB to continuously monitor the health of ECS tasks and stop routing traffic to targets that fail the health check. This approach is automatic and does not require manual intervention, making it the best solution for the scenario.

  • A. Correct.

    Correct. Configuring health checks for the target group ensures that the ALB only routes traffic to ECS tasks that pass the health check. This is the most effective solution for the described issue.

  • B. Incorrect.

    Incorrect. While Route 53 health checks can be used to monitor endpoints, they are not directly tied to ALB target group health checks. This approach would not help the ALB determine the health of ECS tasks.

  • C. Incorrect.

    Incorrect. CloudWatch Alarms can detect unhealthy tasks, but manually removing them is inefficient and not practical for automated traffic routing.

  • D. Incorrect.

    Incorrect. ECS task auto-recovery is not a feature of ECS. ECS tasks are typically managed via services that automatically restart tasks but do not directly integrate with ALB health checks.

Timed practice exam

Take a DOP-C02 practice test under exam conditions

75 questions in 180 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam