简体   繁体   中英

API access to Amazon EC2 price list?

I need to implement a solution to get the Amazon instance hourly cost for each pricing model (on-demand, reserved, spot instance with predefined duration and spot instance with non-predefined duration).

Therefore, I am looking for a file from which I can get with a java code the hourly cost of an instance in each pricing strategy.

For example, I need to get the spot history price value of the spot instance from a file to use it as input for my application code. For that, I am asking how can I get the instance cost for all the different strategies proposed by Amazon to get it from a file with a code.

You can use the AWS Price List API . It provides pricing in JSON format.

See:

However, that API does not provide pricing of Spot Instances because spot instance pricing varies continually and is also different in each Availability Zone in each Region. To access Spot Pricing, use:

You can use the AWS Price List API for Java . BTW, I am the author of this library.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM