Note: Lambda shares network interfaces across multiple functions that have the same Amazon VPC configuration. Sharing network interfaces helps reduce the number of network interfaces that are used in your AWS account.
2. Configure the AWS CLI with an AWS Identity and Access Management (IAM) role that has permissions to query Lambda and network interfaces. For more information, see Execution role and user permissions. Note: Lambda uses the permissions in a function's execution role to delete the Hyperplane ENI. Therefore, don't delete the execution role before Lambda deletes the Hyperplane ENI.
3. Install the command-line JSON processor jq:
$ sudo yum install jq -y
Note: For more information, see the jq page on GitHub.
Note: Replace eni-0123456789abcef01 with the network interface's ID. You can find the ID on the Network Interfaces page of the Amazon Elastic Compute Cloud (Amazon EC2) console. Also, replace us-east-1 with the AWS Region that the network interface is in.
The output returns a list of the Lambda functions and function versions in your AWS account and specified Region that use the network interface. If you still need any of these functions or function versions, then you likely don't need to delete the network interface.