Install s3cmd

brew install s3cmd

Install gpg

brew install gpg

Configure s3cmd

s3cmd --configure

Just follow the prompted to add your Access Key, Secret Key and encryption password

gpg path is /usr/local/bin/gpg

Using the tool


man s3cmd
s3cmd ls

List content of a bucket

s3cmd ls s3://bucket_name

Get files from a bucket to local

s3cmd get s3://bucket_name/file.png LOCAL_PATH
or s3cmd get -r s3://bucket_name LOCAL_PATH

To Put files from local to a bucket

s3cmd -P put LOCAL_PATH/my-file.png  s3://bucket_name/

To delete a file on a bucket

s3cmd del s3://bucket_name/my-file-to-delete.png

Upload files recursively

s3cmd sync -r LOCAL_UPLOAD_DIR s3://BucketName/ --acl-public

Set a bucket to be public

s3cmd setacl s3://BucketName --acl-public --recursive

Check Disk usages on S3

s3cmd du s3://BucketName

Good article about using s3cmd: