Module AWS::S3
In: lib/aws/s3/acl.rb
lib/aws/s3/authentication.rb
lib/aws/s3/base.rb
lib/aws/s3/bittorrent.rb
lib/aws/s3/bucket.rb
lib/aws/s3/connection.rb
lib/aws/s3/error.rb
lib/aws/s3/exceptions.rb
lib/aws/s3/logging.rb
lib/aws/s3/object.rb
lib/aws/s3/owner.rb
lib/aws/s3/service.rb
lib/aws/s3/version.rb

AWS::S3 is a Ruby library for Amazon’s Simple Storage Service’s REST API (aws.amazon.com/s3). Full documentation of the currently supported API can be found at docs.amazonwebservices.com/AmazonS3/2006-03-01.

Getting started

To get started you need to require ‘aws/s3’:

  % irb -rubygems
  irb(main):001:0> require 'aws/s3'
  # => true

The AWS::S3 library ships with an interactive shell called s3sh. From within it, you have access to all the operations the library exposes from the command line.

  % s3sh
  >> Version

Before you can do anything, you must establish a connection using Base.establish_connection!. A basic connection would look something like this:

  AWS::S3::Base.establish_connection!(
    :access_key_id     => 'abc',
    :secret_access_key => '123'
  )

The minimum connection options that you must specify are your access key id and your secret access key.

(If you don’t already have your access keys, all you need to sign up for the S3 service is an account at Amazon. You can sign up for S3 and get access keys by visiting aws.amazon.com/s3.)

For convenience, if you set two special environment variables with the value of your access keys, the console will automatically create a default connection for you. For example:

  % cat .amazon_keys
  export AMAZON_ACCESS_KEY_ID='abcdefghijklmnop'
  export AMAZON_SECRET_ACCESS_KEY='1234567891012345'

Then load it in your shell’s rc file.

  % cat .zshrc
  if [[ -f "$HOME/.amazon_keys" ]]; then
    source "$HOME/.amazon_keys";
  fi

See more connection details at AWS::S3::Connection::Management::ClassMethods.

Classes and Modules

Module AWS::S3::ACL
Module AWS::S3::BitTorrent
Module AWS::S3::Logging
Class AWS::S3::Authentication
Class AWS::S3::Base
Class AWS::S3::Bucket
Class AWS::S3::Owner
Class AWS::S3::ResponseError
Class AWS::S3::S3Exception
Class AWS::S3::S3Object
Class AWS::S3::Service

Constants

Version = [VERSION::MAJOR, VERSION::MINOR, VERSION::TINY, VERSION::BETA].compact * '.'

[Validate]