Lambda And VPC
- By default AWS Lambda is launched outside VPC. Therfore it cannot access VPC resources
- You must define VPC ID, subnets and security group
- Lambda then will create an ENI (Elastic Network Interface) in your subnets
- You need
AWSLambdaVPCAccessExecutionRole
- Note: Deploying a lambda function in public subnet does not give it internet access or public ip
- To have internet, you need deploy in private subnet and give it a NAT gateway or NAT instance
- To have internet, you need deploy in private subnet and give it a NAT gateway or NAT instance