Practice free →
HomeAWS Developer Associatecloudcomputingawsdevtroubleshooting › A Lambda function called from API Gateway return…

A Lambda function called from API Gateway returns 502 Bad Gateway under load. Logs show "Task timed out after 30.00 seconds." What is the FIRST thing to check?

AWhether AWS has globally rate-limited the customer's account
BWhether the function's downstream call (DB / external API) is slow — and whether the Lambda timeout (and/or memory) needs raising
CWhether the developer's laptop is online
DWhether the AWS root account is signed in
Answer & Solution
Correct answer: B. Whether the function's downstream call (DB / external API) is slow — and whether the Lambda timeout (and/or memory) needs raising
Task timed out = the function ran past its configured timeout — usually because a downstream call (DB, third-party HTTP, NAT) is slow. Raise timeout or fix the dependency. The other options are red herrings.
Solve this in the app — AWS Developer Associate practice & 24k+ MCQs →
Related questions