简体   繁体   中英

Connecting to Private AWS RDS Postgres using Java driver

Wondering the best approach to trying to connect to a Private AWS RDS Postgres instance. For me to connect with pgAdmin Ihad to create an SSH tunnel to the DB. I would like to be able to connect to this DB instance via a Java app from my local box and from our EC2 instances. I think the EC2 instance side won't be hard since they are in the same VPC and I think the security groups can talk, but how do you go about doing a SSH tunnel for the Java drivers?

Or perhaps I am looking at this all incorrectly? BTW this is NOT a Spring application.

Tried to connect directly to the server with pgAdmin. That failed, even with my IP added to it's security group. This is because for security reasons (no public API to the DB server) it is a Private server.

Will just create an API to update the DB when in DEV mode. Kind of an overkill but will keep things secure.

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