Amazon S3 is a web service offered by Amazon. It comes under the header of Amazon Web Services(AWS). Amazon S3 has become a widely used Data Storage medium because of its reasonably cost and ease of use. It is widely used by corporates and startups. The data is stored in S3 objects called buckets. To play around with the contents of S3 buckets, we have s3cmd, a very useful command line tool, that allows us to interact directly and securely with the contents in our S3 buckets. It supports various operations like delete, fetch, upload etc.

Installation

s3cmd requires python 2.6x or newer.It is not compatible with python3.

For Redhat, CentOs & Fedora systems:

 sudo yum --enablerepo updates-testing install s3cmd

For Ubuntu & Debian systems:

Import S3tools signing key:

 wget -O- -q http://s3tools.org/repo/deb-all/stable/s3tools.key | sudo apt-key add -

Add the repo to sources.list:

 sudo wget -O/etc/apt/sources.list.d/s3tools.list http://s3tools.org/repo/deb-all/stable/s3tools.list

Refresh package cache and install the newest s3cmd:

 sudo apt-get update && sudo apt-get install s3cmd

For windows:

Follow the link and download the .exe file according to your system’s architecture.

Usage and Functionality

s3cmd is a very easy to use command line utility.To start with one has to configure the AWS S3 access with s3cmd. To configure type:

 s3cmd --configure

You will get the following output, enter whatever details are required like access keys and secret keys

s3cmd-configure

After configuration s3cmd is linked to you S3 account in AWS.Now one can use its various functions like creating an object, uploading contents to a bucket, deleting an object, creating a bucket, finding diskk usage etc. To find all the available commands and command line arguments;type the following command:

s3cmd --help 

The output will also include availaible commands.

s3cmd-help