1. Home
  2. Computer Science MCQs
  3. Cloud Computing
  4. An API Gateway REST API integrates with a Lambda function…

Added 30 Nov -0001

An API Gateway REST API integrates with a Lambda function that takes 40 seconds to finish. What does the client receive?

  1. A 502 error, because Lambda rejects runs longer than 30 seconds
  2. A 504 only if reserved concurrency has been configured on the function
  3. A 504 timeout, because the integration timeout is capped at 29 seconds Correct answer
  4. A 200 response after 40 seconds, since the gateway waits for the backend

Correct answer

C. A 504 timeout, because the integration timeout is capped at 29 seconds

21 views

MCQSEXAM

Explanation

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.

Reference

Asked in: NTS, PPSC IT, Campus Interviews

Preparing for an exam?

Doubts & discussion

Not sure why the answer is C? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More Cloud Computing MCQs

Practise all Cloud Computing MCQs

Similar MCQs