A developer has deployed a new application on AWS using Amazon EC2 instances and an Application Load Balancer (ALB). Users are reporting intermittent 503 Service Unavailable errors. Upon investigation, the developer notices that the EC2 instances behind the ALB appear healthy. Which of the following is the MOST likely cause of the 503 errors?
- AThe target group associated with the ALB has no registered targets or all registered targets are unhealthy.
- BThe security group associated with the EC2 instances does not allow inbound traffic from the ALB.
- CThe network ACL associated with the subnets containing the EC2 instances is blocking traffic.
- DThe EC2 instances are experiencing high CPU utilization, causing them to become unresponsive.
Show answer & explanationAnswer & explanation
Correct answer: A. The target group associated with the ALB has no registered targets or all registered targets are unhealthy.
A 503 error from an ALB typically indicates an issue with the target instances. If the instances are healthy but the ALB returns 503, it often means the ALB cannot forward the request to a valid target. This happens when the target group has no registered targets or all registered targets are marked as unhealthy by the health checks.
Why the other options are wrong
- B. A security group issue would likely result in connection timeouts or different HTTP error codes (e.g., 504 if the ALB can't establish a connection).
- C. Network ACLs blocking traffic would also typically result in connection timeouts or different errors, not usually a 503 from the ALB itself.
- D. High CPU might make instances unresponsive, but the question states instances 'appear healthy,' suggesting health checks are passing, making this less likely for a 503 from the ALB directly.
ALB 503 Service Unavailable
An Application Load Balancer returns a 503 Service Unavailable error when it cannot route a request to a healthy target. This often occurs if the target group has no registered targets or all registered targets fail health checks.
- Indicates ALB cannot find a healthy target.
- Common causes: no registered targets, all targets unhealthy.
- Check target group registration and health check configuration.
Memory trick: Always Look Back for Target Group trouble when you see a 503.