This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ python henis.py | |
Total number of ENIs: 409 | |
Total number of hyperplane ENIs: 139 | |
Total number of hyperplane ENIs used by Lambdas: 68 | |
# adding --verbose shows ENI and HENI IDs | |
$ python henis.py --verbose | |
Total number of ENIs: 413 | |
Total number of hyperplane ENIs: 139 | |
Total number of hyperplane ENIs used by Lambdas: 68 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# be sure to export $AWS_DEFAULT_REGION and $VPC_ID | |
$ aws ec2 describe-network-interfaces --region $AWS_DEFAULT_REGION \ | |
--filters 'Name=vpc-id,Values=$VPC_ID' 'Name=status,Values=in-use' \ | |
--query 'NetworkInterfaces[?InterfaceType==`lambda`].NetworkInterfaceId' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Originally developed by Jiten P. of AWS Support | |
# adapted by ivica-k | |
import boto3 | |
import argparse | |
COUNT_ENIS = 0 | |
COUNT_HENIS = 0 | |
COUNT_HENIS_LAMBDA = 0 |