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.