Upload/Download from S3 using curl (Signature Version 2)
An old script I wrote to interact with s3. It's obsolete now.
Latest
Latest using rclone: https://gist.github.com/repalash/cff71a73127b1a65075adba7677af7d6
Usage:
./s3_v2.sh <file_path> <bucket> <method> <prefix>
Requires AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables
PUT Example: ./s3_v2.sh path/to/file bucket-name PUT prefix/
Will upload file path/to/file to s3://bucket-name/prefix/path/to/file
GET Example: ./s3_v2.sh path/to/file bucket-name GET prefix/
Will download file from s3://bucket-name/prefix/path/to/file to path/to/file
Note: prefix is optional
Note
Uses Signature Version 2 which is deprecated but still supported in some regions launched before January, 2014
Code on Github Gist -