I wasn’t going to bother writing this up (as I hoped the documentation had improved), but it’s surprisingly difficult to get the non-burstable network bandwidth for an EC2 instance from the official AWS documentation. Instead, you are always quoted the burst values, which can be relatively uninformative.
To get the actual bandwidth, here are two options:
- A rough heuristic is that every “downsize” corresponds to a halving of base network bandwidth.
- You can get the base network bandwidth from the AWS CLI.
Network Bandwidth Heuristic
Go to your preferred AWS instance type viewer (such as here or here), select your preferred EC2 instance, find the network bandwidth for the 8xlarge/9xlarge, and then multiply it by the value from the below table.
Instance Size | Multiplier |
---|---|
4xlarge | 0.5 |
2xlarge | 0.25 |
xlarge | 0.125 |
large | 0.0625 |
medium | 0.03125 |
small | 0.015625 |
micro | 0.0078125 |
nano | 0.00390625 |
Alternatively, just remember that a 4xlarge gets about half the bandwidth, a 2xlarge about a quarter of the bandwidth, a xlarge an eigth of the bandwidth, and a large the sixteenth. If you have network intense workloads, I would be surprised if you’re running on a smaller instance, but consult the above table or keep on halving.
This heuristic, to note, is imperfect. I would be surprised, however, if it’s off by more than a small amount (perhaps 20%?). If you are sufficiently worried about network bandwidth that you are quibbling about such a small amount, you might want to consider the possibility you are picking pennies in front of a steamroller and just upsize.
Network Bandwidth from AWS CLI
If you don’t want to use the above (admittedly crude) heuristic, you can just use the AWS CLI. Execute the following with the instance-type replaced with your instance type of interest:
aws ec2 describe-instance-types --instance-types instance-type
The parameter you’re interested in is in the NetworkInfo object and is called BaselineBandwidthInGbps.
Alternatively (and you have a “linux-like” environment available to you), run this horrific bash command, the baseline network bandwidth value is reported in Gbps:
aws ec2 describe-instance-types --instance-types instance-type --output text | grep NETWORKCARDS | sed -n 's/.*NETWORKCARDS\t\([0-9]*\.[0-9]*\).*/\1/p'