I ran into the same problem and fixed it by following these steps:
1) Go to the EC2 instance and write down the example of your security group "sg-12121212121212"
2) Go to the RDS security group and select the incoming traffic
.3) Change the rule, select all traffic and add a new ebs security group "sg-121212121212"
Hope this will be helpful
source share