简体   繁体   中英

unable to connect to AWS RDS postgres instance from pgadmin4

I have created an AWS RDS postgres instance and i am trying to hit the db using postgres4 dashboard from my local machine but am unable to create a connection and it is throwing an error like

Unable to connect to server:
could not connect to server: Connection timed out (0x0000274C/10060)
Is the server running on host "clienteledev2.XXX.ap-south-1.XXX.com" (xx.xx.xx.xx) and accepting
TCP/IP connections on port 5432?

I went through AWS documentation and have already done the necessary settings like: setting public availability

1)setting Public accessibility flag to YES

2)Adding inbound rule in security group in order to open ports for communication ie port 5432 as tcp for postgresSQL

3)even have added rule for incoming traffic from my machine as custom tcp and for source myIP

(see the screenshot) 安全组入站规则

I am using default VPC which is public and on my personal machine i have exempted or allowed pgadmin to connect through firewall.

I have searched enough online and have found some solutions suggested for previous questions like these none of them worked. What is that i am doing wrong?

The easiest way would be to add an INBOUND rule to your DB Security group allowing access from anywhere 0.0.0.0/0 for the DB TCP port (in this scenario, it is 5432 ). This will allow any IP address to access to your publicly accessible DB instance. Please be warned that this brings in its own set of security risks.

To avoid this, commonly used alternative is to connect via a VPN and have the VPN IP address allowed for INBOUND.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM