All AWS exams
Free MLA-C02 practice test: 30 questions with answers
30 original questions for AWS Certified Machine Learning Engineer - Associate (updated, beta), drawn from every topic area. Answer each one to see whether you got it right and why. No sign-up.
- Free questions
- 30
- Full bank
- 100 questions
All 30 MLA-C02 questions with answers
The same questions as the test above, grouped by exam topic. Open any question to see the answer and explanation.
ML Model Development (8 questions)
Question 1
A team wants SageMaker to automatically try multiple algorithms and preprocessing steps on a tabular dataset and produce a ranked leaderboard with explanations. Which feature should they use?
- ASageMaker Edge Manager
- BSageMaker Pipelines
- CSageMaker Serverless Inference
- DSageMaker Autopilot
Show answer and explanationHide answer
Correct answer: DSageMaker Autopilot automatically explores candidate pipelines, ranks them on a leaderboard, and can generate notebooks that explain the process. Edge Manager manages models on devices, Pipelines orchestrates workflows, and Serverless Inference hosts models.
Question 2
A data scientist wants to tune the hyperparameters of a training job efficiently across a large search space by using prior results to choose the next candidates. Which SageMaker feature is designed for this?
- AIncreasing the instance size until accuracy improves
- BAutomatic model tuning with the Bayesian search strategy
- CRandom sampling of the training data only
- DA manual grid of fixed values run sequentially in a notebook
Show answer and explanationHide answer
Correct answer: BAutomatic model tuning supports Bayesian optimization, which uses results from earlier trials to choose promising hyperparameters. A sequential manual grid is inefficient, sampling data does not tune hyperparameters, and instance size does not search the hyperparameter space.
Question 3
A team needs a text classification model quickly. They want to start from a pretrained model available in SageMaker JumpStart and fine-tune it on their labeled data. What is this approach called?
- AUnsupervised clustering
- BFeature hashing from scratch
- CTransfer learning
- DBatch inference
Show answer and explanationHide answer
Correct answer: CFine-tuning a pretrained model from JumpStart is transfer learning, which reuses learned representations and needs less labeled data. Feature hashing, clustering and batch inference are different techniques.
Question 4
During training, the validation loss starts increasing while the training loss keeps decreasing. Which action most directly addresses this?
- AIncrease the learning rate without changing anything else
- BEnable early stopping on the validation metric
- CTrain for more epochs to reduce the gap
- DRemove the validation dataset from the training job
Show answer and explanationHide answer
Correct answer: BRising validation loss with falling training loss indicates overfitting, and early stopping halts training when validation performance stops improving. Raising the learning rate, removing validation data, and training longer all make the problem worse or hide it.
Question 5
A data scientist wants a more reliable estimate of model performance on a small dataset by training and evaluating the model on several different partitions of the data. Which technique is this?
- AFeature re-scaling
- BDense one-hot encoding
- CSynthetic data augmentation
- DK-fold cross-validation
Show answer and explanationHide answer
Correct answer: DK-fold cross-validation rotates the validation fold across k partitions and averages the results, which gives a more stable performance estimate on small data. The other techniques transform features or create data rather than estimating performance.
Question 6
Which TWO metrics are appropriate for evaluating a classifier on a dataset with a rare positive class? (Choose two.)
- APrecision-recall area under the curve
- BAccuracy alone
- CF1 score
- DMean squared error
Show answer and explanationHide answer
Correct answer: A, CPrecision-recall AUC and F1 both focus on the positive class and so remain informative when positives are rare. Accuracy alone can look high by predicting the majority class, and mean squared error is a regression metric.
Question 7
A training job shows that gradients in the early layers are near zero and the model barely learns. The team wants to inspect these tensors during training without changing the training code. Which SageMaker feature helps?
- ASageMaker Feature Store offline store used for batch training data retrieval
- BSageMaker Clarify bias report for pre-training and post-training datasets
- CSageMaker Debugger with built-in rules such as vanishing gradient
- DSageMaker Ground Truth labeling job that assigns workers to image samples
Show answer and explanationHide answer
Correct answer: CSageMaker Debugger captures tensors during training and provides built-in rules, including vanishing gradients, that can be checked without code changes. Clarify analyzes bias and explainability, Ground Truth labels data, and Feature Store manages features.
Question 8
A team has tabular customer data and wants a strong baseline model using an algorithm built into SageMaker with minimal setup. Which option is most suitable?
- AA convolutional network with no pretrained weights
- BA reinforcement learning environment
- CA manual Monte Carlo simulation
- DThe built-in XGBoost algorithm
Show answer and explanationHide answer
Correct answer: DThe built-in XGBoost algorithm is a gradient-boosted tree method that performs well on tabular data and needs no custom code. Convolutional networks are designed for images, reinforcement learning requires an environment and reward, and Monte Carlo simulation is not a predictive model.
Data Preparation for ML (8 questions)
Question 9
A data scientist must clean and transform a 500 GB CSV dataset stored in Amazon S3, removing duplicates and imputing missing values through a visual interface, without writing code. Which SageMaker capability should be used?
- ASageMaker Ground Truth
- BSageMaker Data Wrangler
- CSageMaker Feature Store
- DSageMaker Model Monitor
Show answer and explanationHide answer
Correct answer: BSageMaker Data Wrangler provides a visual, no-code interface for data preparation, including deduplication and missing-value handling, and it can export the flow to a processing job. Model Monitor watches deployed models, Ground Truth manages labeling, and Feature Store stores features.
Question 10
A team needs a serverless way to discover schemas for files in S3 and run Spark-based ETL jobs that write results back to S3, without managing clusters. Which AWS service fits best?
- AAWS Snowball Edge
- BAWS Cloud9
- CAmazon Kinesis Video Streams
- DAWS Glue
Show answer and explanationHide answer
Correct answer: DAWS Glue provides a serverless data catalog through crawlers and serverless Spark ETL jobs. Snowball Edge is for offline data transfer, Kinesis Video Streams ingests video, and Cloud9 is an IDE.
Question 11
A fraud dataset has only 0.5 percent positive examples. The team wants to address the class imbalance by generating synthetic examples of the minority class during preprocessing. Which technique is appropriate?
- APrincipal component analysis
- BSMOTE (synthetic minority oversampling)
- COne-hot encoding of the label column
- DMin-max scaling of all numeric features
Show answer and explanationHide answer
Correct answer: BSMOTE creates synthetic minority-class samples by interpolating between existing minority examples. PCA reduces dimensionality, one-hot encoding represents categories, and min-max scaling normalizes ranges, none of which address imbalance.
Question 12
An online recommendation model needs features for a user with single-digit millisecond latency at inference time, while the same features must also be available in bulk for training. Which SageMaker component provides both?
- ASageMaker Clarify
- BSageMaker Model Registry
- CSageMaker Feature Store
- DSageMaker Neo
Show answer and explanationHide answer
Correct answer: CFeature Store offers an online store for low-latency lookups during inference and an offline store in S3 for training datasets, keeping the features consistent. Clarify analyzes bias, Model Registry tracks model versions, and Neo compiles models.
Question 13
Analysts query a large set of log files in S3 with Amazon Athena and complain about high scan costs. Which change reduces the data scanned per query the most?
- AConvert the data to partitioned, compressed Parquet
- BKeep the files as uncompressed JSON in a single prefix
- CStore the files in Glacier Deep Archive
- DIncrease the number of Athena workgroups
Show answer and explanationHide answer
Correct answer: AColumnar, compressed formats such as Parquet combined with partitioning let Athena read only the columns and partitions a query needs, which cuts scan costs. Uncompressed JSON scans the most, archive storage is not queryable with standard Athena, and workgroups do not change scanned bytes.
Question 14
A company labels images of confidential medical scans with SageMaker Ground Truth and must keep the data within its own workforce rather than a public crowd. Which workforce type should be used?
- AA private workforce of the company's own employees or contractors
- BAmazon Mechanical Turk public workforce with open access
- CA vendor-managed workforce with public access to tasks
- DA third-party workforce hosted in an external country without NDA coverage
Show answer and explanationHide answer
Correct answer: AA private workforce keeps labeling within authorized individuals in the organization, which is appropriate for confidential data. Public and external workforces expose the data to people outside the organization's control.
Question 15
Which TWO controls help protect sensitive training data stored in Amazon S3? (Choose two.)
- AEncryption at rest with SSE-KMS using a customer managed key
- BA bucket ACL that grants read access to everyone
- CA bucket policy that denies requests that are not sent over TLS
- DDisabling versioning to reduce storage costs
Show answer and explanationHide answer
Correct answer: A, CSSE-KMS encrypts objects at rest under a key the organization controls, and a bucket policy that denies non-TLS requests protects data in transit. Public ACLs expose the data, and disabling versioning removes recovery options without improving protection.
Question 16
A categorical column in a training dataset has about 3 percent missing values. The team wants a simple imputation that keeps the column categorical. Which approach is most appropriate?
- AReplace missing values with the column mean of the encoded codes
- BDrop every row that has a missing value in one of the columns
- CFill missing values with a constant label that is also a real category code in the data
- DReplace missing values with the most frequent category in the training split
Show answer and explanationHide answer
Correct answer: DMode imputation fills missing categorical values with the most frequent category and keeps the column categorical. A mean of encoded integers has no meaning for categories, dropping rows discards data unnecessarily, and a constant that duplicates a real category introduces a misleading signal.
Deployment and Orchestration of ML Workflows (7 questions)
Question 17
A model must serve inference requests with payloads up to one gigabyte and processing times of several minutes, with results delivered when ready and no need to keep a persistent connection open. Which SageMaker inference option is most suitable?
- AReal-time endpoint with GPU
- BServerless endpoint
- CBatch transform job
- DAsynchronous inference
Show answer and explanationHide answer
Correct answer: DAsynchronous inference queues requests, supports large payloads and long processing times, and scales to zero when idle. Real-time endpoints need a persistent low-latency response, serverless inference has tighter payload and duration limits, and batch transform processes an entire dataset offline.
Question 18
Which TWO step types can be used in an Amazon SageMaker Pipelines workflow? (Choose two.)
- ATrainingStep
- BProcessingStep
- CEmailStep
- DPrintStep
Show answer and explanationHide answer
Correct answer: A, BSageMaker Pipelines includes built-in step types such as TrainingStep and ProcessingStep, among others for evaluation, conditions and model registration. EmailStep and PrintStep are not pipeline step types.
Question 19
A governance process requires that a newly trained model be reviewed and approved before it can be deployed to production, and that the approval status be recorded with the model version. Which SageMaker component should be used?
- ASageMaker Neo compiler
- BSageMaker Data Wrangler flow
- CSageMaker Debugger
- DSageMaker Model Registry
Show answer and explanationHide answer
Correct answer: DModel Registry stores model versions with metadata and an approval status, and deployment pipelines can require approved models before deploying. The other components do not manage model approval states.
Question 20
A team wants to release a new model version to a production SageMaker endpoint by shifting traffic in steps, rolling back automatically if alarms fire during the shift. Which deployment option supports this?
- ADeleting the endpoint and recreating it with the new model artifact
- BUpdating the model artifact in S3 without changing the endpoint and its variant weights
- CBlue/green deployment with traffic shifting and automatic rollback on alarms
- DRunning batch transform jobs on the production endpoint traffic
Show answer and explanationHide answer
Correct answer: CSageMaker blue/green deployment policies shift traffic in canary or linear steps and can roll back when CloudWatch alarms trigger. Deleting and recreating causes downtime, changing S3 artifacts alone does not redirect the endpoint, and batch transform does not serve live traffic.
Question 21
Which TWO features help reduce the cost of hosting many models with similar architectures on SageMaker? (Choose two.)
- AMulti-model endpoints that load models from S3 on demand and share instances
- BOne dedicated real-time endpoint per model with the largest instance size
- CServerless inference for infrequent traffic on low-volume models
- DKeeping every model on an always-on GPU instance regardless of use
- EAdding a second endpoint for every model to improve redundancy
Show answer and explanationHide answer
Correct answer: A, CMulti-model endpoints share instances across many models that are loaded on demand, and serverless inference avoids paying for idle capacity on infrequently used models. Oversized dedicated endpoints and always-on GPUs increase cost, and the inference recommender is correct as a sizing aid but the question asks for the two cost-sharing features.
Question 22
A company hosts many small models, each called rarely, and wants to load them into a shared endpoint from S3 when first requested. Which SageMaker endpoint type should be used?
- ABatch transform job
- BEdge deployment package
- CMulti-model endpoint
- DReal-time endpoint with one model per instance
Show answer and explanationHide answer
Correct answer: CA multi-model endpoint hosts many models behind one endpoint, loading each from S3 on demand, which suits rarely used models. Batch transform processes datasets offline, one-model-per-instance endpoints are costly, and edge packages run on devices.
Question 23
A model must run on edge hardware from a specific manufacturer, and the team wants the model compiled to run efficiently on that device's processor. Which SageMaker capability should be used?
- ASageMaker Ground Truth
- BSageMaker Model Monitor
- CSageMaker Neo
- DSageMaker Clarify
Show answer and explanationHide answer
Correct answer: CSageMaker Neo compiles trained models into optimized code for specific hardware targets, including edge devices. Clarify explains bias, Model Monitor watches production data, and Ground Truth labels data.
ML Solution Monitoring, Maintenance and Security (7 questions)
Question 24
A deployed model's input feature distributions have shifted from the training baseline, and the team wants to be alerted automatically. Which SageMaker capability should be configured?
- ASageMaker Model Monitor with a data quality baseline and scheduled monitoring jobs
- BSageMaker Ground Truth active learning that selects uncertain samples for human annotation
- CSageMaker Autopilot leaderboard that ranks candidate models by validation objective metric
- DSageMaker Neo compilation logs written to CloudWatch for each compiled model artifact version
Show answer and explanationHide answer
Correct answer: AModel Monitor compares live data with a baseline created from training data and raises alerts on violations such as drift, through scheduled monitoring jobs. The other options do not monitor production data quality.
Question 25
A security team requires that the Amazon EBS volumes attached to SageMaker training instances be encrypted with a customer managed key. Which setting should be configured on the training job?
- AA VolumeKmsKeyId that references the customer managed KMS key
- BA public S3 bucket policy that grants anonymous read access to objects
- CA lifecycle rule that deletes the volumes daily after each job completes
- DA larger instance type with more RAM and attached NVMe storage volumes
Show answer and explanationHide answer
Correct answer: ATraining jobs accept a volume KMS key identifier that encrypts the attached storage volumes with the specified customer managed key. Bucket policies do not encrypt attached volumes, lifecycle rules delete data, and instance size does not change encryption.
Question 26
An ML endpoint's p95 latency rises above the agreed threshold during business hours. The on-call team wants an automatic notification when this happens. Which AWS configuration is most appropriate?
- AA manual check of the endpoint's p95 latency dashboard every morning by an engineer on rotation
- BA CloudWatch alarm on the endpoint's ModelLatency metric that publishes to an SNS topic
- CDisabling the endpoint's container and invocation logs in CloudWatch to reduce noise during peak traffic
- DA weekly cost report from Cost Explorer grouped by linked account and service with forecasted spend
Show answer and explanationHide answer
Correct answer: BSageMaker publishes ModelLatency to CloudWatch, and an alarm with an SNS action notifies responders automatically. Manual checks and cost reports are not timely, and disabling logs removes visibility.
Question 27
A team must ensure that the IAM role used by SageMaker training jobs can read only one specific S3 prefix and write logs to CloudWatch, following least privilege. Which approach is correct?
- AAttach a policy that grants s3:GetObject on only that prefix and the logs actions needed for CloudWatch
- BUse a bucket policy that grants public read access to the training data bucket prefix
- CShare the root user credentials with the training job via an environment variable in the container
- DAttach AdministratorAccess managed policy to the execution role used by the training job
Show answer and explanationHide answer
Correct answer: AA scoped execution role grants only the specific S3 actions and resource prefix plus the CloudWatch Logs actions required. Administrator access, root credentials and public buckets all violate least privilege.
Question 28
A SageMaker notebook instance must reach Amazon S3 without traffic leaving the AWS network and without an internet gateway. Which configuration achieves this?
- AAn S3 gateway VPC endpoint attached to the subnet route table
- BA NAT gateway in a public subnet that routes all traffic to the internet
- CA VPN connection to a corporate data center for S3 traffic
- DDisabling all network access to the subnet
Show answer and explanationHide answer
Correct answer: AAn S3 gateway endpoint lets resources in private subnets reach S3 over the AWS network through the route table, without an internet gateway or NAT. NAT routes traffic to the internet, a VPN goes to the corporate network, and disabling access blocks the service.
Question 29
A team has ground truth labels that arrive a day after predictions are made. They want to monitor the accuracy of deployed predictions against these labels automatically. Which SageMaker Model Monitor type should they use?
- AModel quality monitoring with a merge of captured predictions and ground truth labels
- BBias drift monitoring of demographic groups, computed from the training dataset feature distribution over time
- CData quality monitoring of input feature statistics with no labels required
- DNotebook monitoring of the training job logs in CloudWatch Logs Insights
Show answer and explanationHide answer
Correct answer: AModel quality monitoring compares captured predictions with ground truth labels that arrive later, which tracks accuracy over time. Data quality monitoring does not use labels, and notebook logs do not measure model accuracy.
Question 30
A lender must explain individual credit decisions to regulators and wants feature attribution values for each prediction. Which SageMaker capability provides this?
- ASageMaker Edge Manager device registry for fleet tracking
- BSageMaker Autopilot candidate leaderboard metrics table
- CSageMaker Feature Store online store for serving
- DSageMaker Clarify explainability using SHAP values
Show answer and explanationHide answer
Correct answer: DSageMaker Clarify computes SHAP-based feature attributions for individual predictions and for models overall. Edge Manager, the Autopilot leaderboard and the Feature Store do not produce per-prediction explanations.