Skip to content

Latest commit

 

History

History
5 lines (4 loc) · 276 Bytes

How-to-Get-Spot-Price.md

File metadata and controls

5 lines (4 loc) · 276 Bytes

How to get the spot instance price by 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}'