Verify that a local file is identical to an object on Amazon S3, without having to download the object. :detective:

  • By Stefan Sundin
  • Last update: Sep 13, 2022
  • Comments: 1

s3verify is a program that can verify that a local file is identical to an object on Amazon S3, without having to download the object.

It is required that the object was uploaded using the Additional Checksum Algorithms feature released in February 2022. For objects that weren't uploaded using that you might find s3sha256sum useful instead.

Installation

Precompiled binaries will be provided at a later date. For now you can install using go install:

go install github.com/stefansundin/s3verify@latest

Usage

$ s3verify --help
Usage: s3verify [options] <LocalPath> <S3Uri>
S3Uri must have the format s3://<bucketname>/<key>.

Options:
      --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)
  -h, --help                  Show this help.
      --no-sign-request       Do not sign requests.
      --no-verify-ssl         Do not verify SSL certificates.
      --profile string        Use a specific profile from your credential file.
      --region string         The region to use. Overrides config/env settings. Avoids one API call.
      --use-path-style        Use S3 Path Style.
      --version               Print version number.
      --version-id string     Version ID used to reference a specific version of the S3 object.

Download

s3verify.zip

Comments(1)

  • 1

    Error: a non-empty Access Key (AKID) must be provided in the credential

    I launched the command in this format as suggested in the usage part of README.md:

    s3verify.exe E:\vm-oemsan\vm-oemsan-disk1.vmdk s3://xxxxxxxx/vm-oemsan/vm-oemsan-disk1.vmdk

    and obtained this error:

    Fetching S3 object information... operation error S3: GetBucketLocation, https response error StatusCode: 400, RequestID: A63K84RQFV4XMH30, HostID: 60ykfoUbKUYP38DuSfRbuyZtiQLofSPHQ9lcQKOeiYcNXhoVT6jF9v4P0tfMG12fpdQMYJeX4Vk=, api error AuthorizationHeaderMalformed: The authorization header is malformed; a non-empty Access Key (AKID) must be provided in the credential.

    I've seen the help and I can't find any option related to non-empty Access Key.

    I used the binary s3verify included in s3verify-0.1.0-windows_amd64.zip