Python AWS Boto URL连接错误

时间:2017-07-06 20:19:22

标签: python amazon-web-services machine-learning boto boto3

我正在尝试在Python BOTO中创建一个AWS机器学习模型:

import boto3
from boto3.session import Session
import uuid

session = Session(aws_access_key_id='...', aws_secret_access_key='...', region_name='us-west-1')
client = session.client('machinelearning')

response = client.create_ml_model(
    MLModelId=str(uuid.uuid4()),
    MLModelName='banking',
    MLModelType='BINARY',
    TrainingDataSourceId='...',
)

但是,我收到以下错误:

botocore.exceptions.EndpointConnectionError:无法连接到端点网址:“https://machinelearning.us-west-1.amazonaws.com/

我不相信region_name是问题所在。这可能是一个许可问题吗?

1 个答案:

答案 0 :(得分:3)

实际上该地区是个问题。亚马逊机器学习目前仅在弗吉尼亚州和爱尔兰地区以per documentation

的形式提供

enter image description here