Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Amazon API gateway timeout

I have some issue with API gateway. I made a few API methods, sometimes they work longer than 10 seconds and Amazon returns 504 error. Here is screenshot below:

enter image description here

Please help! How can I increase timeout?

Thanks!

like image 910
Игорь Кирей Avatar asked Aug 12 '15 19:08

Игорь Кирей


People also ask

Does AWS API gateway have a timeout?

You can set a timeout value starting at 50 milliseconds up to 29 seconds.


3 Answers

Right now the default limit for Lambda invocation or HTTP integration is 30s according to http://docs.aws.amazon.com/apigateway/latest/developerguide/limits.html and this limit is not configurable.

like image 118
Ran Avatar answered Oct 18 '22 13:10

Ran


As of Dec/2017, the maximum value is still 29 seconds, but should be able to customize the timeout value.

https://aws.amazon.com/about-aws/whats-new/2017/11/customize-integration-timeouts-in-amazon-api-gateway/

This can be set in "Integration Request" of each method in APIGateway.

like image 24
myouji Avatar answered Oct 18 '22 15:10

myouji


You can't increase the timeout, at least not now. Your endpoints must complete in 10 seconds or less. You need to work on improving the speed of your endpoints.

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

like image 25
E.J. Brennan Avatar answered Oct 18 '22 15:10

E.J. Brennan