Closed hyao closed 9 years ago
Yes, I wanted to clear some time to do that. It seems the new format is not JSON, but a JS callback and the data is returned as a JS object (the annotation is not the same as JSON), so it will take me a while to find a reasonable way to parse it.
If it comes to it, I will write a parser just for that...
I did a quick test and am able to parse linux-od.js, and here's what I did:
Now d becomes a nice dict ready to use!
Thanks,
Thanks. I wanted to see if I can avoid that parts so the code won't break every time a new field is added. I think I have something that is good enough since this is a minified JS file. I will try to commit it later.
Yeah, that makes sense. Thanks.
They also seemed to have removed the pricing from that file for the older generation instances. So instance types like 'm2.2xlarge' are not in that file. That means that this pricing will no longer work for anyone that is using the previous generation type. Thats a bummer. Anyone know a workaround to get prices for the prev generation?
thanks!!
Maybe AWS tries to discourage the use of instance types from previous generations (they are only listed in the spot instance section on the ec2 pricing page: http://aws.amazon.com/ec2/pricing/), and I find current generation instance types more cost effective in general.
Thanks!
I checked that too. Certainly looks like they prefer users to move to the current gen. They are slowly hiding away the info for the old gen instances :)
thanks
There is a new version that I merged which works with the new format of files.
Hi,
Thanks a lot for writing a very useful tool!
As the title says, the url http://aws.amazon.com/ec2/pricing/json/linux-od.json now redirects to https://a0.awsstatic.com/pricing/1/deprecated/ec2/linux-od.json ?
On the ec2 pricing page, it uses something like for ec2 pricing data:
https://a0.awsstatic.com/pricing/1.0.19/ec2/linux-od.min.js
Maybe it's time to update to the new formats of pricing data for ec2?
Thanks a lot,
Heling