Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to connect to mturk sandbox with boto3

How to specify the mTurk sandbox host. In boto this was done with connection, but I don't see that in the boto3 API.

this is boto

connection = MTurkConnection(aws_access_key_id=AWS_ACCESS_KEY_ID,
                         aws_secret_access_key=AWS_SECRET_ACCESS_KEY,
                         host='mechanicalturk.sandbox.amazonaws.com')

from scottlobdell

like image 441
mcwizard Avatar asked Mar 25 '17 07:03

mcwizard


1 Answers

i figured it out

endpoint_url = 'https://mturk-requester-sandbox.us-east-1.amazonaws.com'

# Uncomment this line to use in production
# endpoint_url = 'https://mturk-requester.us-east-1.amazonaws.com'

client = boto3.client('mturk',
    endpoint_url = endpoint_url
)
like image 79
mcwizard Avatar answered Oct 22 '22 18:10

mcwizard