aws-samples/aws-lambda-efs-samples

Cannot access public internet from Lambda inside VPC

weeping-angel opened this issue · 1 comments

Hey everyone,

I was trying to implement this solution for my personal project and there was some issue where I got stuck.

To mount EFS, lambda and EFS should be within the same VPC. Unfortunately, I cannot access the internet when my lambda function is inside that VPC. Can you please provide a template where I can access the public internet from my lambda function, which also uses the EFS on VPC?

I really appreciate any help you can provide.

jbesw commented

Hello, I'd recommend looking at templates that incorporate a NAT Gateway into your VPC, which is required for the Lambda function to reach the internet (for example: https://github.com/widdix/aws-cf-templates/blob/master/vpc/vpc-nat-gateway.yaml).