Back to AWS Certified Machine Learning Specialty MLS-C01 questions

Scenario-based practice

Refer to the Exhibit Practice Questions

Practise AWS Certified Machine Learning Specialty MLS-C01 practice questions — original exam-style scenarios covering every exam domain, with detailed explanations, wrong-answer analysis, and common exam traps.

15
scenario questions
MLS-C01
exam code
Amazon Web Services
vendor

Scenario guide

How to approach refer to the exhibit practice questions

Practise exhibit-style questions that ask you to read a topology, table, command output or diagram before choosing the best answer.

Quick answer

Exhibit-style questions test whether you can read a topology, command output, diagram or table before choosing the best answer.

How to extract the relevant detail from an exhibit.

How topology, command output or routing information affects the answer.

How to avoid answering from memory before reading the evidence.

How to map the exhibit back to the exam objective.

Related practice questions

Related MLS-C01 topic practice pages

Scenario questions usually connect to one or more exam topics. Use these links to review the underlying concepts behind the scenario.

Practice set

Practice scenarios

Question 1hardmultiple choice
Full question →

A data scientist is trying to read a CSV file from S3 bucket 'my-bucket' with key 'training/data.csv' using an IAM role with the attached policy shown in the exhibit. The read operation fails with an Access Denied error. What is the most likely cause?

Exhibit

Refer to the exhibit.

```
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "s3:GetObject",
        "s3:PutObject",
        "s3:DeleteObject"
      ],
      "Resource": "arn:aws:s3:::my-bucket/training/*"
    },
    {
      "Effect": "Allow",
      "Action": [
        "s3:GetObject"
      ],
      "Resource": "arn:aws:s3:::my-bucket/training/"
    }
  ]
}
```
Question 2easymultiple choice
Full question →

An ML engineer is troubleshooting why an automated CI/CD pipeline cannot deploy an updated model to an existing SageMaker endpoint. The pipeline uses the IAM role that has the attached policy shown in the exhibit. What is the MOST likely cause of the failure?

Exhibit

Refer to the exhibit.
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "sagemaker:CreateModel",
        "sagemaker:CreateEndpointConfig",
        "sagemaker:CreateEndpoint",
        "sagemaker:InvokeEndpoint"
      ],
      "Resource": "*"
    },
    {
      "Effect": "Allow",
      "Action": "iam:PassRole",
      "Resource": "arn:aws:iam::123456789012:role/SageMakerExecutionRole",
      "Condition": {
        "StringEquals": {
          "iam:PassedToService": "sagemaker.amazonaws.com"
        }
      }
    },
    {
      "Effect": "Deny",
      "Action": [
        "sagemaker:DeleteEndpoint",
        "sagemaker:DeleteEndpointConfig",
        "sagemaker:DeleteModel"
      ],
      "Resource": "*"
    }
  ]
}
Question 3hardmultiple choice
Full question →

Refer to the exhibit. A data scientist ran an S3 Select query on a large CSV file stored in Amazon S3. The output shows only 2 records returned, but the data scientist expected thousands. The file size is 10 GB. What is the MOST likely reason for the small result set?

Exhibit

Refer to the exhibit.

```
# S3 Select query result on a CSV file
SELECT * FROM s3object s WHERE s."age" > 30 AND s."city" = 'New York'

# Result:
{
  "Payload": [
    {"Records": {"Payload": "name,age,city\nAlice,35,New York\nBob,40,New York\n"}},
    {"Stats": {"Details": {"BytesScanned": 1024, "BytesProcessed": 512, "BytesReturned": 64}}}
  ]
}
```
Question 4mediummultiple choice
Full question →

Refer to the exhibit. A data scientist is trying to run a SageMaker training job using a script that reads data from the S3 bucket 'my-bucket' and writes the model artifact to the same bucket. The training job fails with an access denied error. What is the likely cause?

Exhibit

Refer to the exhibit.

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "s3:GetObject",
        "s3:PutObject",
        "s3:DeleteObject"
      ],
      "Resource": "arn:aws:s3:::my-bucket/training-data/*"
    },
    {
      "Effect": "Allow",
      "Action": [
        "sagemaker:CreateTrainingJob",
        "sagemaker:DescribeTrainingJob"
      ],
      "Resource": "*"
    }
  ]
}
Question 5easymultiple choice
Full question →

Refer to the exhibit. What is the recall of the model?

Exhibit

Refer to the exhibit.

Confusion Matrix:

               Predicted Positive   Predicted Negative
Actual Positive       80                   20
Actual Negative       10                   90
Question 6hardmultiple choice
Full question →

A data scientist ran a hyperparameter tuning job for an XGBoost model. The tuning job completed, but the best validation RMSE is 2.34. The data scientist believes the model can perform better. Based on the exhibit, which change to the tuning strategy is most likely to improve the model's performance?

Network Topology
aws sagemaker describe-hyper-parameter-tuning-jobhyper-parameter-tuning-job-name my-tuning-jobRefer to the exhibit.```"HyperParameterTuningJobName": "my-tuning-job","HyperParameterTuningJobStatus": "Completed","BestTrainingJob": {"TrainingJobName": "my-tuning-job-014","FinalHyperParameterTuningJobObjectiveMetric": {"MetricName": "validation:rmse","Value": 2.34},"TrainingJobStatus": "Completed","ObjectiveStatus": "Succeeded""TrainingJobDefinition": {"StaticHyperParameters": {"objective": "reg:linear","num_round": "100""HyperParameterRanges": {"eta": {"ContinuousParameterRange": {"MinValue": "0.01","MaxValue": "0.5""max_depth": {"IntegerParameterRange": {"MinValue": "3","MaxValue": "10""TuningObjective": {"Type": "Minimize","MetricName": "validation:rmse"
Question 7easymultiple choice
Full question →

Refer to the exhibit. A data scientist is evaluating a binary classification model for spam detection. The exhibit shows a single prediction instance. What is the model's prediction for this instance?

Exhibit

Refer to the exhibit.

```
{
  "predicted_label": "spam",
  "predicted_probability": 0.95,
  "label": "ham"
}
```
Question 8mediummultiple choice
Full question →

Refer to the exhibit. A data scientist runs the above CLI command to create a SageMaker training job. The job fails with an error 'Unable to read data from s3://bucket/train/'. What is the MOST likely cause?

Exhibit

Refer to the exhibit.

```
aws sagemaker create-training-job \
    --training-job-name my-job \
    --algorithm-specification TrainingImage=123456789012.dkr.ecr.us-east-1.amazonaws.com/my-image:latest,TrainingInputMode=File \
    --role-arn arn:aws:iam::123456789012:role/SageMakerRole \
    --input-data-config '[{"ChannelName": "train", "DataSource": {"S3DataSource": {"S3DataType": "S3Prefix", "S3Uri": "s3://bucket/train/"}}}]' \
    --output-data-config S3OutputPath=s3://bucket/output/ \
    --resource-config InstanceType=ml.c5.xlarge,InstanceCount=1,VolumeSizeInGB=10 \
    --stopping-condition MaxRuntimeInSeconds=3600
```
Question 9hardmultiple choice
Full question →

Refer to the exhibit. The training job 'my-job' failed with the error 'Unable to pull image from ECR'. What is the most likely cause?

Exhibit

Refer to the exhibit.

```
aws sagemaker create-training-job \
    --training-job-name my-job \
    --algorithm-specification TrainingImage=123456789012.dkr.ecr.us-east-1.amazonaws.com/my-custom-image:latest,TrainingInputMode=File \
    --role-arn arn:aws:iam::123456789012:role/SageMakerRole \
    --input-data-config ChannelName=training,DataSource={S3DataSource={S3Uri=s3://my-bucket/train/,S3DataType=S3Prefix,S3DataDistributionType=FullyReplicated}} \
    --output-data-config S3OutputPath=s3://my-bucket/output/ \
    --resource-config InstanceType=ml.m5.large,InstanceCount=1,VolumeSizeInGB=10 \
    --stopping-condition MaxRuntimeInSeconds=3600
```
Question 10mediummultiple choice
Full question →

Refer to the exhibit. A SageMaker training job uses an IAM role with this policy. The training job writes output to s3://my-bucket/output/. Which statement about the policy is true?

Exhibit

Refer to the exhibit.
```
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "s3:GetObject",
        "s3:PutObject"
      ],
      "Resource": "arn:aws:s3:::my-bucket/*"
    },
    {
      "Effect": "Deny",
      "Action": "s3:PutObject",
      "Resource": "arn:aws:s3:::my-bucket/*",
      "Condition": {
        "StringNotEquals": {
          "s3:x-amz-server-side-encryption": "AES256"
        }
      }
    }
  ]
}
```
Question 11easymultiple choice
Full question →

Refer to the exhibit. A data scientist runs the AWS CLI command to create a SageMaker training job. The training job fails because the input data is not accessible. Which step should the data scientist take to fix the issue?

Exhibit

Refer to the exhibit.
```
aws sagemaker create-training-job \
    --training-job-name my-training \
    --algorithm-specification TrainingImage=... \
    --role-arn arn:aws:iam::123456789012:role/SageMakerRole \
    --input-data-config [{"ChannelName":"train","DataSource":{"S3DataSource":{"S3Uri":"s3://bucket/data","S3DataType":"S3Prefix"}}}] \
    --output-data-config {"S3OutputPath":"s3://bucket/output"} \
    --resource-config {"InstanceCount":2,"InstanceType":"ml.m5.large","VolumeSizeInGB":10}
```
Question 12easymultiple choice
Full question →

A data scientist runs the AWS CLI command shown in the exhibit. The output shows that job-2 failed. Which action should the data scientist take to diagnose the failure?

Network Topology
$ aws sagemaker list-training-jobsmax-results 10Refer to the exhibit."TrainingJobSummaries": ["TrainingJobName": "job-1","TrainingJobStatus": "Completed","CreationTime": "2023-06-01T10:00:00Z","TrainingEndTime": "2023-06-01T11:00:00Z"},"TrainingJobName": "job-2","TrainingJobStatus": "Failed","CreationTime": "2023-06-01T12:00:00Z","TrainingEndTime": "2023-06-01T12:30:00Z"
Question 13hardmultiple choice
Full question →

Refer to the exhibit. A SageMaker endpoint is returning 5xx errors. The logs show the above error. Which change will most likely resolve the issue?

Exhibit

Refer to the exhibit.
```
[Container] 2022/08/10 12:00:00 Starting inference server
[Container] 2022/08/10 12:00:05 Model server started
[Container] 2022/08/10 12:00:10 Invoking /invocations endpoint
[Container] 2022/08/10 12:00:15 ERROR: Exception during prediction: OutOfMemoryError
[Container] 2022/08/10 12:00:16 Shutting down
```
Question 14hardmultiple choice
Full question →

Refer to the exhibit. A SageMaker training job is launched with the CLI command shown. The job fails with an error 'S3 data distribution type not supported for File mode'. What is the most likely fix?

Exhibit

aws sagemaker create-training-job \
    --training-job-name my-job \
    --algorithm-specification TrainingImage=my-image,TrainingInputMode=File \
    --resource-config InstanceType=ml.m5.large,InstanceCount=1,VolumeSizeInGB=30 \
    --input-data-config ChannelName=training,DataSource={S3DataSource={S3Uri=s3://bucket/data,S3DataType=S3Prefix,S3DataDistributionType=FullyReplicated}} \
    --output-data-config S3OutputPath=s3://bucket/output \
    --stopping-condition MaxRuntimeInSeconds=3600
Question 15easymultiple choice
Full question →

Refer to the exhibit. A SageMaker endpoint logs this error. What is the most likely cause?

Exhibit

2019-10-12 15:30:01 - ERROR - Model prediction failed: Input shape mismatch. Expected (None, 10), got (None, 8).

These MLS-C01 practice questions are part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style MLS-C01 questions with detailed explanations, topic-based practice, mock exams, readiness tracking, and study analytics.