Here, I am having Lambda & EC2 Instance both are under same VPC & Subnet.
Both are having to save security group with the rule to allow inbound connection from same security group for all ports. Lambda is not able to access MongoDB when it is inside VPC.
If I try to take it out from VPC and open port for 0.0.0.0/0 then only it works.
I need the solution for this...