-
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
Checksum x-amz-checksum-crc32
seems to be added INSIDE my files
#4435
Comments
It seems to be resolved if I add this at the top of my code: import os
os.environ["AWS_REQUEST_CHECKSUM_CALCULATION"] = "when_required"
os.environ["AWS_RESPONSE_CHECKSUM_VALIDATION"] = "when_required" |
Hi @jgaucher-cs , thanks for reaching out. This change was recently announced by Python team, related to Announcement: S3 default integrity change -
The workaround you suggested has also been mentioned to bypass the default checksum. Hope that clarifies your questions. Please feel free to reach out if this does not help. Thanks |
Hi @khushail, thank you for your response. The official SDK documentation says:
In my case, the checksum is not stored in the object's metadata, it's stored inside the file contents, making it corrupt and unreadable (e.g. if it's a Python script, it cannot be run anymore). Why is that ? |
I also have this problem. Have any ideas? |
Hey @jgaucher-cs @ZeniT21, I was not able to reproduce this issue when making requests to Amazon S3. When making the request to S3 using the example you provided, I receive the following body: As mentioned above, you can prevent the default checksum calculation behavior using the |
Hey @jonathan343
Yes indeed we are using S3 compatible service from other Cloud provider than AWS (Orange Flexible Engine and/or OVH). The issue might be they are not fully compliant. |
I used an older version and it worked fine. |
Hi @jgaucher-cs , since you are using 3rd party services which might not be compatible and does not support aws chunked requests, there is a workaround as mentioned in Announcement shared earlier, which is what you are using here. So This should be workable as suggested. |
Describe the bug
When uploading a local file to my s3 storage, some kind of checksum seems to be added directory inside the contents of my file:
Regression Issue
It does not happen with
boto3==1.35.41
Expected Behavior
The uploaded file contents should not be modified.
Current Behavior
The uploaded file contents are modified.
Reproduction Steps
Create a dummy file locally:
Install boto3:
Init s3 client and upload file:
Possible Solution
No response
Additional Information/Context
No response
SDK version used
1.36.16
Environment details (OS name and version, etc.)
Linux Ubuntu 22
The text was updated successfully, but these errors were encountered: