Path: lib/amazon/aws.rb
Last Update: Sat Mar 20 12:58:50 +0100 2010

$Id: aws.rb,v 1.130 2010/03/20 11:58:50 ianmacd Exp $

Ruby/AWS - A Ruby interface to the Amazon Associates Web Services API.


Ruby/AWS is a Ruby language library that allows programmatic access to the popular Amazon Web sites via the AWS v4 API. It is the successor to the now obsolete Ruby/Amazon.

In addition to the original site, the local sites,,, and are also supported.

Although the library is still in development, the AWS v4 API is now more or less fully supported, with only tiny gaps in the functionality of some operations.

The following operations are supported:


Remote shopping-carts are also supported. This adds the following operations:


Finally, multiple operations and batch requests are also supported.

Ruby/AWS supports request authentication, using your secret key to sign your requests to AWS.

Beyond wrapping features readily available in the AWS API, Ruby/AWS also offers advanced features not directly supported by the AWS API, such as the ability to retrieve all results pages for a particular search, rather than having to manually deal with multiple AWS responses of 10 results per page.

You can also retrieve product images and optionally overlay them with percentage discount icons.

Another advanced feature is the ability to cache responses returned by AWS. If the cache is used (as it is by default), the results of each unique search will be cached and used for 24 hours. The cache can be manually flushed of all or just the expired entries.

One other useful advanced feature is the ability to determine the appropriate Amazon locale for a given client, based on its IP address or host name. This allows you to perform AWS operations using the correct geographical Amazon site for any given client. German and Austrian clients can be made to interact with, British and Irish clients with, etc.


Please see the INSTALL file supplied with the software for details of how to install Ruby/AWS. You can choose between an installation script and a RubyGems installation.

Note, however, if opting for the gem installation, that Ruby/AWS‘s RubyForge UNIX name is now ruby-aaws. The ruby-aws name was taken by another project and this namespace clash prevented remote installation of the Ruby/AWS gem.


Before you can use this library, you need to obtain an Amazon Web Services access key ID.

You should also apply for an Associates account, although this isn‘t strictly necessary. If you do not explicitly provide an Associates tag in the operations you conduct via Ruby/AWS, the tag of the Ruby/AWS author will be used by default.

See Also

Ultimately, the way to get the most from Ruby/AWS is to read the AWS documentation to get a feel for what is possible, and then experiment with the library to see how the calls to AWS are mapped to the Ruby world. You should also review this library‘s RDoc documentation as well as the plain-text README file that came with the archive.

Additionally, there‘s a mailing-list available, where you can discuss any Ruby/AWS-related subjects and issues.

Please see the AWS Developer Resources home page, the Amazon Web Services API documentation, and, in particular, the release notes for definitive information on the capabilities and inner workings of the AWS API.


Version 0.8.1

gzip'ed tar archive

Ruby Gem

Fedora 12 RPM

Fedora 12 doc RPM

Fedora 12 source RPM

Author:Ian Macdonald <>
Copyright:(C) 2008-2010 Ian Macdonald

Required files

amazon   amazon/aws/cache   enumerator   iconv   rexml/document   uri