简体   繁体   中英

How to Access RDS Proxy from a Different AWS Region?

I have a RDS database and a RDS proxy in one region.

However, I also have a lambda function in a different region that need to connect to the RDS proxy in the first region.

I know that the RDS proxy can't be publicly accessible and need to be within the same VPC as the instance trying to connect to it.

Is there a way to allow a lambda function to connect to a RDS proxy in a different region?

I know that an RDS DB can be publicly accessible, however I was getting sql timeout errors in my lambda functions, which is why I chose to use a RDS proxy.

I know that the RDS proxy can't be publicly accessible and need to be within the same VPC as the instance trying to connect to it .

I think the part in bold is partially incorrect. The RDS proxy has to be in the same VPC as the RDS database. As far as I can tell, the instance trying to connect doesn't need to be in the same VPC, I think it could also be in a peered VPC.

To answer your question, I would suggest placing the Lambda function in a VPC in the other region, and create a VPC peering connection between the two VPCs.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM