- Newest
- Most votes
- Most comments
Thanks a lot for the help David, after many days I found the issue. Using the third document that you attached (Can't Connect to Amazon RDS DB Instance), I had a look on the Internet Gateway step to check if my subnets have a route with 0.0.0.0/0 as the destination. By default there are 6 subnets in total, 3 default ones and 3 additional ones related to RDS. For some reasone, the ones associated with RDS did not had the public route (0.0.0.0/0) and there was no option to allow me to add this new rule. What I did was to navigate to the Route Tables insinde VPC and from the Actions button I selected Edit subnet associations. There I saw that the RDS private routes were selected and I just deselected them and selected the three public ones instead, and then clicked Save associations. After that I was able to connect right away doing this. A bit frustrating that all the tutorials from Google/YouTube only shows the straight-forward database creation and for some reason they are able to connect right away, but neither of them shows these additional steps and it took me a few days to come here and ask for help. Thanks again and have a nice day!
There could be a few possible causes for why your connection is being blocked.
I would start with checking VPC and Subnet configuration. Make sure that the RDS Instance is in a public subnet if you are trying to access it from the internet and make sure that the subnet is associated to a route table with a route to an internet gateway. Alternatively you could keep it in a private subnet and use a bastion host to connect to the private RDS Instance.
I would check security group rules next. It sounds like have done this already, but it never hurts to check again. The default security group does allow all inbound access for instances within that same security group but only within that security group. No other inbound traffic is allowed by default. If you have not already you can always add a rule:
- Type: PostgreSQL
- Protocol: TCP
- Port Range: 5432
- Source: your IP
Check Network ACLs and ensure that they are not cutting off inbound or outbound traffic to or from the subnet where your RDS lives.
Check Firewall on local machine and ensure outbound traffic on port 5432 is not being blocked.
Verify endpoints, ports, and authentication.
Additional information on these topics can be found below.
Connecting to Amazon RDS PostgreSQL DB Instance
Relevant content
- asked a year ago
- asked 2 years ago