Wednesday, April 11, 2012

installing s3cmd in amazon ec2-instance


s3cmd is a command line tool for uploading, downloading and managing file and directories with amazon simple storage s3. It is very useful when running scripts and scheduling scripts with cron. First you have to install s3cmd package which is available from Here we are installing s3cmd in a Centos 5 instance using yum.

Installing s3cmd:

First you have to install the repo file of s3cmd in the system.
you can get the repo from the following url.

save the repo in your /etc/yum.repos.d/ as follows
[root@xxxxxxx ~]# cat /etc/yum.repos.d/s3cmd.repo
# Save this file to /etc/yum.repos.d on your system
# and run "yum install s3cmd"
name=Tools for managing Amazon S3 - Simple Storage Service (RHEL_5)
[root@xxxxxxx ~]#

Now Install it using yum:
[root@xxxxxxx ~]# yum install s3cmd

Now configure it. It will ask your access key, secret key and encryption key(just hit enter if you don't want).
[root@xxxxxxx ~]# s3cmd --configure

Now you will be able to list your buckets in your amazon s3 storage using the following command.
[root@xxxxxxx ~]# s3cmd ls

Look here or more s3cmd examples

No comments:

Post a Comment

Be nice. That's all.