Setting Up an Amazon Mechanical Turk Account¶
psiTurk can interface with Amazon Mechanical Turk (although it doesn’t have to!). To do so, you need to create an account on Amazon’s website in order to use it. There are a number of steps involved here which have to do with signing up with Amazon and creating several accounts. Luckily they are a one-time process for a given AWS account.
psiTurk uses the Python/Boto (Boto3) SDK to communicate with the AWS API. In order to do so, boto must have access to the user’s AWS credentials, generated in section Setting Up an Amazon Mechanical Turk Account.
There are two approaches for setting the keys: (1) in a file called
.psiturkconfig located in the user’s home directory, and (2) in any of the
ways that Boto expects.
If set here, the keys should be lowercased, and under an ‘AWS Access’ section key, as follows:
[AWS Access] aws_access_key_id = foo aws_secret_access_key = bar
If AWS credentials are not found via the .psiturkconfig approach,
then Boto will search for them via its typical methods. That is,
psiTurk users can store AWS credentials in any way that Boto expects.
Specifically, the credentials variables
AWS_SECRET_ACCESSS_KEY can be set via one of the following methods,
listed in order of Boto-preference:
- Environment variables (can optionally be set in
- Shared credential file (
- AWS config file (
- Boto2 config file (
psiTurk sets the
AWS_DEFAULT_REGION to ‘us-east-1’, and this cannot be
For example, if a user’s
AWS_ACCESS_KEY_ID were ‘foo’, their
AWS_SECRET_ACCESS_KEY were ‘bar’, they might set the following in
~/.aws/credentials file (lowercase, since they’re note env vars):
Note that Boto3 respects certain environment variables that alter which files are searched for credentials and configuration settings. See here for more information.