You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have deployed a lambda that performs image manipulation, which can take a while sometimes. Longer than 30 seconds is a normal, expected time (for some photos)
At first, the timeout was showing in the zappa tail logs, but now, after setting the timeout_seconds option to 120, it seems as though the Amazon Cloudfront/Amazon Gateway is still enforcing a 30-second limit. I have dug around on AWS, and it seems I can only change this from a Cloudfront console. I don't believe there is an Cloudfront Distribution for this Lambda.
I am running on python 3.6
Expected Behavior
I would think that if I set the timeout_seconds to 120 in the Zappa settings, zappa would apply that setting to not only the lambda, but also whichever gates stand in front of it. (Gateway OR CloudFront Dist)
Actual Behavior
I get 504's when I don't choose to have the lambda downsample the image. (When it's normal for it to take long)
Possible Fix
Is there a way to apply the timeout_seconds to more than just the Lambda itself?
AWS API Gateway has a hard 30 second integration timeout that cannot be changed, and is most likely what you are running into. This is to say that API gateway will only wait for a maximum of 30 seconds for the lambda to respond, otherwise it will give up and respond with a 504 even if the lambda is still running due to you setting a higher timeout value in zappa.
Thanks for the response @ryancausey. I tried a lot of things like changing the limit, or having one lambda triggered by an API call trigger a SECOND lambda (which shouldn't have the 30 gateway constraint), and more stuff. But eventually, I just left AWS & went to Heroku since it is made simpler there.
I have deployed a lambda that performs image manipulation, which can take a while sometimes. Longer than 30 seconds is a normal, expected time (for some photos)
At first, the timeout was showing in the
zappa tail
logs, but now, after setting thetimeout_seconds
option to 120, it seems as though the Amazon Cloudfront/Amazon Gateway is still enforcing a 30-second limit. I have dug around on AWS, and it seems I can only change this from a Cloudfront console. I don't believe there is an Cloudfront Distribution for this Lambda.I am running on python 3.6
Expected Behavior
I would think that if I set the
timeout_seconds
to 120 in the Zappa settings, zappa would apply that setting to not only the lambda, but also whichever gates stand in front of it. (Gateway OR CloudFront Dist)Actual Behavior
I get 504's when I don't choose to have the lambda downsample the image. (When it's normal for it to take long)
Possible Fix
Is there a way to apply the
timeout_seconds
to more than just the Lambda itself?Steps to Reproduce
downSample
option.Your Environment
pip freeze
:zappa_settings.json
:The text was updated successfully, but these errors were encountered: