I've been trying to resolve the issue for the past 3 hours now. I have an ec2 instance that is running a tomcat application. I launched it from the eclipse using "Deploy to Elastic Beanstalk option" from aws plugin.
And I have a postgreSQL RDS instance. I am able to connect to the database from the localhost but my ec2 instance can't connect. I've fixed my inbound rules in rds security group to allow all kinds of traffic in. Still no luck. Please help!
Here's the screen from my rds security group on aws console
EDIT: