Exception:
Unable to connect to server: timeout expired
![](https://www.infallibletechie.com/wp-content/uploads/2023/03/Amazon-RDS-PostgreSQL-Timeout-Expired-Exception.png)
Resolution:
1. Make sure the Database is Publicly accessible by using the Modify button.
![](https://www.infallibletechie.com/wp-content/uploads/2023/03/Publicly-accessible-PostgreSQL-Amazon-RDS-Database-1.jpg)
2. In “Connectivity & security” section, click the “VPC security groups”.
![](https://www.infallibletechie.com/wp-content/uploads/2023/03/VPC-Security-Groups-Amazon-RDS.png)
3. Select “Inbound rules” tab.
4. Click “Edit Inbound rules” button.
![](https://www.infallibletechie.com/wp-content/uploads/2023/03/Edit-Inbound-Rules-Amazon-RDS-1024x184.png)
5. Click “Add rule” button.
6. For “Type”, select “PostgreSQL”. For “Source”, select “Anywhere-IPv4”.
![](https://www.infallibletechie.com/wp-content/uploads/2023/03/New-Inbound-Rule-for-Postgre-Amazon-RDS.png)
7. Click “Save rules” button.