8

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.

3
  • Have you had any luck with solving this? Commented Mar 31, 2020 at 23:26
  • 1
    Not yet. @Alex . We are not in hurry to use RDS proxy right now. But we will need it soon. Commented Apr 11, 2020 at 15:03
  • Enable logging at the proxy. Let us know the results. Commented May 18, 2020 at 13:53

2 Answers 2

2

Since RDS proxy is not available outside the VPC. Configure your lambda function to run inside the VPC. The following link will help:

https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html

Sign up to request clarification or add additional context in comments.

Comments

1

Late answer.. thought these might help others.

  1. You have to keep your lambdas inside the same VPC and subnets to access RDS proxy.

  2. In any case if you want to access third party web api from your lambda, you have make the lambda subnets private (no Internet Gateway in route table) and assign a NAT gateway which is tied with a public subnet.

  3. If you are accessing other AWS services which are out of VPC like S3, Secret Manager etc. then you have to create VPC endpoints for those services in your VPC.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.