AWS Certified Developer – Associate (DVA-C02) — Question 485

A company is launching a feature that uses an HTTP API built with Amazon API Gateway and AWS Lambda. An API Gateway endpoint performs several independent tasks that run in a Lambda function. The independent tasks can take up to 10 minutes in total to finish running.

Users report that the endpoint sometimes returns an HTTP 604 status code. The Lambda function invocations are successful.

Which solution will stop the endpoint from returning the HTTP 504 status cade?

Answer options

Correct answer: D

Explanation

Amazon API Gateway has a maximum integration timeout limit of 29 seconds, which cannot be increased, resulting in an HTTP 504 error for tasks taking up to 10 minutes. Transitioning the architecture to trigger an AWS Step Functions state machine allows API Gateway to return an immediate response while the long-running tasks execute asynchronously. Adjusting Lambda timeout, concurrency, or memory will not resolve the issue because they do not bypass the API Gateway integration timeout limit.