nerdexam
Amazon

DVA-C02 · Question #484

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 indep

The correct answer is D. Refactor the Lambda function to start an AWS Step Functions state machine.. API Gateway HTTP APIs enforce a hard maximum integration timeout of 29 seconds, so tasks that take up to 10 minutes must be offloaded to an asynchronous orchestration service like AWS Step Functions.

Submitted by jaden.t· Mar 5, 2026Refactoring

Question

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?

Options

  • AIncrease the Lambda function's timeout value.
  • BIncrease the reserved concurrency of the Lambda function.
  • CIncrease the memory that is available to the Lambda function.
  • DRefactor the Lambda function to start an AWS Step Functions state machine.

How the community answered

(30 responses)
  • A
    13% (4)
  • B
    20% (6)
  • C
    7% (2)
  • D
    60% (18)

Why each option

API Gateway HTTP APIs enforce a hard maximum integration timeout of 29 seconds, so tasks that take up to 10 minutes must be offloaded to an asynchronous orchestration service like AWS Step Functions.

AIncrease the Lambda function's timeout value.

Increasing the Lambda function timeout up to 15 minutes does not help because API Gateway's maximum integration timeout of 29 seconds is a hard limit that cannot be changed.

BIncrease the reserved concurrency of the Lambda function.

Reserved concurrency controls how many concurrent executions are available but has no effect on the maximum response time or API Gateway's integration timeout.

CIncrease the memory that is available to the Lambda function.

Increasing Lambda memory allocation speeds up CPU-bound computation but does not extend the API Gateway integration timeout or resolve the 504 error for tasks that inherently take 10 minutes.

DRefactor the Lambda function to start an AWS Step Functions state machine.Correct

Refactoring to invoke an AWS Step Functions state machine asynchronously from the Lambda function allows the API Gateway endpoint to return immediately (e.g., HTTP 202 Accepted with an execution ID) while Step Functions orchestrates the long-running independent tasks, completely avoiding the 29-second API Gateway timeout limit.

Concept tested: API Gateway 29-second integration timeout with async Step Functions

Source: https://docs.aws.amazon.com/apigateway/latest/developerguide/limits.html

Community Discussion

No community discussion yet for this question.

Full DVA-C02 Practice