Question

I am setting up SQS using Amazon's SDK 2 for PHP.

There appears to be very little existing content on the web using the new SDK.

This is the newest Amazon Services SDK built on top of Guzzle.

I am able to successfully:

  1. Create queue
  2. Get queue URL
  3. List all queues
  4. Get a queue ARN

But I cannot get any queue attributes or send a message to a queue.

My call to get the queue attributes is:

$attr   = $sqs->getQueueAttributes(
    array(
        'QueueUrl'          => 'test_18_16-36-57'
    )
);

When attempting to the the queue attributes I get the following response:

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.

The Canonical String for this request should have been 'POST /100404228159/test_18_16-36-57

content-type:application/x-www-form-urlencoded host:sqs.us-east-1.amazonaws.com user-agent:aws-sdk-php2/2.1.0 Guzzle/3.1.2 curl/7.22.0 PHP/5.3.10-1ubuntu3.5 x-amz-date:20130218T213657Z

content-type;host;user-agent;x-amz-date a70e8dd76245fc6631c1b051623a90752c7cec0cd55fa636000c47ad3d8e4e06'

The String-to-Sign should have been 'AWS4-HMAC-SHA256 20130218T213657Z 20130218/us-east-1/sqs/aws4_request 7695e40b612379da5025fca80e26ed6c29f95428e244d2b083764d203d369e36'

Any ideas?

Was it helpful?

Solution

Does upgrading to the latest version fix the issue?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top