Interview practice question
API Gateway timing out before Lambda finishes
Data Engineering · AWS Lambda · Intermediate
A report-generation endpoint backed by Lambda returns a 504 error after about 30 seconds, even though the Lambda timeout is 5 minutes. Why, and what do you do?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- API Gateway has its own integration timeout, around 29 to 30 seconds by default.
- Long work shouldn't be synchronous.
- Switch to async: return a job ID, process in the background.
- Client polls a status endpoint or gets a callback.
- Store results in S3 with a presigned URL.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.