Giter VIP home page Giter VIP logo

calc-s3-etag's Introduction

calc-s3-etag

When a file is uploaded to S3 or Snowball Edge it has an md5 sum calculated and stored as an etag. For larger files that are uploaded using multi-part uploads, the etag is in the form of [summary hash]-number of parts. This summary hash does not match the md5sum of the file and thus makes it difficult for users to clearly verify that the source file matches what is in the target location.

Using the metadata for a multi-part uploaded file, the chunk size can be roughly determined as it will be about the number of bytes of the object (returned by the s3api head-object command) divided by the number of parts with that result being divided by 1024 * 1024.

This can then be utilized with this script to calculate the summary etag for comparrison with the online object.

NOTE: This will not work on objects placed in encrypted buckets as the md5 sums are made of the encrypted data, not the unencrypted.

Future enhancements that anyone can contribute to this repo are:

  • performance improvements
  • use of getopts to allow for expanded functionality
  • added code to actually get the source object and perform the compare
  • recursive enablement

calc-s3-etag's People

Contributors

amazon-auto avatar dmbyte avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.