- 最新
- 最多得票
- 最多評論
It seems there is a currently undocumented parameter that defines the timeout.
set aws_lambda.request_timeout_ms
in your parameter group to the appropriate value and give it a try.
Did you have a chance to test this parameter? Did it work for you?
Thank you for following up. There is definitely a bug here since the query should return after around 10 seconds in the original example, but instead ran for 100 seconds. I tried to set this before running the query: set aws_lambda.request_timeout_ms = 600000;
And ran this query again: SELECT payload->>'answer' from aws_lambda.invoke(aws_commons.create_lambda_function_arn('arn:aws:lambda:eu-central-1:xxxxxx:function:ChatGPT', 'eu-central-1'), '{"prompt": ""}'::json)
I got the same result as before (after 103 seconds), but with an additional line:
WARNING: parameter "aws_lambda.request_timeout_ms" cannot be changed now
You need to set it in the Parameter Group that is used by your RDS cluster.
Thank you Uri! I will need to look into this once the bug has been fixed. The bug will get fixed, right?
Currently the only bug is the lack of documentation for these parameters. Please try setting them in your cluster's parameter group and try again.
This may or may not be the cause, however calling lambda functions isn’t supported on 13.10
Invoking an AWS Lambda function is supported in these RDS for PostgreSQL versions:
- All PostgreSQL 15 versions
- PostgreSQL 14.1 and higher minor versions
- PostgreSQL 13.2 and higher minor versions
- PostgreSQL 12.6 and higher minor versions
Thank you so much for looking into this. But 13.10 is regarded as a higher minor version than 13.2. Here is a screenshot of how they are ordered: https://drive.google.com/file/d/13g8jQJlzBtAarmrsFY3jGJ8x8qein5X-/view?usp=drivesdk
Dohh. That always catches me out. Good spot. I assumed 13.2 is 13.20
Hi, you can adjust timeout on Lambda execution up to minutes, which is beyond what you need-
See https://docs.aws.amazon.com/lambda/latest/dg/configuration-function-common.html#configuration-timeout-console on how to adjust it for your use case.
All Lambda quotas are defined here: https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html
Best,
Didier
Thank you for looking into my problem! Setting the timeout on the Lambda is, though not the issue here. As you can see I have already adjusted the timeout enough. There is a problem in the communication between RDS and Lambda.
相關內容
- AWS 官方已更新 2 年前
Definitely not a lambda timeout issue.
Is there any error message? What is it?
Sorry for my slow reply. The error message after 103 seconds is: ERROR: invoke API failed DETAIL: AWS Lambda client returned 'Unable to connect to endpoint'. CONTEXT: SQL function "invoke" statement 1
So no timeout error message. The video in my original post really gives much more context on this.
Also, I am very sure that this is an actual bug. Is there any way to notify the developers of the postgres extension?
Raised an issue with the service team.