MLS-C01 Modeling Practice Question
Exhibit
Refer to the exhibit.
$ aws sagemaker create-training-job \
--training-job-name my-job \
--algorithm-specification TrainingImage=382416733822.dkr.ecr.us-west-2.amazonaws.com/xgboost:latest,TrainingInputMode=File \
--role-arn arn:aws:iam::123456789012:role/SageMakerRole \
--input-data-config "[{\"ChannelName\": \"train\", \"DataSource\": {\"S3DataSource\": {\"S3DataType\": \"S3Prefix\", \"S3Uri\": \"s3://my-bucket/train/\", \"S3DataDistributionType\": \"FullyReplicated\"}}}]" \
--output-data-config "{\"S3OutputPath\": \"s3://my-bucket/output/\"}" \
--resource-config "{\"InstanceType\": \"ml.m5.large\", \"InstanceCount\": 1}" \
--stopping-condition "{\"MaxRuntimeInSeconds\": 86400}"Refer to the exhibit. A data scientist runs the AWS CLI command to create a SageMaker training job. The job fails immediately with 'ValidationException: Invalid instance type'. What is the most likely issue?
⚠ Common exam trap
A common mix-up: candidates assume 'Invalid instance type' always means the instance is unsupported by the algorithm, when in reality SageMaker uses this generic error for any validation failure related to the training job's resource configuration, including regional mismatches in the image URI.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
The training image URI is for a different AWS region
The error 'ValidationException: Invalid instance type' occurs because the training image URI specified in the command points to an Amazon ECR repository in a different AWS region than where the SageMaker training job is being created. SageMaker validates that the image URI is accessible from the current region; if the URI references a region that does not contain the XGBoost image or the instance type is not supported in that region's ECR, the validation fails. The instance type itself (ml.m5.large) is valid for XGBoost, but the mismatch between the image's region and the job's region triggers the exception.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
The IAM role ARN is invalid
Why it's wrong here
Would cause AccessDenied.
- ✗
The S3 bucket 'my-bucket' does not exist or the role lacks permissions
Why it's wrong here
Would cause AccessDenied, not ValidationException.
- ✗
The instance type ml.m5.large does not support the XGBoost image
Why it's wrong here
XGBoost supports ml.m5.large.
- ✓
The training image URI is for a different AWS region
Why this is correct
The account ID corresponds to us-east-1, but the CLI command is running in us-west-2.
Go deeper
Related to this question
About these practice questions
Courseiva writes every MLS-C01 question from scratch — 1,672 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This MLS-C01 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the MLS-C01 exam.