Before you begin, you must create an Amazon Mechanical Turk Requester account, and set it up to use Amazon Web Services. You must also verify that you have installed the appropriate toolkits and libraries.
Before you can call the web service, you must have an Amazon Mechanical Turk Requester account, and you must register your account for use with Amazon Web Services.
Tip: | If you already have a Requester account, you can register for Amazon Web Services with the same e-mail address and password. If you have an Amazon Web Services account but not a Requester account, you can register as a Requester with your AWS e-mail address and password. |
To create a Requester account
Go to the Amazon Mechanical Turk Requester web site:
Click Register in the upper-right-hand corner.
Enter your e-mail address.
If you already have an Amazon.com account for your e-mail address, you can sign in using your e-mail address and password. However, we recommend creating a new account for use as a Requester.
Follow the prompts to complete your Requester account registration. You will be prompted for your mailing address, and you will be asked to accept the Amazon Mechanical Turk Participation Agreement.
Before you can use the Amazon Mechanical Turk Requester web service, you must set up your Requester account with Amazon Web Services.
The code samples presented in this guide use libraries and toolkits to perform certain functions. Use the following steps to install the appropriate tools and verify that the code samples work with your environment.
The version numbers of the libraries and tools listed here represent the versions we have tested. In some cases, older versions might work. Newer versions usually work. Cases where a specific version is required are noted below.
Tip: | Don't forget: You can hide sections of this guide that do not apply to your programming language using the drop-down menu at the top of this page. |
The Java code sample requires the following software.
| Software | Version Tested | Web Site |
|---|---|---|
|
Java Development Kit |
Java 2 Platform Standard Edition 1.4.2; also works with Java SE 5. | |
|
Apache Axis |
1.4. Using a version prior to 1.4 might require different code. |
Tip: | The ready-to-run Java code sample available from the AWS Developer Connection web site includes a script that builds, configures and runs the sample. The script requires Apache Ant (version 1.6.5 tested), which is available from the following web site:
If you use the provided Apache Ant script, you do not need
to add Apache Axis to your classpath. See the code sample's
|
To check your Java version
Enter the following command at a command prompt:
java -version
The command response should be similar to the following:
java version "1.4.2" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode)
To set up Apache Axis 1.4
Unpack the Apache Axis distribution. Remember the location of the Axis directory.
Add the Axis jars and lib directory to your Java
classpath. How to do this depends on your operating
system.
For example, in a Linux command shell such as Bash, the
following commands add the Axis 1.4 jars and lib
directory to your CLASSPATH environment variable:
export AXIS_PATH=/path/to/ApacheAxis export CLASSPATH=$AXIS_PATH/lib/axis.jar:$CLASSPATH export CLASSPATH=$AXIS_PATH/lib/commons-discovery-0.2.jar:$CLASSPATH export CLASSPATH=$AXIS_PATH/lib/commons-logging-1.0.4.jar:$CLASSPATH export CLASSPATH=$AXIS_PATH/lib/jaxrpc.jar:$CLASSPATH export CLASSPATH=$AXIS_PATH/lib/log4j-1.2.8.jar:$CLASSPATH export CLASSPATH=$AXIS_PATH/lib/saaj.jar:$CLASSPATH export CLASSPATH=$AXIS_PATH/lib/wsdl4j-1.5.1.jar:$CLASSPATH export CLASSPATH=$AXIS_PATH/lib/:$CLASSPATH
Enter the following command at a command prompt to verify your Apache Axis installation:
java org.apache.axis.wsdl.WSDL2Java -h
If Apache Axis is installed correctly, the command will print information about using Axis's WSDL2Java utility.
The C# code sample requires the following software.
| Software | Version Tested | Web Site |
|---|---|---|
|
Microsoft C#.NET Framework |
1.1 | |
|
Microsoft Visual C# |
2005 Express Edition |
http://msdn.microsoft.com/vstudio/ Microsoft offers Visual C# Express Edition as a free download. |
The Perl code sample requires the following software.
| Software | Version Tested | Web Site |
|---|---|---|
|
Perl |
5.8 | |
|
Perl module: |
2.22 |
http://search.cpan.org/~gbarr/TimeDate-1.16/lib/Date/Format.pm |
|
Perl module: |
1.01 |
http://search.cpan.org/~gaas/Digest-HMAC-1.01/lib/Digest/HMAC_SHA1.pm |
|
Perl module: |
3.05 | |
|
Perl module: |
5.803 | |
|
Perl module: |
1.13 |
To check your Perl version
Enter the following command at a command prompt:
perl -version
The command response should begin with something similar to the following:
This is perl, v5.8.6 built for Linux-2.4c2.3-i686-64int ...
To check that the required Perl modules are installed
Enter the following 5 commands at a command prompt:
perl -MDate::Format -e 1 perl -MDigest::HMAC_SHA1 -e 1 perl -MMIME::Base64 -e 1 perl -MLWP -e 1 perl -MXML::XPath -e 1
If none of the commands respond with errors, then all of the modules are installed.
The PHP code sample requires PHP 5 or later. You can download the latest version of PHP from the following web site:
This sample uses PHP's command line interface to run. You can also run the sample through a web server. We don't cover how to do that here.
The Python REST code sample requires Python 2.4 or later. You can download the latest version of Python from the following web site:
The Python SOAP code sample requires the following software:
| Software | Version Tested | Web Site |
|---|---|---|
|
Python |
2.4 | |
|
SOAPpy |
0.11.5 |
To check your Python version
Enter the following command at a command prompt:
python -V
The command response should be similar to the following:
Python 2.4
To check that SOAPpy is installed
Run Python in interactive mode:
python
Attempt to import the SOAPpy library:
>>> import SOAPpy
If you do not see an "ImportError," then SOAPpy is
installed. You can check which version of SOAPpy is
installed by examining the __version__:
>>> SOAPpy.__version__ '0.11.5'
The Ruby REST code sample requires Ruby 1.8 or later. You can download the latest version of Ruby from the following web site:
The Ruby SOAP code sample requires Ruby 1.8 or later. You can download the latest version of Ruby from the following web site: