How to handle API Gateway timeout?

Hello everyone,

I am currently working on an application doing heavy data jobs and I am facing an issue using API Gateway routes.
For example, I have a Lambda running an Athena query and then calling an API for each row before sending the result. The execution time is approximately 1 minute. But API Gateway maximum timeout is 30 seconds. Is there a way to call the lambda directly from the front-end (React) and if so, is there any drawbacks doing this?

The application will not be public and is intended only to be used inside my company for demonstration purposes.

Thank you for your help !

In my experience API gateway has a 10s time out on waiting for the lambda function to start (ie. For the container to load). Once the function has started it can run for much longer than 10s and still respond Ok.

If you use Java for your lambda function the you’re screwed. Container 9Apps Showbox Tutuapp starts for Java are often 40+ seconds, but using Node JS you’re usually Ok.