Posted over 10 years ago. Visible to the public.

Use SSL for Amazon RDS / MySQL (and your Rails app)

In case you have sensitive data within your RDS instance, you want to use encrypted connections between your application and RDS instances. If you're using MySQL on RDS, here's what to do:

  1. Download the AWS CA file and copy it to the machine you want to connect from:
    As far as I could find out, you (currently) cannot access further details of the SSL configuration (such as public key).

  2. Try to connect using MySQL client

    % mysql -uyour_username -p -h --ssl --ssl-ca=/path/to/mysql-ssl-ca-cert.pem

  3. Use this statement to check whether a secure connection is used:

    SHOW STATUS LIKE '%ssl_ciph%';

    It should return something like this

    | Variable_name | Value |
    | Ssl_cipher | AES256-SHA |

  4. To make your Rails application use SSL, modify config/database.yml and add this:

    sslca: /path/to/mysql-ssl-ca-cert.pem

  5. Ensure only encrypted connections are accepted on server-side. Therefore, run

    GRANT USAGE ON *.* TO 'encrypted_user'@'%' REQUIRE SSL

Flaky tests are tests that sometimes fail for no obvious reason. They are the plague of many end-to-end (E2E) test suites that automate the browser through tools like Capybara and Selenium.

Join our free training event and learn to fix any flaky test suite, even in large legacy applications.

Owner of this card:

Thomas Eisenbarth
Last edit:
over 9 years ago
Rails, Amazon, AWS, RDS, SSL
About this deck:
We are makandra and do test-driven, agile Ruby on Rails software development.
License for source code
Posted by Thomas Eisenbarth to makandra dev
This website uses short-lived cookies to improve usability.
Accept or learn more