Bird
0
0

An API Gateway method integration returns a 502 Bad Gateway error. What is the most common reason?

medium📝 Debug Q7 of 15
AWS - API Gateway
An API Gateway method integration returns a 502 Bad Gateway error. What is the most common reason?
AThe API Gateway method is not deployed
BThe API Gateway cache is full
CThe client sent a malformed request
DThe backend endpoint is unreachable or returns invalid response
Step-by-Step Solution
Solution:
  1. Step 1: Understand 502 Bad Gateway

    502 means API Gateway could not get a valid response from backend.
  2. Step 2: Identify common causes

    Backend unreachable or returning invalid data causes 502; deployment issues cause 404 or 403.
  3. Final Answer:

    The backend endpoint is unreachable or returns invalid response -> Option D
  4. Quick Check:

    502 error = backend failure [OK]
Quick Trick: 502 means backend failed or unreachable [OK]
Common Mistakes:
MISTAKES
  • Confusing 502 with client errors
  • Assuming deployment issues cause 502
  • Blaming cache for 502

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes