-
-
Save patlachance/28ac9dd1440cd39499c4e65440bb911b to your computer and use it in GitHub Desktop.
get aws instance name and type
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
curl https://raw.githubusercontent.com/powdahound/ec2instances.info/master/www/instances.json | jq -r ' .[] | [ .instance_type , .pricing."eu-west-1".linux.ondemand , .pricing."eu-west-1".linux.reserved."yrTerm1Convertible.noUpfront"] | @csv' > prices.csv | |
head prices.csv | |
"c5d.xlarge","0.218","0.173" | |
"m5a.2xlarge","0.384","0.311" | |
"c5.9xlarge","1.728","1.369" | |
"m5.24xlarge","5.136","4.147" | |
"i3en.12xlarge","6","4.721" | |
"m5d.12xlarge","3.024","2.445" | |
"c5.large","0.096","0.076" | |
"c5n.large","0.122","0.097" | |
"i2.xlarge","0.938","0.532" | |
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-instances | jq -r '.Reservations[].Instances[] | [ (.Tags[] | select(.Key == "Name").Value ), .InstanceType] | @csv' | sort | |
"infra:chef-server","t3.medium" | |
"infra:grafana-server","t3a.medium" | |
"infra:jenkins-server","t3.medium" | |
"infra:monitor-server","t3.medium" | |
"prod:ns21","t3.small" | |
"prod:ns22","t3.small" | |
"prod:ns23","t3.small" | |
"prod:ss1","t3a.micro" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment