# Cannot connect to Postgres database hosted on AWS "no pg\_hba.conf entry"

**URL:** <https://discourse.nodered.org/t/cannot-connect-to-postgres-database-hosted-on-aws-no-pg-hba-conf-entry/81342>\
**Category:** General\
**Created:** [15 September 2023 14:25 UTC](https://discourse.nodered.org/t/cannot-connect-to-postgres-database-hosted-on-aws-no-pg-hba-conf-entry/81342 "2023-09-15T14:25:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pdup](https://avatars.discourse-cdn.com/v4/letter/p/a587f6/32.png) [@pdup](https://discourse.nodered.org/u/pdup)\
**Post date:** [15 September 2023 14:25 UTC](https://discourse.nodered.org/t/cannot-connect-to-postgres-database-hosted-on-aws-no-pg-hba-conf-entry/81342/1 "2023-09-15T14:25:46Z")

</div>

Hi everyone!

**Some context:**  
I am running Node Red v.2.0.6 on a Siemens IoT2050, and using Putty to SSH in.  
I have a Postgres database hosted on AWS that I want to send queries to.  
I have connected this database to Tecnomatix Plant Simulation, accessed it on DBeaver etc. without any problems. My inbound rules on AWS are set to allow all connections (0.0.0.0/0)

**My problem**  
I have tried both node-red-contrib-postgresql and node-red-contrib-re-postgres, and both give the following error when I try to run a query:  
error: no pg\_hba.conf entry for host "_IP Adress_", user "_postgres_", database "_dbname_", no encryption

The problem is I have no access to the pg\_hba.conf file on AWS, and am limited to changing inbound rules (which already allow all connections). I might be missing something very basic but I have no idea how to solve this.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/0/20f6d99731c6f0dc9015d91d770f28c46c58d214.png)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [14 November 2023 14:26 UTC](https://discourse.nodered.org/t/cannot-connect-to-postgres-database-hosted-on-aws-no-pg-hba-conf-entry/81342/2 "2023-11-14T14:26:08Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
