0

I created a basic test PostgreSQL RDS instance in a VPC. It is public and VPC security group. The security group whose configuration is as follows: Inbound Rule: Type: PostgreSQL Protocol: TCP Port:5432 Source: 0.0.0.0/0 Outbound: Type: All Protocol: All Port: All Destination: 0.0.0.0/0

When I try to connect, it fails. Here's the error code that I get: could not connect to server: Connection timed out Is the server running on host () and accepting TCP/IP connections on port 5432?

I m doing this for the first time so please help me out. Any help will be appreciated.

hakimi
  • 1
  • 1
  • 1
  • What’s the IP or endpoint DNS name? Exactly as is please, not redacted. – MLu Aug 10 '19 at 09:31
  • I think including screen shots of the RDS instance, security group setup, and a ping of an EC2 instance in the same subnet would be valuable for diagnosis. That would show, for example, that you have an internet gateway attached to the VPN and a routing table set up to route to the internet. – Tim Aug 10 '19 at 18:24

1 Answers1

0

I'm a bit late, but for those looking on in the future:

I encountered this error and looked up every possible solution: VPC connection, security groups, changing my pg_hba.conf and postgresql.conf files, making sure my program was publicly accessible, etc.

My problem was that I was using Python 3.7 as my runtime on AWS lambda, and Pyton 3.8 uploaded into S3 bucket dependencies! It took me way too long to figure this out. Live and learn, I guess!

Serene
  • 1