Install s3cmd tools on a mac os x for amazon s3 bucket access upload sync etc

Hi i needed to install s3cmd tools on my mac os x so i could integrate with amazon s3.

Open terminal and run this command

which gpg

If it doesnt return anything install the following at this link just run the installer

Run the command again

which gpg

Hopefully now you should get something like below.


Ok good we need this to now install s3 tools

download s3tools from this link click download here

Extract the tar the cd into it then run this command

test:~ sam$ cd s3cmd-1.1.0-beta3
sam$ sudo python install

Enter your system password and let it install

you should now be able to run the following command

s3cmd --configure

Now run the setup below are my details

s3cmd --configure

Enter new values or accept defaults in brackets with Enter.
Refer to user manual for detailed description of all options.

Access key and Secret key are your identifiers for Amazon S3
Access Key: yours3key
Secret Key: yoursecrets3key

Encryption password is used to protect your files from reading
by unauthorized persons while in transfer to S3
Encryption password: fkcreate
Path to GPG program [/usr/local/bin/gpg]: 

When using secure HTTPS protocol all communication with Amazon S3
servers is protected from 3rd party eavesdropping. This method is
slower than plain HTTP and can't be used if you're behind a proxy
Use HTTPS protocol [No]: yes 

New settings:
  Access Key: yours3key
  Secret Key: yoursecrets3key
  Encryption password: fkcreate
  Path to GPG program: /usr/local/bin/gpg
  Use HTTPS protocol: True
  HTTP Proxy server name: 
  HTTP Proxy server port: 0

Test access with supplied credentials? [Y/n] y
Please wait, attempting to list all buckets...
Success. Your access key and secret key worked fine :-)

Now verifying that encryption works...
Success. Encryption and decryption worked fine :-)

Save settings? [y/N] y
Configuration saved to '/Users/sam/.s3cfg'

List all your buckets

$ s3cmd ls

List contents of your bucket

$ s3cmd ls s3://mybucket

Upload a file (and make it public)

$ s3cmd -P put /path/to/local/file.jpg s3://mybucket/my/prefix/file.jpg

Delete a file

$ s3cmd del s3://mybucket/my/prefix/file.jpg

Make a bucket with

s3cmd mb s3://my-new-bucket-name

Upload multiple files

s3cmd -P put --recursive directory s3://bkt/backup/

Sync with a local folders

s3cmd -P sync directory s3://bkt/backup/

Sync and make private

s3cmd --acl-private sync ./  s3://bucket/folder/

You can find more commands here

Copy from
Other ressource:

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s