$ aws --region=ap-northeast-2 ec2 describe-spot-price-history --instance-types c4.large --start-time=$(date +%s) --product-descriptions="Linux/UNIX" --query 'SpotPriceHistory[*].{az:AvailabilityZone, price:SpotPrice}'
[
{
"price": "0.024900",
"az": "ap-northeast-2a"
},
{
"price": "0.016800",
"az": "ap-northeast-2c"
}
]
Created
August 10, 2016 08:10
-
-
Save pahud/fbbc1fd80fac4544fd0a3a480602404e to your computer and use it in GitHub Desktop.
check current spot price with aws-cli
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
still works, thanks!