简体   繁体   中英

Unable to connect to AWS Postgres instance from SQL Workbench on my local machine

apologies, I am new to this.

I followed the directions to create a Postgres database from https://aws.amazon.com/getting-started/tutorials/create-connect-postgresql-db/

I double checked the endpoint, jdbc:postgresql://databasename.csnul5z77jon.us-east-1.rds.amazonaws.com:5432/databasename

I am putting in correct password and username in SQL Workbench but I keep getting the message: 'the connection attempt failed'. I reinstalled the jdbc driver and checked is has the required syntax jdbc:postgresql://host:port/name_of_database.

Any idea what else I can try?

This error is likely coming down to one of the following:

  • Your IP address cannot connect to the RDS instance because the security group is not allowing inbound access on 5432 from your public on premise IP address.
  • The RDS instance was configured as internal only but there is no route for your on premise to the RDS instance (this would require either a VPN, Direct Connect or proxy based solution).
  • The route table for your RDS instance is missing an internet gateway which will stop the public IP of the RDS instance being routable.

If you're new and following this article exactly the most likely issue is the security group does not allow inbound access (as its not mentioned at all). Find the security group attached to your RDS instance from the console. Follow these instructions if you need some guidance, allowing port 5432 from your IP address only.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM