title: AWS signature does not match
body: <p>I am using following API to fetch order details from amazon</p>
  
  <pre><code>https://mws.amazonservices.com/Orders/2011-01-01?AWSAccessKeyId=aces key&amp;Action=ListOrderItems&amp;SellerId=seller id&amp;AmazonOrderId=order id&amp;Signature=ZQLpf8vEXAMPLE0iC265pf18n0%3D&amp;SignatureVersion=2&amp;SignatureMethod=HmacSHA256&amp;Timestamp=2014-10-04T18%3A12%3A21.687Z&amp;Version=2011-01-01
  </code></pre>
  
  <p>But getting following error</p>
  
  <pre><code>&lt;ErrorResponse&gt;
       &lt;Error&gt;
             &lt;Type&gt;Sender&lt;/Type&gt;
             &lt;Code&gt;SignatureDoesNotMatch&lt;/Code&gt;
             &lt;Message&gt;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.&lt;/Message&gt;
       &lt;/Error&gt;
       &lt;RequestID&gt;ba13b457-bd7c-4413-b138-b216f887ac68&lt;/RequestID&gt;
  &lt;/ErrorResponse&gt;
  </code></pre>
  
  <p>Here is python code to generate signature</p>
  
  <pre><code>import hmac
  
  import urllib
  
  from base64 import b64encode
  
  from hashlib import sha256
  
  secret_key = ''
  
  to_sign = """"""
  
  signature=b64encode(hmac.new(secret_key, to_sign, sha256).digest())
  request = "%s&amp;Signature=%s" %(to_sign,urllib.quote(signature))
  </code></pre>
  
  <p>Can you tell me what data i need to provide in  <strong>to_sign</strong>
  and what is to_sign actually means?</p>