Last active
May 6, 2020 10:50
-
-
Save mvisonneau/00750852362e9d9af91588f5109cb387 to your computer and use it in GitHub Desktop.
Dynamically retrieve all EC2 instance types ENI limits (per region)
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
aws ec2 describe-instance-types \ | |
| jq '[ | |
.InstanceTypes[] | { | |
type: .InstanceType, | |
maxInterfaces: .NetworkInfo.MaximumNetworkInterfaces, | |
maxIPV4PerInterface: .NetworkInfo.Ipv4AddressesPerInterface, | |
maxIPV6PerInterface: .NetworkInfo.Ipv6AddressesPerInterface | |
} | |
]' |
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
# Here is a truncated example of the list being returned | |
[ | |
{ | |
"type": "x1e.xlarge", | |
"maxInterfaces": 3, | |
"maxIPV4PerInterface": 10, | |
"maxIPV6PerInterface": 10 | |
}, | |
{ | |
"type": "r5n.large", | |
"maxInterfaces": 3, | |
"maxIPV4PerInterface": 10, | |
"maxIPV6PerInterface": 10 | |
}, | |
{ | |
"type": "d2.4xlarge", | |
"maxInterfaces": 8, | |
"maxIPV4PerInterface": 30, | |
"maxIPV6PerInterface": 30 | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment