Skip to content

Instantly share code, notes, and snippets.

@mvisonneau
Last active May 6, 2020 10:50
Show Gist options
  • Save mvisonneau/00750852362e9d9af91588f5109cb387 to your computer and use it in GitHub Desktop.
Save mvisonneau/00750852362e9d9af91588f5109cb387 to your computer and use it in GitHub Desktop.
Dynamically retrieve all EC2 instance types ENI limits (per region)
aws ec2 describe-instance-types \
| jq '[
.InstanceTypes[] | {
type: .InstanceType,
maxInterfaces: .NetworkInfo.MaximumNetworkInterfaces,
maxIPV4PerInterface: .NetworkInfo.Ipv4AddressesPerInterface,
maxIPV6PerInterface: .NetworkInfo.Ipv6AddressesPerInterface
}
]'
# 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