erans / ec2instancespricing

Quick and dirty Python API and CLI to get EC2 instance pricing for On-Demand and Reserved Instances
Other
175 stars 89 forks source link

Amazon mappings changed? #13

Closed dfrankow closed 11 years ago

dfrankow commented 11 years ago

Thanks for your efforts on this project.

There is some evidence that Amazon's json pages may have changed format today. Have you had experience with this?

Test program (foo.py):

!/usr/bin/env python

from ec2instancespricing import ec2instancespricing

prices = ec2instancespricing.get_ec2_ondemand_instances_prices()

Results:

$ python foo.py Traceback (most recent call last): File "foo.py", line 5, in prices = ec2instancespricing.get_ec2_ondemand_instances_prices() File ".../libs/ec2instancespricing/ec2instancespricing.py", line 456, in get_ec2_ondemand_instances_prices instance_size = INSTANCE_SIZE_MAPPING[s["size"]] KeyError: 'm1.small'

erans commented 11 years ago

Hi,

They indeed changed the format a bit. They finally dropped the strange mapping and moved to their normal format (i.e. m1.small instead of "sm" for small).

I think I've updated all places, but let me know if there is a problem in other places.

Thanks for report!

dfrankow commented 11 years ago

Works like a charm. I could not be more delighted! Thank you!