Home:ALL Converter>AWS Lambda Function Timeout on Connecting To RDS Database through RDS Proxy

AWS Lambda Function Timeout on Connecting To RDS Database through RDS Proxy

Ask Time:2020-01-13T16:29:35         Author:danish

Json Formatter

I'm trying to test AWS RDS proxy so I created a lambda function and done all steps that are present in this official link

https://aws.amazon.com/blogs/compute/using-amazon-rds-proxy-with-aws-lambda

  • store RDS credentials in Secret Manager
  • create new role and also add Trust Policy
  • in lambda function, from the AWS console, add proxy and its status is available.

When I execute the lambda function, it times out with no errors it seems like the error might be on connecting to db with rds proxy because when I run the lambda function again without proxy, it works just fine.

I initially thought that it might be a security group issue, so I edit the security group of RDS Proxy and update inbound and allow 0.0.0.0 (outbound was already 0.0.0.0).

I used defaut VPC in RDS Database and RDS Proxy. The endpoint of RDS database is public.

Author:danish,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/59712904/aws-lambda-function-timeout-on-connecting-to-rds-database-through-rds-proxy
Humayl :

Since RDS proxy is not available outside the VPC. Configure your lambda function to run inside the VPC. The following link will help:\nhttps://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html",
2022-01-15T05:04:49
yy