Zach
Zach

Reputation: 247

Python AWS Boto URL Connection Error

I'm trying to create an AWS machine learning model in Python BOTO:

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='...',
)

However, I'm getting the following error:

botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "https://machinelearning.us-west-1.amazonaws.com/"

I don't believe the region_name is the problem. Could this be a permission problem?

Upvotes: 0

Views: 440

Answers (1)

Chris White
Chris White

Reputation: 1447

Actually the region is the issue. Amazon Machine Learning is only available currently in the Virginia and Ireland regions as per documentation

enter image description here

Upvotes: 3

Related Questions