如何导出亚马逊EC2竞价实例价格历史记录

4
我知道亚马逊的现货价格历史工具。如何将历史价格导出为CSV?是否有获取原始数据的可能性?

enter image description here

1个回答

1
您可以使用AWS CLI以JSON格式获取数据,例如:
aws ec2 describe-spot-price-history  --start-time 2017-01-06T07:08:09 --end-time 2017-01-07T08:09:10

另一种方法是使用REST API和DescribeSpotPriceHistory
例如,要获取12/01/18的所有值:

https://ec2.amazonaws.com/?Action=DescribeSpotPriceHistory &StartTime=2018-12-01T00:00:00.000Z &EndTime=2018-12-01T23:59:59.000Z &AUTHPARAMS

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接