0

I have created a CloudFormation template and deployed it successfully. I have two EC2 Instances in SAME VPC, SAME SUBNET but different security group. One of the EC2 instance is MongoDB server installed on it, other one have the node server running. I am able to access both instances without any issue, problem happens when I try to connect to MongoDB from Node Server. It doesn't work. I have drilled down the issue that both the servers are not able to connect to each other. Below are my security group for

I have already visited below threads in this regards but it did not help.

EC2 instance can't connect to RDS, from same VPC/Subnet

CloudFormation - Security Group VPC issue

Jeet
  • 5,569
  • 8
  • 43
  • 75

1 Answers1

3

You aren't allowing outgoing traffic from your application server over port 12077. I would really recommend deleting all the SecurityGroupEgress rules and allowing the default of all egress allowed.

Mark B
  • 183,023
  • 24
  • 297
  • 295
  • I did add a rule manually into the Security group to allow all TCP traffic in inbound and outbound on both DB and Application Server, however still did not work. – Jeet Mar 30 '18 at 19:14
  • I think you should also use the SecurityGroup instead of CIDR blocks – jbuiss0n May 03 '18 at 10:00