-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lambda function timeout overrode to 30 secs by Amplify even when set to longer in the function configuration #2026
Comments
Hey @mblanche, thank you for reaching out. AWS AppSync has a limit of 30 seconds on query execution time. |
What version of @aws-amplify/backend is this functionality is implemented?
Also, could you suggest a strategy/pattern for functions needing to return data to the client?
Thanks
|
@mblanche, this should be in |
Thanks, got The Fire and Forget model seems to have limited applications from a first glance... Jobs taking longer than 30 secs would benefit from a mechanism to poll/monitor progress and completion, I think... My need right now is to recursively poll an FTP server for file paths carrying specific prefixes, build a list of file paths that need to be download then transfer the download requests to Fargate tasks on ECS to copy the file on S3. Surveying the FTP server takes some time (usually less than 30 seconds but depending on latency sometime up to a minute or so...). The files can be pretty massive, ranging from a few Gb close to a fraction of Tb, hence passing the copy request to Fargate. Thanks for any suggestions. Adding more patterns to the docs could prove helpful! |
@mblanche thank you for information. Created a issue on our documentation repository to add examples on this pattern Closing this issue, do reach out if you are experiencing any issues with Amplify Gen 2 backend. |
I'm running into a little annoying glitch... Setting up a lambda function timeout seems to get override by the Amplify deployment. I polling the content of an FTP website and recursive search takes about a minute, I really need to get his through...
Here's a playground example using a lambda function that goes into sleep for a number of seconds define by the front-end, everything successfully return as long as the sleep time is less than 30 seconds, even though the timeout setting on the function is set to 2 minutes...
Any chance this can look at soon?
Thanks team.
BTW: Great work on an excellent package overall!
Environment information
Describe the bug
Lambda function exiting after 30 secs no matter what the
timeoutSeconds
value inresource.ts
is.Expected Behavior
Function return with success after 60 seconds, well below the timeout set in the function
resource.ts
Reproduction steps
amplify/data/test-lambda-timeout/resource.ts
amplify/data/test-lambda-timeout/handler.ts
amplify/data/resource.ts
src/main.ts
Additional info
The function does have a
5*60
second timeout configured:$ aws lambda get-function-configuration \ --function-name amplify-updateducbpdui-ma-testlambdatimeoutlambdaB-WUtOKcPZHgMu \ --query 'Timeout' 300
The text was updated successfully, but these errors were encountered: