How do I connect to my RDS Postgres Instance via DBeaver?

0

After following in the documentation provided by AWS, I am still unable to connect to my instance of a postgres database. I have ensured that a Route exists that targets my internet gateway, and set the instance to public, but I am still presented with "The connection attempt failed." error. What else am I missing?

  • Can you include a link of the AWS documentation that you were following?

3 Answers
0

I believe that the reason is inbound rules set for security group, you will need to add the rule and change the source to you IP address. Open the database security group in AWS; and choose "Edit inbound rules"; "Add rule". There is a "My IP" option in the dropdown menu; select that option to auto-populate with your computer's public IP address in CIDR notation, and don't forget to put the RDS Postgres DB port 5432. as shown here.

AWS
answered a year ago
0

This is addressed in the following documentation pages.

With out the docs, I typically do this:

First If you can connect to postgres from another tool on the same machine then skip network testing and go the "if this is successful" section below and make sure Dbeaver is setup correction.

Second you should troubleshoot the route and make sure the RDS Instance is accessible.

  • In Powershell to run Test-NetConnection [rds_end_point] -port [postgres_port]
  • In Linux/MacOs You can run: (depending on what you have installed.
    • telnet [rds_end_point] [postgres_port] (Note: Typically not installed)
    • nc -zvw3 [rds_end_point] [postgres_port] The POSTGRES_PORT is typically 5432, but you should verify, how you set up your RDS Instance.

If this is successful, then it's a configuration problem in DBeaver.

  • Host should be [rds_end_point]
  • Port should be set to [postgres_port]
  • Database Name should match a database that already exists on the cluster
  • Make sure you have the correct username and password

Most common errors I see:

  • IP Address Range is not listed by the inbound security group.
  • There is no route to your Instance as it's not public and you have setup a VPN to private network.
profile picture
answered a year ago
0

Hi there,

This sounds like it could be related to security groups, firewall, or a proxy if you're behind one. Try using a /24 if you're using a /32 when setting your inbound rules to your RDS instance. The IP address of RDS instances is also dynamic, meaning it changes, so this could have implications if you're behind a firewall or proxy. Also if you're using a new user to connect to the database, ensure the user has CONNECT access to the database. Using the Postgres user has this privilege by default.

The setup will be very similar to that of PgAdmin so check these steps:

These guides are also great for troubleshooting common issues and setup:

I hope that helps :)

profile pictureAWS
SUPPORT ENGINEER
Brandon
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions