How to use metadata to automatically compare the checksum #1
Replies: 1 comment
-
With the launch of Additional Checksum Algorithms feature released in February 2022, s3sha256sum may not seem as important. With this feature, there is no longer a need to download the object to verify its consistency, which is especially great for objects stored in Glacier. Since AWS haven't published a good tool to verify these objects, I built s3verify to perform this task. So which feature should you use? If you use shrimp to upload your files then I recommend that you use both The biggest reason for this is because, for multi-part uploads, the checksum algorithm feature builds a hash of hashes, it is not possible to reconstruct a normal full-length checksum of the file using this information. It is handy to have the regular checksum value in case you want to be able to compare the checksum with a checksum collected by someone else without having the file itself handy. With the checksum algorithm feature, changing the part size in a multi-part upload will change the final checksum computed for the completed object. |
Beta Was this translation helpful? Give feedback.
-
If the S3 object that you want to verify has a
sha256sum
metadata entry (or tag), then s3sha256sum will automatically compare that to the actual contents which it has just hashed. It will printOK
orFAILED
.Example:
It's as simple as that.
You can use shrimp to easily attach the checksum (it has lots of other great features too). If there's a
SHA256SUMS
file in the working directory, it will try to look up the file you are uploading and automatically attach the checksum in the metadata.The example is very similar:
Beta Was this translation helpful? Give feedback.
All reactions