title: SignatureDoesNotMatch error when uploading a CSV to a Cognito user import job via pre-signed URL
body: <p>I have a server-side endpoint which starts a user import job with my Cognito user pool and returns a pre-signed URL to upload a CSV to for the job to actually process (as in the <a href="https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UserImportJobType.html#CognitoUserPools-Type-UserImportJobType-PreSignedUrl" rel="nofollow noreferrer">cognito documentation</a>). The code runs successfully and returns a pre-signed URL, but when I try to upload a CSV file to it, I get an error. Doing it in the browser in javascript, with the code below, I get an empty 403 error:</p>
  <pre class="lang-js prettyprint-override"><code>        const response = await axios({
            method: &quot;POST&quot;,
            url: urlRes.data.url,
            data: finalCsv,
            headers: {
              &quot;Content-Type&quot;: &quot;text/csv&quot;,
              &quot;x-amz-server-side-encryption&quot;: &quot;aws:kms&quot;,
            },
          });
  </code></pre>
  <p>I've also tried to upload via Postman to have more control, and regardless of the headers I do or don't include I'm getting the error:</p>
  <pre class="lang-xml prettyprint-override"><code>&lt;Code&gt;SignatureDoesNotMatch&lt;/Code&gt;
  &lt;Message&gt;The request signature we calculated does not match the signature you provided. Check your key and signing method.&lt;/Message&gt;
  </code></pre>
  <p>I've also tried using PUT and GET requests instead of POST requests but got the same response.</p>
  <p>I've tried looking around on SO, but the other answers I've seen have all been about S3 pre-signed URLs, which seem to work differently.</p>