Skip to content

Instantly share code, notes, and snippets.

@kkapuria3
Created May 16, 2018 17:23
Show Gist options
  • Save kkapuria3/5b8950de081d8ee91084bdbaf18576b9 to your computer and use it in GitHub Desktop.
Save kkapuria3/5b8950de081d8ee91084bdbaf18576b9 to your computer and use it in GitHub Desktop.
Check Current Spot Instance Price
$ 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