question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SimpleDB put_attributes raises SignatureDoesNotMatch error when UTF-8 value is given

See original GitHub issue

I am successfully using boto3 to save data to SimpleDB however, if I try to store a string which contains UTF-8 characters, the bellow error is thrown.

Traceback (most recent call last):
  File "/opt/python/run/venv/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app
    response = self.full_dispatch_request()
  File "/opt/python/run/venv/lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/opt/python/run/venv/lib/python2.7/site-packages/flask/app.py", line 1381, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/opt/python/run/venv/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request
    rv = self.dispatch_request()
  File "/opt/python/run/venv/lib/python2.7/site-packages/flask/app.py", line 1461, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/opt/python/current/app/application.py", line 269, in articleAdmin
    'Replace': True
  File "/opt/python/run/venv/lib/python2.7/site-packages/botocore/client.py", line 310, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "/opt/python/run/venv/lib/python2.7/site-packages/botocore/client.py", line 395, in _make_api_call
    raise ClientError(parsed_response, operation_name)
ClientError: An error occurred (SignatureDoesNotMatch) when calling the PutAttributes operation: 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.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:12 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
randxmcommented, Jun 6, 2017

A quick hack for @samoconnor’s hack above, so as to only affect requests headed towards the sdb endpoint:

from botocore import endpoint
def make_request(self, operation_model, request_dict):
    if self._endpoint_prefix == 'sdb':
        request_dict['headers']['Content-Type'] = 'application/x-www-form-urlencoded; charset=utf-8'
    return self._send_request(request_dict, operation_model)
endpoint.Endpoint.make_request = make_request
1reaction
memorycommented, Jul 5, 2017

Believe it or not there are a few SDB users out there still; it would be nice to get this fixed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using non ASCII characters when updating values in AWS ...
Using non ASCII characters when updating values in AWS SimpleDB returns SignatureDoesNotMatch error · Added some information about that I think is the...
Read more >
Amazon SimpleDB SignatureDoesNotMatch error when ...
Voila the first article I read was this PHP example. It is using the content type of: 'application/x-www-form-urlencoded; charset=utf-8' rather ...
Read more >
AWS SimpleDB: Signature does not match [solved] - B4X
I'm experimenting with AWS SimpleDB but I can't get the required signature ... we calculated does not match the signature you provided.
Read more >
A Developer's Guide to Amazon SimpleDB
If the servers hosting a given SimpleDB domain are under heavy load, the time it takes ... already exist have no effect, and...
Read more >
A Developer's Guide to Amazon SimpleDB [1&nbsp
If the servers hosting a given SimpleDB domain are under heavy load, ... for domains that already exist have no effect, and an...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found