0
votes

I am new to RDS Instances and Security, I am wondering how I can setup SSL to connect to my MySQL RDS Instance so i can do the following

  1. connect to my RDS through SequelPro Application
  2. connect via PHP (my framework is laravel)

I looked everywhere and AWS only gives me a rds-combined-ca-bundle.pem key and a rds-ca-2015-{regional-key} i don't even know what to do with these. RDS Bundle and MySQL Specific Link

SSL requires a key file, a certificate file and a CA certificate file.

Any help would be great. Thank you

2

2 Answers

2
votes

The documentation you link to directly specifies how to connect to an RDS instance via SSH:

http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_MySQL.html#MySQL.Concepts.SSLSupport

mysql -h myinstance.c9akciq32.rds-us-east-1.amazonaws.com \
  --ssl-ca=[full path]rds-combined-ca-bundle.pem --ssl-verify-server-cert

So the questions now are:

How to get SequelPro to connect via SSH:

According to the SequelPro documentation, it only can connect via SSH using an SSH tunnel.

So you'll need to connect via SSH from your local computer to an EC2 instance in your VPC. Getting this setup has nothing to do with your RDS instance. Once that connection is established, you would use this tunnel to make a non-SSH connection to your RDS instance.

See: https://sequelpro.com/docs/get-started/get-connected/remote

Connect to RDS from your PHP app:

Similarly, it looks like PHP does not have built-in SSH support for MySQL connections.

There are many QA on Stack Overflow on this topic:

Conclusion

In both accounts, it looks like SSH tunnels is the only way to go. So you either:

  • live with the tunnels,
  • use standard connection (non-encrypted), or
  • use other tools/mechanisms to connect that do support SSH.
0
votes

You can not access the underlying server via SSH on the RDS product. If you absolutely have to have access you will need to install the database on an EC2 instance and forgo the benefits of using RDS

See https://forums.aws.amazon.com/message.jspa?messageID=153017