A lightweight AWS S3 client with a focus on minimizing binary size.
go install github.com/knaka/s3clt/cmd/s3clt
go install github.com/knaka/s3clt/cmd/s3get
go install github.com/knaka/s3clt/cmd/s3put
UPX-compressed executables are available in Releases.
Retrieve an S3 object and output it to stdout. s3get ...
is equivalent to s3clt get ...
. Symlink s3get
to s3clt
binary works as s3get
.
s3clt get us-east-1 DOC-EXAMPLE-BUCKET1 foo.tar | tar xvf -
s3get us-east-1 DOC-EXAMPLE-BUCKET1 foo.tar | tar xvf -
Read data from stdin and upload it as an S3 object. s3put ...
is equivalent to s3clt put ...
. Symlink s3put
to s3clt
binary works as s3put
.
tar cvf * | s3clt put us-east-1 DOC-EXAMPLE-BUCKET1 bar.tar
tar cvf * | s3put us-east-1 DOC-EXAMPLE-BUCKET1 bar.tar
You can omit the region name if it is obtainable from the environment variables $AWS_REGION
or $AWS_DEFAULT_REGION
, the shared config file ~/.aws/config
, or EC2 instance metadata.
s3get DOC-EXAMPLE-BUCKET1 foo.tar | tar xvf -
- Set up GitHub Actions to build and place binaries in the "Releases" section.
- Further reduce binary size using UPX.