Back to AWS Certified Machine Learning Engineer Associate MLA-C01 questions

Scenario-based practice

Refer to the Exhibit Practice Questions

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

15
scenario questions
MLA-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 MLA-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 1easymultiple choice
Full question →

An ML engineer runs the CLI command shown in the exhibit. However, the training job fails immediately with an error: 'Unable to assume role'. What is the most likely cause?

Exhibit

Refer to the exhibit.

aws sagemaker create-training-job \
    --training-job-name my-training-job \
    --algorithm-specification 'TrainingImage=123456789012.dkr.ecr.us-west-2.amazonaws.com/my-custom-training:latest,TrainingInputMode=File' \
    --role-arn arn:aws:iam::123456789012:role/SageMakerExecutionRole \
    --input-data-config '[{"ChannelName":"train","DataSource":{"S3DataSource":{"S3Uri":"s3://my-bucket/train/","S3DataType":"S3Prefix"}},"ContentType":"text/csv"}]' \
    --output-data-config '{"S3OutputPath":"s3://my-bucket/output/"}' \
    --resource-config '{"InstanceType":"ml.m5.large","InstanceCount":1,"VolumeSizeInGB":30}' \
    --vpc-config '{"SecurityGroupIds":["sg-12345678"],"Subnets":["subnet-12345678"]}'
Question 2mediummultiple choice
Full question →

Refer to the exhibit. A data scientist creates a SageMaker Pipeline definition using the JSON shown. The pipeline runs successfully, but the scientist notices that the training step did not use the parameter 'TrainingInstanceCount' defined in Parameters. Why did this happen?

Exhibit

{
  "PipelineExperimentConfig": {
    "ExperimentName": "my-experiment",
    "TrialName": "my-trial"
  },
  "Parameters": {
    "TrainingInstanceType": "ml.m5.large",
    "TrainingInstanceCount": 2,
    "MaxRuntimeInSeconds": 86400
  },
  "Steps": [
    {
      "Name": "Preprocess",
      "Type": "Processing",
      "ProcessingJobName": "preprocess-job",
      "ProcessingResources": {
        "ClusterConfig": {
          "InstanceCount": 1,
          "InstanceType": "ml.m5.large",
          "VolumeSizeInGB": 30
        }
      }
    },
    {
      "Name": "Train",
      "Type": "Training",
      "TrainingJobName": "train-job",
      "AlgorithmSpecification": {
        "TrainingImage": "123456789012.dkr.ecr.us-east-1.amazonaws.com/my-algo:latest",
        "TrainingInputMode": "File"
      },
      "ResourceConfig": {
        "InstanceCount": 2,
        "InstanceType": "ml.m5.large",
        "VolumeSizeInGB": 30
      }
    }
  ]
}
Question 3easymultiple choice
Full question →

A SageMaker Processing job fails with 'Access Denied' when listing objects in an S3 bucket, despite the IAM policy shown in the exhibit. What is the most likely cause?

Exhibit

Refer to the exhibit. A data scientist is trying to run a SageMaker Processing job that reads data from an S3 bucket. The IAM role attached to the processing job has the following policy:

```json
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": "s3:GetObject",
            "Resource": "arn:aws:s3:::my-bucket/*"
        }
    ]
}
```

The job fails with an error: "Access Denied" when trying to list objects. What is the root cause?
Question 4mediummultiple choice
Full question →

Refer to the exhibit. A Glue job runs successfully the first time but on subsequent runs with new data (added to the same input location), the job does not process the new data. What is the most likely cause?

Network Topology
TempDir": "s3://my-bucket/temp/""job-bookmark-option": "job-bookmark-enable"Type: AWS::Glue::JobProperties:Name: my-glue-jobRole: arn:aws:iam::123456789012:role/GlueServiceRoleCommand:Name: glueetlScriptLocation: s3://my-bucket/scripts/script.pyPythonVersion: "3"DefaultArguments:MaxRetries: 0WorkerType: StandardNumberOfWorkers: 2
Question 5easymultiple choice
Full question →

Refer to the exhibit. The Glue job reads a CSV file and attempts to write to a Parquet table. What is the most likely cause of this error?

Exhibit

An AWS Glue job fails with the following error from the CloudWatch logs:
"Conversion error: Unable to convert column 'price' from String to Double for some rows."
Question 6hardmultiple choice
Full question →

Refer to the exhibit. A data engineer deploys this Glue job via CloudFormation. When running, the job fails with a timeout after 2 hours. The job processes a large dataset and expected to take 3 hours. Which change would resolve the issue?

Network Topology
"TempDir": "s3://data-bucket/temp"Resources:MyGlueJob:Type: AWS::Glue::JobProperties:Command:Name: glueetlScriptLocation: s3://data-bucket/scripts/etl.pyPythonVersion: "3"Role: arn:aws:iam::123456789012:role/GlueServiceRoleDefaultArguments:GlueVersion: "2.0"WorkerType: G.1XNumberOfWorkers: 10MaxRetries: 0Timeout: 120
Question 7hardmultiple choice
Full question →

Refer to the exhibit. A company configures a SageMaker Model Monitor Data Quality monitoring schedule as shown. The schedule runs every hour. However, the team notices that the monitoring job fails intermittently with an AccessDenied error when accessing the S3 bucket for output. The IAM role SageMakerMonitorRole has permissions to write to s3://my-bucket/monitor-output. What is the MOST likely cause of the failure?

Exhibit

{
  "MonitoringScheduleName": "model-quality-monitor",
  "EndpointName": "my-endpoint",
  "MonitoringType": "DataQuality",
  "MonitoringScheduleConfig": {
    "ScheduleExpression": "cron(0 * * * ? *)",
    "MonitoringJobDefinition": {
      "BaselineConfig": {
        "BaseliningJobName": "baseline-job",
        "ConstraintsResource": {
          "S3Uri": "s3://my-bucket/baseline/constraints.json"
        },
        "StatisticsResource": {
          "S3Uri": "s3://my-bucket/baseline/statistics.json"
        }
      },
      "MonitoringInputs": [
        {
          "EndpointInput": {
            "EndpointName": "my-endpoint",
            "LocalPath": "/opt/ml/processing/input/endpoint",
            "S3DataDistributionType": "FullyReplicated",
            "S3InputMode": "File"
          }
        }
      ],
      "MonitoringOutputConfig": {
        "MonitoringOutputs": [
          {
            "S3Output": {
              "S3Uri": "s3://my-bucket/monitor-output",
              "LocalPath": "/opt/ml/processing/output",
              "S3UploadMode": "Continuous"
            }
          }
        ]
      },
      "MonitoringResources": {
        "ClusterConfig": {
          "InstanceCount": 1,
          "InstanceType": "ml.m5.large",
          "VolumeSizeInGB": 20
        }
      },
      "RoleArn": "arn:aws:iam::123456789012:role/SageMakerMonitorRole"
    }
  }
}
Question 8easymultiple choice
Full question →

Refer to the exhibit. A user is unable to invoke a SageMaker endpoint. The IAM policy shown is attached to the user. Which permission is missing to allow invocation?

Exhibit

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "sagemaker:DescribeEndpoint",
        "sagemaker:ListEndpoints"
      ],
      "Resource": "*"
    }
  ]
}
Question 9hardmultiple choice
Full question →

Refer to the exhibit. A SageMaker Pipeline fails with 'Invalid output reference' at the TrainingStep. What is the most likely cause?

Exhibit

TrainingStep(
    name="TrainModel",
    step_args=train_args,
    depends_on=[tuning_step]
)
tuning_step = TuningStep(...) # produces multiple artifacts
Question 10hardmultiple choice
Full question →

A data scientist creates a feature group as shown in the exhibit. When ingesting data with an 'age' column of integer values, the ingestion fails. What is the most likely cause?

Exhibit

Refer to the exhibit. A data scientist uses the following SageMaker Feature Store feature definition (using the Boto3 SDK) to create a feature group:

```python
import boto3
sagemaker = boto3.client('sagemaker', region_name='us-east-1')
response = sagemaker.create_feature_group(
    FeatureGroupName='my-feature-group',
    RecordIdentifierFeatureName='customer_id',
    EventTimeFeatureName='timestamp',
    FeatureDefinitions=[
        {'FeatureName': 'customer_id', 'FeatureType': 'String'},
        {'FeatureName': 'age', 'FeatureType': 'String'},
        {'FeatureName': 'income', 'FeatureType': 'Fractional'}
    ],
    OnlineStoreConfig={'EnableOnlineStore': True},
    RoleArn='arn:aws:iam::123456789012:role/SageMakerRole'
)
```

The data scientist later tries to ingest data with an 'age' column containing integer values. The ingestion fails. What is the most likely reason?
Question 11hardmultiple choice
Full question →

Refer to the exhibit. A data engineer runs an AWS Glue ETL job with the following script portion. The job fails with an error: 'An error occurred while calling o113.pyWriteDynamicFrame. No such file or directory'. What is the most likely cause?

Exhibit

import sys
from awsglue.transforms import *
from awsglue.utils import getResolvedOptions
from pyspark.context import SparkContext
from awsglue.context import GlueContext
from awsglue.job import Job

args = getResolvedOptions(sys.argv, ['JOB_NAME'])
sc = SparkContext()
glueContext = GlueContext(sc)
spark = glueContext.spark_session
job = Job(glueContext)
job.init(args['JOB_NAME'], args)

raw = glueContext.create_dynamic_frame.from_options(
    connection_type="s3",
    connection_options={"paths": ["s3://bucket/input/year=2023/month=01/"]},
    format="json")

transformed = raw.select_fields(["col1", "col2"]).rename_field("col1", "new_col")

glueContext.write_dynamic_frame.from_options(
    frame=transformed,
    connection_type="s3",
    connection_options={"path": "s3://bucket/output/transformed"},
    format="parquet")

job.commit()
Question 12hardmultiple choice
Full question →

A SageMaker endpoint is failing with the exhibited error. What is the most likely cause of this error?

Exhibit

Refer to the exhibit.

[ERROR] 2022-12-01 10:15:30,123 – model_server – ModelLoadFailed: Unable to load model from /opt/ml/model. Parsed error: FileNotFoundError: [Errno 2] No such file or directory: '/opt/ml/model/classes.txt'

This log is from a SageMaker endpoint instance. The model was packaged as a tar.gz containing model.pth, classes.txt, and inference.py. The Docker container uses the SageMaker inference toolkit.
Question 13mediummultiple choice
Full question →

An engineer runs: aws sagemaker describe-endpoint --endpoint-name my-endpoint and receives the exhibit output. The engineer wants to update the endpoint to use a new model version stored in ECR with tag ':2'. Which step is necessary to perform the update?

Exhibit

Refer to the exhibit.

{
  "EndpointName": "my-endpoint",
  "EndpointConfigName": "my-endpoint-config-v1",
  "ProductionVariants": [
    {
      "VariantName": "v1",
      "DeployedImages": [
        {
          "SpecifiedImage": "123456789012.dkr.ecr.us-west-2.amazonaws.com/my-model:1",
          "ResolvedImage": "123456789012.dkr.ecr.us-west-2.amazonaws.com/my-model:1@sha256:abc123"
        }
      ],
      "CurrentWeight": 1.0,
      "DesiredWeight": 1.0,
      "CurrentInstanceCount": 2,
      "DesiredInstanceCount": 2
    }
  ],
  "EndpointStatus": "InService"
}
Question 14hardmultiple choice
Full question →

Refer to the exhibit. The training job failed. What is the MOST likely cause?

Exhibit

[2024-01-15 10:30:45] Training job 'my-training-job' started.
[2024-01-15 10:31:10] Using algorithm 'built-in' with hyperparameters: {'epochs': 10, 'batch-size': 32, 'learning-rate': 0.001}
[2024-01-15 10:31:15] File system creation failed: No usable scratch space. Error: Input/output error.
[2024-01-15 10:31:15] Retrying with local SSD...
[2024-01-15 10:31:20] Training completed with status 'Failed'.
Question 15easymultiple choice
Full question →

Refer to the exhibit. The data scientist wants to update the endpoint to use a new model version without downtime. Which approach should they use?

Exhibit

{
  "EndpointConfigName": "my-config",
  "ProductionVariants": [
    {
      "VariantName": "variant1",
      "ModelName": "my-model-v1",
      "InitialInstanceCount": 1,
      "InstanceType": "ml.c5.large",
      "InitialVariantWeight": 1.0
    }
  ]
}

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