# API Gateway timeout limit (29 seconds) and how to go beyond it

AWS limits and quotas · Updated 17 November 2026

**Short answer:** A REST API integration can run for 50 milliseconds to 29 seconds by default. For Regional and private REST APIs you can request a higher integration timeout through Service Quotas, which may lower your account's Region-level throttle quota; edge-optimized APIs stay at 29 seconds. HTTP APIs have a fixed 30-second maximum. Alternatively, a REST API proxy integration set to stream its response can keep a response open for up to 15 minutes without any quota increase.

## The timeout limits by API type

| API type | Integration timeout | Can it go higher? |
|---|---|---|
| REST API, Regional | 50 ms to 29 s (default 29 s) | Yes, by quota request; may reduce your account throttle quota |
| REST API, private | 50 ms to 29 s | Yes, same as Regional |
| REST API, edge-optimized | 50 ms to 29 s | No |
| REST API with response streaming (proxy integrations) | Up to 15 minutes of streaming | No request needed; idle timeout 5 minutes (Regional/private) or 30 seconds (edge) |
| HTTP API | Up to 30 s | No |
| Lambda authorizer response (HTTP API) | 10 s | No |

Other timeouts sit around the integration: the client's own timeout, CloudFront's origin response timeout if a distribution is in front, and the backend's timeout (Lambda's function timeout, a load balancer's [idle timeout](https://cloudconsole.dev/config/alb-idle-timeout)). The shortest one decides what the caller sees.

## Raise the 29-second limit (Regional and private REST APIs)

1. Open Service Quotas, choose **Amazon API Gateway**, find the integration timeout quota and request the value you need, in milliseconds. AWS may lower your account-level throttle quota in that Region to compensate, so check the [10,000 RPS default](https://cloudconsole.dev/limits/api-gateway-limits) still covers your traffic.
2. Once approved, set the timeout on each integration that needs it and redeploy the stage:

```
aws apigateway update-integration --rest-api-id a1b2c3d4e5 --resource-id abc123 --http-method POST \
  --patch-operations op=replace,path=/timeoutInMillis,value=90000

aws apigateway create-deployment --rest-api-id a1b2c3d4e5 --stage-name prod
```

In CloudFormation the property is `TimeoutInMillis` on the method's `Integration`; in the console it is **Integration timeout** under the integration request settings. Without the quota increase, values above 29,000 are rejected.

1. Raise the backend to match: a Lambda function behind a 90-second integration needs a function timeout above 90 seconds.

## Or stream the response instead

For long-running or large responses, set a proxy integration (`AWS_PROXY` or `HTTP_PROXY`) to the STREAM response transfer mode. API Gateway starts sending bytes as soon as the backend produces them, so the 29-second limit no longer applies, the 10 MB response cap is lifted, and you don't need a quota change. The trade-offs:

- Only REST APIs and only proxy integrations support it; request bodies are not streamed.
- Endpoint caching, content encoding and VTL response transformation don't work in STREAM mode.
- The stream must send data at least every 5 minutes (Regional and private) or 30 seconds (edge-optimized), and stops at 15 minutes.
- Lambda backends must use response streaming in the function code.

## When the limit is the wrong thing to change

Most 504s come from backends that are slow for a reason: a cold dependency, connection pool exhaustion, a VPC function without a route to a service, or a downstream API timing out. Before raising anything, look at `IntegrationLatency` for the method (an [integration latency alarm](https://cloudconsole.dev/alarms/api-gateway-integrationlatency) helps) and the backend's own logs. For work that genuinely takes minutes, the durable fix is asynchronous: accept the request, return 202 with a job ID, do the work in SQS plus Lambda, Step Functions or ECS, and let the client poll or receive a callback.

When the timeout does fire, the client gets `504` with `{"message": "Endpoint request timed out"}`; the [504 page](https://cloudconsole.dev/errors/api-gateway-504-endpoint-request-timed-out) covers diagnosis.

## Questions

### Can the API Gateway 29 second timeout be increased?

Yes, for Regional and private REST APIs: request a higher integration timeout in Service Quotas, then set timeoutInMillis on the integration. Edge-optimized REST APIs and HTTP APIs can't go beyond 29 and 30 seconds.

### What is the maximum timeout for API Gateway HTTP APIs?

30 seconds, and it can't be increased.

### Does increasing the API Gateway timeout cost anything?

There is no separate charge, but AWS may reduce your account's Region-level throttle quota when it grants a longer integration timeout.

## When this happens away from your desk

A 504 storm usually means a dependency slowed down, not that the timeout is wrong. CloudConsole, a phone app for AWS, is being built to show API latency and 5xx alarms with the backend logs on your phone so you can tell which.

[About the CloudConsole app](https://cloudconsole.dev/aws-console-app) · [Download on the App Store](https://apps.apple.com/app/cloudconsole-for-aws/id6835419710)

## Sources

- [Quotas for configuring and running a REST API in API Gateway](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-execution-service-limits-table.html)
- [Quotas for configuring and running an HTTP API](https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-quotas.html)
- [Stream the integration response for your proxy integrations](https://docs.aws.amazon.com/apigateway/latest/developerguide/response-transfer-mode.html)

## Related

- [504: Endpoint request timed out](https://cloudconsole.dev/errors/api-gateway-504-endpoint-request-timed-out)
- [Amazon API Gateway limits and quotas](https://cloudconsole.dev/limits/api-gateway-limits)
- [How to increase Lambda timeout](https://cloudconsole.dev/how-to/increase-lambda-timeout)
- [Lambda payload size limit](https://cloudconsole.dev/limits/lambda-payload-size-limit)
- [CloudWatch alarm for API Gateway IntegrationLatency (ApiId, Stage)](https://cloudconsole.dev/alarms/api-gateway-integrationlatency)
- [ALB idle timeout and HTTP client keepalive duration](https://cloudconsole.dev/config/alb-idle-timeout)

---

Source: https://cloudconsole.dev/limits/api-gateway-timeout-limit

CloudConsole is an independent iPhone and Android app for Amazon Web Services by Cloudconcur Ltd. It is not affiliated with Amazon Web Services.
