Created
May 16, 2018 17:23
-
-
Save kkapuria3/5b8950de081d8ee91084bdbaf18576b9 to your computer and use it in GitHub Desktop.
Check Current Spot Instance Price
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 --region=us-east-1e ec2 describe-spot-price-history --instance-types c4.4xlarge --start-time=$(date +%s) --product-descriptions="Linux/UNIX" --query 'SpotPriceHistory[*].{az:AvailabilityZone, price:SpotPrice}' | |
## Result | |
[ | |
{ | |
"price": "0.024900", | |
"az": "us-east-1e" | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment