About this article: This article is reviewed against the cited sources. This is source research, not lab validation. Check the stated versions and your own requirements before making changes.
When S3 answers a backup, upload or listing with SignatureDoesNotMatch and HTTP 403 Forbidden, the key pair, the signing method or the request on the wire is not what the client signed. The S3 API Reference gives the description: "The request signature we calculated does not match the signature you provided. Check your AWS secret access key and signing method. For more information, see REST Authentication for details." The quickest first test is to make one call with the AWS CLI using the same credentials: if it works, the fault is in the backup tool or the path to S3, not the key.
What the error means
AWS's Signature Version 4 troubleshooting page explains the code: "These errors mean that the signature value in your HTTP request to AWS did not match the signature that the AWS service calculated." The client signs a canonical form of the request with a key derived from the secret access key. The service rebuilds the same signature from the request it received. Any difference gives a mismatch, so a changed header, a wrong key or a different canonical request all look the same.
That page lists four groups of cause: credential errors, canonical request and signing string errors, credential scope errors, and key signing errors. It also tells you to move off the older signing protocol first: "Update your signing protocol from AWS Signature version 2 (SigV2) to AWS Signature version 4 (SigV4) before exploring other error solutions. Services, such as Amazon S3, and Regions no longer support SigV2 signing."
The credential scope group produces its own messages, which are not SignatureDoesNotMatch. The page lists, for example, "Credential should be scoped to a valid Region, not region-code", "Signature expired: date is now earlier than date" and "Credential should be scoped to correct service: 'service'". If you see one of those, read the scope part of that page. A clock that is wrong is a separate fault; see S3 backup uploads fail with RequestTimeTooSkewed: the server clock, not the bucket.
A signature error is not an authorisation error. The S3 error list gives AccessDenied as a separate code, so a request that is signed correctly but not allowed is a different fault; see S3 403 Access Denied: following policy evaluation across bucket, IAM, KMS and SCP.
Likely causes
| Cause | What you see | How to confirm |
|---|---|---|
| The secret access key does not match the access key ID | Every call with that pair fails, also in other tools | aws sts get-caller-identity with the same pair fails |
| Stray spaces or wrong characters in the secret key or session token | Fails after a paste or an edit of the key field | Compare the stored value with the key as issued; check the token for temporary credentials |
| An old signing method (SigV2) in the tool | The tool is old or set to a legacy signature option | The tool's documentation or settings name the signature version |
| A proxy or inspection device that changes headers or the request | Works from a network without the proxy | Repeat the same call from a host that does not pass the proxy |
| Custom signing code builds the canonical request or key wrongly | A hand-written client fails while the AWS CLI works | Compare the canonical request and string to sign with the values in the error message |
| Signed headers differ from the headers sent (presigned URLs) | A presigned URL works in one client, not in another | Compare the signed headers with the request's headers |
Prove the cause before changing anything
All commands below only read. Replace backup-bucket-example and the profile name with your own.
- Show where the CLI takes its credentials and region from. The command prints the profile, access key, secret key and region, "where the configuration value was retrieved". The page's example output shows the keys masked.
aws configure list --profile backup
Several sources can disagree: the command shows whether a value came from an environment variable or from the file. A good result shows the profile you intended for each line.
- Make a call that needs only a valid key pair. The page says
get-caller-identity"Returns details about the IAM user or role whose credentials are used to call the operation".
aws sts get-caller-identity --profile backup
A good result prints the account, the user or role ARN and the user ID. A signature error here means the key pair itself is wrong; this reading of the result is our own, following the IAM page's advice to test with "a known working implementation".
- Make the S3 call the tool makes, with the same profile. The head-bucket page says the call "verifies access to a bucket".
aws s3api head-bucket --bucket backup-bucket-example --profile backup
If steps 2 and 3 succeed and the backup tool still fails, the key pair is correct and the fault is in the tool's own settings or in the network path.
-
If the tool runs through a proxy, run step 3 from a host that does not use it. The IAM page says "You can also verify that you didn't send the request through a proxy that modifies the headers or the request."
-
Read the tool's own log for the exact message, including any canonical request it prints. The IAM page says to "Compare the canonical request and string to your signed request with the value in the error message."
Fix
Secret key or session token wrong
The knowledge-centre page, which is written for presigned URLs, says to check "that there isn't any extra spaces or wrong characters" in the secret access key, and for a temporary session to "check that the AWS_SESSION_TOKEN is correct". The same checks apply to any client.
First save the current state:
cp -p ~/.aws/credentials ~/.aws/credentials.2026-12-02
If the key pair is stored in a backup tool's own settings instead, first save that configuration with the tool's own export or copy command.
Risk: the next step replaces the secret access key stored for the backup profile, or in the backup tool's own settings. Jobs that use this pair stop working if the new pair is wrong, and the saved copy contains a secret, so keep its permissions as they are.
Edit ~/.aws/credentials, and under the [backup] heading enter the access key ID and secret access key exactly as IAM issued them, with no spaces before or after. For a backup tool, enter the same pair in its key fields. Then repeat steps 2 and 3.
To undo it: restore the saved file, or the tool's saved configuration, and run step 2 again.
cp -p ~/.aws/credentials.2026-12-02 ~/.aws/credentials
aws sts get-caller-identity --profile backup
A proxy changes the request
The IAM page names a proxy that modifies headers or the request as a cause to rule out; it describes no proxy settings. Whether the S3 endpoint can be passed through unchanged is a decision for the proxy's owner, and step 3 repeated from the affected host shows whether it worked.
Custom signing code
The IAM page says to move from SigV2 to SigV4, to derive the signing key from the secret access key, and to compare the canonical request and string to sign with the values in the error message. A change to signing code belongs in version control and is tested against a test bucket first. The page's example canonical request has the method, path, query string, one header per line, the list of signed headers and the hash of the payload.
Region in the request
A request signed for one Region and sent to a bucket in another can be a separate fault. That link is our reading, not a statement on the pages; the fault is covered here: S3 PermanentRedirect: "The bucket you are attempting to access must be addressed using the specified endpoint".
Example (illustrative): fs01 runs a nightly upload to backup-bucket-example and starts failing with SignatureDoesNotMatch the morning after an access key was rotated. aws sts get-caller-identity --profile backup on fs01 fails, while the same call with the new pair on an administrator's workstation succeeds. The upload tool's configuration still holds the old secret. The administrator enters the new key pair, aws sts get-caller-identity --profile backup prints the account and role, aws s3api head-bucket succeeds, and the next night's upload completes.
Confirm the fix
aws sts get-caller-identitywith the profile the tool uses prints the expected account and user or role.aws s3api head-bucketfor the bucket succeeds.- The backup tool's next run lists and uploads without a signature error in its log.
What to watch afterwards
- Rotate a key by adding the new pair first, testing it, then removing the old pair. See S3 Credentials for Automated Delivery: Least Privilege and Rotation.
- After any change to a proxy or firewall that inspects traffic, repeat step 3.
- Keep the profile name used by each job in the job's documentation, so the right pair is tested.
Read next
Related articles you may want next.
- CloudS3 403 Access Denied: following policy evaluation across bucket, IAM, KMS and SCPRead the error, identify the caller, then follow AWS policy evaluation through bucket policy, IAM, organisation policies, endpoints and KMS.Read article
- Backup & RecoveryS3 backup uploads fail with RequestTimeTooSkewed: the server clock, not the bucketS3 backups fail with RequestTimeTooSkewed when the host clock is wrong. Prove the offset with chrony, timedatectl or w32tm, then fix and verify.Read article
- CloudS3 PermanentRedirect: "The bucket you are attempting to access must be addressed using the specified endpoint"S3 PermanentRedirect 301? Usually the Region or endpoint is wrong. Find the bucket Region with head-bucket and correct the setting.Read article
Risks and limits
- These commands have not been run or lab-tested.
- The credentials file holds secrets. Do not paste it into a ticket. The saved copy
~/.aws/credentials.2026-12-02holds the old secret too, so its owner decides when to delete it once the new pair works. - The Signature Version 4 detail comes from the IAM troubleshooting page, which covers AWS services in general, not Amazon S3 alone.
- Causes that depend on path-style addressing, S3-compatible services or a particular backup tool are not described on these pages. For a service other than Amazon S3, use that service's documentation.
- The knowledge-centre page concerns presigned URLs; its secret-key checks are applied here to ordinary signed requests as our own advice.
Sources
- Error — Amazon S3 API Reference, Amazon Web Services, no date shown, accessed 2 December 2026
- Troubleshoot Signature Version 4 signing for AWS API requests — AWS Identity and Access Management User Guide, Amazon Web Services, no date shown, accessed 2 December 2026
- Troubleshoot Signature Mismatch errors with S3 presigned URLs — AWS re:Post Knowledge Center, Amazon Web Services, shows only "Updated a year ago", accessed 2 December 2026
- list — AWS CLI 2.43.0 Command Reference (aws configure list), Amazon Web Services, no date shown, accessed 2 December 2026
- get-caller-identity — AWS CLI 2.43.0 Command Reference (aws sts), Amazon Web Services, no date shown, accessed 2 December 2026
- head-bucket — AWS CLI 2.43.0 Command Reference (aws s3api), Amazon Web Services, no date shown, accessed 2 December 2026
This article was originally published on .