Courseiva
Incident and Event ResponsemediumMultiple ChoiceObjective-mapped

Troubleshooting ALB 5xx Errors

A company runs a critical web application on EC2 instances behind an Application Load Balancer (ALB) with Auto Scaling. Users report intermittent 503 errors. CloudWatch metrics show that the ALB's 'RequestCount' is normal, but 'HTTPCode_ELB_5XX_Count' spikes. The 'TargetResponseTime' metric shows occasional high latency. Which troubleshooting step should the DevOps engineer take FIRST?

Quick Answer

The correct first step is to enable and analyze the ALB access logs stored in S3, filtering for 503 errors and correlating them with target response times. This approach directly addresses the intermittent 503 errors by allowing you to pinpoint whether the errors align with spikes in latency from specific targets, revealing issues like resource exhaustion or application bottlenecks that CloudWatch metrics alone cannot isolate. On the AWS Certified DevOps Engineer Professional DOP-C02 exam, this scenario tests your ability to choose the most granular diagnostic tool before making configuration changes—a common trap is jumping to scaling actions or misreading CloudTrail logs, which record API calls, not HTTP traffic. Remember, access logs are your forensic microscope for ALB errors; CloudWatch shows the fever, but access logs find the infection. A useful memory tip: "Logs before knobs"—always inspect the data before turning any dials.

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

Enable and analyze the ALB access logs stored in S3, filtering for 503 errors and correlating with target response times.

The correct first step is to enable and analyze ALB access logs (Option A). ALB access logs contain detailed information about each HTTP request, including the response status code (e.g., 503), target response time, and the specific target that handled the request. By filtering for 503 errors and correlating with high target response times, the engineer can identify whether the errors are caused by slow or failing targets. Option B (increasing desired capacity) does not address the root cause and may not help if the issue stems from target health or configuration. Option C (disabling connection draining) can worsen the problem by abruptly terminating in-flight requests, increasing errors. Option D (reviewing CloudTrail logs) is not useful because CloudTrail captures API changes, not HTTP-level errors.

Answer analysis

Option-by-option breakdown

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

  • Enable and analyze the ALB access logs stored in S3, filtering for 503 errors and correlating with target response times.

    Why this is correct

    Access logs provide detailed per-request data including timestamp, target status, and response time, enabling correlation of errors with slow targets.

  • Increase the desired capacity of the Auto Scaling group to handle more requests.

    Why it's wrong here

    This may temporarily reduce errors but does not identify the root cause; could be cost-ineffective.

  • Disable connection draining on the target group to prevent slow-draining instances from causing errors.

    Why it's wrong here

    Connection draining helps gracefully terminate connections; disabling it may cause more errors during instance replacement.

  • Review AWS CloudTrail logs for any recent configuration changes to the ALB.

    Why it's wrong here

    CloudTrail logs API calls, not HTTP-level errors; 503 errors are not captured there.

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 company's application running on EC2 instances behind an Application Load Balancer (ALB) is returning intermittent 504 errors. The instances are in an Auto Scaling group with a health check grace period of 300 seconds. What should the DevOps engineer check first to troubleshoot the issue?

medium
  • A.Review the Auto Scaling group scaling policies.
  • B.Verify the target group health checks are passing.
  • C.Check security group rules for the ALB.
  • D.Check ALB access logs for target response times.

Why D: A 504 error indicates the load balancer did not receive a response from the target within the idle timeout period. Checking ALB access logs for target response times is the first step to determine if the backend is slow or unresponsive. Option A is wrong because scaling policies affect the number of instances, not response times. Option B is wrong because health checks verify instance availability, but intermittent slow responses may not cause health check failures. Option C is wrong because security group rules would cause different errors (e.g., connection timeouts) rather than 504s.

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.