如何使用boto3连接到mturk沙箱

时间:2017-03-25 07:52:06

标签: boto3 mechanicalturk

如何指定mTurk沙箱主机。在boto中,这是通过连接完成的,但我没有在boto3 API中看到它。

这是boto

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

来自scottlobdell

1 个答案:

答案 0 :(得分:8)

我想通了

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
)