Friday, 29 April 2011

AWS Signature mismatch with python-boto

With python-boto 1.9b4, connecting to Amazon Cloud services using the following commands

>>>from boto.ec2.connection import EC2Connection
>>>conn = EC2Connection(<your AWS key>, <your secret key>
>>>conn.get_all_instances()


failed an error message as follows:

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/site-packages/boto/ec2/connection.py", line 119, in get_all_images
return self.get_list('DescribeImages', params, [('item', Image)])
File "/usr/lib/python2.7/site-packages/boto/connection.py", line 615, in get_list
raise self.ResponseError(response.status, response.reason, body)
boto.exception.EC2ResponseError: EC2ResponseError: 403 Forbidden
<?xml version="1.0" encoding="UTF-8"?>
<Response><Errors><Error><Code>SignatureDoesNotMatch</Code><Message>The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details.</Message></Error></Errors><RequestID>kept-out-of-post</RequestID></Response>


The issue disappears when you update to python-boto 2.0b4.

1 comment:

CruiZen said...

I see the same problem with boto 2.0b4 :-)
I suspect the problem is local. Perhaps the proxy is doing something funny.