Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NpgSQL Connect RDS AWS

I am learning RDS via Npgsql. I could not find documentation telling me how to connect to AWS RDS PostgreSQL from C#.NET program running on premises. In other words I have a code running on a PC desktop or on-premises app server which wants to access a PostgreSQL database on RDS. I get error "No Such Host is Known" from connection Open request. I use the Endpoint string which I copied from AWS console. Please point me to appropriate documentation or examples. I found some JDBC samples/documentation but it does not help me with C#.NET. Thank you very much.

like image 568
Acid Rider Avatar asked Feb 25 '26 22:02

Acid Rider


1 Answers

Try connecting with PostgreSQL's psql first. You're right about this probably being some sort of network config issue (or just a badly-copied hostname).

like image 116
Shay Rojansky Avatar answered Feb 27 '26 12:02

Shay Rojansky