

# Quotas for configuring and running a WebSocket in API Gateway
WebSocket API quotas

The following quotas apply to configuring and running a WebSocket API in Amazon API Gateway. If the quota is per-API, it can only be increased on specific APIs, not for all the APIs in an account. For information about account-level quotas see [Amazon API Gateway quotas](limits.md)


| Resource or operation | Default quota | Can be increased | 
| --- | --- | --- | 
| New connections per second per account (across all WebSocket APIs) per Region | 500 | [Yes](https://console.amazonaws.cn/servicequotas/home/services/apigateway/quotas/L-9ED1E49A) | 
| Concurrent connections | Not applicable \$1 | Not applicable | 
| Amazon Lambda authorizers per API | 10 |  Yes To increase this quota, contact the [Amazon Support Center](https://console.amazonaws.cn/support/home#/)  | 
| Amazon Lambda authorizer result size | 8 KB | No | 
| Routes per API | 300 | [Yes](https://console.amazonaws.cn/servicequotas/home/services/apigateway/quotas/L-01C8A9E0) | 
| Integrations per API | 300 |  Yes To increase this quota, contact the [Amazon Support Center](https://console.amazonaws.cn/support/home#/)  | 
| Integration timeout | 50 milliseconds - 29 seconds for all integration types, including Lambda, Lambda proxy, HTTP, HTTP proxy, and Amazon integrations. | No | 
| Stages per API | 10 | [Yes](https://console.amazonaws.cn/servicequotas/home/services/apigateway/quotas/L-379E48B0) | 
| WebSocket frame size | 32 KB | No | 
| Message payload size | 128 KB \$1\$1 | No | 
| Maximum mapping template size | 300 KB | No | 
| Connection duration for WebSocket API | 2 hours | No | 
| Idle Connection Timeout | 10 minutes | No | 
| Length, in characters, of the URL for a WebSocket API | 4096 | No | 
| Access log template size | 3 KB | No | 

\$1 API Gateway doesn't enforce a quota on concurrent connections. The maximum number of concurrent connections is determined by the rate of new connections per second and maximum connection duration of two hours. For example, with the default quota of 500 new connections per second, if clients connect at the maximum rate over two hours, API Gateway can serve up to 3,600,000 concurrent connections.

\$1\$1 Because of the WebSocket frame-size quota of 32 KB, a message larger than 32 KB must be split into multiple frames, each 32 KB or smaller. This applies to `@connections` commands. If a larger message (or larger frame size) is received, the connection is closed with code 1009.