DEV Community

Aadit Unni
Aadit Unni

Posted on

Check the Integrity of Data in Amazon S3 with Additional Checksums

[25/100] #100DaysOfCloud Today, I learned how to upload a file to Amazon S3 to calculate additional checksums, and compare the checksum on Amazon S3 and my local file to verify data integrity.

mazon S3 uses checksum values to verify the integrity of data that you upload to or download from Amazon S3. In addition, you can request that another checksum value be calculated for any object that you store in Amazon S3. You can select from one of several checksum algorithms to use when uploading or copying your data. Amazon S3 uses this algorithm to compute an additional checksum value and store it as part of the object metadata.

When you upload an object, you can optionally include a precalculated checksum as part of your request. Amazon S3 compares the provided checksum to the checksum that it calculates by using your specified algorithm. If the two values don't match, Amazon S3 reports an error.

Amazon S3 offers you the option to choose the checksum algorithm that is used to validate your data during upload or download. You can select one of the following Secure Hash Algorithms (SHA) or Cyclic Redundancy Check (CRC) data-integrity check algorithms:

  • CRC32
  • CRC32C
  • SHA-1
  • SHA-256 When you upload an object, you can specify the algorithm that you want to use

You can try do it by yourself by following the steps from the link below:
GitHub

Top comments (0)