Giter VIP home page Giter VIP logo

s3sha256sum's Introduction

s3sha256sum is a small program that calculates SHA256 checksums of objects stored on Amazon S3. Use it to verify the integrity of your objects.

If the expected checksum value has been attached to the object metadata (or tag), then s3sha256sum will automatically compare the values and report OK or FAILED. See here for an example.

s3sha256sum has a fancy feature that helps avoid double work and extra data transfer charges if you have to abort the hashing process. If you interrupt the program with Ctrl-C, it will print the internal state of the hash function and print a command that will resume the process from that position in the object.

For the paranoid, s3sha256sum also has an option that prints the status on an interval. This can be useful for humongous objects where you can't afford to restart the process from the beginning.

Tip: In many cases it may be worth running s3sha256sum on an EC2 instance located in the same region as the S3 bucket. Data transfer from S3 to EC2 is free.

Installation

You can download precompiled binaries from the releases section.

If you prefer to compile from source (or to use unreleased features), you can install using go install:

go install github.com/stefansundin/s3sha256sum@latest

Usage

$ s3sha256sum --help
Usage: s3sha256sum [parameters] <S3Uri> [S3Uri]...
S3Uri must have the format s3://<bucketname>/<key>.

Parameters:
      --ca-bundle string               The CA certificate bundle to use when verifying SSL certificates.
      --debug                          Turn on debug logging.
      --endpoint-url string            Override the S3 endpoint URL. (for use with S3 compatible APIs)
      --expected-bucket-owner string   The account ID of the expected bucket owner.
      --no-sign-request                Do not sign requests.
      --no-verify-ssl                  Do not verify SSL certificates.
      --paranoid duration              Print status and hash state on an interval. (e.g. "10s")
      --profile string                 Use a specific profile from your credential file.
      --region string                  The region to use. Overrides config/env settings. Avoids one API call.
      --request-payer string           Confirms that the requester knows that they will be charged for the requests. Possible values: requester.
      --resume string                  Provide a hash state to resume from a specific position.
      --use-accelerate-endpoint        Use S3 Transfer Acceleration.
      --use-path-style                 Use S3 Path Style.
      --verbose                        Verbose output.
      --version                        Print version number.
      --version-id string              Version ID used to reference a specific version of the S3 object.

You can also set environment variables that aws-sdk-go-v2 automatically consumes:

AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
AWS_SESSION_TOKEN
AWS_ROLE_ARN
AWS_ROLE_SESSION_NAME
AWS_REGION
AWS_PROFILE
AWS_SHARED_CREDENTIALS_FILE
AWS_CONFIG_FILE
AWS_CA_BUNDLE

s3sha256sum's People

Contributors

stefansundin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

s3sha256sum's Issues

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.