franco phong
franco phong

Reputation: 2219

PGAdmin III cannot connect AWS RDS

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)

Upvotes: 5

Views: 12976

Answers (4)

Vishnu Thuletiya
Vishnu Thuletiya

Reputation: 41

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

Upvotes: 0

Half_Duplex
Half_Duplex

Reputation: 5234

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

Upvotes: 2

Vikas Thombre
Vikas Thombre

Reputation: 50

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

Upvotes: 1

Murtuza Z
Murtuza Z

Reputation: 6017

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.

Upvotes: 4

Related Questions