I wanted to install pgbouncer in my postgres rds, but I am not able to access the instance, like the same way we access ec2 instances. So is there a way by which I can ssh to the machine (not psql, it's working fine).
Asked
Active
Viewed 3,018 times
2 Answers
7
You cannot access the rds underlying instances directly, that is by design.

E.J. Brennan
- 45,870
- 7
- 88
- 116
-
Oh, so I believe the only way I can achieve is by launching an ec2-instance and install pgbouncer and the in the conf redirect to my RDS instance. – najeeb Feb 26 '16 at 08:21
-
Right, you can run your own db on ec2, but when you use rds you give up some control of what you can and cannot do - thats the tradeoff for having someone else manage it for you. – E.J. Brennan Feb 26 '16 at 08:29
-1
This worked for me. Make sure you have psql client installed locally.
psql --host=myAwsDbEndpointUrl.ciqykqusf0nv.us-west-1.rds.amazonaws.com --port=5432 --username=myUserName --password --dbname=myDbName
When creating your db instance on aws, make sure to define the following:
- username
- password
- database name
- port number
I also had to create a security group for the VPC that the database was located in. After creating it make sure your db instance uses this for its security group. The security group has the following rules:
inbound--> type:PostgreSQL, protocol:TCP port range:5432, source:0.0.0.0/0
outbound--> type:All Traffic, protocol:All, port range:all, destination:0.0.0.0/0

Tim Siwula
- 966
- 11
- 15