akilesh raj
akilesh raj

Reputation: 674

Getting an error trying to connect to Amazon RDS with Postgresql

I am new to AWS and Postgresql. I am trying to connect a AWS RDS db in which I have setup a PostGresql database.

psql -h <name_of_my_instance>.ctmkmqls5kgp.ap-southeast-1.rds.amazonaws.com:5432
psql: could not translate host name <name_of_my_instance>.ctmkmqls5kgp.ap-southeast-1.rds.amazonaws.com:5432 to address: nodename nor servname provided, or not known

I have edited the command and the error message that I got. would be replaced by the actual name of my instance.

Can someone please help me with this error.

Thank you.

Upvotes: 0

Views: 5523

Answers (1)

chalitha geekiyanage
chalitha geekiyanage

Reputation: 6872

Use -p option to specify your port number. -h option is only to specify your host.

Try this way :

psql -p 5432 -h <name_of_my_instance>.ctmkmqls5kgp.ap-southeast-1.rds.amazonaws.com -U <your user name>

Upvotes: 5

Related Questions