Skip to content

wikiwi/s3-bash4

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

s3-bash4

s3-bash4 is a small collection of Bash scripts to do simple interaction with Amazon S3 using AWS Signature Version 4. The advantage of using s3-bash4 is that it's extremly lightweight and easy to use. No need to setup Python, Java, Ruby and co.

This is inspired by the discontinued s3-bash from cosmin. I was in need of a Bash version that supports the newer AWS Signature Version 4.

Usage

# Get file from bucket:
s3-get -k {accesskey} -s /{path}/{secretid} -r {region} /{bucketname}/{filename} > {filename}

# Upload file to bucket:
s3-put -k {accesskey} -s /{path}/{secretid} -r {region} -T /{path}/{filename} /{bucketname}/{filename}

# Delete from bucket:
s3-delete -k {accesskey} -s /{path}/{secretid} -r {region} /{bucketname}/{filename}

Environment Variables

Variable Description
AWS_ACCESS_KEY_ID Default AWS Access Key ID
AWS_SECRET_ACCESS_KEY Default AWS Secret Access Key
AWS_DEFAULT_REGION Default AWS S3 Region
AWS_SECURITY_TOKEN Default AWS Security Token for temporary credentials

Requirements

  • OpenSSL
  • cUrl

License

Apache License Version 2.0

About

Bash Commands for S3 using AWS Signature Version 4

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages