s3-tool

command module
v0.0.0-...-c0e9cb7 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2017 License: MIT Imports: 9 Imported by: 0

README

s3-tool

Go Report Card codebeat badge Build Status
CLI tool for AWS S3, written in Go. Work in progress...

AWS Credentials

Set environment variables

export AWS_ACCESS_KEY_ID=<key>       
export AWS_SECRET_ACCESS_KEY=<secret>
Install

Get it via

go get github.com/artemnikitin/s3-tool 

Or you can just get binary from release.

Commands

Current list of supported commands:

presigned
download
upload
  • presigned generate pre-signed URL for downloading file from S3.
    Requires parameters:
    • bucket specified bucket in S3
    • key specified key in S3
      Example:
s3tool presigned -bucket=mybucket -key=my-file.png
  • download download file from S3.
    Required parameters:
    • bucket specified bucket in S3
    • key specified key in S3
    • url if specified, then s3-tool will try to download file be pre-signed URL ignoring other parameters
    • path (optional) if specified, then file will be download to specified folder
      Example:
s3-tool download -bucket=mybucket -key=my-file.png    
s3-tool download -url=https://
  • upload upload file(s) to S3
    Required parameters:
    • bucket specified bucket in S3
    • key specified key in S3
    • path specified path to file/folder. If specified path is folder, then folder with all it's content will be uploaded.
    • keepRootFolder (optional) specified option to keep root folder from path parameter. Disabled by default.
      Example:
s3-tool upload -bucket=mybucket -key=my-file.png -path=/path/to/my-file.png
s3-tool upload -bucket=mybucket -key=/ -path=/path/to/folder -keepRootFolder
Optional parameters
  • region set S3 region, by default region will be set to us-east-1
    Example:
s3-tool -bucket=bucket-name -key=my-key -region=region-name 
Run

Run it like:

s3-tool command -parameter=blabla ...

You can specify parameter -log for logging AWS requests and responses.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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