aws-lambda-efs-samples icon indicating copy to clipboard operation
aws-lambda-efs-samples copied to clipboard

Cannot access public internet from Lambda inside VPC

Open weeping-angel opened this issue 2 years ago • 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.

weeping-angel avatar Aug 15 '23 12:08 weeping-angel

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).

jbesw avatar Aug 21 '23 16:08 jbesw