-
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
InvalidArgument when calling PutObject operation #4401
Comments
Hey @Zankroh, thanks for reaching out! This issues is related to the S3 default integrity changes we introduced in I wouldn't expect this type of request to fail for Amazon S3. Can you confirm if you're hitting a Amazon endpoint or third-party S3-compatible service? |
Hi @jonathan343, Thank you for your help. I saw the announcement, so I tried this: client = boto3.client(
"s3",
aws_access_key_id=AWS_ACCESS_KEY_ID,
aws_secret_access_key=AWS_SECRET_ACCESS_KEY,
endpoint_url=AWS_ENDPOINT,
region_name=AWS_DEFAULT_REGION,
config=Config(
request_checksum_calculation="when_required",
response_checksum_validation="when_required"
)
) But same exception remains. |
Could you provide debug logs of an |
This is likely a result of the behavior described in boto/s3transfer#327. A default value we specified in s3transfer is taking precedence over the “when_required” config and setting a CRC32 default checksum. We’ll work on addressing this issue and provide more updates when we have them. I'll be closing this issue as a duplicate, please refer to the s3transfer issue for updates. In the meantime, you should still be able to use put_object, since it doesn't use the transfer manager. |
@RyanFitzSimmonsAK from my point of view and code and for your information, I will revert boto3 version till s3transfer issue is fixed (also using OVH) |
Thank you |
Related GH issue : boto/boto3#4401
Related GH issue : boto/boto3#4401
Related GH issue : boto/boto3#4401
Describe the bug
Since 1.36 release, we're seeing upload errors with S3 client using
upload_file
method.boto3.exceptions.S3UploadFailedError: Failed to upload test.txt to s3_bucket/test.txt: An error occurred (InvalidArgument) when calling the PutObject operation: Invalid Argument.
Regression Issue
Expected Behavior
upload_file
success without error.Current Behavior
upload_file
fails withboto3.exceptions.S3UploadFailedError
exception.boto3.exceptions.S3UploadFailedError: Failed to upload test.txt to s3_bucket/test.txt: An error occurred (InvalidArgument) when calling the PutObject operation: Invalid Argument.
Debug logs
Reproduction Steps
With python 3.9.13 and
boto3==1.36.1
(same error withboto3==1.36.0
)Possible Solution
No response
Additional Information/Context
No response
SDK version used
1.36.1
Environment details (OS name and version, etc.)
Windows 11 22H2 ; python 3.9.13
The text was updated successfully, but these errors were encountered: