Courseiva

AWS Certified Machine Learning Specialty MLS-C01 (MLS-C01) — Questions 151225

1672 questions total · 23pages · All types, answers revealed

Page 2

Page 3 of 23

Page 4
151
MCQmedium

A data engineering team is building a real-time clickstream analytics pipeline on AWS. They need to ingest millions of events per second from mobile apps and websites, process them with low latency, and store the results in Amazon S3 for downstream analysis. Which combination of AWS services should the team use to minimize operational overhead while meeting these requirements?

A.Use Amazon MQ to ingest streaming data, AWS Lambda to process each message, and save output to Amazon S3.
B.Use Amazon Kinesis Data Streams to ingest data, Amazon EMR to process with Spark Streaming, and save output to Amazon S3.
C.Use Amazon Kinesis Data Streams for ingestion, Amazon Kinesis Data Analytics for real-time processing, and Amazon Kinesis Data Firehose to deliver results to Amazon S3.
D.Use AWS Glue to ingest data into Amazon RDS, then use AWS Glue ETL jobs to transform and load into Amazon S3.
AnswerC

This combination provides serverless, low-latency ingestion, processing, and delivery with minimal operational overhead.

Why this answer

Amazon Kinesis Data Streams scales to handle millions of events per second with low latency, Kinesis Data Analytics provides real-time processing without managing infrastructure, and Kinesis Data Firehose delivers processed data to Amazon S3 with automatic buffering and compression, minimizing operational overhead. Option A is wrong because Amazon MQ is a managed message broker for standard protocols (e.g., JMS) and does not offer the high-throughput, real-time streaming capabilities required for clickstream analytics. Option B is wrong because, while Kinesis Data Streams works for ingestion, using Amazon EMR with Spark Streaming adds operational overhead for cluster management and scaling, and is less suited for low-latency, serverless processing compared to Kinesis Data Analytics.

Option D is wrong because AWS Glue is a batch ETL service, not designed for real-time ingestion, and Amazon RDS is a relational database that cannot handle the throughput and streaming nature of clickstream data; Glue cannot directly ingest streaming data into RDS in real time.

152
MCQhard

A data scientist uses SageMaker Autopilot to automatically build a binary classification model. The dataset has 50 features and 100,000 rows. After the experiment, Autopilot provides multiple candidate models. Which candidate should the data scientist select to minimize inference latency for real-time predictions?

A.The model with the smallest memory footprint
B.The model with the highest validation accuracy
C.The model with the lowest validation loss
D.The model that is a linear learner
AnswerD

Linear models are fast for inference due to simple computations.

Why this answer

SageMaker Autopilot explores various algorithms including linear models, tree-based ensembles, and neural networks. For real-time inference with low latency, simpler models like linear or logistic regression or shallow decision trees are preferred. XGBoost with many trees or deep neural networks increase latency.

153
MCQhard

A team has deployed a SageMaker endpoint for a sentiment analysis model. The model was trained on text data from social media. After deployment, the team notices that the model's accuracy has dropped significantly after 3 months. Which action should the team take to detect and address this issue?

A.Use SageMaker A/B testing to compare with a new model.
B.Enable SageMaker Model Monitor to detect data drift and trigger a retraining pipeline.
C.Re-deploy the model using the same training script.
D.Create a CloudWatch alarm on invocation errors.
AnswerB

Model Monitor can detect drift and trigger automated retraining.

Why this answer

B is correct because SageMaker Model Monitor is specifically designed to detect data drift (changes in the input data distribution over time) and model drift (degradation in prediction quality). When a sentiment analysis model trained on social media text sees a drop in accuracy after months, it is likely due to shifts in language, slang, or topics. Model Monitor can continuously track the distribution of input features and predictions against a baseline, and when drift is detected, it can automatically trigger a retraining pipeline to update the model, directly addressing the root cause of the accuracy drop.

Exam trap

AWS often tests the distinction between monitoring for operational errors (CloudWatch alarms) versus monitoring for model performance degradation (Model Monitor), and candidates mistakenly choose CloudWatch because they associate 'alarms' with any problem, missing that accuracy drop is a data drift issue, not an invocation error.

How to eliminate wrong answers

Option A is wrong because SageMaker A/B testing is used to compare the performance of two different model variants (e.g., a new model vs. the current one) in real-time traffic, but it does not detect or diagnose the cause of accuracy degradation like data drift; it only helps choose the better model after the issue is already identified. Option C is wrong because re-deploying the model using the same training script will not fix the accuracy drop if the underlying data distribution has changed; the model will still be stale and produce poor predictions on the new data. Option D is wrong because a CloudWatch alarm on invocation errors monitors for infrastructure or runtime failures (e.g., timeouts, 5xx errors), not for model accuracy degradation or data drift; the model can still serve predictions without errors but with low accuracy.

154
Multi-Selecteasy

A data engineer needs to collect and analyze log data from multiple EC2 instances in real-time. The solution should be serverless and scalable. Which TWO AWS services should be used?

Select 2 answers
A.Amazon Kinesis Data Firehose
B.Amazon EMR
C.Amazon Athena
D.Amazon OpenSearch Service
E.Amazon S3
AnswersA, D

Firehose can ingest streaming data.

Why this answer

Amazon Kinesis Data Firehose is the correct choice because it is a fully managed, serverless service that can capture, transform, and load streaming log data from EC2 instances into destinations like Amazon S3 or Amazon OpenSearch Service in near real-time, with no infrastructure to manage. It automatically scales to handle high-throughput data streams, making it ideal for real-time log analytics.

Exam trap

The trap here is that candidates often choose Amazon S3 alone for storage, forgetting that a real-time ingestion layer like Kinesis Data Firehose is required to collect and stream the data from EC2 instances into a queryable destination.

155
MCQhard

A data scientist is using Amazon SageMaker Studio notebooks for EDA. They want to share a reproducible report that includes code, visualizations, and narrative text with their team. Which approach should they use?

A.Save the notebook as an .ipynb file and share it via Amazon S3.
B.Use Amazon SageMaker Clarify to generate an EDA report.
C.Export the results to Amazon QuickSight and create a dashboard.
D.Use Amazon SageMaker Autopilot to generate a report.
AnswerA

Correct. A .ipynb file preserves code, output, and markdown, making it fully reproducible when shared via S3.

Why this answer

A Jupyter notebook (.ipynb) saved in SageMaker Studio contains code, visualizations, and narrative text, and sharing it via Amazon S3 allows team members to reproduce and interact with the analysis. Option B (SageMaker Clarify) is for bias detection and model explainability, not for sharing EDA reports. Option C (Amazon QuickSight) is used for interactive dashboards and does not include the underlying code.

Option D (SageMaker Autopilot) automates model building and does not generate a shareable EDA report.

156
MCQeasy

A data scientist needs to perform exploratory data analysis on a 100 GB CSV file stored in Amazon S3. The data is not sensitive. The scientist wants to use SQL queries to filter and aggregate the data without setting up a server or moving the data. Which service should be used?

A.AWS Glue
B.Amazon EMR
C.Amazon Athena
D.Amazon Redshift Spectrum
AnswerC

Athena is serverless and allows SQL queries on S3 data.

Why this answer

Amazon Athena is the correct choice because it is a serverless, interactive query service that allows you to run standard SQL directly on data stored in Amazon S3 without any infrastructure setup. For a 100 GB CSV file, Athena can handle the query workload efficiently by automatically scaling, and it charges only for the data scanned per query, making it ideal for ad-hoc exploratory analysis without moving or transforming the data.

Exam trap

AWS often tests the distinction between serverless query services (Athena) and services that require provisioning (EMR, Redshift), so the trap here is that candidates may choose Redshift Spectrum thinking it is serverless, but it actually requires an active Redshift cluster.

How to eliminate wrong answers

Option A is wrong because AWS Glue is primarily a serverless ETL (extract, transform, load) service used for data cataloging and preparing data for analytics, not for running interactive SQL queries directly on raw data in S3. Option B is wrong because Amazon EMR requires provisioning and managing a cluster of EC2 instances (even if transient), which contradicts the requirement of not setting up a server. Option D is wrong because Amazon Redshift Spectrum is a feature of Amazon Redshift that allows querying data in S3, but it requires an existing Redshift cluster (a provisioned data warehouse) to be running, which violates the 'no server setup' constraint.

157
MCQhard

A team is training a deep learning model using TensorFlow on a single GPU instance in SageMaker. The GPU utilization is below 30%. Which change will MOST improve GPU utilization?

A.Reduce the number of epochs
B.Increase the batch size
C.Use SageMaker Distributed Training with multiple GPUs
D.Switch to a CPU instance
AnswerB

Larger batches keep the GPU busy with more data per iteration.

Why this answer

Increasing the batch size makes more efficient use of GPU memory and parallel processing, improving utilization.

158
MCQmedium

A data scientist is using Amazon SageMaker Autopilot to automatically build a binary classification model. The dataset has 50 features and 100,000 rows. After the experiment completes, the best candidate model achieves an F1 score of 0.85 on the validation set. However, when deployed to a real-time endpoint, the model's F1 score drops to 0.72 on production data. The data distributions between training and production are similar. What is the MOST likely cause of the performance drop?

A.Concept drift occurred between training and production.
B.The production data contains missing values that were not present in training.
C.The inference endpoint uses a different instance type than training.
D.The Autopilot pipeline used features that are not available at inference time (data leakage).
AnswerD

If Autopilot used future information or features derived from the target, the validation score would be inflated.

Why this answer

Data leakage during Autopilot's feature engineering can lead to overly optimistic validation scores because features may have been derived from the target variable or from future information. Option A is wrong because similar distributions suggest no drift. Option B is wrong because Autopilot handles missing values.

Option C is irrelevant because inference instance type does not affect model accuracy.

159
MCQmedium

A company is building a binary classifier to predict equipment failure. The dataset has 99% negative (no failure) and 1% positive (failure) examples. The data scientist uses a random forest model with default settings. The model achieves 99% accuracy on the test set but fails to identify any actual failures. Which metric should the data scientist use to evaluate the model?

A.RMSE
B.R-squared
C.Recall
D.Precision
AnswerC

Recall measures the proportion of actual positives correctly identified, which is critical for imbalanced data.

Why this answer

Recall (sensitivity) measures the proportion of actual positive cases correctly identified. With 99% negative examples, a model can achieve 99% accuracy by simply predicting 'no failure' for all instances, but this yields 0% recall for the failure class. Since the goal is to detect rare failures, recall is the appropriate metric to evaluate the model's ability to find positive cases.

Exam trap

The trap here is that candidates see 99% accuracy and assume the model is performing well, failing to recognize that accuracy is a poor metric for imbalanced datasets, and they overlook recall as the metric that reveals the model's inability to detect the minority class.

How to eliminate wrong answers

Option A is wrong because RMSE (Root Mean Squared Error) is a regression metric used for continuous target variables, not for binary classification problems. Option B is wrong because R-squared measures the proportion of variance explained in a regression model, which is meaningless for evaluating a binary classifier's ability to detect failures. Option D is wrong because precision measures the proportion of predicted positives that are actually positive; while useful, it does not capture the model's failure to identify any actual failures (the model has 0% recall, but precision would be undefined or 0/0 if no positives are predicted).

160
MCQhard

An organization stores sensitive customer data in S3. A data pipeline uses AWS Glue to transform the data and load it into Amazon Redshift. The security team requires that data be encrypted at rest in S3 and in transit between S3 and Glue, and between Glue and Redshift. Which configuration meets these requirements?

A.Use S3 client-side encryption, and use VPC Peering between Glue and Redshift.
B.Use S3 default encryption with SSE-KMS, and use Network Load Balancer for Redshift.
C.Enable S3 server-side encryption with SSE-S3, and use SSL for both Glue connections.
D.Enable S3 default encryption with SSE-KMS, use a VPC endpoint for S3, and configure Glue to use SSL for Redshift connection.
AnswerD

Correct because SSE-KMS ensures encryption at rest in S3 with a customer-managed key, a VPC endpoint for S3 uses HTTPS/TLS for in-transit encryption between S3 and Glue, and configuring Glue to use SSL for Redshift encrypts data in transit between Glue and Redshift.

Why this answer

It ensures encryption at rest in S3 via SSE-KMS, encrypts data in transit between S3 and Glue by using a VPC endpoint (which enforces HTTPS/TLS), and encrypts data in transit between Glue and Redshift by configuring SSL for the Redshift connection. SSE-KMS provides envelope encryption with a customer-managed key, while the VPC endpoint and SSL satisfy the in-transit encryption requirements.

Exam trap

The trap here is that candidates often assume VPC Peering alone provides encryption in transit, but it only provides network isolation without encryption, and they may overlook that SSL must be explicitly configured for the Glue-to-Redshift connection.

How to eliminate wrong answers

Option A is wrong because client-side encryption does not guarantee server-side encryption at rest in S3 (the security team requires encryption at rest in S3, which is typically satisfied by server-side encryption), and VPC Peering alone does not enforce encryption in transit between Glue and Redshift (it only provides network connectivity, not TLS/SSL). Option B is wrong because a Network Load Balancer (NLB) for Redshift does not inherently encrypt traffic between Glue and Redshift; NLB operates at Layer 4 and does not terminate TLS unless explicitly configured with a TLS listener, which is not mentioned. Option C is wrong because SSE-S3 encrypts data at rest but does not provide encryption in transit between S3 and Glue (SSL must be explicitly enabled for the Glue connection to S3, and the option does not specify SSL for the S3-to-Glue leg).

161
MCQhard

A company uses SageMaker to train a model each night. The training data is stored in an S3 bucket with SSE-S3 encryption. The training job fails with an access denied error. Which configuration is needed?

A.Configure the training job to run in a VPC with S3 VPC Endpoint
B.Create an IAM role with S3 read access and assign it to the SageMaker training job
C.Enable SSE-KMS on the S3 bucket
D.Add a bucket policy allowing s3:GetObject for all principals
AnswerB

SageMaker needs a role with permissions to read S3 data.

Why this answer

The training job fails because SageMaker does not have the necessary permissions to read the data from S3. The solution is to create an IAM role with S3 read access (s3:GetObject) and assign it to the SageMaker training job. Option A is incorrect because VPC endpoints are not required for this error and are unrelated to encryption.

Option C is incorrect because SSE-S3 encryption is already enabled and does not require KMS. Option D is incorrect because a bucket policy allowing all principals is insecure and not the proper way to grant permissions to SageMaker.

162
Multi-Selecthard

A company is using Amazon SageMaker to deploy a model for real-time inference. The model takes 200 ms to respond, but the requirement is 100 ms. Which THREE actions could reduce latency? (Choose THREE.)

Select 3 answers
A.Use a larger instance with more compute capacity
B.Prune the model to remove unnecessary weights
C.Switch to a CPU-based instance
D.Use SageMaker Neo to compile the model for the target instance
E.Increase the batch size for inference
AnswersA, B, D

More powerful instances reduce inference time.

Why this answer

Using a larger instance with more compute capacity reduces inference time by providing more CPU/GPU power. Option B: Pruning removes unnecessary weights, reducing model size and computation. Option D: SageMaker Neo compiles the model to optimize for the target instance, improving performance.

Option C is incorrect because CPU instances are generally slower than GPU instances for deep learning models. Option E is incorrect because increasing batch size typically increases latency for real-time inference as it waits for more samples.

163
MCQmedium

A company is training a deep learning model on a large dataset using Amazon SageMaker. The training script uses TensorFlow and requires GPUs. The training job is failing with an out-of-memory error. Which configuration change should be made to resolve this issue?

A.Use a larger instance type with more GPU memory.
B.Increase the number of instances in the training job.
C.Switch to using spot instances to reduce cost.
D.Enable distributed training across multiple instances.
AnswerA

Larger instance types have more GPU memory, resolving the OOM error.

Why this answer

The training job is failing with an out-of-memory error, which indicates that the model or batch size exceeds the GPU memory capacity of the current instance. Using a larger instance type with more GPU memory directly addresses this by providing additional VRAM, allowing the model to fit in memory and the training to proceed without failure.

Exam trap

The trap here is that candidates confuse horizontal scaling (adding instances) with vertical scaling (increasing instance size), assuming that more instances will magically fix a per-GPU memory limit, when in fact distributed training requires the model to fit on each GPU unless model parallelism is explicitly implemented.

How to eliminate wrong answers

Option B is wrong because increasing the number of instances does not increase the GPU memory available to a single training process; it only distributes the workload across multiple machines, which does not resolve a local out-of-memory error on each GPU. Option C is wrong because switching to spot instances reduces cost but does not change the instance's hardware specifications, so the GPU memory remains the same and the out-of-memory error persists. Option D is wrong because enabling distributed training across multiple instances partitions the data or model across GPUs, but if the model itself does not fit on a single GPU, you would need model parallelism or a larger instance; simply distributing the workload does not increase per-GPU memory and may still result in out-of-memory errors on each GPU.

164
MCQmedium

A data scientist needs to choose an algorithm for a regression problem with 50 features and 1 million training examples. The model must be interpretable and the training data fits in memory. Which algorithm is most appropriate?

A.Principal Component Analysis (PCA)
B.Linear regression
C.XGBoost
D.k-Nearest Neighbors
AnswerB

Linear regression is interpretable and efficient for large datasets.

Why this answer

Linear regression is the most appropriate choice because it is interpretable, handles high-dimensional data with 50 features efficiently, scales well to 1 million training examples that fit in memory, and directly addresses regression. Option A (PCA) is a dimensionality reduction technique, not a regression algorithm. Option C (XGBoost) is powerful for regression but is less interpretable due to its ensemble nature.

Option D (k-NN) is non-parametric and computationally expensive at inference time, lacking interpretability.

165
MCQeasy

A company is using Amazon DynamoDB to store sensor data. The data is exported to Amazon S3 using DynamoDB Streams and AWS Lambda for long-term archival. Recently, the Lambda function has been failing due to 'ProvisionedThroughputExceededException' on the DynamoDB stream. What is the most likely cause?

A.The Lambda function is processing records too slowly, causing the stream to throttle.
B.The DynamoDB stream is disabled.
C.The DynamoDB table's write capacity is too low.
D.The Lambda function does not have enough memory allocated.
AnswerA

Correct: Slow processing can lead to throttling; increasing batch size or concurrency can help.

Why this answer

A is correct because the 'ProvisionedThroughputExceededException' on a DynamoDB stream indicates that the stream's read throughput is being throttled. When a Lambda function processes records too slowly, it cannot keep up with the rate of new records being written to the stream, causing the stream shards to throttle the Lambda consumer. This is a common issue when the Lambda function's processing time per record is high or when the function is invoked with a large batch size that exceeds its processing capacity.

Exam trap

A common misconception in AWS exams is that DynamoDB throttling errors are always related to table write capacity. However, the trap here is that the error is on the stream, not the table, and the root cause is the Lambda consumer's processing speed, not the table's provisioned throughput.

How to eliminate wrong answers

Option B is wrong because if the DynamoDB stream were disabled, the Lambda function would not be triggered at all, and the error would be a different one (e.g., 'ResourceNotFoundException' or no invocation), not a 'ProvisionedThroughputExceededException'. Option C is wrong because the error is on the DynamoDB stream, not on the table's write capacity; the table's write capacity affects writes to the table, but the stream's read throughput is independent and controlled by the stream's shard-level read limits. Option D is wrong because insufficient memory in the Lambda function would cause out-of-memory errors or timeouts, not a 'ProvisionedThroughputExceededException', which is a throttling error from the DynamoDB Streams API.

166
MCQeasy

A data scientist loads a large dataset from Amazon S3 into a pandas DataFrame using a SageMaker notebook. The dataset contains a mix of numeric and categorical features. The data scientist wants to quickly check for missing values. Which pandas function is most appropriate?

A.df.info()
B.df.describe()
C.df.shape
D.df.isnull().sum()
AnswerD

This returns the sum of null values per column.

Why this answer

Df.isnull().sum() returns the count of missing values per column. Option A is wrong because df.info() provides column data types and non-null counts, but not missing value counts directly. Option B is wrong because df.describe() only summarizes numeric columns.

Option C is wrong because df.shape returns the dimensions, not missing values.

167
Multi-Selecteasy

A data scientist is exploring a dataset with categorical variables. Which TWO EDA techniques are appropriate for understanding the relationship between a categorical feature and a continuous target? (Choose TWO.)

Select 2 answers
A.Correlation matrix
B.Violin plots
C.Scatter plot with categorical variable on x-axis
D.Bar chart of category counts
E.Side-by-side box plots
AnswersB, E

Violin plots show density and distribution across categories.

Why this answer

Box plots (E) and violin plots (B) are both effective for visualizing the distribution of a continuous variable across different categories. Violin plots combine box plots with kernel density estimation, providing a richer view. Correlation matrix (A) is for numerical variables.

Scatter plots (C) require two continuous variables. Bar chart of counts (D) shows frequency distribution of categories, not relationship with a continuous target.

168
MCQhard

A data scientist is building a fraud detection model using a dataset of 500,000 credit card transactions. The dataset contains 20 features, including transaction amount, merchant category, time since last transaction, and customer age. The target variable 'is_fraud' has 0.1% positive examples. Initial EDA reveals that the transaction amount distribution is highly skewed with a long tail. Also, there are missing values in the 'customer_age' field (5% missing). The data scientist needs to prepare the data for training a binary classifier. Which combination of preprocessing steps should the data scientist apply to address these issues and improve model performance? (Select TWO.)

A.Use SMOTE to generate synthetic samples of the minority class.
B.Apply standard scaling to all numerical features.
C.Apply log transformation to the transaction amount to reduce skewness.
D.Impute missing values in customer_age with the mean of the non-missing values.
E.Drop the transaction amount feature because of its skewness.
AnswerC, D

Log transformation is effective for reducing right skewness and can make the distribution more Gaussian-like, which benefits many models.

Why this answer

This is a multi-select question requiring two correct preprocessing steps. Option C is correct because applying a log transformation to the highly skewed transaction amount reduces skewness and compresses the dynamic range, which helps many machine learning algorithms (especially those sensitive to feature scales like logistic regression or SVM) converge faster and perform better. Option D is correct because imputing missing values in customer_age with the mean is a simple and effective method when the missing rate is only 5% and the data is roughly normally distributed, preserving sample size.

Option A is wrong because SMOTE is typically applied after splitting the data to avoid data leakage, and it is not a preprocessing step for EDA; also, the class imbalance is severe but SMOTE may be considered later. Option B is wrong because standard scaling does not handle skewness; it should be applied after skewness correction. Option E is wrong because dropping the feature due to skewness would lose valuable information; transformation is preferable.

Exam trap

The trap here is that candidates often confuse handling skewness with scaling—they may choose standard scaling (Option B) thinking it addresses skewness, but standard scaling only centers and scales the data, not corrects the shape of the distribution.

How to eliminate wrong answers

Option A is wrong because SMOTE (Synthetic Minority Oversampling Technique) generates synthetic samples for the minority class, but with only 0.1% fraud cases (500 out of 500,000), SMOTE would create an extremely large synthetic dataset that risks overfitting and does not address the skewed transaction amount or missing values. Option B is wrong because standard scaling (z-score normalization) is not appropriate for highly skewed features like transaction amount; scaling after log transformation would be valid, but applying standard scaling directly to a skewed distribution does not reduce skewness and can still leave the feature non-Gaussian, harming model performance. Option E is wrong because dropping the transaction amount feature due to skewness discards valuable predictive information; skewness can be corrected via transformation (e.g., log) rather than deletion, which would reduce model accuracy.

169
Multi-Selectmedium

A company is deploying a machine learning model for real-time fraud detection using Amazon SageMaker. The model must have a p99 inference latency under 50ms. Which TWO actions should the ML team take to meet the latency requirement?

Select 2 answers
A.Use a multi-model endpoint to reduce cold starts.
B.Use SageMaker Neo to compile and optimize the model for the target instance type.
C.Use SageMaker Batch Transform for near-real-time inference.
D.Configure automatic scaling to add instances based on CPU utilization.
E.Select a GPU instance type such as ml.g4dn.xlarge.
AnswersB, E

Neo optimizes the model to run faster on specific hardware.

Why this answer

SageMaker Neo compiles and optimizes trained models for specific hardware targets, reducing inference latency by up to 2x without sacrificing accuracy. By applying hardware-specific optimizations such as kernel fusion and memory layout tuning, Neo ensures the model runs efficiently on the chosen instance type, directly helping to achieve sub-50ms p99 latency.

Exam trap

Candidates often assume that using a GPU instance (like ml.g4dn.xlarge) alone guarantees low latency. However, without model optimization (e.g., via SageMaker Neo), the overhead from unoptimized kernels and framework runtime can still cause p99 latency to exceed 50ms. Neo compiles the model specifically for the target instance, reducing inference time.

170
Multi-Selecteasy

A data scientist is training a linear regression model and wants to check for multicollinearity among the features. Which TWO methods can be used to detect multicollinearity? (Choose TWO.)

Select 2 answers
A.Examine the R-squared value of the model
B.Compute the correlation matrix between features
C.Check the p-values of the coefficients
D.Calculate Variance Inflation Factor (VIF) for each feature
E.Plot the residuals vs. fitted values
AnswersB, D

High pairwise correlations between features (e.g., >0.8) suggest multicollinearity.

Why this answer

Computing the correlation matrix between features directly reveals pairwise linear relationships. High correlation coefficients (e.g., >0.8 or <-0.8) between two predictors indicate potential multicollinearity, which can destabilize coefficient estimates in linear regression.

Exam trap

AWS often tests the distinction between diagnosing model fit (R-squared, residual plots) and diagnosing predictor multicollinearity, leading candidates to mistakenly choose methods that evaluate model performance rather than feature interdependence.

171
MCQhard

A company uses Amazon Kinesis Data Streams with a shard count of 5. The data producer sends 1000 records per second, each 1 KB in size. The consumer application reads from the stream using the Kinesis Client Library (KCL) and processes records. The consumer is experiencing high latency and falling behind. What is the most effective way to improve consumer throughput?

A.Switch to Kinesis Data Analytics for processing.
B.Use enhanced fan-out to dedicate read throughput to the consumer.
C.Increase the record size to 5 KB.
D.Increase the number of shards in the stream.
AnswerD

Correct: More shards provide more read capacity and allow parallel processing.

Why this answer

The consumer is falling behind because it cannot process records fast enough. The Kinesis Client Library (KCL) typically runs one consumer thread per shard, so with only 5 shards there are only 5 parallel consumers. To improve throughput, the number of shards should be increased to allow more parallel processing.

Options like enhanced fan-out would improve read throughput per consumer but do not increase parallelism; the bottleneck here is processing speed, not read throughput. Increasing shards directly increases the number of consumers and thus overall throughput.

Exam trap

The trap here is that candidates often confuse enhanced fan-out (which provides dedicated throughput per consumer) with solving throughput issues, but fail to realize that with only 5 shards, even dedicated throughput per shard is insufficient for high-volume consumption, making shard scaling the correct solution.

How to eliminate wrong answers

Option A is wrong because Kinesis Data Analytics is a service for running SQL or Apache Flink queries on streaming data in real time; it does not increase read throughput or resolve consumer backpressure. Option B is wrong because enhanced fan-out provides dedicated 2 MB/s read throughput per consumer per shard, but with only 5 shards the total read capacity is still limited to 10 MB/s (5 shards × 2 MB/s), which is insufficient to process 1000 records/second at 1 KB each (1 MB/s write, but consumer processing rate is constrained by shard-level read limits and record processing overhead). Option C is wrong because increasing record size to 5 KB would increase the data volume to 5 MB/s, worsening the consumer's latency and backpressure issue rather than solving it.

172
Multi-Selectmedium

Which TWO of the following are appropriate techniques for detecting outliers in a univariate continuous feature?

Select 2 answers
A.Apply a Random Forest classifier to predict outliers.
B.Use Z-score and flag values with absolute Z-score > 3.
C.Remove any value that is more than one standard deviation from the mean.
D.Use DBSCAN clustering with default parameters.
E.Use the interquartile range (IQR) and flag values below Q1 - 1.5*IQR or above Q3 + 1.5*IQR.
AnswersB, E

Z-score >3 is a common outlier threshold.

Why this answer

The Z-score method (Option B) is a standard statistical technique for detecting outliers in a univariate continuous feature. It measures how many standard deviations a data point is from the mean, and flagging values with an absolute Z-score greater than 3 is a common threshold because, under a normal distribution, approximately 99.7% of data falls within three standard deviations, making points beyond this likely outliers.

Exam trap

The MLS-C01 exam often tests the misconception that removing values more than one standard deviation from the mean is a valid outlier detection technique, when in fact it removes a large portion of normal data and is not a standard practice.

173
Multi-Selecthard

A machine learning engineer is using SageMaker's built-in XGBoost algorithm for a multi-class classification problem. The training job completes but the model accuracy is low. Which THREE hyperparameters should the engineer tune to improve performance?

Select 3 answers
A.eta (learning rate)
B.num_round
C.subsample
D.max_depth
E.colsample_bytree
AnswersA, B, D

Learning rate controls contribution of each tree; tuning helps convergence.

Why this answer

XGBoost hyperparameters: 'num_round' (number of boosting rounds), 'eta' (learning rate), and 'max_depth' (tree depth) are key for improving accuracy. 'subsample' can help but is less direct. 'min_child_weight' also important but these three are most common. 'colsample_bytree' is for feature subsampling.

174
Multi-Selectmedium

A company is using Amazon SageMaker to train a model. The training data includes sensitive personally identifiable information (PII). The company needs to ensure that the training data is protected and that the trained model does not inadvertently expose PII. Which TWO actions should the company take? (Choose TWO.)

Select 2 answers
A.Encrypt the training data in S3 using AWS KMS
B.Use server-side encryption with S3-managed keys
C.Use SageMaker's data processing to redact PII before training
D.Enable AWS CloudTrail to log all access to the data
E.Grant public read access to the training data for faster access
AnswersA, C

Encryption protects data at rest.

Why this answer

Encrypting the training data in S3 using AWS KMS ensures that the data is protected at rest with customer-managed keys, providing a strong security control for sensitive PII. This encryption prevents unauthorized access to the raw data stored in S3, which is a fundamental requirement for data protection.

Exam trap

The trap here is that candidates often confuse logging (CloudTrail) with data protection, or assume that any form of S3 encryption (like SSE-S3) is sufficient, when the question specifically requires control over keys and PII redaction to prevent model exposure.

175
MCQmedium

A company is building a multiclass classification model using Amazon SageMaker. The dataset has 100 classes and is highly imbalanced. The model currently achieves high accuracy on the majority classes but poor performance on minority classes. Which technique should the data scientist use to improve minority class performance?

A.Apply random oversampling with replacement
B.Apply principal component analysis (PCA)
C.Use class weights to penalize misclassifications of minority classes
D.Remove samples from majority classes
AnswerC

Class weights penalize errors on minority classes more, improving their recall.

Why this answer

Class weights assign a higher penalty to misclassifications of minority classes, forcing the model to pay more attention to them and improving recall for minority classes. Option A is wrong because random oversampling with replacement can cause overfitting and does not incorporate minority class importance as directly as class weights. Option B is wrong because PCA is a dimensionality reduction technique and does not address class imbalance.

Option D is wrong because removing samples from the majority class (undersampling) can discard useful information and is often less effective than using class weights.

176
Multi-Selectmedium

Which THREE of the following are valid metrics for evaluating a regression model?

Select 3 answers
A.R-squared (R²)
B.F1 score
C.Mean Absolute Error (MAE)
D.Root Mean Squared Error (RMSE)
E.Accuracy
AnswersA, C, D

R-squared is a common regression metric.

Why this answer

R-squared (R²) is a valid regression metric that measures the proportion of variance in the dependent variable explained by the independent variables. It ranges from 0 to 1, with higher values indicating better fit, and is commonly used alongside other error metrics to assess model performance.

Exam trap

The trap here is that candidates confuse classification metrics (F1 score, Accuracy) with regression metrics, especially when the question asks for 'valid metrics' without specifying the model type, leading them to select metrics they are more familiar with from classification tasks.

177
MCQeasy

A data engineer needs to transfer 50 TB of historical data from an on-premises Hadoop cluster to Amazon S3. The on-premises network has a 1 Gbps connection to AWS. The transfer must be completed within 10 days. What is the MOST efficient approach?

A.Use AWS Snowball Edge to physically ship the data.
B.Use Amazon S3 Transfer Acceleration to speed up the upload.
C.Use AWS DataSync over the existing network connection.
D.Set up a VPN connection and use multi-part upload directly to S3.
AnswerA

Snowball Edge provides high-speed local transfer and avoids network bottlenecks.

Why this answer

Transferring 50 TB over a 1 Gbps connection would take approximately 5.6 days under ideal conditions (50 TB × 8 bits/byte / 1 Gbps / 86400 seconds/day ≈ 4.63 days), but real-world factors like network congestion, TCP overhead, and protocol inefficiencies typically reduce throughput to 50-70% of line rate, pushing the transfer beyond the 10-day window. AWS Snowball Edge provides a physical shipping alternative that bypasses network limitations entirely, making it the most efficient and reliable method for this volume and deadline.

Exam trap

The trap here is that candidates calculate the theoretical maximum transfer time (50 TB / 1 Gbps ≈ 4.6 days) and conclude it fits within 10 days, ignoring real-world network inefficiencies, protocol overhead, and the fact that sustained throughput rarely exceeds 50-70% of line rate, which pushes the actual time beyond the deadline.

How to eliminate wrong answers

Option B is wrong because S3 Transfer Acceleration only optimizes the last-mile path over AWS edge locations and does not increase the bandwidth of the 1 Gbps on-premises link; it cannot overcome the fundamental throughput bottleneck of the existing connection. Option C is wrong because AWS DataSync, while efficient for incremental transfers, still operates over the same 1 Gbps network and would face the same bandwidth constraint, making it impossible to complete 50 TB within 10 days given real-world overhead. Option D is wrong because setting up a VPN connection adds encryption overhead and further reduces effective throughput, and multi-part upload alone does not increase the available bandwidth; the transfer would still be limited by the 1 Gbps link.

178
MCQmedium

A data engineer needs to transform a large dataset stored in Amazon S3 using Apache Spark. The engineer wants to minimize costs and avoid managing infrastructure. Which AWS service should be used?

A.Amazon Athena
B.Amazon SageMaker
C.Amazon EMR
D.AWS Glue
AnswerD

AWS Glue provides serverless Spark execution, automatically scaling and costing only for active compute time.

Why this answer

AWS Glue is the optimal choice because it provides a serverless Apache Spark environment, fully managed, that allows the engineer to run Spark transformations without provisioning or managing clusters. This meets both requirements: using Apache Spark as specified, and minimizing costs and infrastructure management through its pay‑as‑you‑go, serverless model. Amazon Athena is a SQL query service and does not execute Apache Spark code.

Amazon EMR provides Spark but typically requires cluster management (unless using EMR Serverless, which is not as straightforward as Glue for serverless Spark). Amazon SageMaker is focused on machine learning, not general ETL transformations.

Exam trap

Candidates often select Amazon Athena because it is serverless and low‑cost, but overlook the key requirement: the question explicitly states ‘using Apache Spark.’ Only AWS Glue (serverless) and Amazon EMR (cluster‑based) natively support Spark. Between them, AWS Glue eliminates infrastructure management, making it the correct choice.

How to eliminate wrong answers

Option A is wrong because Amazon Athena is a serverless interactive query service that uses Presto/Trino SQL, not Apache Spark, and is designed for ad-hoc queries, not for running custom Spark transformations. Option B is wrong because Amazon SageMaker is a managed machine learning platform for building, training, and deploying models, not a Spark-based ETL service for general data transformation. Option C is wrong because Amazon EMR, while capable of running Apache Spark, requires the user to provision, configure, and manage EC2 clusters (even with managed scaling), incurring costs for idle cluster time and infrastructure overhead, which contradicts the requirement to minimize costs and avoid managing infrastructure.

179
MCQhard

A data engineer uses the IAM policy above for an AWS Lambda function that processes data in S3 and triggers an AWS Glue job. The Lambda function is unable to start the Glue job. What is the most likely cause?

A.The Glue job name in the resource ARN is misspelled.
B.The policy does not allow s3:PutObject on the bucket.
C.The policy does not include iam:PassRole permission.
D.The policy does not include s3:GetObject on the bucket.
AnswerC

To start a Glue job, Lambda must pass an execution role; iam:PassRole is required.

Why this answer

The Lambda function needs to pass an IAM role to AWS Glue when starting a job, which requires the `iam:PassRole` permission. Without this permission, the `StartJobRun` API call fails even if the Lambda has permissions to invoke Glue. The policy shown lacks this critical permission, making option C the correct answer.

Exam trap

The trap here is that candidates focus on S3 permissions (options B and D) because the Lambda processes S3 data, but the actual failure is the missing IAM permission required to delegate a role to AWS Glue, which is a subtle but critical detail in cross-service orchestration.

How to eliminate wrong answers

Option A is wrong because a misspelled Glue job name would cause a different error (e.g., 'Job not found'), not a permissions failure, and the question states the Lambda is 'unable to start' the job, implying an authorization issue. Option B is wrong because the Lambda function processes data in S3 (likely reading objects) and triggers a Glue job; the error is about starting the Glue job, not writing to S3, and `s3:PutObject` is not required for the Glue job start action. Option D is wrong because `s3:GetObject` is needed for reading data from S3, but the error is specifically about starting the Glue job, not about reading S3 objects; the Lambda may already have that permission or the error would manifest differently.

180
MCQmedium

A company is deploying a machine learning model using AWS Lambda for real-time inference. The model is a large ensemble model that takes approximately 500 MB of memory. The Lambda function is configured with 1024 MB of memory and a timeout of 15 seconds. The company observes that the function frequently times out during inference. The company wants to keep using Lambda for its serverless benefits. Which solution should the company implement to reduce inference time?

A.Increase the Lambda function memory to 3008 MB to provide more CPU resources.
B.Deploy the model on Amazon SageMaker hosting instead of Lambda.
C.Use AWS Step Functions to invoke the Lambda function asynchronously.
D.Use Amazon ElastiCache to cache model predictions and reduce computation.
AnswerA

Increasing memory to 3008 MB provides more CPU resources, reducing inference time.

Why this answer

Lambda has a maximum memory of 10,240 MB and a maximum timeout of 15 minutes. Increasing memory to 3008 MB gives more CPU power and reduces inference time. Option A is correct.

Option B (SageMaker) moves away from serverless, which the company wants to keep. Option C (Step Functions) adds orchestration overhead and does not directly reduce inference time. Option D (ElastiCache) adds latency and cost and does not address the timeout issue.

181
Multi-Selecthard

A data scientist is using SageMaker to train a deep learning model. The training job runs on a single GPU instance and is taking too long. Which THREE actions can the data scientist take to reduce training time? (Choose three.)

Select 3 answers
A.Increase the size of the EBS volume attached to the instance.
B.Increase the number of instances but keep the same total data.
C.Switch to Pipe input mode to reduce I/O waiting time.
D.Use a larger GPU instance type, such as p3.16xlarge.
E.Use distributed training across multiple GPU instances.
AnswersC, D, E

Streams data directly, reducing I/O bottleneck.

Why this answer

Pipe input mode streams training data directly from Amazon S3 to the GPU instance, reducing I/O waiting time compared to the default File mode, which downloads the entire dataset to the EBS volume first. This minimizes the time the GPU spends idle waiting for data, especially for large datasets that cannot fit entirely in memory.

Exam trap

The trap here is that candidates may confuse increasing instance count (Option B) with distributed training (Option E), not realizing that simply adding instances without distributed training code and configuration does not parallelize the workload and can even increase overhead.

182
Multi-Selectmedium

A data scientist is building a regression model to predict housing prices. The dataset includes numerical features such as square footage, number of bedrooms, and year built, as well as categorical features such as neighborhood and roof type. Which TWO preprocessing steps are most important to apply before training a linear regression model?

Select 2 answers
A.Apply principal component analysis (PCA) for dimensionality reduction
B.One-hot encode categorical features
C.Remove outliers using IQR
D.Add interaction terms between all features
E.Normalize or standardize numerical features
AnswersB, E

One-hot encoding converts categorical variables into numerical form suitable for linear regression.

Why this answer

Linear regression requires numerical features and is sensitive to feature scales. Encoding categorical variables as numerical is necessary, and scaling numerical features ensures that no single feature dominates the model.

183
MCQhard

Refer to the exhibit. A data engineer runs an Athena query and gets a failure. What is the most likely cause?

A.The query result location uses a bucket with default encryption enabled.
B.The SQL query syntax is incorrect.
C.The IAM role used does not have permissions to write to S3.
D.The output S3 bucket specified in the query result configuration already exists.
AnswerC

The IAM role used by Athena must have s3:PutObject permission for the output bucket. Lack of permissions is a frequent and common cause of query failures.

Why this answer

The most likely cause for an Athena query failure is that the IAM role used does not have the necessary permissions to write query results to the specified S3 bucket. While syntax errors or encryption settings can cause issues, permissions are a frequent and common cause of failure in practice.

Exam trap

Candidates often assume that the bucket must be new or empty, but Athena can use any existing bucket. The real trap is forgetting that the IAM role must have write permissions to the output bucket.

How to eliminate wrong answers

Option A is wrong because default encryption on the S3 bucket does not cause Athena query failures; Athena can write to encrypted buckets as long as the IAM role has the necessary permissions (e.g., kms:GenerateDataKey). Option B is wrong because the question states the query fails due to the output location, not syntax; Athena provides specific syntax error messages if the SQL is incorrect. Option C is wrong because the IAM role lacking S3 write permissions would produce an access denied error, not a failure related to the output bucket already existing.

184
Multi-Selecthard

Which TWO of the following are appropriate methods for handling missing data in a dataset?

Select 2 answers
A.Dropping features with more than 50% missing values
B.Mean imputation for all features
C.Multiple imputation
D.Using algorithms that handle missing values internally (e.g., XGBoost)
E.Listwise deletion (removing rows with missing values)
AnswersC, D

Multiple imputation accounts for uncertainty by creating multiple datasets.

Why this answer

Multiple imputation and using algorithms that handle missing values (e.g., XGBoost) are valid. Listwise deletion reduces sample size. Mean imputation may bias distributions.

Dropping features with many missing values may lose information.

185
MCQhard

A data scientist is building a recommendation system for an e-commerce platform. The dataset contains user interactions (clicks, purchases) and item metadata. The scientist wants to use matrix factorization. Which algorithm should be used?

A.SageMaker Image Classification
B.SageMaker BlazingText
C.SageMaker XGBoost
D.SageMaker Factorization Machines
AnswerD

Factorization Machines are designed for recommendation and matrix factorization.

Why this answer

SageMaker Factorization Machines is specifically designed for recommendation systems and matrix factorization tasks. Option A (SageMaker Image Classification) is used for image classification, not matrix factorization. Option B (SageMaker BlazingText) is used for text classification or word embeddings, not for recommendation.

Option C (SageMaker XGBoost) is a gradient boosting algorithm for regression and classification, not matrix factorization.

186
MCQmedium

A company is using Amazon SageMaker to train a deep learning model on a large dataset. The training job is taking too long. The team wants to reduce training time without changing the model architecture. Which action should they take?

A.Increase the learning rate by a factor of 10
B.Use SageMaker's distributed training with multiple instances
C.Reduce the number of epochs
D.Reduce the batch size
AnswerB

Distributed training parallelizes the workload.

Why this answer

SageMaker's distributed training with multiple instances splits the dataset and model computations across several machines, enabling parallel processing that significantly reduces wall-clock training time. This approach leverages data parallelism or model parallelism without altering the model architecture, directly addressing the need for faster training.

Exam trap

The MLS-C01 exam often tests the misconception that simply adjusting hyperparameters like learning rate or batch size can solve performance issues, when the correct answer is to leverage distributed computing resources that SageMaker provides natively.

How to eliminate wrong answers

Option A is wrong because increasing the learning rate by a factor of 10 can cause the optimizer to overshoot minima, leading to divergence or unstable training, and does not guarantee reduced training time without risking model quality. Option C is wrong because reducing the number of epochs directly reduces the amount of training iterations, which may lower model accuracy or prevent convergence, and is not a valid method to reduce training time while preserving model performance. Option D is wrong because reducing the batch size typically increases the number of weight updates per epoch and can slow down training due to less efficient hardware utilization and increased communication overhead, especially on GPUs.

187
MCQeasy

A data scientist is training a binary classification model on a dataset with a severe class imbalance (95% negative, 5% positive). The model achieves 95% accuracy but only correctly identifies 10% of the positive class. Which metric should the data scientist use to evaluate model performance?

A.Log loss
B.F1 score
C.Accuracy
D.Area under the ROC curve (AUC)
AnswerB

F1 score balances precision and recall, making it suitable for imbalanced datasets where the minority class is important.

Why this answer

The F1 score is the harmonic mean of precision and recall, making it robust to class imbalance. With 95% accuracy but only 10% recall on the positive class, the model is essentially a trivial classifier that predicts the majority class. F1 score captures both false positives and false negatives, providing a balanced view of performance on the minority class.

Exam trap

The trap here is that candidates see high accuracy and assume the model is good, but AWS tests the understanding that accuracy is meaningless for imbalanced datasets, and that AUC can be misleadingly high even when minority class recall is poor.

How to eliminate wrong answers

Option A is wrong because log loss measures the probabilistic confidence of predictions and can be misleading when class imbalance is severe, as it is dominated by the majority class. Option C is wrong because accuracy is misleading in imbalanced datasets; a model predicting all negatives achieves 95% accuracy without learning anything about the positive class. Option D is wrong because AUC measures the model's ability to rank positive instances higher than negative ones, but it can still be high even when recall on the positive class is low, as it aggregates performance across all thresholds.

188
MCQeasy

A data scientist is training a neural network on a GPU instance in Amazon SageMaker. The training job fails with an 'OutOfMemoryError'. Which action should the data scientist take to resolve this issue?

A.Enable automatic hyperparameter tuning.
B.Switch to distributed training across multiple instances.
C.Use a smaller instance type with less GPU memory.
D.Reduce the batch size in the training script.
AnswerD

Smaller batch size reduces memory footprint.

Why this answer

An OutOfMemoryError during GPU training indicates that the GPU's memory is exhausted. Reducing the batch size directly decreases the memory footprint per training step, as fewer samples and their corresponding activations are stored simultaneously. This is the most immediate and effective fix without changing the instance type or training architecture.

Exam trap

The MLS-C01 exam often tests the misconception that scaling up hardware (distributed training) solves memory errors, but the correct approach is to reduce per-instance memory load, typically by lowering batch size.

How to eliminate wrong answers

Option A is wrong because hyperparameter tuning adjusts learning rates, optimizers, or network architecture, not the memory consumption per step; it does not resolve an out-of-memory error. Option B is wrong because switching to distributed training across multiple instances does not reduce per-GPU memory usage; it may even increase overhead from gradient synchronization and data parallelism. Option C is wrong because using a smaller instance type with less GPU memory would exacerbate the memory shortage, making the error more likely, not less.

189
MCQmedium

A machine learning team is building a real-time inference pipeline using Amazon SageMaker. The input data is located in an S3 bucket, and the team needs to transform the data before inference using a custom Python script. The transformation should run on a serverless infrastructure and must be triggered automatically when new data arrives in S3. Which combination of services should the team use?

A.Use AWS Lambda functions triggered by S3 events to run the transformation, then invoke a SageMaker endpoint.
B.Use AWS Glue jobs triggered by S3 events.
C.Use Amazon SageMaker Processing jobs triggered by S3 events.
D.Use Amazon Kinesis Data Firehose to transform data and deliver to SageMaker.
AnswerA

Lambda provides serverless compute triggered by S3 events, and can call SageMaker endpoints.

Why this answer

AWS Lambda functions can be triggered directly by S3 events (e.g., ObjectCreated) to run a custom Python transformation script on the incoming data, and then invoke a SageMaker endpoint for real-time inference. This combination meets the serverless infrastructure requirement and provides automatic, event-driven processing without managing any servers.

Exam trap

The trap here is that candidates often confuse batch-oriented services like Glue or SageMaker Processing with real-time event-driven needs, or assume Kinesis Firehose can directly invoke a SageMaker endpoint without an intermediate Lambda function.

How to eliminate wrong answers

Option B is wrong because AWS Glue jobs are designed for batch ETL workloads, not real-time inference pipelines; they incur startup latency and are not triggered by S3 events in a serverless, low-latency manner. Option C is wrong because Amazon SageMaker Processing jobs are intended for large-scale, offline data processing and model evaluation, not for real-time, event-driven transformations before inference. Option D is wrong because Amazon Kinesis Data Firehose is a streaming ingestion service that buffers and delivers data, but it cannot directly invoke a SageMaker endpoint for inference; it would require additional Lambda or custom logic to call the endpoint.

190
MCQhard

A healthcare company is building a model to predict patient readmission within 30 days. They have structured electronic health records (EHR) data with 200 features. The data includes missing values, categorical variables with high cardinality (e.g., diagnosis codes), and a severe class imbalance (5% readmission). They need to deploy a model on SageMaker that is interpretable and achieves high recall for the positive class. Which combination of techniques should they use?

A.Use XGBoost with SMOTE, feature selection via SHAP, and deploy as a SageMaker endpoint
B.Use logistic regression with one-hot encoding and random undersampling
C.Use PCA for dimensionality reduction, then train a linear SVM with class weights
D.Use a deep neural network with embeddings for categorical variables and oversample the minority class
AnswerA

XGBoost handles missing values, SMOTE addresses imbalance, SHAP provides interpretability.

Why this answer

XGBoost natively handles missing values, making it well-suited for EHR data with missing entries. SMOTE addresses the severe class imbalance by generating synthetic samples of the minority class, which improves recall. SHAP feature selection provides interpretability by identifying the most influential features, and deploying as a SageMaker endpoint enables real-time predictions.

This combination directly meets the requirements of high recall and interpretability.

Exam trap

The trap here is that candidates often choose logistic regression (Option B) for interpretability without considering the practical issues of high-cardinality categorical variables and class imbalance, or they select deep learning (Option D) for its flexibility but overlook the strict interpretability requirement in healthcare.

How to eliminate wrong answers

Option B is wrong because logistic regression with one-hot encoding on high-cardinality categorical variables (e.g., diagnosis codes) leads to a massive feature explosion, causing overfitting and poor generalization; random undersampling discards majority class data, which can reduce recall for the minority class. Option C is wrong because PCA reduces dimensionality by creating uninterpretable linear combinations of features, which contradicts the interpretability requirement, and linear SVM with class weights may not capture complex interactions in EHR data, often yielding lower recall than tree-based methods. Option D is wrong because deep neural networks with embeddings are inherently less interpretable than tree-based models, making it difficult to explain predictions in a healthcare setting, and oversampling the minority class without synthetic generation can lead to overfitting.

191
Multi-Selecthard

A machine learning engineer is analyzing a dataset with a large number of features (p >> n). The engineer suspects that many features are irrelevant. Which THREE methods are suitable for feature selection during exploratory data analysis? (Choose THREE.)

Select 3 answers
A.Fit a Lasso regression model and select features with non-zero coefficients
B.Remove features with variance below a threshold (e.g., <0.01)
C.Remove features with high pairwise correlation (e.g., >0.95)
D.Calculate mutual information between each feature and the target, and keep top k features
E.Apply Principal Component Analysis (PCA) and select top components
AnswersB, C, D

Low-variance features provide little information and can be removed.

Why this answer

In a high-dimensional dataset (p >> n), feature selection is crucial. Option B (Variance Threshold) is suitable because features with low variance (e.g., <0.01) are likely to be constant or near-constant and thus uninformative. Option C (removing features with high pairwise correlation >0.95) helps reduce redundancy and multicollinearity.

Option D (mutual information) is a filter method that measures dependency between each feature and the target, allowing selection of the most relevant features. Option A (Lasso regression) is a modeling method that can be used for feature selection but is not typically used during EDA; it is a supervised learning technique. Option E (PCA) is a dimensionality reduction technique that creates new components, not feature selection.

Therefore, the correct answers are B, C, D.

192
Multi-Selectmedium

A data scientist is using Amazon SageMaker to train a model. The training job uses a custom Docker image stored in Amazon ECR. The training job fails with an error 'CannotPullContainerError'. Which TWO actions should the data scientist take to resolve this issue? (Choose TWO.)

Select 2 answers
A.Use a public Docker image instead of a custom one
B.Confirm that the image tag exists in the ECR repository
C.Verify that the IAM role used for training has permissions to pull from ECR
D.Increase the training job timeout
E.Ensure the training instance has internet access
AnswersB, C

A missing tag causes CannotPullContainerError.

Why this answer

Options B and C are correct because the error 'CannotPullContainerError' typically indicates that the container image cannot be pulled from ECR. This can occur if the image tag does not exist in the repository (B) or if the IAM role used by the SageMaker training job does not have the necessary permissions (e.g., ecr:GetDownloadUrlForLayer, ecr:BatchGetImage) to pull the image (C). Option A is not required; custom images can be used.

Option D, increasing the timeout, would not resolve a pull issue. Option E, internet access, is not necessary because SageMaker can access ECR within the AWS network.

193
MCQeasy

A machine learning engineer needs to deploy a model that requires low latency (under 10 ms) for real-time inference. The model is a small ensemble of decision trees. Which Amazon SageMaker endpoint configuration is MOST appropriate?

A.Batch transform
B.Training job
C.Real-time endpoint
D.Multi-model endpoint
AnswerC

Real-time endpoints provide low latency.

Why this answer

Real-time endpoints in Amazon SageMaker are designed for low-latency inference (typically under 10 ms) and are the correct choice for deploying a small ensemble of decision trees that needs to respond to individual prediction requests in real time. They keep the model loaded and ready, providing a persistent HTTPS endpoint that can serve predictions with minimal overhead.

Exam trap

The trap here is that candidates often confuse Multi-model endpoints with real-time endpoints, assuming they offer the same low-latency guarantees, but Multi-model endpoints trade off latency for cost efficiency by loading models on demand, which can introduce delays that violate strict latency requirements.

How to eliminate wrong answers

Option A is wrong because Batch Transform is an asynchronous, offline inference service that processes large datasets in batches and does not provide a real-time endpoint; it can take minutes to hours to complete and is unsuitable for sub-10 ms latency. Option B is wrong because a Training job is used to train a model, not to host it for inference; it runs a training algorithm on input data and produces model artifacts, but does not expose an endpoint for serving predictions. Option D is wrong because a Multi-model endpoint is designed to host multiple models on a single endpoint to reduce costs, but it introduces additional latency due to model loading and unloading on demand, making it less suitable for the strict under-10 ms requirement compared to a dedicated real-time endpoint.

194
MCQhard

A data scientist is training a deep learning model on Amazon SageMaker using a custom TensorFlow container. The training job fails with an OutOfMemory error. The instance type is ml.p3.2xlarge with 16 GB GPU memory and 61 GB system memory. The model uses mixed precision training. Which step should the data scientist take to resolve the issue without changing the instance type?

A.Reduce the batch size
B.Use gradient accumulation to simulate a larger batch size
C.Use model parallelism across multiple GPUs
D.Enable automatic mixed precision (AMP)
E.Increase the instance type to ml.p3.8xlarge
AnswerA

Smaller batch size reduces memory usage.

Why this answer

Reducing the batch size directly decreases the memory footprint per training step, which is the most straightforward way to resolve an OutOfMemory error without changing the instance type. Since the model already uses mixed precision training (which reduces memory usage via FP16), the remaining memory pressure is likely from the batch size being too large for the 16 GB GPU memory on the ml.p3.2xlarge instance.

Exam trap

The trap here is that candidates often confuse gradient accumulation (Option B) as a memory-saving technique, but it actually increases memory usage per step because it stores gradients across multiple micro-batches, whereas reducing batch size directly lowers peak memory consumption.

How to eliminate wrong answers

Option B is wrong because gradient accumulation simulates a larger batch size by accumulating gradients over multiple forward/backward passes, which actually increases memory usage per step (storing gradients) and does not reduce peak memory; it is used to improve convergence, not to fix OOM. Option C is wrong because model parallelism across multiple GPUs requires a multi-GPU instance (e.g., ml.p3.16xlarge) or a distributed setup, and the current instance has only one GPU; this would require changing the instance type. Option D is wrong because automatic mixed precision (AMP) is already enabled per the question, so enabling it again does nothing to resolve the OOM.

Option E is wrong because increasing the instance type to ml.p3.8xlarge changes the instance type, which violates the constraint of not changing the instance type.

195
MCQeasy

A data scientist is using Amazon SageMaker to train a model, but the training job fails with an 'Out of memory' error. The instance type is ml.p3.2xlarge. Which action should the data scientist take to resolve the issue?

A.Use Pipe input mode.
B.Increase the number of instances.
C.Reduce the mini-batch size in the training script.
D.Use a Spot instance.
AnswerC

Reducing batch size reduces memory consumption.

Why this answer

The 'Out of memory' error on a single ml.p3.2xlarge instance indicates that the GPU memory is insufficient for the current workload. Reducing the mini-batch size directly decreases the memory footprint per training step, allowing the model to fit within the available GPU memory without changing the instance type or incurring additional costs.

Exam trap

The trap here is that candidates confuse storage-related issues (disk space, data loading) with compute memory (GPU RAM), leading them to select Pipe input mode or Spot instances, which do not address the fundamental memory constraint.

How to eliminate wrong answers

Option A is wrong because Pipe input mode streams data directly from Amazon S3 without downloading it to the local disk, which reduces disk storage requirements but does not affect GPU memory consumption during training. Option B is wrong because increasing the number of instances distributes the workload across multiple machines but does not reduce the per-instance memory usage; each instance still faces the same GPU memory constraint. Option D is wrong because using a Spot instance provides cost savings but does not change the hardware specifications or memory capacity of the ml.p3.2xlarge instance, so the out-of-memory error would persist.

196
MCQeasy

A company is using Amazon SageMaker to deploy a machine learning model that predicts equipment failure. The model is a binary classifier that outputs a probability. The company wants to set a threshold such that the model correctly identifies 95% of actual failures (recall >= 0.95). The model's precision at the current threshold of 0.5 is 0.7. The data scientist evaluates the model on a test set and obtains the following confusion matrix at threshold 0.5: TP=95, FN=5, FP=40, TN=860. The total actual positives are 100. Which threshold adjustment should the data scientist make to achieve the recall goal?

A.Decrease the threshold to 0.1
B.Increase the threshold to 0.7
C.Keep the threshold at 0.5
D.Decrease the threshold to 0.3
AnswerC

Recall is already 95%, meeting the requirement.

Why this answer

At a threshold of 0.5, recall is TP/(TP+FN) = 95/(95+5) = 0.95, which already meets the goal of recall ≥ 0.95. No adjustment to the threshold is necessary. Decreasing the threshold (e.g., to 0.3 or 0.1) would increase recall but also increase false positives, which is not required.

Increasing the threshold (e.g., to 0.7) would reduce recall, missing the goal. Therefore, the correct choice is to keep the threshold at 0.5 (Option C).

197
MCQhard

A company runs a real-time analytics platform that ingests IoT sensor data from millions of devices. The data is sent to Amazon Kinesis Data Streams with 16 shards. A custom Java application using the Kinesis Client Library (KCL) processes the data and writes aggregated results to Amazon DynamoDB. The application runs on a fleet of EC2 instances in an Auto Scaling group. Recently, the team noticed that some records are being processed multiple times, resulting in duplicate entries in DynamoDB. The application uses the DynamoDB PutItem API to write records. The team needs to eliminate duplicates without significantly increasing latency. Which solution should the team implement?

A.Enable DynamoDB auto scaling to increase write capacity and reduce throttling, which causes retries and duplicates.
B.Use DynamoDB TransactWriteItems with a condition check that the record's Kinesis sequence number does not already exist in the table.
C.Place an Amazon SQS FIFO queue between the KCL application and DynamoDB to deduplicate messages.
D.Modify the application to use DynamoDB BatchWriteItem instead of PutItem to reduce the number of write requests.
AnswerB

Using a DynamoDB transaction with a condition check on the Kinesis sequence number ensures that each record is written only once.

Why this answer

Using a DynamoDB transaction with a condition check on the Kinesis sequence number ensures that each record is written only once. Option A is wrong because increasing write capacity does not address duplicate processing; duplicates arise from the KCL consumer processing records multiple times, not from throttling. Option C is wrong because while SQS FIFO provides deduplication at the queue level, it does not guarantee exactly-once processing downstream in DynamoDB; the consumer could still write duplicates if it fails after writing but before deleting the message.

Additionally, adding an extra queue increases latency and complexity. Option D is wrong because BatchWriteItem does not decrease duplicates; it only batches multiple put requests into one API call and still requires idempotency measures.

198
MCQhard

A machine learning team is building a fraud detection model. The dataset is highly imbalanced (99.9% legitimate, 0.1% fraudulent). Which EDA technique is most important to apply before modeling?

A.Normalize all numerical features to have zero mean and unit variance.
B.Remove outliers from the dataset using the IQR method.
C.Create a stratified train-test split to preserve the class distribution.
D.Perform correlation analysis to remove highly correlated features.
AnswerC

Ensures the rare class appears in both training and test sets.

Why this answer

Stratified sampling is crucial for highly imbalanced datasets to ensure that the rare class is proportionally represented in both training and testing splits, allowing for proper evaluation. Normalization (A) is important but does not address imbalance. Removing outliers (B) could remove fraud cases.

Correlation analysis (D) is useful but not the most critical step for imbalance.

199
MCQeasy

A data scientist needs to analyze a dataset stored in Amazon S3 as CSV files. The dataset contains 100 columns, and the data scientist wants to quickly understand the distribution of each column, including missing values, data types, and basic statistics. Which AWS service is best suited for this task?

A.AWS Glue DataBrew
B.Amazon SageMaker Data Wrangler
C.Amazon QuickSight
D.Amazon Athena
AnswerA

AWS Glue DataBrew provides visual data profiling and preparation without coding, making it ideal for quickly understanding dataset characteristics.

Why this answer

AWS Glue DataBrew (Option A) is correct because it provides visual data profiling and preparation without writing code, allowing users to quickly understand distributions, missing values, data types, and basic statistics. Option B (Amazon SageMaker Data Wrangler) is designed for data preparation and feature engineering within the SageMaker ecosystem, but it is more focused on transforming data for machine learning rather than initial exploratory analysis. Option C (Amazon QuickSight) is a business intelligence tool for creating visualizations and dashboards, not for profiling raw datasets.

Option D (Amazon Athena) is an interactive query service that can analyze data in S3 using SQL, but it does not offer built-in data profiling capabilities for quick exploration.

200
Multi-Selectmedium

Which THREE of the following are valid ways to deploy a model using SageMaker? (Select THREE.)

Select 3 answers
A.Deploy to AWS Lambda
B.Deploy to a SageMaker batch transform job
C.Deploy to a SageMaker asynchronous endpoint
D.Deploy to a SageMaker real-time endpoint
E.Deploy to Amazon EC2 directly
AnswersB, C, D

Batch transform processes large batches of data asynchronously.

Why this answer

SageMaker batch transform jobs allow you to run inference on an entire dataset asynchronously, processing large batches of data without requiring a persistent endpoint. This is ideal for offline predictions where low latency is not needed, and the job automatically manages compute resources, scaling, and output storage.

Exam trap

AWS often tests the distinction between SageMaker's managed deployment options (real-time, asynchronous, batch) and external compute services like Lambda or EC2, expecting candidates to recognize that only SageMaker-native endpoints and jobs are considered valid deployment methods within the SageMaker ecosystem.

201
MCQmedium

A data scientist is using Amazon SageMaker to train an XGBoost model for a regression problem. The training data contains missing values in some features. Which approach should the data scientist use to handle missing values in XGBoost?

A.Use K-nearest neighbors imputation
B.Leave missing values as-is; XGBoost handles them natively
C.Remove all rows with missing values
D.Impute missing values with the mean of the column
AnswerB

XGBoost can handle missing values by learning the optimal direction to split.

Why this answer

XGBoost has a built-in mechanism to handle missing values natively by learning the best direction to split on missing values during training. For each split, XGBoost assigns missing values to the left or right child node based on which direction minimizes the loss function, making explicit imputation unnecessary for this algorithm.

Exam trap

The trap here is that candidates often default to common imputation techniques (like mean imputation or row removal) without recognizing that XGBoost has a built-in, algorithm-specific method for handling missing values, which is a key differentiator tested in the MLS-C01 exam.

How to eliminate wrong answers

Option A is wrong because K-nearest neighbors imputation is a data preprocessing technique that introduces computational overhead and potential bias, and it is not needed since XGBoost handles missing values internally. Option C is wrong because removing all rows with missing values can lead to significant data loss and reduced model performance, especially when missingness is not completely at random. Option D is wrong because imputing missing values with the mean of the column can distort the underlying distribution and reduce variance, which may degrade model accuracy, and it is unnecessary given XGBoost's native missing value handling.

202
MCQmedium

Refer to the exhibit. A developer has this IAM policy attached to an IAM role used by SageMaker. When attempting to create an endpoint, the operation fails with an access denied error. What is the MOST likely cause?

A.The policy is missing ecr:DescribeRepositories.
B.The policy is missing s3:ListBucket on the model bucket.
C.The policy is missing sagemaker:DescribeEndpoint.
D.The policy is missing sagemaker:InvokeEndpoint.
AnswerB

SageMaker needs to list the bucket to access model artifacts.

Why this answer

The error occurs because SageMaker needs to list objects in the S3 bucket where the model artifacts are stored before it can download them to create the endpoint. The attached policy grants s3:GetObject but not s3:ListBucket, which is required for the initial validation and listing of model artifacts in the bucket. Without s3:ListBucket, the CreateEndpoint API call fails with an access denied error.

Exam trap

The trap here is that candidates often assume only s3:GetObject is needed for reading model artifacts, overlooking that SageMaker's internal validation process also requires s3:ListBucket to verify the artifact's location and existence.

How to eliminate wrong answers

Option A is wrong because ecr:DescribeRepositories is not required for creating a SageMaker endpoint; it is used for interacting with Amazon ECR repositories, which are not directly involved in endpoint creation from an S3 model artifact. Option C is wrong because sagemaker:DescribeEndpoint is a read-only action used to retrieve endpoint metadata, not a prerequisite for creating an endpoint. Option D is wrong because sagemaker:InvokeEndpoint is used for invoking a deployed endpoint for inference, not for the creation of the endpoint itself.

203
Multi-Selecthard

Which TWO statements about handling categorical variables in exploratory data analysis are correct? (Select TWO.)

Select 2 answers
A.When a categorical feature has high cardinality, consider grouping rare categories.
B.Target encoding always avoids data leakage.
C.One-hot encoding creates binary columns for each category.
D.Label encoding is suitable for nominal categorical variables.
E.Categorical variables should always be dropped if they have many unique values.
AnswersA, C

Grouping reduces dimensionality and overfitting.

Why this answer

High-cardinality categorical features can lead to overfitting and sparse representations. Grouping rare categories into a single 'Other' bucket reduces dimensionality and noise, improving model generalization without losing significant predictive signal.

Exam trap

The MLS-C01 exam often tests the misconception that label encoding is safe for nominal data, when in fact it imposes an ordinal relationship that can distort model performance.

204
MCQmedium

A data engineer is building a data pipeline that aggregates customer transaction data. The engineer notices that some transactions have duplicate entries due to a system error. Which approach should the engineer use to identify and remove duplicates based on a unique transaction ID?

A.Sort the data by transaction ID and then check consecutive rows for equality
B.Use fuzzy matching to find similar transaction IDs
C.Group by all columns and aggregate with sum
D.Use the drop_duplicates method on the transaction ID column
AnswerD

drop_duplicates removes exact duplicate rows based on specified columns.

Why this answer

Using drop_duplicates on the transaction ID column is a straightforward and efficient method to remove duplicate rows based on the unique identifier. Option A is incorrect; sorting and checking consecutive rows is a valid but more complex approach, and not as direct as drop_duplicates. Option B is incorrect because fuzzy matching is designed for approximate matches, not exact duplicates.

Option C is incorrect because grouping by all columns and summing would aggregate data, potentially losing information, and does not specifically remove duplicate transaction IDs.

205
MCQhard

A data scientist is setting up an IAM role for an Amazon SageMaker training job. The policy shown is attached to the role. The training job fails with an access denied error when trying to read the training data from s3://my-bucket/training/data.csv. What is the most likely reason?

A.The bucket policy on my-bucket denies access to the IAM role
B.The training job is using a different IAM role
C.The IAM policy is missing the s3:ListBucket permission
D.The IAM role does not have permission to access the bucket location
AnswerA

The IAM policy allows GetObject, but the bucket policy may have a deny rule that overrides the allow.

Why this answer

The IAM policy shown grants s3:GetObject access to the bucket and object, but the training job still fails with an access denied error. The most likely cause is that the bucket policy on my-bucket explicitly denies access to the IAM role, overriding the IAM policy's allow. In AWS, an explicit deny in a resource-based policy (bucket policy) takes precedence over any allow in an identity-based policy (IAM role policy), causing the access denied error despite the IAM policy appearing sufficient.

Exam trap

The trap here is that candidates often assume the IAM policy alone determines access, overlooking that resource-based policies (like S3 bucket policies) can override IAM permissions with explicit denies, especially when the bucket policy is not shown in the question.

How to eliminate wrong answers

Option B is wrong because the question states the IAM role is set up for the training job, and the policy shown is attached to that role; if a different role were used, the error would likely be about role mismatch or missing permissions, not specifically about reading training data from the given S3 path. Option C is wrong because s3:ListBucket is not required to read a specific object if the full object ARN is known; the s3:GetObject permission on the object ARN is sufficient for reading the data.csv file, and the error is access denied, not a missing permission that would cause a different error like 403 Forbidden with a different message. Option D is wrong because the IAM policy explicitly grants s3:GetObject on the bucket and object ARN, so the role does have permission to access the bucket location; the failure is due to an external deny from the bucket policy, not a lack of permission in the IAM policy.

206
Multi-Selectmedium

A data scientist is performing exploratory data analysis on a dataset with 100 features. They want to identify which features are most correlated with the target variable. Which THREE methods are appropriate for this task?

Select 3 answers
A.Pearson correlation coefficient
B.Variance threshold
C.One-hot encoding
D.Feature importance from a random forest
E.Mutual information
AnswersA, D, E

Measures linear correlation between each feature and the target.

Why this answer

Pearson correlation coefficient measures linear relationship between features and target. Feature importance from a random forest provides a ranking of feature relevance. Mutual information captures both linear and non-linear dependencies.

Together, these three methods effectively identify correlated features. Variance threshold is used for removing low-variance features, not for correlation. One-hot encoding is a preprocessing technique for categorical variables, not a correlation method.

207
MCQmedium

A machine learning team is using SageMaker to train a model. The training data is stored in an S3 bucket encrypted with AWS KMS. The training job fails with an 'AccessDenied' error. Which IAM permission is MOST likely missing from the SageMaker execution role?

A.s3:GetObject
B.s3:ListBucket
C.kms:Decrypt
D.kms:GenerateDataKey
AnswerC

To read encrypted objects, SageMaker needs kms:Decrypt permission.

Why this answer

The training data is stored in an S3 bucket encrypted with AWS KMS. When SageMaker reads the encrypted data, the execution role must have permission to decrypt the KMS key. Without `kms:Decrypt`, the role cannot access the encrypted objects, resulting in an 'AccessDenied' error even if S3 read permissions are present.

Exam trap

The trap here is that candidates often assume S3 permissions alone are sufficient, overlooking that KMS-encrypted objects require explicit decryption permissions, and they may confuse `kms:Decrypt` with `kms:GenerateDataKey` which is used for encryption, not decryption.

How to eliminate wrong answers

Option A is wrong because `s3:GetObject` is necessary to read the objects from S3, but the error occurs specifically due to KMS encryption; without decryption permissions, GetObject alone will still fail with an AccessDenied error. Option B is wrong because `s3:ListBucket` is required to list objects in the bucket, but the training job typically accesses specific objects by key, and listing is not the cause of the decryption failure. Option D is wrong because `kms:GenerateDataKey` is used to create new data keys for encryption, not to decrypt existing encrypted data; the training job needs to decrypt, not generate new keys.

208
Multi-Selectmedium

Which TWO of the following are best practices for hyperparameter tuning using Amazon SageMaker? (Choose 2)

Select 2 answers
A.Use grid search to exhaustively explore all combinations.
B.Use early stopping to terminate poorly performing training jobs.
C.Include all algorithm hyperparameters in the tuning job.
D.Use a larger training dataset to improve tuning results.
E.Use automatic model tuning with Bayesian optimization.
AnswersB, E

Early stopping avoids wasted resources.

Why this answer

Early stopping terminates poorly performing training jobs, saving time and compute resources. Option E is correct because automatic model tuning with Bayesian optimization efficiently searches the hyperparameter space by focusing on promising regions. Option A is incorrect because grid search is exhaustive and computationally expensive, not a best practice.

Option C is incorrect because tuning all algorithm hyperparameters can be unnecessary and inefficient; only relevant hyperparameters should be tuned. Option D is incorrect because while a larger dataset may improve model accuracy, it does not directly improve tuning efficiency; hyperparameter tuning optimizes the learning process, not data size.

209
MCQhard

A data scientist is training a deep learning model for image classification using TensorFlow on Amazon SageMaker. The model trains slowly, and the GPU utilization is below 20%. Which action will MOST effectively increase GPU utilization and reduce training time?

A.Reduce the training dataset size.
B.Increase the batch size to better saturate the GPU.
C.Switch to a CPU-only instance.
D.Decrease the batch size to reduce memory pressure.
AnswerB

Increasing batch size provides more work per GPU step, improving utilization and reducing training time.

Why this answer

Increasing batch size provides more work per GPU step, improving utilization. Option A is wrong because reducing dataset size does not directly improve GPU utilization and may lead to underfitting. Option C is wrong because switching to CPU would be slower.

Option D is wrong because decreasing batch size reduces the work per step, lowering GPU utilization and increasing training time.

210
Multi-Selectmedium

A company is deploying a machine learning model using Amazon SageMaker. The model needs to be updated frequently with new data. Which TWO approaches can be used to update the model without downtime? (Choose TWO.)

Select 2 answers
A.Delete the existing endpoint and create a new one with the updated model.
B.Directly update the model artifact in the existing endpoint configuration.
C.Use SageMaker A/B testing to gradually shift traffic to the new model variant.
D.Stop the endpoint, update the model, and restart the endpoint.
E.Use a blue/green deployment by deploying the new model on a separate endpoint and then updating the DNS record.
AnswersC, E

A/B testing with production variants allows traffic shifting without downtime.

Why this answer

Amazon SageMaker supports deploying multiple model variants behind a single endpoint using production variants. By using A/B testing (traffic shifting), you can gradually route a percentage of inference requests to the new model variant while the old variant continues serving the majority of traffic, enabling updates with zero downtime.

Exam trap

The trap here is that candidates often think stopping or deleting the endpoint is acceptable for updates, but the exam emphasizes zero-downtime strategies like traffic shifting (A/B testing) and blue/green deployments, which avoid any service interruption.

211
MCQmedium

A data scientist needs to process a large dataset (100 TB) for training a machine learning model. The data is stored in Amazon S3. Which approach is most cost-effective and efficient for data processing?

A.Use AWS Glue ETL jobs.
B.Use Amazon EMR with Apache Spark.
C.Use Amazon Athena to run SQL queries.
D.Use Amazon SageMaker Processing with a single large instance.
AnswerB

Distributed processing is efficient for large data.

Why this answer

Amazon EMR with Apache Spark is the most cost-effective and efficient approach for processing 100 TB of data stored in S3 because it provides a managed, scalable cluster that can process large datasets in parallel using in-memory computation. EMR integrates natively with S3 via the EMRFS connector, allowing data to be read directly from S3 without the need for intermediate storage, and it supports auto-scaling and spot instances to reduce costs. For petabyte-scale data, Spark's distributed processing engine outperforms single-node solutions and is more flexible than SQL-only or ETL-only services.

Exam trap

The trap here is that candidates often choose AWS Glue (Option A) because it is marketed as a serverless ETL service, but they overlook that for 100 TB, Glue's per-DPU pricing and lack of distributed processing optimizations make it less cost-effective and slower than EMR with Spark, which is purpose-built for big data workloads.

How to eliminate wrong answers

Option A is wrong because AWS Glue ETL jobs are designed for smaller-scale, schema-on-read ETL tasks and may incur high costs and performance bottlenecks for 100 TB due to its serverless, per-DPU pricing model and lack of fine-grained control over cluster configuration. Option C is wrong because Amazon Athena is a serverless query engine that charges per TB of data scanned, and scanning 100 TB repeatedly for training data preparation would be prohibitively expensive and inefficient for iterative processing or complex transformations. Option D is wrong because Amazon SageMaker Processing with a single large instance cannot efficiently handle 100 TB due to vertical scaling limits (max instance storage and network throughput), leading to long processing times and higher costs compared to distributed processing with EMR.

212
MCQeasy

A data scientist is exploring a dataset with many features and wants to detect multicollinearity. Which technique should the scientist use?

A.Calculate the Variance Inflation Factor (VIF) for each feature.
B.Compute the Pearson correlation matrix between features.
C.Perform ANOVA on each feature against the target.
D.Create pairwise scatter plots of all features.
AnswerA

Variance Inflation Factor (VIF) measures how much the variance of a regression coefficient is inflated due to multicollinearity. A high VIF indicates strong multicollinearity, making it a quantitative method for detection.

Why this answer

Variance Inflation Factor (VIF) is a standard metric for detecting multicollinearity. Option D (pairwise scatter plots) can hint at relationships but does not quantify multicollinearity. Option B (Pearson correlation matrix) shows pairwise linear correlation but does not capture multicollinearity among multiple variables.

Option C (ANOVA) is used for comparing means, not for detecting multicollinearity.

213
MCQmedium

A company uses Amazon SageMaker to train a deep learning model on a GPU instance. The training job is taking too long. Which action would MOST likely reduce training time?

A.Reduce the mini-batch size
B.Use distributed data parallelism across multiple smaller instances
C.Use a larger GPU instance type, such as p3.16xlarge
D.Reduce the number of epochs
AnswerC

More powerful GPU accelerates training.

Why this answer

Using a larger GPU instance like p3.16xlarge provides significantly more GPU memory, CUDA cores, and memory bandwidth, which allows for larger batch sizes and more efficient parallel processing of matrix operations. This directly reduces training time for deep learning models by enabling faster forward and backward passes through the network, especially when the model is large enough to fully utilize the additional GPU resources.

Exam trap

The trap here is that candidates often confuse reducing mini-batch size (Option A) with improving training speed, but in GPU-accelerated deep learning, larger batch sizes better utilize GPU parallelism and reduce the number of iterations, making a larger instance the more effective solution.

How to eliminate wrong answers

Option A is wrong because reducing the mini-batch size typically increases the number of weight updates per epoch and can lead to noisier gradients, which often increases training time due to more frequent synchronization and less efficient GPU utilization. Option B is wrong because distributed data parallelism across multiple smaller instances introduces communication overhead (e.g., gradient synchronization via AllReduce) that can outweigh the benefits for a single GPU-bound training job, especially if the model does not fit in the smaller instances' memory. Option D is wrong because reducing the number of epochs directly reduces the amount of training performed, but it does not address the underlying performance bottleneck of the training process and may result in underfitting or incomplete convergence.

214
MCQeasy

A company wants to use Amazon SageMaker to host a model that was trained using a custom algorithm. The model artifact is stored in Amazon S3. The company wants to ensure that the endpoint can automatically scale based on the number of incoming requests. Which configuration should the company use?

A.Create a SageMaker multi-model endpoint with automatic scaling.
B.Create a SageMaker real-time endpoint and configure automatic scaling using a target tracking policy.
C.Use SageMaker Serverless Inference which scales automatically.
D.Use SageMaker Batch Transform with a scheduled job.
AnswerB

Real-time endpoints with auto-scaling adjust instance count based on load.

Why this answer

A SageMaker real-time endpoint with automatic scaling using a target tracking policy allows the endpoint to dynamically adjust the number of instances based on the incoming request load. This configuration is ideal for hosting a custom algorithm model artifact stored in S3, as it provides low-latency inference and can scale out or in based on a target metric like average CPU utilization or request count per instance.

Exam trap

The trap here is that candidates often confuse SageMaker Serverless Inference with real-time endpoints, assuming serverless automatically handles all scaling needs, but they overlook the limitations of serverless (e.g., model size limits, cold starts, and concurrency caps) that make it unsuitable for many custom algorithms, especially those requiring high throughput or large artifacts.

How to eliminate wrong answers

Option A is wrong because a multi-model endpoint is designed to host multiple models on a single endpoint to reduce costs, but it does not inherently provide automatic scaling based on request load; scaling must be configured separately, and the question specifically asks for automatic scaling based on incoming requests. Option C is wrong because SageMaker Serverless Inference automatically scales to zero and handles burst traffic, but it is not suitable for all custom algorithms, especially those with large model artifacts or high memory requirements, and it has a maximum concurrency limit that may not meet the company's scaling needs. Option D is wrong because SageMaker Batch Transform is for offline, asynchronous inference on batches of data, not for real-time request handling, and a scheduled job does not provide automatic scaling based on incoming request volume.

215
MCQeasy

A data scientist needs to perform hyperparameter optimization for a gradient boosting model. Which built-in Amazon SageMaker feature should they use?

A.Amazon SageMaker Automatic Model Tuning
B.Amazon SageMaker Clarify
C.Amazon SageMaker Debugger
D.Amazon SageMaker Neo
AnswerA

Performs hyperparameter optimization.

Why this answer

Amazon SageMaker Automatic Model Tuning (A) is the built-in feature specifically designed for hyperparameter optimization. It automates the search for the best combination of hyperparameters by launching multiple training jobs with different hyperparameter values, using strategies like Bayesian optimization, random search, or Hyperband. This directly addresses the data scientist's need to optimize a gradient boosting model's hyperparameters.

Exam trap

The trap here is that candidates may confuse SageMaker Debugger's monitoring capabilities (e.g., capturing loss curves) with the active optimization of hyperparameters, but Debugger only observes and reports, it does not suggest or iterate on hyperparameter values.

How to eliminate wrong answers

Option B is wrong because Amazon SageMaker Clarify is designed for bias detection and model explainability, not for hyperparameter optimization. Option C is wrong because Amazon SageMaker Debugger monitors training jobs in real-time, captures metrics, and detects anomalies like overfitting or vanishing gradients, but it does not perform hyperparameter tuning. Option D is wrong because Amazon SageMaker Neo optimizes trained models for deployment on specific hardware targets (e.g., ARM, Intel, NVIDIA) by compiling them, not for hyperparameter search.

216
Multi-Selectmedium

A data scientist is training a model using SageMaker and wants to automatically stop training when the model stops improving. Which TWO options can be used?

Select 2 answers
A.AWS Step Functions
B.Built-in early stopping in XGBoost
C.SageMaker Debugger
D.CloudWatch Alarms
E.SageMaker Model Monitor
AnswersB, C

Native early stopping support.

Why this answer

Built-in early stopping in XGBoost (Option B) is correct because XGBoost natively supports an `early_stopping_rounds` parameter that halts training when the validation metric stops improving for a specified number of rounds. SageMaker Debugger (Option C) is correct because it can monitor training metrics in real time and trigger a stop action via a built-in or custom rule (e.g., `VanishingGradient` or `LossNotDecreasing`) when the model stops improving, integrating with SageMaker's `StopTraining` API.

Exam trap

The trap here is that candidates may confuse SageMaker Model Monitor (post-deployment monitoring) with SageMaker Debugger (training-time monitoring), or assume CloudWatch Alarms can directly implement early stopping logic when they are only for threshold-based alerts on emitted metrics.

217
MCQmedium

A company is building a fraud detection model that must achieve low false positive rates. The dataset is highly imbalanced (0.1% positive class). Which metric is most appropriate for model evaluation?

A.RMSE
B.Accuracy
C.Area under the Precision-Recall curve
D.R-squared
AnswerC

Best for imbalanced datasets.

Why this answer

In highly imbalanced datasets (0.1% positive class), the Precision-Recall curve focuses on the performance of the positive class, which is the minority class of interest. Area under the Precision-Recall curve (AUPRC) is insensitive to the large number of true negatives, making it a robust metric for evaluating models where false positives must be minimized. Unlike ROC-AUC, which can be overly optimistic in severe imbalance, AUPRC directly reflects the trade-off between precision and recall for the rare positive class.

Exam trap

AWS often tests the misconception that ROC-AUC is always the best metric for imbalanced classification, but the trap here is that ROC-AUC can be overly optimistic because it considers true negatives, whereas Precision-Recall AUC focuses solely on the positive class and is the correct choice when false positives must be minimized.

How to eliminate wrong answers

Option A is wrong because RMSE (Root Mean Square Error) is a regression metric that measures the average magnitude of errors between continuous values, and is not suitable for binary classification or imbalanced fraud detection. Option B is wrong because Accuracy is misleading in highly imbalanced datasets; a model that predicts the majority class for all instances would achieve 99.9% accuracy but fail to detect any fraud. Option D is wrong because R-squared is a regression metric that measures the proportion of variance explained by the model, and has no relevance to binary classification or precision-recall evaluation.

218
Multi-Selectmedium

A data scientist is using SageMaker to build a model for fraud detection. The dataset is highly imbalanced. Which THREE techniques should be applied to address class imbalance?

Select 3 answers
A.Train the model only on the majority class.
B.Use accuracy as the evaluation metric.
C.Apply SMOTE to generate synthetic samples of the minority class.
D.Use class weights in the loss function.
E.Undersample the majority class.
AnswersC, D, E

SMOTE creates synthetic examples to balance classes.

Why this answer

SMOTE (Synthetic Minority Oversampling Technique) generates synthetic samples for the minority class by interpolating between existing minority instances, which helps balance the dataset without simply duplicating data. This is effective for fraud detection because it provides the model with more diverse examples of fraudulent transactions, reducing the bias toward the majority class.

Exam trap

AWS exams often test the misconception that accuracy is a valid metric for imbalanced data, when in fact precision, recall, F1-score, or AUC-ROC are more appropriate.

219
Multi-Selectmedium

A data scientist is performing EDA on a dataset with mixed data types (numerical, categorical, text). The dataset is stored in S3. Which TWO AWS services can be used to directly perform statistical summaries and visualizations without writing custom code?

Select 2 answers
A.Amazon SageMaker Studio
B.AWS Glue DataBrew
C.Amazon Athena
D.Amazon SageMaker Data Wrangler
E.Amazon QuickSight
AnswersD, E

Data Wrangler offers visual data analysis and built-in visualizations.

Why this answer

Options D and E are correct. Amazon SageMaker Data Wrangler provides a visual interface for data preparation and analysis with built-in transforms and visualizations directly on S3 data. Amazon QuickSight is a BI service that connects to S3 and creates dashboards with statistical summaries and visualizations.

Option A (SageMaker Studio) is an IDE for ML development, not a direct analysis service without custom code. Option B (AWS Glue DataBrew) is a data preparation tool but requires some configuration and is not primarily for statistical summaries and visualizations. Option C (Athena) is a SQL query engine for querying data, but does not provide built-in visualizations.

220
MCQmedium

A data scientist is training a deep learning model on Amazon SageMaker using the built-in Object Detection algorithm. The training job is failing with a 'ResourceLimitExceeded' error when trying to launch multiple GPU instances. Which of the following is the MOST likely cause?

A.The training script has a syntax error.
B.The dataset is too large for the selected instance type.
C.The account has reached the limit for the number of GPU instances in the current AWS Region.
D.The S3 bucket containing the training data has insufficient permissions.
AnswerC

ResourceLimitExceeded indicates service limit reached; contact AWS to increase limits.

Why this answer

The 'ResourceLimitExceeded' error indicates that the account has exceeded its service limit for the number of GPU instances (or any SageMaker training instances) in the current AWS Region. Option A is incorrect because a syntax error would result in a different error (e.g., 'ModuleNotFoundError' or 'SyntaxError'). Option B is incorrect because the dataset size does not directly cause a resource limit error; it might cause out-of-memory issues but not a resource limit exceeded.

Option D is incorrect because insufficient S3 bucket permissions would cause an 'AccessDenied' error, not 'ResourceLimitExceeded'.

221
MCQhard

A company is deploying a model for real-time inference with SageMaker. The endpoint receives spiky traffic, with occasional bursts of 10x normal load. Which scaling policy is MOST cost-effective while maintaining availability?

A.Provision a large instance type that can handle the peak load at all times.
B.Manually scale the endpoint based on historical traffic patterns.
C.Use a combination of scheduled scaling for predictable peaks and simple scaling for additional bursts.
D.Use a target tracking scaling policy based on average latency.
AnswerC

Scheduled scaling handles known patterns, while simple scaling provides reactive capacity for bursts.

Why this answer

It combines scheduled scaling for predictable traffic patterns (e.g., known peak hours) with simple scaling to handle unexpected bursts, ensuring availability during 10x load spikes without over-provisioning. This hybrid approach is more cost-effective than always-on large instances, as it dynamically adjusts capacity only when needed, aligning with SageMaker's automatic scaling capabilities.

Exam trap

The trap here is that candidates often assume target tracking (Option D) is always optimal for cost, but it fails for spiky traffic because it reacts to post-burst metrics like latency, not preemptively scaling for sudden load changes.

How to eliminate wrong answers

Option A is wrong because provisioning a large instance type to handle peak load at all times leads to significant cost waste during low-traffic periods, as you pay for unused capacity continuously. Option B is wrong because manual scaling based on historical patterns cannot react quickly enough to sudden 10x bursts, risking latency or downtime during unpredictable spikes. Option D is wrong because target tracking based on average latency is reactive and may cause slow scaling, as latency increases only after the burst has already impacted performance, potentially leading to dropped requests or throttling.

222
MCQhard

A data scientist is building a recommendation system using matrix factorization. The dataset has 1 million users and 100,000 items, with a sparse user-item interaction matrix. The scientist wants to minimize training time on Amazon SageMaker. Which algorithm would be most appropriate?

A.Linear Learner
B.Factorization Machines
C.K-Means
D.XGBoost
AnswerB

Built for recommendation systems with sparse data.

Why this answer

Factorization Machines (B) are specifically designed for sparse, high-dimensional datasets like the user-item interaction matrix in recommendation systems. They extend matrix factorization by modeling pairwise feature interactions, which is ideal for collaborative filtering tasks. On Amazon SageMaker, the built-in Factorization Machines algorithm is optimized for sparse data and can train efficiently on 1 million users and 100,000 items, minimizing training time compared to general-purpose algorithms.

Exam trap

The trap here is that candidates often choose XGBoost (D) because of its popularity and strong performance on tabular data, but they overlook that it requires dense feature engineering and is not optimized for the sparse, high-cardinality interaction matrices typical in recommendation systems.

How to eliminate wrong answers

Option A (Linear Learner) is wrong because it models only linear relationships and cannot capture the complex pairwise interactions between users and items that are essential for recommendation systems; it also does not handle sparse categorical features efficiently. Option C (K-Means) is wrong because it is an unsupervised clustering algorithm that groups similar data points, not a supervised or matrix factorization method for predicting user-item interactions; it cannot generate personalized recommendations from a sparse interaction matrix. Option D (XGBoost) is wrong because it is a tree-based ensemble method that requires dense feature engineering and is not designed for sparse matrix factorization; it would be computationally expensive and less effective on high-cardinality categorical features like user and item IDs.

223
Multi-Selecthard

A data engineer is analyzing a large dataset stored in Amazon S3 using AWS Glue and Amazon Athena. They notice that queries against a table with many small files are slow. Which TWO actions can improve query performance?

Select 2 answers
A.Use Athena's automatic compression
B.Increase the number of Glue DPUs
C.Convert files to Apache Parquet format
D.Decrease the number of partitions
E.Use a larger number of partitions
AnswersC, E

Parquet is a columnar format that reduces data scanned and improves compression, leading to faster queries.

Why this answer

Converting files to Apache Parquet format (C) improves query performance by leveraging columnar storage, which reduces the amount of data scanned and provides better compression. Using a larger number of partitions (E) allows Athena to perform partition pruning, limiting the data scanned per query. These two actions together reduce the volume of data processed and improve query speed, unlike increasing Glue DPUs (irrelevant for Athena), using automatic compression (not a distinct action), or decreasing partitions (increases scanned data).

224
MCQeasy

A data scientist is building a time series forecasting model for monthly sales data. The scientist has observed that the sales data shows a clear upward trend and a seasonal pattern that repeats every 12 months. Which algorithm would be most appropriate for this task?

A.ARIMA
B.Random Forest
C.k-means clustering
D.Linear regression with time-based features
AnswerA

ARIMA (or SARIMA) directly models trend and seasonality in time series data.

Why this answer

ARIMA (Autoregressive Integrated Moving Average) is specifically designed for time series forecasting and can handle both trend and seasonality through its parameters: the 'I' (differencing) removes trend, and seasonal ARIMA (SARIMA) extends it with seasonal differencing and seasonal AR/MA terms to capture the 12-month repeating pattern. This makes it the most appropriate choice for monthly sales data with a clear upward trend and annual seasonality.

Exam trap

The trap here is that candidates often choose Linear regression with time-based features (Option D) because they think adding a time index and month dummies is sufficient, but they overlook that ARIMA is purpose-built for time series with autocorrelation and seasonality, while linear regression violates the independence assumption and cannot model the stochastic seasonal patterns without extensive feature engineering.

How to eliminate wrong answers

Option B (Random Forest) is wrong because it is a tree-based ensemble method for regression or classification that does not inherently model temporal dependencies or seasonality; it treats each time point as an independent feature, ignoring the sequential nature and autocorrelation of time series data. Option C (k-means clustering) is wrong because it is an unsupervised clustering algorithm used to partition data into groups based on similarity, not for forecasting future values in a time series. Option D (Linear regression with time-based features) is wrong because while it can model a linear trend by including a time index feature, it cannot capture the complex autocorrelation structure and seasonal patterns without manually engineering lagged variables and seasonal dummies, and it assumes independent errors, which is violated in time series data.

225
MCQmedium

A company has a dataset with a timestamp column and multiple numerical metrics. They want to identify seasonality and trends. Which AWS service is best suited for this analysis?

A.Amazon SageMaker Canvas
B.Amazon CloudWatch
C.Amazon QuickSight
D.Amazon Athena
AnswerC

QuickSight offers time series analysis and forecasting capabilities.

Why this answer

Amazon QuickSight provides built-in time series visualization and forecasting. SageMaker Canvas is for ML models without code. Athena is for querying.

CloudWatch is for monitoring AWS resources. Kinesis Data Analytics is for real-time analytics.

Page 2

Page 3 of 23

Page 4