3
votes

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
are they in the same VPC? can you show subnet and route table information?RaGe
@RaGe I'm pretty sure they are. I've added the pictures to the questionsamatovS
What about EC2's security group? Probably you have restrictions on that side.Nick
are you using the public IP to connect from local? Does your EC2 have access to an internet gateway to get to a public IP?RaGe
@RaGe could you please elaborate on that? what is an internet gateway? And I'm just using my laptop from local. The thing is I am able to connect from ANYWHERE else but the ec2 instance.samatovS

2 Answers

0
votes

Try to set a rule to specific port to your security group:
Type: Custom TCP Rule
Protocol: TCP
Port Range: 5432
Source: 0.0.0.0/0

enter image description here

0
votes

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'