Home > Blockchain >  Access Amazon RDS database in VPC from Lambda locally
Access Amazon RDS database in VPC from Lambda locally

Time:12-25

Is there any way we can access an Amazon RDS database inside VPC from Lambda locally (now in AWS console)?

I am trying to run lambda locally but having an issue while accessing RDS because of VPC.

CodePudding user response:

Your database is not accessible from the Internet. This is excellent for security, but it means you cannot connect directly to the database.

You have a couple of options...

You could create a VPN Connection into the VPC and then connect to the database.

Or, you could SSH into a 'Jump Box' (or 'Bastion Server') while using Port Forwarding. See: StackOverflow: How EC2 allow SSH tunelling to access RDS in private subnet?

  • Related