Skip to content

Instantly share code, notes, and snippets.

@pahud
Created August 10, 2016 08:10
Show Gist options
  • Save pahud/fbbc1fd80fac4544fd0a3a480602404e to your computer and use it in GitHub Desktop.
Save pahud/fbbc1fd80fac4544fd0a3a480602404e to your computer and use it in GitHub Desktop.
check current spot price with aws-cli
$ 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"
    }
]
@jyan-micro1
Copy link

still works, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment