'Unable to connect to AWS RDS server: could not connect to server: Connection timed out (0x0000274C/10060)

I am trying to connect to AWS RDS database using pgAdmin4, I encounter and error:

Unable to connect to server:
could not connect to server: Connection timed out (0x0000274C/10060)
Is the server running on host "database-1.xxxx.eu-west-2.rds.amazonaws.com" (xx.xxx.xxx.xx) and accepting TCP/IP connections on port 5432?

I have tried to Allow Public Accessibility and InBound Rules from my IP. But I am still getting the error? What seems to be the issue?



Solution 1:[1]

For a quick test, try opening your inbound rule like this. If it works, then you know the issue is your IP address in your inbound rule:

enter image description here

Once you set this- can you connect?

Solution 2:[2]

I was facing the same error but for the MySQL database in rds. What I did was, I went to http://checkip.amazonaws.com/ and checked the IP shown. I copied that IP and created a new security group by adding two rules, one is your standard all traffic rule, and the second is the one with custom IP which you just copied. Then went to rds and changed VPC security grp to both default and the one I just created. Do this and try to connect again. It worked for me

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 smac2020
Solution 2 Yash Vishe