Open springcoil opened 9 years ago
Headintheclouds is a little janky to run in different zones than us-east, but if your really want to, you can replace the line
_ec2.client = boto.ec2.connection.EC2Connection(ACCESS_KEY_ID, SECRET_ACCESS_KEY)
with
ec2.client = boto.ec2.connect_to_region('eu-west-1', aws_access_key_id=ACCESS_KEY_ID, aws_secret_access_key=SECRET_ACCESS_KEY)
and then you can change the availability_zone to eu-west-1a.
Hi I am trying to recreate this with Python 2.7. On a Mac OS X
I tried changing the EC2.py file to change this to EU-West-1a
(py27)Peadars-MBP% fab pricing ec2 Traceback (most recent call last): File "/Users/peadarcoyle/anaconda/envs/py27/lib/python2.7/site-packages/fabric/main.py", line 743, in main _args, _kwargs File "/Users/peadarcoyle/anaconda/envs/py27/lib/python2.7/site-packages/fabric/tasks.py", line 427, in execute results[''] = task.run(_args, _new_kwargs)
File "/Users/peadarcoyle/anaconda/envs/py27/lib/python2.7/site-packages/fabric/tasks.py", line 174, in run
return self.wrapped(_args, _kwargs)
File "/Users/peadarcoyle/anaconda/envs/py27/lib/python2.7/site-packages/fabric/decorators.py", line 139, in decorated
decorated.return_value = func(_args, _kwargs)
File "/Users/peadarcoyle/anaconda/envs/py27/lib/python2.7/site-packages/headintheclouds/tasks.py", line 118, in pricing
provider.pricing(sort)
File "/Users/peadarcoyle/anaconda/envs/py27/lib/python2.7/site-packages/headintheclouds/ec2.py", line 77, in pricing
availability_zone='eu-west-1a',
File "/Users/peadarcoyle/anaconda/envs/py27/lib/python2.7/site-packages/boto/ec2/connection.py", line 1013, in get_spot_price_history
[('item', SpotPriceHistory)], verb='POST')
File "/Users/peadarcoyle/anaconda/envs/py27/lib/python2.7/site-packages/boto/connection.py", line 1057, in get_list
raise self.ResponseError(response.status, response.reason, body)
boto.exception.EC2ResponseError: EC2ResponseError: 400 Bad Request
<?xml version="1.0" encoding="UTF-8"?>
InvalidParameterValue