Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save martintsch/26601e90246a02ee0a7c62ab609712d6 to your computer and use it in GitHub Desktop.
Save martintsch/26601e90246a02ee0a7c62ab609712d6 to your computer and use it in GitHub Desktop.

Revisions

  1. @glarrain glarrain revised this gist Jun 9, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion connect-heroku-app-to-postgres-rds-with-ssl.md
    Original file line number Diff line number Diff line change
    @@ -12,7 +12,7 @@ wget -O config/rds-combined-ca-bundle.pem https://s3.amazonaws.com/rds-downloads
    'postgres://user:password@host/db_name?sslmode=verify-full&sslrootcert=config/rds-combined-ca-bundle.pem'
    ```

    *do not forget to surround with quotes*
    **do not forget to surround with quotes**

    References:

  2. @glarrain glarrain revised this gist Jun 9, 2016. 1 changed file with 4 additions and 2 deletions.
    6 changes: 4 additions & 2 deletions connect-heroku-app-to-postgres-rds-with-ssl.md
    Original file line number Diff line number Diff line change
    @@ -6,12 +6,14 @@ wget -O config/rds-combined-ca-bundle.pem https://s3.amazonaws.com/rds-downloads

    2 - Add `config/rds-combined-ca-bundle.pem` to the repository and redeploy to Heroku.

    3 - Append the following to the `DATABASE_URL` env var:
    3 - Update the `DATABASE_URL` env var:

    ```
    ?sslmode=verify-full&sslrootcert=config/rds-combined-ca-bundle.pem
    'postgres://user:password@host/db_name?sslmode=verify-full&sslrootcert=config/rds-combined-ca-bundle.pem'
    ```

    *do not forget to surround with quotes*

    References:

    - http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.SSL.html
  3. @glarrain glarrain revised this gist Jun 9, 2016. 1 changed file with 11 additions and 4 deletions.
    15 changes: 11 additions & 4 deletions connect-heroku-app-to-postgres-rds-with-ssl.md
    Original file line number Diff line number Diff line change
    @@ -1,9 +1,16 @@
    1 - Download the certificate with:
    `wget -O config/rds-combined-ca-bundle.pem https://s3.amazonaws.com/rds-downloads/rds-combined-ca-bundle.pem`
    1 - Download the RDS certificates (root plus region-specific intermediate ones) bundle:

    2 - Add the certificate file to the repository and redeploy to Heroku.
    ```sh
    wget -O config/rds-combined-ca-bundle.pem https://s3.amazonaws.com/rds-downloads/rds-combined-ca-bundle.pem
    ```

    3 - Update the `DATABASE_URL` env var by appending `?sslmode=verify-full&sslrootcert=config/rds-combined-ca-bundle.pem`
    2 - Add `config/rds-combined-ca-bundle.pem` to the repository and redeploy to Heroku.

    3 - Append the following to the `DATABASE_URL` env var:

    ```
    ?sslmode=verify-full&sslrootcert=config/rds-combined-ca-bundle.pem
    ```

    References:

  4. @glarrain glarrain revised this gist Jun 9, 2016. 1 changed file with 3 additions and 4 deletions.
    7 changes: 3 additions & 4 deletions connect-heroku-app-to-postgres-rds-with-ssl.md
    Original file line number Diff line number Diff line change
    @@ -6,7 +6,6 @@
    3 - Update the `DATABASE_URL` env var by appending `?sslmode=verify-full&sslrootcert=config/rds-combined-ca-bundle.pem`

    References:
    http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.SSL
    https://github.com/jeremyevans/sequel/issues/897
    http://www.postgresql.org/docs/9.3/static/libpq-connect.html#LIBPQ-CONNECT-SSLROOTCERT
    http://dba.stackexchange.com/questions/77811/how-to-connect-to-an-amazon-postgresql-database-using-ssl

    - http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.SSL.html
    - https://www.postgresql.org/docs/9.5/static/libpq-ssl.html#LIBPQ-SSL-PROTECTION
  5. @glarrain glarrain renamed this gist Jun 9, 2016. 1 changed file with 6 additions and 4 deletions.
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,9 @@
    Download the certificate with:
    `wget -O config/rds-combined-ca-bundle.pem http://s3.amazonaws.com/rds-downloads/rds-combined-ca-bundle.pem`
    Then connect with:
    `postgres://user:password@amazon-host/db_name?sslmode=require&sslrootcert=config/rds-combined-ca-bundle.pem`
    1 - Download the certificate with:
    `wget -O config/rds-combined-ca-bundle.pem https://s3.amazonaws.com/rds-downloads/rds-combined-ca-bundle.pem`

    2 - Add the certificate file to the repository and redeploy to Heroku.

    3 - Update the `DATABASE_URL` env var by appending `?sslmode=verify-full&sslrootcert=config/rds-combined-ca-bundle.pem`

    References:
    http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.SSL
  6. @jonyt jonyt revised this gist Mar 9, 2015. 1 changed file with 7 additions and 1 deletion.
    8 changes: 7 additions & 1 deletion connect_heroku_to_amazon_rds
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,10 @@
    Download the certificate with:
    `wget -O config/rds-combined-ca-bundle.pem http://s3.amazonaws.com/rds-downloads/rds-combined-ca-bundle.pem`
    Then connect with:
    `postgres://user:password@amazon-host/db_name?sslmode=require&sslrootcert=config/rds-combined-ca-bundle.pem`
    `postgres://user:password@amazon-host/db_name?sslmode=require&sslrootcert=config/rds-combined-ca-bundle.pem`

    References:
    http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.SSL
    https://github.com/jeremyevans/sequel/issues/897
    http://www.postgresql.org/docs/9.3/static/libpq-connect.html#LIBPQ-CONNECT-SSLROOTCERT
    http://dba.stackexchange.com/questions/77811/how-to-connect-to-an-amazon-postgresql-database-using-ssl
  7. @jonyt jonyt created this gist Mar 9, 2015.
    4 changes: 4 additions & 0 deletions connect_heroku_to_amazon_rds
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,4 @@
    Download the certificate with:
    `wget -O config/rds-combined-ca-bundle.pem http://s3.amazonaws.com/rds-downloads/rds-combined-ca-bundle.pem`
    Then connect with:
    `postgres://user:password@amazon-host/db_name?sslmode=require&sslrootcert=config/rds-combined-ca-bundle.pem`