s3-util

Crates.ios3-util
lib.rss3-util
version0.3.0
sourcesrc
created_at2021-04-08 06:58:59.921757
updated_at2021-07-22 22:47:08.495114
descriptionA command line utility for interacting with S3 compatible object stores
homepage
repositoryhttps://github.com/ryankurte/s3-util
max_upload_size
id380733
size64,815
ryan (ryankurte)

documentation

README

Another S3 command line utility

A quick and extremely simple utility based on durch/rust-s3 for interacting with S3 compatible object stores because all the other tools I could find needed configuration and I'm not into it.

Status

Build GitHub tag Crates.io Docs.rs

Usage

Install via cargo install s3-util to build from source, cargo binstall s3-util to fetch a binary if you have cargo-binstall available, or grab a pre-build binary from the releases or a docker container from ghcr.io/ryankurte/s3-util.

Examples:

  • s3-util upload dir/something.txt ./localfile.txt to upload localfile.txt to dir/something.txt in the bucket
  • s3-util upload dir/something.txt ./*.txt to glob for a file matching ./*.txt and upload to dir/something.txt in the bucket
  • s3-util upload-dir prefix/ ./*.txt to upload each file matching ./*.txt with the prefix prefix/

You can also set the ACL with --acl, for example: --acl=public-read for a public bucket

See s3-util [SUBCOMMAND] --help for more information, you need to configure all the options as appropriate for your object-storage provider (specifically: ACCESS_KEY, S3_BUCKET, S3_ENDPOINT, S3_REGION and SECRET_KEY).

s3-util 0.1.0

USAGE:
    s3-util [OPTIONS] --access-key <access-key> --bucket <bucket> --endpoint <endpoint> --region <region> --secret-key <secret-key> <SUBCOMMAND>

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
        --access-key <access-key>    Access key for bucket [env: ACCESS_KEY=]
        --bucket <bucket>            Bucket name [env: S3_BUCKET=]
        --endpoint <endpoint>        Bucket endpoint (eg. amazonaws.com) [env: S3_ENDPOINT=]
        --log-level <log-level>       [default: info]
        --region <region>            Bucket region (eg. s3-ap-northeast-1) [env: S3_REGION=]
        --secret-key <secret-key>    Secret key for bucket [env: SECRET_KEY=]

SUBCOMMANDS:
    delete      Delete an item from the bucket
    download    Download an item from the bucket
    help        Prints this message or the help of the given subcommand(s)
    list        Show items in bucket
    upload      Upload an item to the bucket
    upload-dir    Upload files from a directory

Alternatives

Commit count: 21

cargo fmt