Can't Connect to PostgreSQL RDS from EC2 But works fine from localhost

Viewed 1655

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 enter image description here

EDIT:

Here's my vpc and subnet info on ec2 instance: enter image description here

And on my rds instance: enter image description here

My security group inbound rules on ec2: enter image description here

2 Answers

When you create RDS with Security Group, The Security gruop inbound rule is only you local IP.

So, you should update 'rds-launch-wizard-4'

Related