Whitelisting database IP on AWS

Whitelist your database IP on AWS

To connect the database to your virtual machine, whitelist the database IP address with the following steps:

1. Log in to the AWS console

2. Navigate to the RDS Console

3. Choose RDS database from the list of instances

Click to expand

4. Select the security group linked to your RDS(Make sure RDS instance is publically accessible)

Click to expand

5. Click on “Inbound” at the bottom and then click “Edit”

Click to expand

6. Select the port to whitelist. If you are using the default MySQL port then selecting the “MYSQL/Aurora” option works

Click to expand

7. Set Source to Custom and enter the database IP address

8. Click Save

Your database should now be accessible from your EC2 instance. Read more about security group rules.