# Get Started With the Amazon Mechanical Turk Command Line Tools v1.3.1

## What Are the Amazon Mechanical Turk Command Line Tools?

The Amazon Mechanical Turk Command Line Tools are a set of command line interfaces allowing you to easily build solutions leveraging Amazon Mechanical Turk without writing a line of code. The goals of the Command Line Tools are to:

- abstract you from the "muck" of using web services
- allow you to create solutions without writing a single line of code
- allow you to focus more on solving the business problem and less on managing technical details

## How Do I Get Started as a Windows User?

The installation of the Command Line Tools and loading your first HIT is simple and requires minimal configuration.

The instructions below assume that the downloaded file was uncompressed in a directory that you specified. When the instructions refer to [Command Line Tools Installation Directory], it assumes the following directory structure:
[Command Line Tools Installation Directory] = [The directory that the downloaded file was uncompressed into]\aws-mturk-clt-1.3.1

If you downloaded and ran the mech-turk-setup.exe file, you have installed and configured the Command Line Tools. Your [Command Line Tools Installation Directory] is [Command Line Tools Installation Directory] = mech-turk-tools-1.3.1

To verify that your installation is correct, run the command to get your account balance, described in the next section.

If you downloaded a different file, follow the instructions below to install and configure the Command Line Tools.

1. Sign up for an Amazon Web Services (AWS) account at the AWS web site.
2. Sign up for an Amazon Mechanical Turk Requester account at the Requester web site.
3. Ensure that you are using the latest version of the Command Line Tools by checking the Command Line Tools page on the Amazon Web Services Resource Center.
4. Configure the Command Line Tools to use your AWS access identifiers information.

   a. Open a Windows command prompt by clicking on the Start Menu -> Programs -> Accessories -> Command Prompt
   b. Navigate to the following directory:
   [Command Line Tools Installation Directory]\bin c. Then run the following command:
   notepad mturk.properties d. Set the following properties to reflect your AWS access identifiers:

   access_key=[Your AWS Access Key]
   secret_key=[Your Secret Key] e. Save and close the file.

Your Command Line Tools are now configured. Verify this by checking your account balance.

Note: If you did not download a version of the Command Line Tools that contains the Java Standard Edition Runtime Environment (Only available for Windows distribution), you must have the Java JRE 1.5.0 (JRE 5) or later installed. The Command Line Tools are not compatible with JRE 6. You can download the JRE at the following website: http://java.sun.com/javase/downloads/index_jdk5.jsp.

### Get your account balance

To get your current balance,

1. Open a Windows command prompt by clicking on the Start Menu -> Programs -> Accessories -> Command Prompt
2. Navigate to the following directory:
   [Command Line Tools Installation Directory]\bin
3. Then run the following command:
   getBalance You should see the following output:
   Your account balance: $0.00 If you have prepaid funds in your account, you should see the correct balance.

If you did not receive the above output and encountered an error, check the following items.

1. Did you successfully create an Amazon Web Services account?
2. Did you successfully create an Amazon Mechanical Turk Requester account?
3. Did you correctly copy and paste your AWS access identifiers into the setup application or the mturk.properties file?

### Run the sample applications

Amazon Mechanical Turk provides several sample applications that you can run to create HITs. You can then revise the samples to create your own HITs. For complete instructions on how to run the samples see the Overview of the Sample Applications section in the User Guide for the Amazon Mechanical Turk Command Line Tools v1.3.1.

To find the sample applications, navigate to the following directory:
[Command Line Tools Installation Directory]\samples

### View the Command Line Tools tutorials

Amazon Mechanical Turk provides video tutorials to help you get started creating HITs. For more information, see Command Line Tools Tutorial.

### Additional Resources

For more information about the Command Line Tools see the Command Line Tools Reference section in the Amazon Mechanical Turk Developer Guide.

## How Do I Get Started as a Unix User?

The installation of the Command Line Tools and loading your first HIT is simple and requires minimal configuration.

The instructions below assume that the downloaded file was uncompressed in a directory that you specified. When the instructions refer to [Command Line Tools Installation Directory], it assumes the following directory structure:
[Command Line Tools Installation Directory] = [The directory that the downloaded file was uncompressed into]/aws-mturk-clt-1.3.1

1. Sign up for an Amazon Web Services (AWS) account at the AWS web site.
2. Sign up for an Amazon Mechanical Turk Requester account at the Requester web site.
3. Ensure that you are using the latest version of the Command Line Tools by checking the Command Line Tools page on the Amazon Web Services Resource Center.
4. Configure the Command Line Tools to use your AWS identifier information.

   a. Open the following file: [Command Line Tools Installation Directory]/bin/mturk.properties b. Set the following properties to reflect your AWS identifiers:

   access_key=[Your AWS Access Key]
   secret_key=[Your Secret Key] c. Save and close the file.
5. Set the MTURK_CMD_HOME environment variable to point to your Command Line Tools installation location.
6. Set the JAVA_HOME environment variable to point to your Java Standard Edition Runtime Environment (JRE) installation location.
7. Navigate to the following directory:
   [Command Line Tools Installation Directory]/bin

Your Command Line Tools are now configured. Verify this by checking your account balance.

### Get your account balance

To get your current balance,

1. Navigate to the following directory:
   [Command Line Tools Installation Directory]/bin
2. Then run the following command:
   ./getBalance.sh You should see the following output:
   Your account balance: $0.00 If you have prepaid funds in your account, you should see the correct balance.

If you did not receive the above output and encountered an error, check the following items.

1. Did you successfully create an Amazon Web Services account?
2. Did you successfully create an Amazon Mechanical Turk Requester account?
3. Did you correctly copy and paste your AWS access identifiers into the setup application or the mturk.properites file?

### Run the sample applications

Amazon Mechanical Turk provides several sample applications that you can run to create HITs. You can then revise the samples to create your own HITs. For complete instructions on how to run the samples see the Overview of the Sample Applications section in the User Guide for the Amazon Mechanical Turk Command Line Tools v1.3.1.

To find the sample applications, navigate to the following directory:
[Command Line Tools Installation Directory]/samples

### View the Command Line Tools tutorials

Amazon Mechanical Turk provides video tutorials to help you get started creating HITs. For more information, see Command Line Tools Tutorial.

### Additional Resources

For more information about the Command Line Tools see the Command Line Tools Reference section in the Amazon Mechanical Turk Developer Guide.

## How Do I Learn More About Using the Command Line Tools?

Check out the User Guide for the Amazon Mechanical Turk Command Line Tools v1.3.1 for more details on the various features of the Command Line Tools. You can also see the Command Line Tools Reference section in the Amazon Mechanical Turk Developer Guide.

Amazon Mechanical Turk provides video tutorials to help you get started creating HITs. For more information, see Command Line Tools Tutorial.

## How Do I Learn More About the Concepts of Amazon Mechanical Turk?

For a conceptual overview of Amazon Mechanical Turk, see the Mechanical Turk Concepts section in the Amazon Mechanical Turk Developer Guide.

## What Environments Are Supported?

The Command Line Tools can be run on the following environments:

- Microsoft Windows
- Unix based system (i.e. Mac OSX, Linux, etc.)

## What If I Have Comments, Questions or Feedback?

If you have any comments, questions or feedback on the Amazon Mechanical Turk Command Line Tools or the service in general, please visit the Amazon Mechanical Turk discussion forums.

Alternatively, you can visit the open source project home page.