How do you debug intermittent 5xx errors behind an ALB?
AWS · Advanced level
Answer
For intermittent 5xx behind ALB, I separate ELB-generated errors from target errors, inspect ALB metrics/access logs, correlate by target/path/AZ/deployment, then check health checks, timeouts, app logs, dependencies, and scaling events.
Technical explanation
Compare HTTPCode_ELB_5XX with HTTPCode_Target_5XX to determine whether the ALB or the backend generated errors.
Operations at scale should prefer managed access, automation, immutable infrastructure, repeatable runbooks, and auditability over manual host-by-host changes.
Troubleshooting should isolate layers: identity, network, host, application, dependency, deployment, and AWS service signals.
Patch, access, AMI, and incident workflows must be tested and measurable so they do not depend on tribal knowledge.
Hands-on example
1. Set up a sandbox EC2 fleet with SSM Agent, IAM instance role, CloudWatch Agent, hardened AMI baseline, and no unnecessary inbound access.
2. Perform the operation through automation: Session Manager, Run Command, Patch Manager, Image Builder, ASG instance refresh, or a runbook.
3. Introduce a realistic failure and use logs, metrics, status checks, and reachability tools to troubleshoot layer by layer.
4. Update the runbook and define the alarm or compliance check that would catch the issue next time.
Check how well your resume matches the role with our free resume checker— match score, ATS check, and the skills you're missing.
More AWS interview questions
- How do you troubleshoot an EC2 instance that is unreachable over SSH?
- What is an AMI, and how do you build standardised, hardened images?
- What is AWS Systems Manager, and how is Session Manager safer than SSH bastions?
- What is the difference between an SQS standard and FIFO queue?
- What is the difference between a service quota and a rate limit, and how do you handle throttling?
- How do you detect and reduce unexpected AWS cost increases?
- Compare backup-and-restore, pilot light, warm standby, and multi-site DR strategies.
- What is a CloudFormation change set and a drift detection?