Views
2 weeks ago

sqsputapi

Amazon Simple Queue

Amazon Simple Queue Service Developer Guide Query Request Authentication request, then it handles the required URL encoding of the signature. If your toolkit doesn't URL encode the final request, then make sure to URL encode the signature before you include it in the request. Most importantly, make sure the signature is URL encoded only once. A common mistake is to URL encode it manually during signature formation, and then again when the toolkit URL encodes the entire request. Example SetQueueAttributes Request https://sqs.us-east-1.amazonaws.com/770098461991/queue2 ?Action=SetQueueAttributes &Attribute.Name=VisibilityTimeout &Attribute.Value=90 &Version=2009-02-01 &Expires=2008-02-10T12%3A00%3A00Z &SignatureVersion=2 &SignatureMethod=HmacSHA256 &AWSAccessKeyId= Following is the string to sign. GET\n sqs.us-east-1.amazonaws.com\n /770098461991/queue2\n AWSAccessKeyId= &Action=SetQueueAttributes &Attribute.Name=VisibilityTimeout &Attribute.Value=90 &Expires=2008-02-10T12%3A00%3A00Z &SignatureMethod=HmacSHA256 &SignatureVersion=2 &Version=2009-02-01 Following is the signed request. https://sqs.us-east-1.amazonaws.com/770098461991/queue2 ?Action=SetQueueAttributes &Attribute.Name=VisibilityTimeout &Attribute.Value=35 &Version=2009-02-01 &Expires=2008-02-10T12%3A00%3A00Z &Signature= &SignatureVersion=2 &SignatureMethod=HmacSHA256 &AWSAccessKeyId= API Version 2009-02-01 25

Amazon Simple Queue Service Developer Guide Query Request Authentication Example SendMessage Request Using POST POST /queue2 HTTP/1.1 Host: sqs.us-east-1.amazonaws.com Content-Type: application/x-www-form-urlencoded Action=SendMessage &MessageBody=Your+Message+Text &Version=2009-02-01 &Expires=2008-02-10T12%3A00%3A00Z &SignatureVersion=2 &SignatureMethod=HmacSHA256 &AWSAccessKeyId= Following is the string to sign. Notice that you encode the spaces as %20 (and not plus signs) when you form the string to sign. POST\n sqs.us-east-1.amazonaws.com\n /queue2\n AWSAccessKeyId= &Action=SendMessage &Expires=2008-02-10T12%3A00%3A00Z &MessageBody=Your%20Message%20Text &SignatureMethod=HmacSHA256 &SignatureVersion=2 &Version=2009-02-01 Following is the signed request. POST /queue2 HTTP/1.1 Host: sqs.us-east-1.amazonaws.com Content-Type: application/x-www-form-urlencoded Action=SendMessage &MessageBody=Your+Message+Text &Version=2009-02-01 &Expires=2008-02-10T12%3A00%3A00Z &SignatureVersion=2 &SignatureMethod=HmacSHA256 &AWSAccessKeyId= &Signature=URLEncode(Base64Encode(Signature)) API Version 2009-02-01 26