I use pg://user:pass@localhost:port/table
for connecting to my AWS database. When I use localhost, the app works fine, but when I try to connect the AWS server
If it helps anyone, I had this problem trying to connect to a postgres db on AWS from an API hosted on Heroku using the pg npm package. I changed by PGHOST environmental variable from https://aws-sondayy-prod.caoqasdfsdftwur.us-east-2.rds.amazonaws.com to aws-sondayy-prod.caoqasdfsdftwur.us-east-2.rds.amazonaws.com (ie removed the https://) and it started working.