An API Gateway REST API integrates with a Lambda function that takes 40 seconds to finish. What does the client receive?
Correct answer
C. A 504 timeout, because the integration timeout is capped at 29 seconds
21 views
C. A 504 timeout, because the integration timeout is capped at 29 seconds
21 views
API Gateway's integration timeout is 29 seconds, so a 40-second backend produces a 504 even though the function itself succeeds and keeps running. The usual remedy is an asynchronous pattern: return quickly, hand the work to SQS or Step Functions, and let the client poll for the result. Raising the Lambda timeout does not help, because the gateway is the limiting component.
Asked in: NTS, PPSC IT, Campus Interviews
Not sure why the answer is C? Ask here and get an explanation.