Search code examples
mysqlamazon-web-servicesamazon-ec2rdsvpc

Accessing AWS RDS From Outside the VPC with no public access


I have a MySQL database on Amazon RDS. When I created this database I unselected the "public access" option which can not be changed after creating the database. This means that my database instance can only be accessed from inside the VPC.

So now I would like to access the database in my local computer with setting the MySQL host with a EC2 VPS I have inside the network with access to the database. I want this server to act as my MySQL server so I can access it locally.


Solution

  • I just had to do this same thing. The process is to set up an SSH tunnel through the EC2 instance to the database. I wrote a post about the whole process that should be helpful