Connecting your Mac OSX to AmazonS3 buckets.
This process requires a couple of Unix tools installed, s3cmd and gpg (optional), s3cmd is the command line tool used to connect to Amazon S3 and gpg is an optional secure tool allowing data transfer to be encrypted over HTTPS between you and Amazon.
This guide uses Homebrew to install the 2 required programs, this can also be done with MacPorts.
You will already need to have your Amazon S3 buckets set up and need to have Access ID and Secret Key ready to be pasted into the Terminal.
brew install s3cmd
brew install gpg
When prompted paste in your Access key, Secret key and encryption password, the encryption password has to be made by you. The path to gpg is:
That’s all you need to do.
Using the s3cmd Tool
To list all your buckets:
To list contents of a bucket:
s3cmd ls s3://mybucket
To get something from the bucket and move to your desktop:
s3cmd get s3://mybucket/my-needed-file.png ~/Desktop
And the reverse to put something to the bucket – using the –P flag to make it public:
s3cmd -P put ~/Desktop/my-file.png s3://mybucket/
To delete a file:
s3cmd del s3://mybucket/my-file-to-delete.png
Check the man for more options