s3cli.rb - Readme

This script imitates common shell commands available on Unix systems to access Amazon Storage Service(S3). I started to work on this script to integrate amazon storage service with existing backup scripts both at work and home. It also turned out to be a good way to make any open source code written by me available to everyone. In fact this readme file and the associated script will be available on S3 and were uploadedusing this script.

http://s3.amazonaws.com/designandcode/s3cli.rb
http://s3.amazonaws.com/designandcode/s3cli-readme.html

This code is still under development and does not handle a lot of errors. It will work fine as long as it does not encounter corner cases. I will keep improving at over time. Any comments, suggestions and patches are always welcome. I have a TODO section at the bottom which reflects my thoughts on future improvements.

Recent Changes Requirements

This script requires ruby and ruby gems to be installed. It also requires the "aws/s3" gem available from http://amazon.rubyforge.org. You will need to have an account with Amazon Web Services and an active Storage Service account. You should then lookup your keys and name from the account and put them in the amazon.keys file.

You will need to create a file called amazon.keys with the following format and edit the path to it in s3cli.rb for ruby to find it.

Contents of amazon.keys file should look like

$keys = {
        'secret' => 'xxxxxxx',
        'id' => 'yyyyyyyyy',
        'name' => 'username'
}
Usage

<id> means that user needs to give a name of his choice. For example a sample command for ls will look like "s3cli.rb ls designandcode"

[ ] represents an optional argument.

| separates all the possible values for an argument. Only one of the possible values can be specified at a time.