AWS RDS Database - How to connect
Last updated
Last updated
To connect DI to an existing or new Amazon RDS Database, you will have to take several steps.
Make sure your Database's "Public accessibility" is set to "Yes" (Click on your RDS Instance -> On the main page, under the "Connectivity& security" tab)
Whitelisting our static IP
Click on your VPC security group (as visible above) and click "Edit inbound rules" under the "Actions" dropdown in the top-right corner:
Click "Add rule"
As Type, select "PostgreSQL", enter the port of your DB-Instance (for PostgreSQL usually 5432), and add our static IP + /32 in the "Source" search. If you don't have our static IP yet, please contact us and we will provide it. The IP should look like this: 00.000.00.00/32
If you want, enter something like "Static IP Locoia" into the description, so you'll be able to find and edit this rule easily.
Click "Save rules".
If you have outgoing rules set up on your VPC, you might need to repeat this process under the "edit outbound rules" option. By default, your VPC should allow all outgoing traffic.
At this point, try connecting to the database in DI. Most likely, you won't have to do anything else.
If you still encounter issues connecting to your DB instance, try checking your VPC settings:
On the same screen as in step 1, under "Networking", click onto the name of your VPC instance:
In the overview, click on the ID of your VPC:
On the next screen, under the "Details" tab, click on the "Main Network ACL":
Just like in step 2, use the "Action" drop-down in the top right corner to check your inbound and outbound rules. By default, they should look like this: The "Allow" rule needs to be located above the "Deny" rule in order to work. If you have stricter rules set up, white-label our IP similar to step 2.
You should now be able to connect to your database instance! In case you are still experiencing issues, try connecting to your database through a different tool (such as pgAdmin) from a whitelisted IP to ensure your database is exposed as intended. If you are unable to connect, please discuss with your sysadmin, as your organization might enforce even stricter rules on RDS. If you are able to connect from a 3rd-party tool, but can't connect from DI, please contact us so we can investigate the issue.