Databases Reference
In-Depth Information
www.subbu.org/weblogs/main/2007/12/a_restful_versi.html , to understand why the
SimpleDB REST API isn't truly RESTful. The easiest way to test this API is to run the operations
using a command-line client. I will use a Perl-based command-line client in this subsection. The
name of this command-line client is amazon-simpledb-cli. You can download a copy of this client
from its project page, accessible online at http://code.google.com/p/amazon-simpledb-cli/ .
The amazon-simpledb-cli program depends on the Amazon-provided Perl modules for AWS. The
Perl modules for AWS are available for download at http://aws.amazon.com/code/1136 .
A SOAP API is also available for Amazon SimpleDB. I don't cover the SOAP API
in this topic but you can learn more about the SOAP API in the online developer
documentation at http://aws.amazon.com/documentation/simpledb/ .
To install amazon-simpledb-cli, fi rst make sure you have Perl installed on your machine. If you
are a POSIX system user (which includes various fl avors of Linux, BSD, and Mac OSX) you will
likely have Perl preinstalled on your machine. If not, you need to get a copy of the Perl compiler and
interpreter and get it up and running fi rst. Instructions for installing Perl are beyond the scope of
this topic, but start at perl.org if you need help.
To get started, fi rst make sure to get (or update) the following Perl modules:
Getopt::Long
Pod::Usage
Digest::SHA1
Digest::HMAC
XML::Simple
Bundle::LWP
Crypt::SSLeay
You can install Getopt::Long like so:
perl -MCPAN -e 'install Getopt:Long'
You can install the other required Perl modules in the same manner. Just make sure to replace
Getpot::Long with the name of the specifi c module. On some systems and for some modules you
may need to run the commands as root. Once the required modules are installed and updated you can
install the downloaded AWS Perl module as follows:
1.
First, unzip the downloaded distribution as follows: unzip AmazonSimpleDB-*-perl-
library.zip
2.
Then get the Perl sitelib like so: sitelib=$(perl -MConfig -le 'print
$Config{sitelib}')
Search WWH ::




Custom Search