CloudConsole

SignatureDoesNotMatch: The request signature we calculated does not match the signature you provided

Updated 16 November 2026 · How we write and check guides

Short answer

AWS recognised your access key ID but computed a different signature from the one you sent, so either the secret access key is wrong or the request changed after it was signed. Check the secret for typos or trailing whitespace first; for S3 presigned URLs, make sure the HTTP method and signed headers such as Content-Type match exactly what was signed.

Common causes, most likely first, in 5 steps: 1. Wrong secret access key for that key ID; 2. Whitespace or a newline in the…
The diagnosis and fix steps from this page, in the order to try them; commands and details are below.

What the error tells you

Every AWS request is signed with your secret key over a canonical form of the request: method, path, query string, selected headers and a hash of the body. AWS rebuilds that canonical request on its side and compares signatures. A mismatch means the access key ID was found (otherwise you'd see InvalidAccessKeyId or InvalidClientTokenId) but something else differs.

An error occurred (SignatureDoesNotMatch) when calling the PutObject operation:
The request signature we calculated does not match the signature you provided.
Check your key and signing method.

S3 helps more than most services: its XML error body includes <StringToSign> and <CanonicalRequest>, which you can diff against what your client signed.

Common causes, most likely first

CauseTypical situation
Wrong secret access key for that key IDSecret pasted from the wrong row, or a rotated key's old secret still in a file
Whitespace or a newline in the secretSecret stored in a CI variable, Kubernetes secret (echo without -n before base64) or .env file
Presigned URL used with a different method or headersURL generated for get_object but used for a PUT, or browser upload sends a Content-Type that wasn't signed
Something rewrote the request in transitA proxy, CDN or load balancer changed the host, path encoding or a signed header
Hand-rolled SigV4 codeObject keys with spaces, + or Unicode encoded differently from AWS's rules

How to fix it

  1. Test the key pair in isolation. If this fails with the same error, the secret is wrong:
    AWS_PROFILE=ci aws sts get-caller-identity
  2. Look for invisible characters. Print the length of the secret (it is 40 characters for IAM user keys) and check for a trailing newline:
    printf '%s' "$AWS_SECRET_ACCESS_KEY" | wc -c
    grep -n ' $' ~/.aws/credentials
  3. For presigned PUT URLs, sign for put_object and include the exact ContentType the client will send. If the browser adds a different Content-Type, the signature breaks.
  4. Inspect the signing input. Run the failing command with --debug and compare the logged CanonicalRequest with the one in S3's error response; the first differing line is your bug.
    aws s3api put-object --bucket my-bucket --key 'reports/q3 summary.pdf' \
      --body summary.pdf --debug 2>&1 | grep -A12 'CanonicalRequest'
  5. If nothing else works, create a new access key, update the stored secret, and deactivate the old key once the new one is confirmed.

Mistakes people make next

  • Regenerating keys repeatedly while the real fault is a proxy or an unsigned header. If the CLI works from your laptop with the same keys, the keys are fine.
  • Confusing this with clock problems. A skewed clock produces RequestTimeTooSkewed or "Signature expired", not this error; see signature expired.
  • Using an old SDK that defaults to Signature Version 2 against regions or buckets that only accept SigV4. Upgrade the SDK rather than forcing the signature version.

Questions

What causes S3 error 403 SignatureDoesNotMatch?

Most often a wrong or whitespace-damaged secret access key, or a presigned URL used with a different HTTP method or Content-Type than the one it was signed for.

How do I debug an S3 signature mismatch?

Compare the CanonicalRequest S3 returns in the error body with the one your client signed; with the CLI, add --debug to see it. The first line that differs shows what changed.

Is SignatureDoesNotMatch caused by the wrong region?

Not usually. A wrong signing region for S3 normally produces AuthorizationHeaderMalformed with a hint naming the expected region.

CloudConsole home screen showing what needs attention on a phone, for following up on SignatureDoesNotMatch away from your…
When this happens away from your desk

Signature errors usually show up as a spike of 4xx responses from an upload feature rather than a page. CloudConsole, a phone app for AWS, is built to put those alarms and the related log lines on your phone so you can tell a broken release from a broken key.

Did it start after a deploy? What changed? on the app’s alarm screen lists the deploys and configuration changes from the hour before the alarm fired.

About the app → · Download on the App Store

Sources