Target timeout

The target timeout defines how long API Gateway waits for a response from the target server before returning a timeout error. You can configure this value to accommodate longer-running requests when needed.

By default, API Gateway waits up to 60 seconds for a response from the target server. If the target server does not respond within this time frame, Gateway returns a 504 Timeout status, indicating that the request cannot be completed due to a timeout.

You can modify this behavior by applying a timeout policy. This policy allows you to configure the Gateway to wait longer for a response—up to five minutes, if required. Adjusting the timeout value is useful in scenarios where the target server needs additional time to process and respond to requests.

Increasing the timeout ensures that longer-running operations are given enough time to complete without prematurely returning a timeout error.

To increase the timeout, update the policy settings for your API endpoints.