Uly.me

cloud engineer

  • Home
  • About
  • Archives
Home/Cloud/Install S3cmd on Mac

December 29, 2016

Install S3cmd on Mac

Previously, I wrote about installing and accessing Amazon S3 (Simple Storage Service) from Ubuntu using s3cmd command line tool. Interestingly enough, the S3cmd command line tool is also available on the Mac, since MacOS is based on NeXT, which was based on BSD, which is a major variant of Unix. Anyways, you can install s3cmd on the Mac so you can access to Amazon S3 via the command line.

How to Install

$ sudo sudo python setup.py install

$ sudo sudo python setup.py install

Configure

$ s3cmd --configure

$ s3cmd --configure

The configuration will ask you to provide your access key and secret key. You can get those keys from your AWS account or your AWS administrator.

Once it’s configured and you have access to the S3, you can try the following commands.

# list the files
$ s3cmd ls 
# get file sizes in human form
$ s3cmd du -H s3://yourbucket
# create a new bucket
$ s3cmd mb s3://newbucket
# put file into bucket
$ s3cmd put filename.ext s3://bucket/folder
# get file from bucket
$ s3cmd get s3://yourbucket/yourfolder/yourfile
# delete file from bucket
$ s3cmd del s3://yourbucket/yourfolder/yourfile

# list the files $ s3cmd ls # get file sizes in human form $ s3cmd du -H s3://yourbucket # create a new bucket $ s3cmd mb s3://newbucket # put file into bucket $ s3cmd put filename.ext s3://bucket/folder # get file from bucket $ s3cmd get s3://yourbucket/yourfolder/yourfile # delete file from bucket $ s3cmd del s3://yourbucket/yourfolder/yourfile

There are a lot more commands you can explore. Here’s the documentation.

Filed Under: Cloud, Linux, Mac Tagged With: s3cmd

Content delivered to your email

About Me

I'm Ulysses, a Cloud Engineer at Cardinal Health based in Columbus, Ohio. I’m a certified AWS Solutions Architect. This website is my way of documenting the things I have learned in the Cloud. When off the grid, I enjoy riding my electric skateboard. I have surfed, snowboarded and played the saxophone in the past. I hope you will find this site helpful. It's powered by WordPress and hosted in AWS LightSail.

  • Cloud
  • Linux
  • Git

Copyright © 2012–2021