Created
November 7, 2018 13:37
-
-
Save corvax19/eb25f166a35e241e0b22f22164fce7db to your computer and use it in GitHub Desktop.
List AWS EC2 instance types
This file contains hidden or 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
#!/usr/bin/env python | |
import requests | |
URL='https://pricing.us-east-1.amazonaws.com/offers/v1.0/aws/AmazonEC2/current/us-east-1/index.csv' | |
lines = requests.get(URL).text.split('\n')[6:] | |
for type in sorted(set([s[18] for s in [ l.split('","') for l in lines ] if len(s)>18 and s[18] and '.' in s[18]])): | |
print(type) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment