s3clt

package module
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 19, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

README

s3clt

A lightweight AWS S3 client with a focus on minimizing binary size.

Installation

go install github.com/knaka/s3clt/cmd/s3clt
go install github.com/knaka/s3clt/cmd/s3get
go install github.com/knaka/s3clt/cmd/s3put

Synopsis

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 -

Todo

  • Set up GitHub Actions to build and place binaries in the "Releases" section.
  • Further reduce binary size using UPX.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(command Command, args []string)

func RunGet

func RunGet(args []string)

func RunPut

func RunPut(args []string)

Types

type Command

type Command int8
const (
	CommandUnknown Command = iota
	CommandGet
	CommandPut
)

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL