こんなエラーです。
psql: could not connect to server: Operation timed out
        Is the server running on host "host" (x.x.x.x) and accepting
        TCP/IP connections on port 5432?セキュリティグループの Inbound に Postgresql で使っているポートが許可されているか
psqlで接続するとき、デフォルトで5432ポートが使われます。以下の場所からそれが許可されているか確認します。
もし、5432に関する設定がなければ以下のように追加します。
接続できれば完了です。

