What’s the Best Way to Programmatically Retrieve EC2 Instance Pricing?

0
7
Asked By TechieTraveler92 On

I'm looking for the most efficient way to get pricing data for all AWS EC2 instance types programmatically. Specifically, I'm interested in both on-demand and spot pricing across all regions. Is it best to use the AWS Pricing API, make AWS CLI or SDK calls, or is there another recommended approach?

2 Answers

Answered By WebWhiz_101 On

I personally use the instances.vantage.sh UI, and they also offer a free API. It’s user-friendly and summarizes the data quite well.

QuickCoder_22 -

I've heard that site is useful! There's even a massive JSON file available with all the data if you want to dive deeper into the specifics.

Answered By CloudGuru_89 On

You should definitely check out the AWS Price List Bulk API. It's great for getting all on-demand pricing in one go. For spot pricing, however, you'll need to query the EC2 API for each region since the pricing isn't available through the Pricing APIs.

DevonDev_77 -

That's a good point! Spot prices can change frequently, so it's better to retrieve them dynamically rather than store them.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.