Subject: | SendMessage fails when message contains UTF8 characters |
Calling SendMessage with a message that contains UTF8 characters fails
with this error:
ERROR: On calling SendMessage: 401 Unauthorized (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.)
This is believed to be a bug in SQS - you can find numerous reports of
similar bugs across a number of the Amazon Web Services in the AWS forums.
In order to circumvent the bug, use SignatureVersion 0 (which does not
use the message payload when calculating the signature) rather than
SignatureVersion 1 (the default, which does).
You can specify the signature version in the Amazon::SQS::Simple
constructor:
$sqs = new Amazon::SQS::Simple($access_key, $secret_key,
SignatureVersion => 0);