Boto3 EndpointConnectionError:无法连接到端点(以前运行正常)

问题描述 投票:1回答:1

几个月前我升级到boto3。这些操作总是可以正常工作。据我所知,没有任何变化,但是最近当我尝试连接到aws服务器时,发生了此错误。

client = boto3.client(
        'mturk',
        aws_access_key_id = key,
        aws_secret_access_key = secret_key,
        endpoint_url= r"https://mturk-requester.us-east-1.amazonaws.com/")

client.get_hit(HITId=hit.id)
botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL:
"https://mturk-requester.us-east-1.amazonaws.com/"

现在,在发布匹配,检查我的余额等时会发生这种情况。所有这些操作原本都是按预期进行的。

我的awscli配置为

[default]
region=us-east-1 
amazon-web-services boto3 aws-cli mechanicalturk
1个回答
0
投票

似乎可以像这样对我正常工作:

client = boto3.client('mturk',region_name='us-east-1')
© www.soinside.com 2019 - 2024. All rights reserved.