Ruby/AWS

A Ruby language library that makes it relatively easy for programmers to retrieve info from the popular Amazon site.
Download

Ruby/AWS Ranking & Summary

Advertisement

  • Rating:
  • License:
  • GPL
  • Price:
  • FREE
  • Publisher Name:
  • Ian Macdonald
  • Publisher web site:
  • http://caliban.org/ruby/ruby-aws/

Ruby/AWS Tags


Ruby/AWS Description

A Ruby language library that makes it relatively easy for programmers to retrieve info from the popular Amazon site. Ruby/AWS is a Ruby language library that makes it relatively easy for the programmer to retrieve information from the popular Amazon Web site via Amazon Web Services (AWS). In addition to the original amazon.com site, amazon.co.uk, amazon.de, amazon.fr, amazon.ca and amazon.co.jp are also supported.Ruby/AWS is the sequel to Ruby/Amazon. All too often, sequels fall short of expectations, but Ruby/AWS truly aims to be better than its predecessor. It has some distance to travel before that aim is achieved, but we're getting there.History and compatibility with Ruby/AmazonIn the beginning, there was Ruby/Amazon. This library was built around version 3.x of the Amazon Web Service API and first saw the light of day in 2004. That version of the API was known at the time as AWS 3.x.Amazon later renamed AWS to ECS, or E-Commerce Service, for the launch of version 4 of the API, a complete overhaul that provided no backward compatibility with previous versions. The previous version of the API was sometimes referred to as ECS 3.Demonstrating the wisdom and consistency for which large companies are famous, Amazon changed its mind once again in late 2007, reverting to the familar name of AWS. This time, however, it stood for Associates Web Service.Since Amazon started offering AWS, the number of Amazon Web APIs has grown. AWS is now just one of many. It is therefore no longer appropriate to call this library by a name so general as Ruby/Amazon, because it interacts only with AWS. Henceforth, this library shall therefore be known as Ruby/AWS.Ruby/AWS is built around version 4 of the Amazon AWS API, which is fundamentally different to version 3, both in terms of how data is requested and returned. The underlying XML data structures are radically changed from previous versions.It has therefore not been possible in Ruby/AWS to retain any level of API compatibility with Ruby/Amazon. Unfortunately, this means that any code written for Ruby/Amazon will need to be rewritten to work with Ruby/AWS.One bit of good news is that the /etc/amazonrc and ~/.amazonrc files used with Ruby/Amazon _are_ compatible with Ruby/AWS. The only change required for Ruby/AWS is the addition of a 'key_id' parameter, which should contain your AWS Access Key ID.Amazon finally decomissioned v3 of the AWS API on 2008-03-31. As a result, the original Ruby/Amazon library no longer functions. What's New in This Release: · . Requests to AWS can now be signed in order to authenticate them. Amazon plans to make the signing of requests mandatory as of 15th August 2009, so it is recommended to start doing so now. To have your requests automatically signed by Ruby/AWS, simply add the 'secret_key_id' parameter to your ~/.amazonrc configuration file. Its value should, rather predictably, be your secret access key, which can be retrieved here: · https://aws-portal.amazon.com/gp/aws/developer/account/index.html?ie=UTF8&action=access-key · You needn't be concerned about Amazon's warnings not to show your secret key to anyone else, because it will be used only for signing requests, prior to sending them. The key itself will not be sent over the network to Amazon, even in encrypted form. · In order to incorporate the new functionality, minor changes had to be made to the way the AWS request URLs are encoded. This change means that previous requests cached by earlier versions of Ruby/AWS will not be found in the cache. This is a minor, one-time inconvenience, and it just means that the requests will be performed and cached again. · When Amazon's AWS servers check whether the correct signature has been applied to a request, they recalculate the signature based on the data in the request and check for a match with the signature supplied by Ruby/AWS. · This introduces a complicating factor, namely the treatment of non-ASCII characters in the request, such as accented letters. When recalculating the signature, Amazon will use the UTF-8 representation of any such characters. This will cause a signature mismatch if you used a different encoding, such as ISO-8859-1 (a.k.a. Latin-1), when you supplied values for your request parameters. · Ruby/AWS can't (reliably) dynamically determine which character encoding your strings use, so this information can now be supplied via the ~/.amazonrc configuration file, using the 'encoding' parameter. This should be set to whichever encoding you use. If left unset, it defaults to UTF-8. An exception will be raised if you attempt to use an invalid (i.e. unknown) encoding. · Currently, the encoding you use makes no difference unless your requests are being signed, but because signing will soon be mandatory, I recommend you explicitly state which encoding you intend to use. · You may also change the encoding in use at any time by assigning to the @encoding instance variable of your Request object. · The robustness of the software has been improved by handling the following additional exceptions while communicating with the AWS servers: Errno::ECONNREFUSED, Errno::ECONNABORTED, Errno::ETIMEDOUT and Timeout::Error. Users have reported that all of these occur from time to time, although only Windows platforms seem to suffer from Errno::ECONNABORTED. · The version of the AWS API used is now 2009-03-31, the latest at the time of writing.


Ruby/AWS Related Software