In AWS, created 2 accounts A and B.

  • A: EC2 instance -> Installed a postgres client
  • B: RDS postgres cluster

These 2 accounts were set transit gateway from each VPC. So they should be connect each other.

But from A's EC2, in the instance, use psql

psql -h [Acount B's DB instance endpoint] -U postgres

Got connect error:

psql: error: could not connect to server: Connection timed out
        Is the server running on host "xxx.yyy.rds.amazonaws.com" ( and accepting
        TCP/IP connections on port 5432?

From B's RDS subnet, already allowed A's instance IP.

How to debug the connection from A to B? If there is a way to find RDS endpoint's IP, maybe a little helpful. Since there isn't many methods to test except by client tool.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.