How can I set the AWS API Gateway timeout higher than 30 seconds?

Kamilski81

I read here that I can set my Lambda function timeout for 15 minutes (https://aws.amazon.com/about-aws/whats-new/2018/10/aws-lambda-supports-functions-that-can-run-up-to-15-minutes/)

However, when I try to set API Gateway inside the Integration Request settings, it does not allow me to set it higher than 29seconds:

Timeout max is 29 seconds

How can I have a function that lasts 15 minutes, but a Gateway that time outs after 30 seconds?

bspeagle

Unfortunately there isn't a way to increase the API Gateway timeout to longer than 29 seconds. This is a limitation of the gateway. The reason you can set the lambda function longer is because this can be plugged into other AWS resources that allow a higher threshold for timeout processing.

Here's some options you could explore to get around this and/or work with the limitation:

  1. Split your function out into smaller functions and chain those together to see if you get a performance increase. Before doing so you could use AWS X-Ray to debug the function and see what part is taking the most time to target what needs to be split out.

  2. Increase the memory used by the function. Higher memory allocation could result in faster execution. I have used this option before and was able to work around timeout limits.

  3. Instead of using API Gateway you could just use AWS SDK to call 'invoke()' which will invoke your lambda function. This will bypass the timeout threshold.

Hopefully one or a mix of those will help out :)

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How can I stop request(timeout) in AFNetworking if I start a request but no response data in 30seconds

From Dev

How can I deny public access to an AWS API gateway?

From Dev

How can I get AWS Cognito login/logout to work properly with AWS API Gateway on Android?

From Dev

How can I get location after 30 seconds in android?

From Dev

How can I use the higher APIs while we set the minimum API to 7

From Dev

How can I use the higher APIs while we set the minimum API to 7

From Dev

How can i increase session timeout (which is 30 minutes by default)

From Dev

In AWS API Gateway - how do i set stage variables for the test-invoke-stage?

From Dev

Catching timeout errors in AWS Api Gateway

From Dev

Catching timeout errors in AWS Api Gateway

From Dev

How can I set a timeout on "return false"?

From Dev

How can I set the interval unit between labels on the x-axis to a value higher than 255 in Microsoft Excel 2013?

From Dev

How can I deny public access to an AWS API gateway while allowing access by only a specific role?

From Dev

How can i reduce Seconds till windows starts have duration of 30 seconds

From Dev

How can I send data to aws lambda via aws gateway?

From Dev

Can I specify HTTP endpoint in a VPC as resource in AWS API Gateway?

From Dev

How to set resolution higher than maximum shown?

From Dev

How do I avoid AWS API Gateway returning a 400 error?

From Dev

How can I see AWS Gateway logs for external calls?

From Dev

How do I set a cookie to expire after 1 minute or 30 seconds in Jquery?

From Dev

Eclipse Mars 2 UI Bug - How can I configure Tomcat to have x seconds of timeout on startup?

From Dev

How can I set a timeout for a zmq request in Node.js?

From Dev

How can I set the job timeout using the Jenkins DSL

From Dev

how can I set a callback for the user session timeout

From Dev

how can I set a timeout to a block in a test (junit)?

From Dev

How can I set the Liquibase database connection timeout and retry count?

From Dev

How can I set connection timeout in Retrofit library for Android?

From Dev

How can I call function every 30 seconds on every devices in the same time?

From Dev

How can I take browser screenshots at a higher resolution than my browser supports?

Related Related

  1. 1

    How can I stop request(timeout) in AFNetworking if I start a request but no response data in 30seconds

  2. 2

    How can I deny public access to an AWS API gateway?

  3. 3

    How can I get AWS Cognito login/logout to work properly with AWS API Gateway on Android?

  4. 4

    How can I get location after 30 seconds in android?

  5. 5

    How can I use the higher APIs while we set the minimum API to 7

  6. 6

    How can I use the higher APIs while we set the minimum API to 7

  7. 7

    How can i increase session timeout (which is 30 minutes by default)

  8. 8

    In AWS API Gateway - how do i set stage variables for the test-invoke-stage?

  9. 9

    Catching timeout errors in AWS Api Gateway

  10. 10

    Catching timeout errors in AWS Api Gateway

  11. 11

    How can I set a timeout on "return false"?

  12. 12

    How can I set the interval unit between labels on the x-axis to a value higher than 255 in Microsoft Excel 2013?

  13. 13

    How can I deny public access to an AWS API gateway while allowing access by only a specific role?

  14. 14

    How can i reduce Seconds till windows starts have duration of 30 seconds

  15. 15

    How can I send data to aws lambda via aws gateway?

  16. 16

    Can I specify HTTP endpoint in a VPC as resource in AWS API Gateway?

  17. 17

    How to set resolution higher than maximum shown?

  18. 18

    How do I avoid AWS API Gateway returning a 400 error?

  19. 19

    How can I see AWS Gateway logs for external calls?

  20. 20

    How do I set a cookie to expire after 1 minute or 30 seconds in Jquery?

  21. 21

    Eclipse Mars 2 UI Bug - How can I configure Tomcat to have x seconds of timeout on startup?

  22. 22

    How can I set a timeout for a zmq request in Node.js?

  23. 23

    How can I set the job timeout using the Jenkins DSL

  24. 24

    how can I set a callback for the user session timeout

  25. 25

    how can I set a timeout to a block in a test (junit)?

  26. 26

    How can I set the Liquibase database connection timeout and retry count?

  27. 27

    How can I set connection timeout in Retrofit library for Android?

  28. 28

    How can I call function every 30 seconds on every devices in the same time?

  29. 29

    How can I take browser screenshots at a higher resolution than my browser supports?

HotTag

Archive