While there appear to be a few ways to output and filter some AWSCLI commands into this list, does someone have a nice+easy way to list all EC2 instance types for a specific region?
Or perhaps that list is published in a .json file up in a bucket someplace, maintained by AWS?
I'm simply looking for this sort of output:
t1.micro
t2.nano
t2.micro
t2.small
...
Well it seems that at least one programmatic way to do this is to query the AWS Pricing API:
#!/bin/bash
curl https://pricing.us-east-1.amazonaws.com/offers/v1.0/aws/AmazonEC2/current/index.json | jq -r '.products[].attributes["instanceType"]' | sort -u | grep '\.'
A gist for this is here, in case of future tweaks: https://gist.github.com/nmagee/b096e6fadf9ac336da7ffdada43f656a
What this is lacking is grouping/specifying by AWS Region, which can be an important distinction -- not every region has all instance type offerings.
As Far As I Know, such list is not available and cannot be queried from aws cli.
Even when running the aws ec2 run-instances
, the instance-type
parameter lists available instance types and refers to aws docs
Others have parsed the data and made it available.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With