-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PutObject fails with SignatureDoesNotMatch following release of 1.36 #4400
Comments
It looks like somebody else has hit the same issue: awslabs/amazon-sns-python-extended-client-lib#20 |
We're running into this issue ourselves, too. Could someone take a look or at least point us at the right place to go fiddle with it? :) |
i have the same problem:
|
Hey @davidjmemmett, thanks for bringing this issue to our attention! We're currently investigating this behavior and hoping to get more information about your request. Can you provide debug logs for the request you're making? The following example shows how to enable them: import boto3
boto3.set_stream_logger("") Is there a specific region you're seeing these |
Another workaround seems to be to revert to signature version "s3"/"v2" instead of "s3v4" if this one is still available for the bucket or third party party s3 provider. |
This issue is related to new parameters of the Config, which are not yet supported by third-party S3-compatible providers.
Changing your config to:
fixes the problem. @jonathan343 this issue seems to be related to third-party S3 providers only. |
@eyurchuk this is untrue, I'm using pure AWS resources. |
I'm happy to provide redacted logs privately. I will try to get in touch via our AWS accounts team. |
I might have found another clue - in the debug logs, it indicated that boto3 was correcting the region for the bucket early on in the request. After explicitly setting the Omitting the |
It does not work for me: setting region_name, request_checksum_calculation and response_checksum_validation. Still the same error. (its a 3rd party cloud provider) |
Hey, just wanted to provide some clarification here related to the original issue described by @davidjmemmett. The This issue exists in versions of import boto3
boto3.set_stream_logger("")
from botocore.config import Config
client = boto3.client(
"s3",
config=Config(
s3={
"use_accelerate_endpoint": True,
},
),
)
client.upload_file(
"aws-example-file.txt",
"aws-example-bucket",
"aws-example-file.txt",
ExtraArgs={
"ChecksumAlgorithm": "CRC32"
}
) However, because of the changes to default checksum behavior in
This is interesting behavior you're seeing here. Botocore has custom S3 redirect logic that attempts to re-route your request to the proper region of your bucket if initially configured incorrectly. For debugging purposes, can you can clarify which region your bucket exists in and what you're configuring your client to be in both cases you described? |
Thank you for following this up @jonathan343 - I'll give it a whirl tomorrow. Regarding the regional workaround; I'm using AWS IAM SSO, and the profile I was using to test was configured to use us-west-2 by default, whereas the bucket was in on of the eu-west regions. Cheers, |
Got it. When looking into this, I was able to reproduce in |
Also, because you're using a high-level S3 operation ( I have PRs open with the fix and will work on getting them released asap:
Until then the best way to mitigate this issue is to do one of the following:
|
Looking at those change requests, will those effectively disable the new checksum functionality? That's not what I think should be the case, I want checksums to happen to validate what I uploaded. |
Starting in If users want to disable default checksum behavior, the See the Data Integrity Protections for Amazon S3 guide for more details. Sorry for the confusion. Please let me know if I can clear anything up. |
Checked boto/s3transfer#329, thanks, it fixes at least my problems with 3rd party providers |
Describe the bug
We're seeing intermittent signature errors when using
boto3==1.36.x
andbotocore==1.36.x
with S3 transfer acceleration enabled. Either disabling transfer acceleration or downgrading to boto3==1.35.99 allows the upload to succeed.Regression Issue
Expected Behavior
PutObject
call succeeds without error.Current Behavior
Intermittent
SignatureDoesNotMatch
errorsReproduction Steps
Possible Solution
No response
Additional Information/Context
Looking at the announcement regarding integrity checks in 1.36.x, it looks as though this may be related.
SDK version used
1.36.x
Environment details (OS name and version, etc.)
Python 3.9.4 on Ubuntu 20.04.6 LTS
The text was updated successfully, but these errors were encountered: