Set up Amazon Mechanical Turk - Amazon Mechanical Turk

Set up Amazon Mechanical Turk

Use the following topics to learn how to use Amazon Mechanical Turk (Mechanical Turk) with APIs or AWS command line tools.

If you plan to interact with Mechanical Turk only through the Mechanical Turk requester user interface, you can skip these steps and instead follow the Getting Started steps described in the Requester UI Guide.

Step 1: Create a Mechanical Turk account

To create an Amazon Mechanical Turk account, go to the Amazon Mechanical Turk Requester website, choose Create an account, and follow the on-screen instructions.

Account creation options with "Create an Account" and sign-in link for existing users.

Note that Mechanical Turk accounts use the same login credentials and profiles as Amazon retail websites such as Amazon.com. Changes in the name or address on your account, on either Amazon.com or Mechanical Turk, are reflected in both locations.

To use Mechanical Turk programmatically, you must have an AWS account. If you don't already have an account, you are prompted to create one when you sign up. You're not charged for any AWS services that you sign up for unless you use them.

To create an AWS account
  1. Open https://portal.aws.amazon.com/billing/signup.

  2. Follow the online instructions.

    Part of the sign-up procedure involves receiving a phone call and entering a verification code on the phone keypad.

    When you sign up for an AWS account, an AWS account root user is created. The root user has access to all AWS services and resources in the account. As a security best practice, assign administrative access to a user, and use only the root user to perform tasks that require root user access.

Note your AWS account ID. You need it for the next step.

You need to link your AWS account to your Mechanical Turk requester account. This operation grants permission to your AWS account to access your requester account using the Mechanical Turk APIs.

Step 3: Select a payment option

Before you can post HITs to the Mechanical Turk marketplace, you need to enable AWS Billing for your account to pay worker rewards and Mechanical Turk fees. These appear on the AWS Anniversary Bill for your linked AWS account.

Alternatively, you can prepay for the HITs you plan to create using a credit card payment.

To enable AWS Billing or prepay for HITs, go to the account section of the Requester website.

Step 4: Get an AWS access key

Before you can access Mechanical Turk programmatically, you must have an AWS access key. Access keys consist of an access key ID and secret access key, which are used to sign programmatic requests that you make to AWS. If you don't have access keys, you can create them from the AWS Management Console. As a best practice, do not use the AWS account root user access keys for any task where they are not required. Instead, create a new administrator IAM user with access keys for yourself. To learn how, see Creating your first IAM admin user and group in the IAM User Guide. If you do not wish to grant administrator access to this account, you can choose either the AmazonMechanicalTurkFullAccess or AmazonMechanicalTurkReadOnly policy rather than AdministratorAccess when you attach a policy to the user.

The only time that you can view or download the secret access key is when you create the keys. You cannot recover them later. However, you can create new access keys at any time. You must also have permissions to perform the required IAM actions. For more information, see Permissions Required to Access IAM Resources in the IAM User Guide.

To create access keys for an IAM user:
  1. Sign in to the AWS Management Console and open the IAM console at https://console.aws.amazon.com/iam/ .

  2. In the navigation pane, choose Users.

  3. Choose the name of the user whose access keys you want to create, and then choose the Security credentials tab.

  4. In the Access keys section, choose Create access key.

  5. To view the new access key pair, choose Show. You will not have access to the secret access key again after this dialog box closes. Your credentials should resemble the following example:

    Access key ID: AKIAIOSFODNN7EXAMPLE

    Secret access key: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY

  6. To download the key pair, choose Download .csv file. Store the keys in a secure location. You will not have access to the secret access key again after this dialog box closes.

Keep the keys confidential in order to protect your AWS account. Never email them. Do not share them outside your organization, even if an inquiry appears to come from AWS or Amazon.com. No one who legitimately represents Amazon will ever ask you for your secret key.

  • After you download the .csv file, choose Close. When you create an access key, the key pair is active by default, and you can use the pair right away.

Related topics

Step 5: Configure Your Credentials

To access Mechanical Turk programmatically, you must configure your credentials to enable authorization for your applications.

There are several ways to do this. For example, you can manually create the credentials file to store your access key ID and secret access key. You also can use the aws configure command of the AWS CLI to automatically create the file. Alternatively, you can use environment variables. For more information about configuring your credentials, see the programming language-specific AWS SDK developer guide.

The Mechanical Turk API endpoint is only available in the us-east-1 Region so it is recommended that you configure your default Region as us-east-1. If you primarily work with a different default AWS Region, you can specify the us-east-1 Region and endpoint as part of your CLI or SDK requests to Mechanical Turk.

To install and configure the AWS CLI, see Installing, updating, and uninstalling the AWS CLI and Configuring the AWS CLI in the IAM User Guide, respectively.

Step 6: Set up the developer sandbox

You may wish to test your HITs in the Amazon Mechanical Turk sandbox testing environment to make sure they work as expected before publishing them in the Mechanical Turk marketplace. The sandbox is an environment where you can publish and work on HITs at no cost before publishing them in the production Mechanical Turk marketplace. The sandbox consists of a requester sandbox website and a worker sandbox website.

Create a requester account on the requester sandbox website, which is located at https://requestersandbox.mturk.com. This follows the same procedure as creating a Mechanical Turk account described in Step 1: Create a Mechanical Turk account. You can use the same email address and account if you wish.

You also need to create a worker account on the worker sandbox website located at https://workersandbox.mturk.com to view your sandbox HITs as a worker. There is no charge for using the Mechanical Turk sandbox sites.

To create HITs in the sandbox using the Mechanical Turk APIs, you also need to link your AWS account to your sandbox requester account, as described in Step 2: Link your AWS account to your Mechanical Turk requester account, on the requester sandbox website.

To configure the AWS CLI or SDKs to access the sandbox instead of the production environment, you must set the API endpoint to be https://mturk-requester-sandbox.us-east-1.amazonaws.com. Refer to the AWS CLI Command Reference or SDK documentation for how best to do this.