Exception:
Unable to connect to server: timeout expired
Resolution:
1. Make sure the Database is Publicly accessible by using the Modify button.
2. In “Connectivity & security” section, click the “VPC security groups”.
3. Select “Inbound rules” tab.
4. Click “Edit Inbound rules” button.
5. Click “Add rule” button.
6. For “Type”, select “PostgreSQL”. For “Source”, select “Anywhere-IPv4”.
7. Click “Save rules” button.