我正在尝试将boto3用于Amazon Mechanical Turk。我正在尝试使用以下代码获取客户端:
import boto3
endpoint_url = 'https://mturk-requester.us-east-1.amazonaws.com'
aws_access_key_id = <aws_access_key_id>
aws_secret_access_key = <aws_secret_access_key>
region_name = 'us-east-1'
client = boto3.client('mturk',
aws_access_key_id = aws_access_key_id,
aws_secret_access_key = aws_secret_access_key,
region_name=region_name,
endpoint_url = endpoint_url
)
但是我收到有关UnknownService名称的以下错误:
botocore.exceptions.UnknownServiceError: Unknown service: 'mturk'. Valid service
names are: acm, apigateway, application-autoscaling, appstream, autoscaling,
budgets, cloudformation, cloudfront, cloudhsm, cloudsearch, cloudsearchdomain,
cloudtrail, cloudwatch, codebuild, codecommit, codedeploy, codepipeline,
cognito-identity, cognito-idp, cognito-sync, config, datapipeline, devicefarm,
directconnect, discovery, dms, ds, dynamodb, dynamodbstreams, ec2, ecr, ecs, efs,
elasticache, elasticbeanstalk, elastictranscoder, elb, elbv2, emr, es, events,
firehose, gamelift, glacier, health, iam, importexport, inspector, iot, iot-data,
kinesis, kinesisanalytics, kms, lambda, lightsail, logs, machinelearning,
marketplacecommerceanalytics, meteringmarketplace, opsworks, opsworkscm, pinpoint,
polly, rds, redshift, rekognition, route53, route53domains, s3, sdb, servicecatalog,
ses, shield, sms, snowball, sns, sqs, ssm, stepfunctions, storagegateway, sts,
support, swf, waf, workspaces, xray
为什么'mturk'
不在此列表中?我使用的代码取自mturk developer website。
欢迎任何建议!预先感谢!