upload-to-s3

Crates.ioupload-to-s3
lib.rsupload-to-s3
version0.3.0
sourcesrc
created_at2024-08-01 09:31:56.674752
updated_at2024-08-01 09:31:56.674752
descriptionSmall tool to upload a file to Amazon S3
homepagehttps://github.com/wezm/upload-to-s3
repositoryhttps://github.com/wezm/upload-to-s3
max_upload_size
id1321836
size44,977
Wesley Moore (wezm)

documentation

README

upload-to-s3

Small binary that can upload a file to an Amazon S3 bucket.

Build Status Version License

This tool was built to allow uploading files to S3 from a continuous integration pipeline. Pre-built binaries are provided for several platforms, which can be downloaded as part of a CI build.

Usage

Usage: upload-to-s3 [options] FILE OBJECT

Options:
    -b, --bucket NAME   S3 bucket
    -r, --region REGION S3 region (default: us-east-1)
    -h, --help          Print this help information

upload-to-s3 expects to retrieve AWS credentials from the following environment variables:

  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY

It will also read values for these variables from a .env file if present.

Upload a file as follows:

./upload-to-s3 -b bucket.example.com some-file.tar.xz object/on/s3/some-file.tar.xz

For a more complete example of usage see the CI configuration for this repository.

Install

Pre-compiled Binary

upload-to-s3 is a single binary available for a number of platforms. The binary has no runtime dependencies. Pre-compiled binaries are available for:

  • FreeBSD 14+ amd64
  • Linux x86_64
  • Linux aarch64
  • MacOS Universal
  • Windows x86_64

Check the [latest release] for download links.

Download and extract along these lines:

curl https://releases.wezm.net/upload-to-s3/0.2.0/upload-to-s3-0.2.0-x86_64-unknown-linux-musl.tar.gz | tar zxf -

From Source

cargo install upload-to-s3

Development

Minimum Supported Rust Version: 1.79.0

Commit count: 0

cargo fmt