Tried connecting an Amazon RDS database to an EC2 instasnce. Both are in new VPC getting this error:
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
I have 1 public subnet for EC2 and 2 private subnets for database, created subnet group and security groups.
RDS security group tried with below inbound rules:
option: 1
PostgreSQL TCP 5432 0.0.0.0/0 Traffic from EC2
All traffic All All sg-0706b9fb2d2c2dbce / public-sc-eks-demo Public Subnet SC
option: 2
PostgreSQL TCP 5432 <ec2 ip address> Traffic from EC2
All traffic All All sg-0706b9fb2d2c2dbce / public-sc-eks-demo Public Subnet SC
Do we need outbound rules for EC2 security group?
Is the server running locally
? How are you connecting to the database? What connection details are you using? – John Rotenstein