Skip to content
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

unclear / misleading FAQ for s3 re: checksum #8884

Closed
abroy77 opened this issue Aug 28, 2024 · 5 comments
Closed

unclear / misleading FAQ for s3 re: checksum #8884

abroy77 opened this issue Aug 28, 2024 · 5 comments
Assignees
Labels
closing-soon This issue will automatically close in 4 days unless further comments are made. documentation This is a problem with documentation. p2 This is a standard priority issue s3

Comments

@abroy77
Copy link

abroy77 commented Aug 28, 2024

Describe the issue

The FAQ page says:

The AWS CLI will calculate and auto-populate the Content-MD5 header for both standard and multipart uploads. If the checksum that S3 calculates does not match the Content-MD5 provided, S3 will not store the object and instead will return an error message back the AWS CLI

I don't think this is accurate. When I upload a file using aws s3 cp file.txt s3://bucket/file.txt I can't see a checksum for the object on the AWS console. Perhaps I have misunderstood the documentation?

Links

https://awscli.amazonaws.com/v2/documentation/api/latest/topic/s3-faq.html?highlight=checksum

@abroy77 abroy77 added documentation This is a problem with documentation. needs-triage This issue or PR still needs to be triaged. labels Aug 28, 2024
@tim-finnigan tim-finnigan self-assigned this Aug 29, 2024
@tim-finnigan
Copy link
Contributor

Thanks for reaching out. If you add --debug to your command, then you can see what the request looks like. For example when I run aws s3 cp there is a Content-MD5 header logged in my request.

The S3 console has a table for additional checksums (which you can find more info on here in the S3 User Guide: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html). The additional checksums are not supported via high-level s3 commands but there is a feature request for that: #6750. As an alternative you can use aws s3api put-object.

@tim-finnigan tim-finnigan added s3 response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. p2 This is a standard priority issue and removed needs-triage This issue or PR still needs to be triaged. labels Aug 29, 2024
@abroy77
Copy link
Author

abroy77 commented Sep 5, 2024

Ah! I see, my misunderstanding then. I thought the page meant that the checksum will be stored.

Am I correct in understanding that this Content-MD5 header is used to ensure data integrity during the s3 cp command? but does not store an additional checksum with the data on s3 permanently?

Thank you for all your help!

@github-actions github-actions bot removed the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Sep 5, 2024
@tim-finnigan
Copy link
Contributor

Thanks for following up. Yes the Content-MD5 header is used to ensure data integrity, and the ETag of the object might be an MD5 digest of the object data, this section in the S3 User Guide has more details on that: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#checking-object-integrity-etag-and-md5. But I recommend applying one of the additional checksum algorithms if you want to store that on S3.

@tim-finnigan tim-finnigan added the closing-soon This issue will automatically close in 4 days unless further comments are made. label Sep 5, 2024
@abroy77
Copy link
Author

abroy77 commented Sep 5, 2024

thanks! very helpful!

@abroy77 abroy77 closed this as completed Sep 5, 2024
Copy link

github-actions bot commented Sep 5, 2024

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closing-soon This issue will automatically close in 4 days unless further comments are made. documentation This is a problem with documentation. p2 This is a standard priority issue s3
Projects
None yet
Development

No branches or pull requests

2 participants