In order to send messages via mTurk to SQS the corresponding permission to SendMessage should be given. In documentation they say that the Principal should be mturk-requester.amazonaws.com. So the policy that works looks like:
"Principal": {
"Service": "mturk-requester.amazonaws.com"
},
This can be done via Boto3.SQS.addPermission. Like that:
response = client.add_permission(
QueueUrl='string',
Label='string',
AWSAccountIds=[
'string',
],
Actions=[
'string',
]
)
but I fail to understand how I can add the correct Principal to AWSAccountIds field. All my attempts to use mturk-requester.amazonaws.com there failed.
What am I doing wrong?