How to solve request timeout on aws

I deployed my app on aws api-gate way. My app need to query data for a long time(40s-1min) then draw a figure. but the api-gate way timeout is 29s. So my app is broken.
Is there any way to avoid such a problem? any help will be thanks.