0

In security group(inbound rules) of ec2 instance i have opened mongo port to security group of lambda function EC2 inbound rules screenshot

In lambda function also i have selected vpc,subnets and security group. Lambda vpc configuration screenshot

Also i have configured NAT gateway for vpc. Still i am not able to access mongodb

1 Answer 1

0

You should enter the subnets in your VPC (which is used by your lambda function) to the security group.

e.g.

enter image description here

but in this case, change the 3306 to mongodb port e.g. 27017

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.