Member-only story

Access an AWS RDS DB in a Private Subnet From MySQL Workbench

You put your database in a private subnet. How do you still “Connect to Database” from MySQL Workbench?

Serverless Guru
Serverless Guru
2 min readApr 19, 2019

--

Photo by Yale Cohen on Unsplash

Follow this procedure if you’ve already created an RDS instance in a private subnet and an EC2 instance in a public subnet:

  1. In MySQLWorkbench, click Connect to Database in the Database menu.
  2. As the Connection Method, select Standard TCP/IP over SSH.
  3. As the SSH Hostname, type the IPv4 Public IP of your EC2 instance.
  4. As the SSH Username, enter ec2-user.
  5. As the SSH Key File, type the path to your EC2’s private key file.
  6. The MySQL Hostname is the Endpoint of your database instance.
  7. The Server Port is typically 3306. It shows as Port in your DB instance.
  8. Enter your database’s Username.
  9. Click Store in Keychain… to enter your database’s password.
  10. OK.
Made-up database names.

That’s it! If your RDS database isn’t in a private subnet yet, it’s time to ask…

--

--

Serverless Guru
Serverless Guru

Published in Serverless Guru

Serverless Guru exists to be a change agent and overall guide to companies around the globe whom are moving to serverless at scale. We help companies understand where serverless fits and where it doesn’t. Then we lay a proven roadmap to move them along in their serverless journey

Serverless Guru
Serverless Guru

Written by Serverless Guru

We can help you migrate to serverless, build serverless applications, and train your team on serverless best practices. https://www.serverlessguru.com

Responses (3)