5

I am trying to connect AWS RDS PostgreSql from PgAdmin 3. I followed the below link http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ConnectToPostgreSQLInstance.html

In Security Group, I also added PostgreSQL and All traffic as below enter image description here

The "publicly accessible" flag was enabled (updated after Mark B's comment)

enter image description here

I got the error from PGAdmin3 enter image description here

Very appreciate for any suggestion

******UPDATE*******

I can connect pgAdminIII to AWS RDS successfully using home wifi, but cannot connect using office wifi.

My concern is:

Was the port 5432 blocked by office wifi?

How can I configure/update the port without impacting to current API? Note: My current API is working well (CRUD)

franco phong
  • 2,219
  • 3
  • 26
  • 43
  • 2
    Did you enable the "publicly accessible" flag on the RDS instance? – Mark B Feb 22 '17 at 16:33
  • Hi Mark, I checked my RDS instance, the "publicly accessible" flag was enabled – franco phong Feb 22 '17 at 22:14
  • If you can connect from home, and you didn't require any changes to inbound rules in your VPC, it's almost certainly your office connection. You might need to speak to whoever manages your network to enable you to connect on port 5432 (or whichever port your RDS instance runs on) via TCP. – Blair Nov 30 '17 at 00:13

4 Answers4

4

Can you can test your connection to a DB instance using common Linux or Windows tools first?

From a Linux or Unix terminal, you can test the connection by typing the following (replace with the endpoint and with the port of your DB instance):

$nc -zv DB-instance-endpoint port

For example, the following shows a sample command and the return value:

$nc -zv postgresql1.c6c8mn7tsdgv0.us-west-2.rds.amazonaws.com 8299

Connection to postgresql1.c6c8mn7tsdgv0.us-west-2.rds.amazonaws.com 8299 port [tcp/vvr-data] succeeded!

Windows users can use Telnet to test the connection to a DB instance. Note that Telnet actions are not supported other than for testing the connection. If a connection is successful, the action returns no message. If a connection is not successful, you receive an error message such as the following:

C:>telnet sg-postgresql1.c6c8mntzhgv0.us-west-2.rds.amazonaws.com 8299

Connecting To sg-postgresql1.c6c8mntzhgv0.us-west-2.rds.amazonaws.com...Could not open connection to the host, on port 819: Connect failed

If Telnet actions return success, then you are good to go.

Murtuza Z
  • 5,639
  • 1
  • 28
  • 52
  • Do we need to specify 8299 port only ? What does that it mean? I am also facing issue while connecting to remote AWS RDS server. When I am trying to connect it, SSH error - Authentication identity file failed with error code 18 – Mansi Shah Jul 15 '17 at 11:46
  • Neither 'nc' nor 'telnet' are commands recognized on my Windows 10. – MSC Aug 17 '18 at 03:15
2

You will also need to set Public accessibility true under Connect & security tab in RDS console.

Half_Duplex
  • 5,102
  • 5
  • 42
  • 58
1

If you are trying to access it from a network which is not listed for that port. you need to add inbound rules for those network IPs from AMAZON RDS system

0

Read this post.In your security group go to unbound rules and add my ip. and make sure your database is public. https://serverfault.com/questions/656079/unable-to-connect-to-public-postgresql-rds-instance