- Newest
- Most votes
- Most comments
When you attach a Lambda function to a VPC, AWS Lambda uses Hyperplane ENIs (Elastic Network Interfaces) to provide network connectivity between your function and the resources in your VPC. These are managed resources that Lambda creates and manages automatically.
There are a few important things to understand about how Lambda handles ENIs:
-
Hyperplane ENIs are not directly visible to you in the EC2 Network Interfaces console. They are managed by the Lambda service behind the scenes.
-
Lambda reuses ENIs across multiple functions that use the same subnet and security group combination. This is done to optimize resource utilization and minimize the creation of new ENIs.
-
Each Hyperplane ENI can support up to 65,000 connections/ports, and Lambda will automatically scale the number of ENIs based on network traffic and concurrency requirements.
-
When you first attach a function to a VPC, your function will remain in the "Pending" state while Lambda creates the necessary Hyperplane ENI. This can take several minutes, and you won't be able to invoke the function until it transitions to the "Active" state.
So, not seeing dedicated ENIs for your Lambda function in the EC2 console is expected behavior. The ENIs are created and managed by Lambda, but they're not directly visible to you as a customer. Your function should still be able to access resources within your VPC as configured.
If you're experiencing connectivity issues despite your Lambda function being properly configured with VPC access, you might want to check other aspects of your setup, such as security group rules, subnet routing tables, or whether your function needs internet access (which would require a NAT Gateway or VPC endpoints).
Sources
Giving Lambda functions access to resources in an Amazon VPC - AWS Lambda
Relevant content
asked 3 years ago
