Skip to content

Bash Commands for S3 using AWS Signature Version 4

License

Notifications You must be signed in to change notification settings

Orange-OpenSource/s3-bash4

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 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 extremely 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} [-d {customdomain}] /{bucketname}/{filename} > {filename}

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

  # Delete from bucket:
  s3-delete -k {accesskey} -s /{path}/{secretid} -r {region} [-d {customdomain}] /{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
S3_DEFAULT_DOMAIN Default S3 custom domain
AWS_SECURITY_TOKEN Default AWS Security Token for temporary credentials

Requirements

  • GNU Bash
  • OpenSSL
  • cUrl

License

This work is released under the 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

  • Shell 100.0%