Courseiva

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

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

Page 11

Page 12 of 23

Page 13
826
MCQeasy

A data scientist is working with a dataset that contains text reviews and a numeric rating (1-5). The goal is to predict the rating from the review text. During EDA, the scientist wants to check if there are any spelling errors or unusual characters. Which tool is BEST suited for this task?

A.Amazon SageMaker Data Wrangler with a custom transform for text cleaning.
B.Amazon Athena with SQL queries to find anomalies.
C.Amazon Comprehend to detect syntax and entities.
D.Amazon QuickSight to create word clouds.
AnswerC

Correct. Amazon Comprehend provides syntax analysis and entity detection, which can help identify unusual text patterns (e.g., misspelled words or odd characters) without custom coding. It is the most appropriate AWS AI service among the options for initial text inspection.

Why this answer

Amazon Comprehend is the best choice among the options because it is an AWS AI service that can detect syntax, entities, and key phrases in text. While it does not directly find spelling errors, it can identify unusual patterns or anomalies in text that may indicate misspellings or odd characters. SageMaker Data Wrangler is for tabular data, Athena is for SQL queries, and QuickSight is for visualization, none of which are specialized for text analysis in this context.

Exam trap

Candidates might think Amazon Comprehend can detect spelling errors directly, but it does not. It analyzes syntax and entities, which can help identify unusual patterns, but a custom solution or spell-check library would be needed for exact spelling correction.

827
MCQmedium

A data scientist is analyzing a dataset with missing values in several columns. The dataset contains customer demographic information and purchase history. Which approach should the data scientist take to handle missing values without introducing bias into the dataset?

A.Drop all rows with any missing values.
B.Impute missing values with the mean of each column.
C.Replace missing values with a constant, such as 0.
D.Use multiple imputation to estimate missing values.
AnswerD

Multiple imputation accounts for uncertainty and reduces bias.

Why this answer

Multiple imputation produces multiple estimates of missing values, accounting for the uncertainty in the imputation and reducing bias compared to simpler methods. Option A is wrong because dropping all rows with missing values can lead to loss of data and potential bias if missingness is not completely random. Option B is wrong because mean imputation can underestimate variance and distort relationships between variables.

Option C is wrong because replacing missing values with a constant (e.g., 0) introduces arbitrary values that can skew the data distribution.

828
MCQhard

A team notices that a SageMaker training job using TensorFlow is running slower than expected. The training data is in S3 in TFRecord format. Which action is most likely to improve training throughput?

A.Use Pipe mode for data ingestion
B.Use distributed training with more instances
C.Increase the batch size in the training script
D.Switch from Pipe mode to File mode
AnswerA

Pipe mode streams data, reducing I/O wait time.

Why this answer

Pipe mode streams data directly from S3 into the training container without writing to disk, eliminating the I/O bottleneck of downloading TFRecord files first. Since TFRecords are already serialized for efficient reading, Pipe mode leverages this by feeding data sequentially, which reduces latency and improves throughput for TensorFlow jobs.

Exam trap

The trap here is that candidates often assume distributed training (Option B) always speeds up training, but the question specifically points to a data ingestion bottleneck, and Pipe mode directly addresses that by reducing I/O wait time.

How to eliminate wrong answers

Option B is wrong because adding more instances introduces network communication overhead (e.g., gradient synchronization) that can actually slow down training if the dataset is small or the model is not embarrassingly parallel; it does not address the data ingestion bottleneck. Option C is wrong because increasing batch size may improve GPU utilization but does not fix the underlying slow data loading from S3; it can even cause out-of-memory errors or require learning rate tuning. Option D is wrong because switching from Pipe mode to File mode would download the entire dataset to the local EBS volume before training, increasing startup time and disk I/O, which would worsen throughput.

829
MCQeasy

A data scientist is analyzing a dataset with many features and wants to identify which features are most correlated with the target variable. Which EDA technique should be used?

A.Box plots grouped by target
B.Scatter plot matrix
C.Histogram of each feature
D.Correlation matrix
AnswerD

Correlation matrix provides a compact view of pairwise correlations.

Why this answer

A correlation matrix displays pairwise Pearson correlation coefficients between all numeric features and the target variable, enabling quick identification of the most correlated features. Option A (box plots grouped by target) is useful for visualizing feature distributions across target categories but does not directly measure correlation strength. Option B (scatter plot matrix) can show pairwise relationships but becomes impractical with many features and lacks a single quantitative correlation measure.

Option C (histogram) only shows the distribution of a single feature, not its relationship with the target. Therefore, the correlation matrix is the appropriate EDA technique for identifying features most correlated with the target.

830
Matchingmedium

Match each SageMaker built-in metric to its meaning.

Drag a concept onto its matching description — or click a concept then click the description.

Concepts
Matches

Fraction of correct predictions on validation set

Root mean square error on validation set

Area under ROC curve on validation set

Logistic loss on validation set

Harmonic mean of precision and recall on validation set

Why these pairings

Accuracy measures overall correctness, precision measures positive predictive value, and recall measures sensitivity. Common confusions occur when precision and recall definitions are swapped.

831
MCQhard

A data engineer is using AWS Glue to catalog a dataset with 200 columns. During exploratory data analysis, they run a crawler and then view the table schema in the AWS Glue Data Catalog. They notice that many columns are inferred as 'string' even though they contain numeric values. What is the most likely cause?

A.The data is stored in JSON format, which only supports string types.
B.The crawler sample size is too small, and the sampled rows contain non-numeric values.
C.The data is stored in Parquet format, which does not support numeric types.
D.The column names contain special characters that prevent type inference.
AnswerB

The crawler samples a subset; if the sample includes non-numeric values, it infers string.

Why this answer

The AWS Glue crawler samples a subset of rows to infer schema. If the sample size is too small or the sampled rows contain non-numeric values (e.g., headers, missing data, or text entries), the crawler may default to 'string' type for columns that are actually numeric. Options A, C, and D are incorrect: JSON files can contain numeric types, Parquet files support numeric types, and special characters in column names do not affect type inference.

832
MCQhard

During EDA, a data scientist discovers that two numerical features have a Pearson correlation coefficient of 0.95. Which action should the scientist take to avoid multicollinearity in a linear regression model?

A.Remove one of the features
B.Apply PCA to the two features
C.Use Ridge regression to penalize coefficients
D.Create polynomial features from the correlated pair
E.Apply min-max scaling to both features
AnswerA

Removing one feature eliminates multicollinearity and retains interpretability.

Why this answer

Pearson correlation of 0.95 indicates high multicollinearity, which can adversely affect linear regression by inflating standard errors. Removing one of the correlated features (Option A) is a straightforward solution to eliminate multicollinearity. Option B (PCA) reduces dimensionality but creates principal components that are linear combinations, losing interpretability; it also does not directly remove the original features.

Option C (Ridge regression) applies L2 regularization to shrink coefficients, which can mitigate multicollinearity but does not remove it; simply removing one feature is simpler. Option D (polynomial features) would introduce more correlated terms, worsening multicollinearity. Option E (min-max scaling) does not affect correlation.

Therefore, removing one feature is the best action.

833
MCQmedium

Refer to the exhibit. A data scientist is unable to query a table in Amazon Athena that is located in the 'my-data-bucket' S3 bucket. The IAM policy shown is attached to the scientist's role. What is the most likely reason for the failure?

A.The policy does not allow decrypting data encrypted with AWS KMS.
B.The policy does not allow athena:StartQueryExecution.
C.The policy does not allow s3:GetObject on the bucket.
D.The policy does not allow s3:PutObject to write query results to an S3 bucket.
AnswerD

Athena writes results to S3, requiring s3:PutObject.

Why this answer

Athena queries require permissions to write query results to an S3 bucket, typically via 's3:PutObject' on an output location. The policy only allows 's3:GetObject' and 's3:ListBucket' on the data bucket, but lacks any 's3:PutObject' permission, causing the failure. Option A is incorrect because the policy does not reference any KMS actions.

Option B is incorrect because 'athena:StartQueryExecution' is implicitly allowed (not denied), though it doesn't appear in the policy; Athena actions are not shown but the failure is due to S3 write permissions. Option C is incorrect because 's3:GetObject' is explicitly allowed on the bucket.

834
Multi-Selectmedium

A data scientist is performing EDA on a dataset with 1,000 features and 10,000 rows. The target is binary. The scientist wants to reduce dimensionality while preserving information related to the target. Which TWO methods are appropriate?

Select 2 answers
A.Principal Component Analysis (PCA)
B.Autoencoders
C.L1-regularized logistic regression
D.Mutual information-based feature selection
E.t-Distributed Stochastic Neighbor Embedding (t-SNE)
AnswersC, D

Can perform feature selection by shrinking coefficients to zero.

Why this answer

Options C and D are correct. L1-regularized logistic regression (option C) drives coefficients to zero for irrelevant features, effectively performing feature selection. Mutual information-based feature selection (option D) measures dependency between each feature and the target, selecting features with highest mutual information.

Option A (PCA) is unsupervised and may discard target-related variance. Option B (Autoencoders) is unsupervised and not directly target-aware. Option E (t-SNE) is for visualization, not feature selection.

835
MCQhard

A data scientist is working with a dataset containing text reviews. The goal is to classify sentiment. During EDA, they compute the word frequency distribution. They notice that the most frequent words are common stop words like 'the', 'and', 'a'. Which action should they take to improve the feature representation for modeling?

A.Use n-grams instead of unigrams to capture phrase patterns.
B.Add more stop words to the default list to remove even more common words.
C.Remove the stop words from the text before creating the bag-of-words representation.
D.Apply stemming to reduce words to their root forms.
AnswerC

Stop words are usually not informative for sentiment; removing them reduces noise.

Why this answer

The correct action is to remove stop words (option C) because stop words like 'the', 'and', 'a' are common across all documents and do not carry sentiment information. Removing them allows the model to focus on content words that are more indicative of sentiment. Option A (n-grams) captures phrase patterns but still includes stop words, so it does not address the issue.

Option B (adding more stop words) would remove even more words, potentially including some useful for sentiment, making it less effective than using a standard stop word list. Option D (stemming) reduces words to root forms but does not remove stop words, so it does not solve the problem of high-frequency stop words dominating the feature space.

836
MCQeasy

A company is using AWS Glue to run ETL jobs that transform data from Amazon S3 to Amazon Redshift. The jobs are failing intermittently with timeouts. What is the most likely cause?

A.The S3 bucket policy is too restrictive.
B.The AWS Glue job does not have enough DPUs (Data Processing Units) allocated.
C.The Amazon Redshift cluster is in maintenance mode.
D.The source data is not compressed.
AnswerB

Insufficient resources can cause timeouts.

Why this answer

Intermittent timeouts in AWS Glue ETL jobs typically indicate insufficient resource allocation. DPUs (Data Processing Units) define the compute capacity for the job; if too few are allocated, the job may run slowly and exceed the default timeout (e.g., 2880 minutes) or internal service limits, especially when processing large datasets from S3 to Redshift. Increasing the DPU count or using the G.1X/G.2X worker types can resolve this.

Exam trap

The trap here is that candidates often confuse intermittent failures with configuration issues (like policies or maintenance) rather than recognizing that resource starvation (insufficient DPUs) is the classic cause of sporadic timeouts in distributed ETL jobs.

How to eliminate wrong answers

Option A is wrong because a restrictive S3 bucket policy would cause consistent access denied errors (HTTP 403), not intermittent timeouts. Option C is wrong because Redshift maintenance mode is a planned event that blocks all queries and connections, leading to immediate, persistent failures, not intermittent timeouts. Option D is wrong because uncompressed source data increases data volume and network transfer time, which can contribute to slower performance but does not directly cause intermittent timeouts; AWS Glue can handle uncompressed data, and compression is an optimization, not a requirement.

837
MCQeasy

A data engineer needs to schedule an AWS Glue ETL job to run every hour. The job reads from an Amazon DynamoDB table and writes to Amazon S3. Which AWS service should the engineer use to trigger the Glue job on schedule?

A.Amazon Kinesis Data Streams
B.AWS Step Functions
C.Amazon EventBridge (CloudWatch Events)
D.AWS Lambda
AnswerC

EventBridge can schedule events to trigger Glue jobs.

Why this answer

Amazon EventBridge (formerly CloudWatch Events) can trigger AWS Glue jobs on a schedule using cron or rate expressions. Option A is incorrect because Amazon Kinesis Data Streams is for real-time streaming data, not scheduling. Option B is incorrect because AWS Step Functions is for orchestrating workflows, but scheduling is typically done via EventBridge.

Option D is incorrect because AWS Lambda is a compute service, not a scheduler, though it can be used in conjunction with EventBridge to trigger Glue, but the direct scheduler is EventBridge.

838
Multi-Selectmedium

Which TWO approaches are valid for handling missing categorical values in a dataset before training a machine learning model?

Select 2 answers
A.Remove all rows with missing values
B.Impute missing values with the mode of the column
C.Impute missing values with the median of the column
D.Impute missing values with the mean of the column
E.Treat missing values as a separate category
AnswersB, E

Mode is appropriate for categorical data.

Why this answer

The mode (most frequent value) is the only valid measure of central tendency for categorical data, as it identifies the most common category. Imputing with the mode preserves the distribution of categories and is a standard technique for handling missing categorical values in preprocessing pipelines like scikit-learn's SimpleImputer with strategy='most_frequent'.

Exam trap

AWS often tests the distinction between numerical and categorical imputation methods, trapping candidates who apply mean or median imputation to categorical features without recognizing that these statistics are invalid for non-numeric data.

839
MCQmedium

A company uses Amazon SageMaker to train a model. The training job runs successfully but the model artifacts are not saved to the specified S3 output path. What is a likely cause?

A.The training script does not save the model to /opt/ml/model.
B.The model size exceeds the S3 bucket limit.
C.The training job used spot instances.
D.The S3 bucket is in a different AWS Region.
AnswerA

SageMaker uploads contents of /opt/ml/model to S3; saving elsewhere means artifacts are lost.

Why this answer

Amazon SageMaker expects the training script to save the model artifacts to the `/opt/ml/model` directory. After the training job completes, SageMaker automatically copies the contents of this directory to the specified S3 output path. If the script saves the model elsewhere (e.g., `/tmp` or a custom path), no artifacts will be uploaded, resulting in an empty or missing S3 output.

Exam trap

The trap here is that candidates assume any successful training job automatically saves artifacts, but SageMaker only uploads what is explicitly placed in `/opt/ml/model`, and the exam tests this specific SageMaker convention.

How to eliminate wrong answers

Option B is wrong because S3 bucket limits are based on total bucket size (unlimited) and object size (up to 5 TB per object), not model size; a model exceeding these limits would cause a different error (e.g., upload failure), not a silent missing artifact. Option C is wrong because using spot instances does not affect where the model is saved; spot instances can be preempted, but if the training completes successfully, artifacts are still saved to `/opt/ml/model` and uploaded. Option D is wrong because SageMaker can write to S3 buckets in any region as long as the bucket policy and IAM role grant cross-region access; a region mismatch would cause a permission or access error, not a silent failure to save artifacts.

840
MCQmedium

A company uses SageMaker to train a time-series forecasting model using Amazon Forecast. The dataset contains historical sales data for 10,000 products over 2 years. Which data format is required for the target time series?

A.A single JSON file with nested arrays
B.A CSV file with columns: timestamp, target_value, item_id
C.A text file with one value per line
D.A Parquet file partitioned by date
AnswerB

This is the required format for target time series in Forecast.

Why this answer

Amazon Forecast requires the target time series data to be in a CSV format with specific columns: timestamp, target_value, and item_id. This structured format allows the service to correctly identify the time series for each product and the target metric to forecast. The CSV format is the standard input for Forecast's built-in algorithms and ensures compatibility with the dataset import process.

Exam trap

The trap here is that candidates may assume Amazon Forecast supports flexible data formats like JSON or Parquet for all dataset types, but the target time series is strictly restricted to CSV to ensure consistent parsing and algorithm compatibility.

How to eliminate wrong answers

Option A is wrong because Amazon Forecast does not accept JSON files for target time series data; it requires CSV format for dataset import. Option C is wrong because a text file with one value per line lacks the necessary metadata (timestamp and item_id) to define multiple time series and their temporal alignment. Option D is wrong while Parquet is a supported format for related time series (RTS) or item metadata, the target time series dataset must be in CSV format as per Forecast's documentation.

841
Multi-Selecteasy

A data scientist is evaluating a binary classification model that predicts whether a customer will churn. The model achieves an AUC of 0.85 on the test set. Which TWO statements about AUC are correct? (Choose two.)

Select 2 answers
A.AUC represents the probability that a randomly chosen positive instance is ranked higher than a randomly chosen negative instance.
B.An AUC of 0.85 indicates the model is no better than random guessing.
C.AUC is the average precision across all thresholds.
D.AUC is equivalent to the accuracy of the model at the default threshold of 0.5.
E.AUC is threshold-independent, meaning it evaluates the model's ranking performance across all thresholds.
AnswersA, E

This is the statistical interpretation of AUC.

Why this answer

AUC measures the probability that a randomly chosen positive instance is ranked higher than a randomly chosen negative instance, which is correctly stated in option A. AUC is also threshold-independent, evaluating model ranking across all thresholds, as stated in option E. Option B is incorrect because an AUC of 0.85 is better than random (0.5).

Option C is incorrect because AUC is not average precision; average precision is a different metric. Option D is incorrect because AUC is not equivalent to accuracy at any specific threshold.

842
MCQeasy

A data scientist is training a linear regression model using Amazon SageMaker's built-in Linear Learner algorithm. The dataset has 500 features and 1 million rows. After training, the model's training RMSE is 2.5 and validation RMSE is 2.6, which is acceptable. However, the scientist notices that many feature coefficients are very small but non-zero, and the model takes a long time to train. The scientist wants to reduce training time while maintaining similar accuracy. Which action should the scientist take?

A.Increase the mini-batch size
B.Increase the L1 regularization strength
C.Switch to a neural network model
D.Increase the L2 regularization strength
AnswerB

Increasing L1 regularization drives many coefficients to zero, reducing the effective number of features and speeding up training, while maintaining similar accuracy.

Why this answer

(increase L1 regularization) will drive many coefficients to zero, reducing effective features and thus training time. Option A (increase mini-batch size) may speed training but could affect convergence. Option C (switch to a neural network model) is unnecessary for this task.

Option D (increase L2 regularization) shrinks coefficients but doesn't zero them out, so less impact on training speed.

843
MCQeasy

A machine learning engineer is deploying a model to an Amazon SageMaker endpoint. The model requires GPU for inference. Which instance type should be selected?

A.ml.p3.2xlarge
B.ml.m5.large
C.ml.c5.xlarge
D.ml.r5.large
AnswerA

GPU instance suitable for inference.

Why this answer

Ml.p3.2xlarge is a GPU-enabled instance (part of the P3 family) suitable for inference requiring GPU acceleration. Options B, C, and D (ml.m5.large, ml.c5.xlarge, ml.r5.large) are CPU-only instances and do not provide GPU capabilities.

844
MCQmedium

A company is using SageMaker to train a linear learner algorithm. The training log shows that the algorithm converges but the final loss is still high. Which change is most likely to improve the model?

A.Reduce the early stopping tolerance
B.Increase the maximum runtime
C.Add feature crosses or polynomial features
D.Increase the number of training instances
AnswerC

Linear models benefit from feature engineering to capture non-linear relationships.

Why this answer

A high final loss despite convergence indicates that the model is underfitting — the linear decision boundary is too simple to capture the underlying patterns in the data. Adding feature crosses or polynomial features increases the model's expressiveness by introducing non-linear interactions, allowing the linear learner to fit more complex relationships and reduce the loss.

Exam trap

The trap here is that candidates confuse convergence (the optimization stopping) with a good model, overlooking that a linear model can converge to a high-loss minimum if the data is non-linear — the fix is feature engineering, not hyperparameter tuning or more data.

How to eliminate wrong answers

Option A is wrong because reducing early stopping tolerance would cause training to stop even sooner, which does not address the fundamental issue of model capacity and would likely worsen the high loss. Option B is wrong because increasing maximum runtime does not help if the model has already converged; the algorithm has reached a plateau and more time will not reduce the loss further. Option D is wrong because increasing the number of training instances does not increase model complexity — it only provides more data for the same linear model, which may actually increase the irreducible error if the data is inherently non-linear.

845
MCQhard

A data scientist is using Amazon SageMaker to train a deep learning model for image classification. The training job is using a single GPU instance and is taking too long. The scientist wants to reduce training time without sacrificing model accuracy. The dataset contains 100,000 images of size 256x256. Which change would most effectively reduce training time?

A.Reduce the batch size
B.Use a smaller image size (e.g., 128x128)
C.Increase the learning rate
D.Switch to a distributed training setup with multiple GPUs
AnswerB

Fewer pixels mean faster forward/backward passes, significantly reducing training time.

Why this answer

Reducing image resolution (e.g., to 128x128) significantly reduces the number of pixels and thus the computational cost per epoch, often with minimal impact on accuracy for many tasks. Using a smaller batch size increases the number of iterations but can actually slow down training. Distributed training with multiple GPUs would reduce time but the question asks for a change that does not sacrifice accuracy; distributed training can sometimes affect convergence but is generally safe.

However, reducing resolution is a direct and effective method.

846
MCQmedium

A company is streaming e-commerce events to Amazon Kinesis Data Streams. The data science team needs to join events from multiple shards in near real-time and then store the joined results in Amazon S3. Which solution would meet these requirements with the LEAST operational overhead?

A.Use AWS Lambda functions with Kinesis triggers to process each record, join across shards using a DynamoDB table for state, and write to S3.
B.Use Amazon Kinesis Data Firehose to buffer the data and write to S3, then use Amazon Athena to join the data after it is stored.
C.Use AWS Glue ETL jobs that read from the Kinesis stream via the Kinesis connector and write the joined results to S3.
D.Use Amazon Kinesis Data Analytics for Apache Flink to read from the Kinesis stream, perform a join operation using Flink SQL, and write the results to S3 using a sink connector.
AnswerD

Kinesis Data Analytics for Apache Flink supports stateful stream processing and can join across shards natively.

Why this answer

Amazon Kinesis Data Analytics for Apache Flink can read from a Kinesis stream, perform stateful joins across shards using Flink SQL or the DataStream API, and write the results to Amazon S3 via a sink connector, all with minimal operational overhead. Option A is wrong because AWS Lambda functions process each shard independently; joining across shards would require managing external state (e.g., DynamoDB), increasing complexity and latency. Option B is wrong because Amazon Kinesis Data Firehose buffers data and writes to S3, but it cannot perform joins; using Athena to join after storage introduces batch-like delays.

Option C is wrong because AWS Glue ETL jobs are batch-oriented and not designed for near real-time streaming; Glue Streaming ETL would still require significant configuration and is less optimized for stateful joins across shards.

847
MCQmedium

A SageMaker training job fails with the failure reason shown in the exhibit. What is the most likely cause?

A.The training instance ran out of memory
B.The S3 bucket with training data is not accessible
C.The SageMaker service limit for the instance type has been exceeded
D.There is an error in the custom training script
AnswerD

ExecuteUserScriptError with ExitCode 1 indicates script error.

Why this answer

The failure reason in the exhibit (not shown here but implied by the question) typically indicates a runtime error such as a Python exception, missing module, or syntax error in the custom training script. SageMaker logs the exact error from the container, and when the script itself fails, the training job terminates with a 'ClientError' or 'AlgorithmError' referencing the script, not infrastructure issues.

Exam trap

The MLS-C01 exam often tests the distinction between infrastructure failures (S3 access, memory, limits) and application-level failures (script errors), and the trap here is that candidates assume any training failure is due to resource limits or data access, ignoring the explicit error message from the script.

How to eliminate wrong answers

Option A is wrong because out-of-memory errors usually manifest as 'ResourceExhaustedError' or container OOM kill signals, not a script-level failure reason. Option B is wrong because inaccessible S3 buckets cause a 'ClientError' with a specific 'AccessDenied' or 'NoSuchBucket' message, not a generic script failure. Option C is wrong because exceeding service limits results in a 'LimitExceededException' during job submission, not during training execution.

848
MCQeasy

A data scientist is training a binary classification model on a highly imbalanced dataset where the positive class represents only 1% of the data. The model achieves 99% accuracy but only identifies 5% of the actual positives. Which metric should the data scientist use to evaluate model performance?

A.Mean squared error
B.Accuracy
C.Recall
D.Precision
AnswerC

Recall measures the proportion of actual positives correctly identified.

Why this answer

Recall (sensitivity) measures the proportion of actual positives correctly identified by the model. With only 5% of positives detected, recall is 0.05, which directly reveals the model's failure to capture the minority class despite high accuracy. In imbalanced datasets, accuracy is misleading because the model can achieve 99% accuracy by simply predicting the majority class (negative) for all instances.

Exam trap

The MLS-C01 exam often tests the trap that high accuracy implies good performance on imbalanced datasets, leading candidates to choose accuracy without considering class distribution or the specific failure mode (low recall).

How to eliminate wrong answers

Option A is wrong because mean squared error (MSE) is a regression metric that measures average squared differences between predicted and actual values, not suitable for binary classification evaluation. Option B is wrong because accuracy is misleading in imbalanced datasets; a model predicting all negatives achieves 99% accuracy but fails to identify positives, as seen here. Option D is wrong because precision measures the proportion of positive predictions that are correct, which could be high if the model makes very few positive predictions, but it does not capture the low detection rate of actual positives (recall).

849
MCQhard

A data engineer is exploring a dataset with a timestamp column and wants to resample the data to a consistent 1-hour frequency. The data is irregularly spaced. Which approach is most efficient using AWS services?

A.Use Amazon EMR with Spark
B.Use AWS Glue with built-in transforms
C.Use Amazon Athena with SQL window functions
D.Use Amazon SageMaker Processing with a custom script
AnswerD

Amazon SageMaker Processing jobs allow custom scripts (e.g., using pandas resample) to handle irregular time series, and they are fully managed.

Why this answer

Amazon SageMaker Processing jobs allow custom scripts (e.g., using pandas resample) to handle irregular time series, and they are fully managed. Option A is wrong because Amazon EMR with Spark requires cluster management and is more complex for simple resampling. Option B is wrong because AWS Glue with built-in transforms is more suited for batch ETL but may be overkill for this task.

Option C is wrong because Amazon Athena with SQL window functions is a query engine and cannot resample easily.

850
MCQhard

A data scientist is analyzing a dataset with 100,000 observations and 50 features. The scientist uses a Jupyter notebook on Amazon SageMaker. During EDA, the scientist runs a command to check for missing values and notices that 20% of the data in one feature is missing. The missing values are not random; they are correlated with another feature. Which imputation method is MOST appropriate?

A.Median imputation
B.Listwise deletion (remove rows with missing values)
C.Mean imputation
D.Multiple imputation by chained equations (MICE)
AnswerD

Models missing values using other features.

Why this answer

MICE uses multiple imputation based on other features, accounting for the correlation between the missing feature and another feature. Option A is wrong because median imputation ignores the correlation and simply fills with the median, which does not leverage relationships between features. Option B is wrong because listwise deletion removes rows with missing data, which reduces sample size and can introduce bias if missingness is not completely random.

Option C is wrong because mean imputation, like median imputation, ignores correlations and can distort relationships.

851
MCQmedium

A data scientist is exploring a dataset of customer transactions. The dataset has 1 million rows and 50 columns. The target variable is a binary flag indicating whether a customer churned. The data scientist runs a correlation matrix on all numerical features and finds that two features have a correlation coefficient of 0.98. Which action should be taken to improve model performance?

A.Create an interaction term between the two features.
B.Remove one of the two highly correlated features from the dataset.
C.Increase the regularization parameter (e.g., lambda) in the model.
D.Apply mean-centering to both features to reduce correlation.
AnswerB

Removing one feature eliminates multicollinearity, simplifying the model and improving interpretability.

Why this answer

Two features with a correlation coefficient of 0.98 are nearly perfectly multicollinear. This inflates the variance of coefficient estimates in linear models, making them unstable and reducing interpretability. Removing one of the highly correlated features is a standard dimensionality reduction technique that mitigates multicollinearity without significant information loss, as the remaining feature captures almost the same variance.

Exam trap

AWS often tests the misconception that regularization alone fixes multicollinearity, but regularization only penalizes coefficient magnitude, not the linear dependency between features.

How to eliminate wrong answers

Option A is wrong because creating an interaction term between two nearly perfectly correlated features would introduce even more severe multicollinearity (the interaction term will be highly correlated with the original features), worsening model stability. Option C is wrong because increasing the regularization parameter (e.g., lambda in L2 regularization) can shrink coefficients but does not eliminate the underlying multicollinearity; the model remains sensitive to small data changes and coefficient interpretation is still problematic. Option D is wrong because mean-centering only shifts the features' means to zero and does not change the correlation coefficient between them; it has no effect on multicollinearity.

852
MCQeasy

A machine learning engineer needs to store and version datasets for reproducibility. Which AWS service is designed for this purpose?

A.AWS CodeCommit
B.Amazon S3
C.SageMaker Feature Store
D.Amazon Redshift
AnswerC

Feature Store is designed for feature storage, versioning, and retrieval.

Why this answer

SageMaker Feature Store is designed to store, manage, and version features for machine learning, ensuring reproducibility. Option A (CodeCommit) is for version control of code. Option B (S3) is an object store not specialized for ML features.

Option D (Redshift) is a data warehouse. Therefore, Option C is correct.

853
Multi-Selecthard

A company uses Amazon SageMaker to build a text classification model using a pre-trained BERT model. The dataset contains 10,000 labeled documents. The model is overfitting: training accuracy is 99%, validation accuracy is 85%. Which TWO of the following are most likely to help reduce overfitting? (Choose TWO.)

Select 2 answers
A.Add more transformer layers to the model
B.Increase the dropout rate during fine-tuning
C.Increase the batch size
D.Use a larger pre-trained BERT model
E.Decrease the learning rate
AnswersB, E

Dropout is a regularization technique that randomly drops units, reducing overfitting.

Why this answer

Increasing dropout during fine-tuning adds regularization. Decreasing the learning rate can help the model converge to a better solution and prevent overfitting to the training set. Increasing batch size can sometimes regularize but is not as effective as dropout.

Adding more layers increases model capacity and overfitting. Using a larger pre-trained model also increases capacity.

854
MCQmedium

An IAM policy attached to a SageMaker execution role is shown in the exhibit. When a data scientist tries to create a training job that writes logs to CloudWatch Logs, the job fails. What is the MOST likely reason?

A.The policy does not specify the SageMaker API version
B.The S3 bucket policy denies access to the training job
C.The policy lacks permissions for CloudWatch Logs actions
D.The policy has an implicit deny for SageMaker actions
AnswerC

Training jobs need logs:CreateLogGroup, logs:CreateLogStream, logs:PutLogEvents.

Why this answer

The IAM policy attached to the SageMaker execution role does not include permissions for CloudWatch Logs actions (e.g., CreateLogGroup, CreateLogStream, PutLogEvents), which are required to write logs during training job execution. Option A is incorrect because the API version is not relevant to permission issues. Option B is incorrect because the problem is not related to S3 bucket policy; the training job fails due to logging, not data access.

Option D is incorrect because the policy does not contain an explicit deny for SageMaker actions, but the lack of CloudWatch Logs permissions causes the failure.

855
MCQmedium

A company is using Amazon SageMaker to train a deep learning model. The training job is failing with an error 'CUDA out of memory'. The training instance is an ml.p3.2xlarge with 16 GB GPU memory. The model architecture and batch size are appropriate for this instance size. What is the most likely cause of this error?

A.Reduce the number of epochs.
B.Increase the number of GPUs by using a distributed training instance type.
C.Enable automatic mixed precision (AMP) training to reduce memory usage.
D.Use a smaller instance type to force lower memory usage.
AnswerC

AMP uses FP16 where possible, cutting memory usage roughly in half, which often resolves out-of-memory errors.

Why this answer

Enabling automatic mixed precision (AMP) training reduces GPU memory usage by storing tensors in half-precision (FP16) where possible, while keeping critical operations in full precision (FP32). This directly addresses the 'CUDA out of memory' error on an ml.p3.2xlarge instance (16 GB GPU memory) without changing the model architecture or batch size, which are already appropriate.

Exam trap

The trap here is that candidates may incorrectly assume the solution is to reduce epochs (Option A) or scale out to more GPUs (Option B), when the root cause is memory exhaustion per GPU, which is best addressed by mixed precision training to halve the memory footprint without altering the model or batch size.

How to eliminate wrong answers

Option A is wrong because reducing the number of epochs does not affect peak GPU memory usage during training; it only changes the total training time, not the memory footprint per batch. Option B is wrong because increasing the number of GPUs via distributed training (e.g., ml.p3.16xlarge) does not reduce per-GPU memory consumption; it distributes the model across GPUs but each GPU still needs to hold its portion of the data and gradients, and the error is on a single GPU instance. Option D is wrong because using a smaller instance type would reduce available GPU memory (e.g., ml.p3.xlarge has only 8 GB), making the out-of-memory error worse, not better.

856
MCQhard

A company uses AWS Glue to run ETL jobs that transform data from Amazon RDS for MySQL to Amazon S3. The current job runs daily and takes 3 hours to process 100 GB of data. The company expects data volume to grow 10x in the next year. They need to reduce job runtime and cost. Which approach should they take?

A.Use S3 Select with Glue to filter data before transformation.
B.Use parallel reads with pushdown predicates in the Glue job's source connection, and write the output in columnar format (Parquet) partitioned by date.
C.Increase the number of Glue DPUs to 100 and enable job bookmarking.
D.Use Amazon Redshift Spectrum to perform transformations in place on S3.
AnswerB

Parallel reads with partition pushdown reduce load on RDS and speed up extraction; Parquet with partitioning reduces storage and query costs.

Why this answer

Using parallel reads with pushdown predicates reduces the amount of data transferred from RDS to Glue by filtering at the database level, which lowers extraction time and load on the source. Writing output in columnar format (Parquet) reduces storage size and improves query performance for downstream analytics. Partitioning by date enables efficient pruning.

Option A is incorrect because S3 Select is used for server-side filtering of data already in S3, not for tuning extraction from RDS. Option C is incorrect because increasing DPUs alone does not solve the bottleneck from the source database; pushdown predicates are more effective. Option D is incorrect because Redshift Spectrum is used for querying data in S3, not for performing transformations in ETL jobs.

857
MCQeasy

A data scientist is training a binary classification model on imbalanced data (95% negative, 5% positive). Which metric is most appropriate for evaluating model performance?

A.R-squared
B.Mean Squared Error (MSE)
C.Area Under the ROC Curve (AUC-ROC)
D.Accuracy
AnswerC

AUC-ROC measures the model's ability to distinguish between classes regardless of threshold, suitable for imbalanced data.

Why this answer

AUC-ROC is the most appropriate metric for imbalanced binary classification because it evaluates the model's ability to distinguish between positive and negative classes across all classification thresholds, without being biased by the 95% negative majority. It measures the trade-off between true positive rate and false positive rate, making it robust to class imbalance.

Exam trap

The trap here is that candidates often default to accuracy as the primary metric, not realizing that with severe class imbalance, accuracy can be artificially high and completely mask poor performance on the minority class.

How to eliminate wrong answers

Option A is wrong because R-squared is a regression metric that measures the proportion of variance explained by the model, and it is not applicable to binary classification problems. Option B is wrong because Mean Squared Error (MSE) is a regression loss function that penalizes large errors quadratically and does not provide meaningful evaluation for classification tasks, especially with imbalanced data. Option D is wrong because accuracy would be misleadingly high (95%) by simply predicting the majority class for all instances, failing to capture the model's performance on the rare positive class.

858
MCQhard

A company uses Amazon SageMaker to train a text classification model. The training data is stored in S3 and contains sensitive personally identifiable information (PII). The company must ensure that the data is encrypted at rest in S3 and that the encryption key is managed by the company's own hardware security module (HSM). Which configuration should be used?

A.Use S3 server-side encryption with S3-managed keys (SSE-S3)
B.Use client-side encryption with the encryption key stored in the HSM
C.Use S3 server-side encryption with customer-provided keys (SSE-C) and store the keys in the HSM
D.Use S3 server-side encryption with AWS KMS managed keys (SSE-KMS) with a customer managed key
AnswerC

SSE-C allows customers to provide their own keys, which can be stored in an HSM.

Why this answer

SSE-C allows you to provide your own encryption key, which can be stored in your own HSM, and Amazon S3 manages the encryption/decryption process using that key. This satisfies the requirement for server-side encryption with a key managed by the company's HSM, ensuring data at rest is encrypted without exposing the key to AWS.

Exam trap

The trap here is that candidates confuse SSE-KMS with customer managed keys as meeting the 'customer-managed' requirement, but the question specifically requires the key to be managed by the company's own HSM, not by AWS KMS, which still stores the key in AWS's infrastructure.

How to eliminate wrong answers

Option A is wrong because SSE-S3 uses AWS-managed keys, not the company's own HSM-managed keys, violating the requirement for customer-controlled key management. Option B is wrong because client-side encryption encrypts data before it reaches S3, but the requirement specifies 'encrypted at rest in S3' and server-side encryption; client-side encryption also places the burden of key management on the client, but the key must be stored in the HSM, not used for client-side encryption. Option D is wrong because SSE-KMS with a customer managed key still relies on AWS KMS to manage the key, not the company's own HSM, and the key is not stored or managed directly in the company's HSM.

859
Multi-Selecthard

Which THREE of the following are valid approaches for deploying a machine learning model to an Amazon SageMaker endpoint for real-time inference?

Select 3 answers
A.Use a SageMaker Inference Pipeline with multiple containers
B.Use a pre-built SageMaker container with built-in algorithms
C.Use Amazon EMR to host the model
D.Deploy the model as an AWS Lambda function
E.Bring your own Docker container
AnswersA, B, E

Inference pipelines allow chaining of preprocessing and prediction containers.

Why this answer

SageMaker Inference Pipelines allow you to chain multiple containers (e.g., preprocessing, prediction, postprocessing) into a single endpoint, enabling complex workflows for real-time inference. This is achieved by defining a sequence of Docker containers in the model definition, where each container's output is passed as input to the next, all within the same SageMaker endpoint.

Exam trap

The trap here is that candidates might confuse Amazon EMR's model serving capabilities (e.g., using Spark MLlib) with SageMaker's managed inference, or assume Lambda can handle large model artifacts despite its payload and timeout constraints.

860
MCQhard

A data scientist is training a binary classifier to detect network intrusions. The dataset has 1,000 features and 10 million samples, but only 0.1% are positive (intrusions). The scientist uses XGBoost with scale_pos_weight set to 100. The model achieves a recall of 0.90 and precision of 0.05 on the test set. The business requires precision of at least 0.50 while maintaining recall above 0.80. Which technique should the scientist apply?

A.Switch to a random forest classifier with class weights
B.Randomly undersample the majority class to achieve 1:1 ratio
C.Tune the decision threshold on validation data to maximize F1 score
D.Increase scale_pos_weight to 500
AnswerC

Threshold tuning directly controls precision-recall trade-off.

Why this answer

Tuning the decision threshold on validation data adjusts the trade-off between precision and recall. The current model has high recall (0.90) but low precision (0.05). By raising the decision threshold, precision increases while recall decreases.

Tuning on validation data allows finding a threshold that meets the business requirements of precision ≥0.50 and recall ≥0.80. Option A (switching to random forest) may not achieve the required precision. Option B (undersampling majority class) may reduce recall.

Option D (increasing scale_pos_weight to 500) further increases recall and decreases precision.

861
MCQeasy

A data engineer needs to transform large CSV files stored in S3 into Parquet format and load them into a data warehouse for analysis. The transformation must be cost-effective and serverless. Which AWS service should be used?

A.Amazon Athena
B.Amazon EMR with Spark
C.AWS Glue
D.AWS Data Pipeline
AnswerC

AWS Glue is a serverless ETL service that can perform the transformation efficiently.

Why this answer

AWS Glue is the correct choice because it provides a fully managed, serverless ETL service that can automatically convert CSV files from S3 into Parquet format using its built-in Spark engine. It is cost-effective as you only pay for the resources consumed during the job execution, and it integrates directly with data warehouses like Amazon Redshift for loading transformed data.

Exam trap

The trap here is that candidates confuse Amazon Athena's ability to query Parquet files with the ability to transform CSV into Parquet, overlooking that Athena is a query engine, not an ETL service, while Glue is purpose-built for serverless data transformation.

How to eliminate wrong answers

Option A is wrong because Amazon Athena is an interactive query service that can query CSV and Parquet files directly in S3, but it does not perform ETL transformations or convert file formats; it is for ad-hoc analysis, not data transformation. Option B is wrong because Amazon EMR with Spark requires provisioning and managing clusters, which is not serverless; it incurs costs for running EC2 instances even when idle, making it less cost-effective for occasional transformations. Option D is wrong because AWS Data Pipeline is a workflow orchestration service that can move and transform data, but it is not serverless (it relies on EC2 instances for task runners) and is primarily designed for scheduled data movement, not optimized for converting CSV to Parquet with built-in Spark capabilities.

862
MCQmedium

A company uses Amazon Kinesis Data Firehose to ingest streaming data and deliver it to an S3 bucket. The data is in JSON format with a timestamp field. The data science team wants to query the data using Athena with partitioning by year/month/day. How should the S3 data be organized?

A.Configure Firehose to use dynamic partitioning with custom prefix
B.Store data in a single prefix and use Athena's 'partition projection' feature
C.Use AWS Glue crawler to partition the data after delivery
D.Use Amazon EMR to partition the data after delivery
AnswerA

Firehose dynamic partitioning creates directories based on record fields or timestamps.

Why this answer

Kinesis Firehose can partition data using custom prefixes like 'year=!{timestamp:yyyy}/month=!{timestamp:MM}/day=!{timestamp:dd}/'. This creates Hive-style partitions that Athena can automatically discover.

863
MCQeasy

A data scientist needs to understand the distribution of a numeric feature in a dataset stored in Amazon S3. Which AWS service can be used to run a quick exploratory query without setting up a server?

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

Amazon Athena is serverless and allows SQL queries directly on data in S3.

Why this answer

Amazon Athena allows serverless SQL queries on data in S3. Option A (Amazon Redshift) is a data warehouse; Option B (Amazon EMR) requires cluster setup; Option D (AWS Glue) is for ETL.

864
MCQhard

A company is deploying a real-time inference endpoint using SageMaker. The model is a large deep learning model (5 GB) with strict latency requirements (< 100 ms per request). The team expects bursty traffic with up to 1000 requests per second. Which configuration best meets the latency and throughput requirements?

A.Deploy an ml.p3.2xlarge instance with automatic scaling based on a custom metric like 'InvocationsPerInstance'
B.Use a multi-model endpoint with ml.c5.4xlarge instances
C.Use SageMaker Serverless Inference with a memory size of 6 GB
D.Deploy a single ml.p3.16xlarge instance with a production variant
AnswerA

GPU instances handle large models; automatic scaling with custom metrics provides elasticity.

Why this answer

Deploying on an ml.p3.2xlarge instance with automatic scaling based on 'InvocationsPerInstance' allows the endpoint to handle bursty traffic up to 1000 requests per second while maintaining sub-100 ms latency. The GPU-accelerated p3 instance provides the necessary compute for a 5 GB deep learning model, and custom scaling on invocations per instance ensures that additional instances are provisioned quickly during traffic spikes without over-provisioning.

Exam trap

The trap here is that candidates often assume a single large instance (like ml.p3.16xlarge) can handle high throughput, but they overlook the need for horizontal scaling to manage bursty traffic without latency degradation.

How to eliminate wrong answers

Option B is wrong because multi-model endpoints share a single instance across multiple models, which can lead to contention and increased latency for a large 5 GB model under bursty traffic, and the ml.c5.4xlarge instances lack GPU acceleration, making them unsuitable for deep learning inference at high throughput. Option C is wrong because SageMaker Serverless Inference has a cold start latency that can exceed 100 ms, especially for a 5 GB model, and its maximum concurrency is limited, making it unable to handle 1000 requests per second with strict latency requirements. Option D is wrong because a single ml.p3.16xlarge instance, while powerful, cannot handle bursty traffic of 1000 requests per second without scaling; a single instance will be overwhelmed, causing latency to spike above 100 ms, and it lacks the elasticity needed for bursty workloads.

865
MCQmedium

A machine learning team is deploying a model using Amazon SageMaker. The model inference code runs on GPUs and requires a custom container. The team wants to minimize cold start latency. Which SageMaker hosting option should they use?

A.Use a multi-model endpoint with GPU instances.
B.Use a serverless inference endpoint.
C.Use a real-time endpoint with multiple production variants for redundancy.
D.Use a real-time endpoint with a single production variant using a GPU instance.
AnswerD

Real-time endpoints with GPU instances minimize cold start latency for custom containers.

Why this answer

A real-time endpoint with a single production variant using a GPU instance provides a persistent, always-on inference environment. This eliminates cold start latency entirely, as the container and GPU resources are pre-warmed and ready to serve requests immediately, which is critical for minimizing latency in GPU-based custom containers.

Exam trap

The trap here is that candidates often confuse 'minimizing cold start latency' with 'scalability' or 'cost optimization,' leading them to choose serverless (Option B) or multi-model (Option A) options, which actually increase cold start latency due to their on-demand scaling behavior.

How to eliminate wrong answers

Option A is wrong because multi-model endpoints do not support GPU instances; they are designed for CPU-based hosting where multiple models share the same endpoint to reduce costs, not for minimizing cold start latency. Option B is wrong because serverless inference endpoints automatically scale to zero when idle, incurring cold start latency when a request arrives, which contradicts the goal of minimizing cold start latency. Option C is wrong because multiple production variants are used for A/B testing or gradual rollout, not for reducing cold start latency; they do not change the underlying cold start behavior of the endpoint.

866
MCQhard

A data scientist is training a model using SageMaker's built-in XGBoost algorithm. The dataset has 500 features and 1 million rows. The training job is taking too long. The scientist wants to reduce training time without sacrificing accuracy. Which action is LIKELY to be most effective?

A.Use a smaller instance type to reduce time
B.Reduce the number of trees in XGBoost
C.Use a larger instance type with more vCPUs
D.Apply Principal Component Analysis (PCA) to reduce the number of features
AnswerD

PCA reduces dimensionality, speeding up training while retaining most information.

Why this answer

PCA reduces the dimensionality of the dataset from 500 features to a smaller set of principal components, which directly decreases the computational complexity of training the XGBoost model. With fewer features, each tree split requires fewer operations, and the overall training time drops significantly. Since PCA retains the variance in the data, it can preserve model accuracy while speeding up training.

Exam trap

The trap here is that candidates often assume scaling up instance size (Option C) is the best way to reduce training time, but they overlook that feature reduction (Option D) addresses the fundamental computational bottleneck of high dimensionality, which is more effective and cost-efficient.

How to eliminate wrong answers

Option A is wrong because using a smaller instance type reduces CPU and memory resources, which would likely increase training time, not decrease it. Option B is wrong because reducing the number of trees in XGBoost directly lowers model capacity, which typically sacrifices accuracy (increases bias) and is not a recommended way to reduce time without impacting performance. Option C is wrong because while a larger instance type with more vCPUs can speed up training through parallelism, it does not address the root cause of high dimensionality (500 features), and the improvement may be marginal compared to feature reduction; it also increases cost without guaranteeing accuracy preservation.

867
MCQeasy

A company wants to use SageMaker to host multiple models behind a single endpoint to reduce costs. Which SageMaker feature should they use?

A.SageMaker Elastic Inference
B.SageMaker inference pipeline
C.SageMaker batch transform
D.SageMaker multi-container endpoints
E.SageMaker Multi-Model Endpoints
AnswerE

Multi-Model Endpoints host multiple models on the same endpoint.

Why this answer

SageMaker Multi-Model Endpoints allow you to deploy multiple models behind a single endpoint, each loaded dynamically from Amazon S3 based on the inference request. This reduces hosting costs by sharing a single instance across many models, as only the models that are actively invoked consume memory. The correct answer is E because this feature is specifically designed for cost-efficient multi-model hosting.

Exam trap

The trap here is confusing SageMaker Multi-Model Endpoints with multi-container endpoints, but multi-container endpoints run multiple containers per instance for a single pipeline, not independently serving different models on demand.

How to eliminate wrong answers

Option A is wrong because SageMaker Elastic Inference attaches a fixed acceleration resource to a single model endpoint, not enabling multiple models behind one endpoint. Option B is wrong because SageMaker inference pipeline chains multiple containers (e.g., pre-processing, prediction, post-processing) for a single model workflow, not for hosting multiple independent models. Option C is wrong because SageMaker batch transform processes entire datasets offline in batches, not real-time inference with multiple models behind a single endpoint.

Option D is wrong because SageMaker multi-container endpoints run multiple containers per instance but they are part of a single inference pipeline or ensemble, not independently serving different models on demand.

868
MCQhard

A data scientist is training a model using Amazon SageMaker. The training dataset is 500 GB and is stored in S3. The data scientist wants to use Pipe input mode to stream data directly from S3 to the training container. However, the training job fails with an error indicating that the container cannot read the data. What is the most likely cause?

A.The training instance does not have enough memory
B.The IAM role does not have s3:GetObject permission
C.The data is compressed and Pipe mode cannot handle compressed data
D.The S3 bucket is in a different Region
E.The training algorithm does not support Pipe mode
AnswerE

Not all algorithms support Pipe input; they need to read from a pipe.

Why this answer

Pipe mode in SageMaker streams data directly from S3 to the training container via a FIFO pipe, but the training algorithm must be specifically designed to read from a pipe (e.g., via stdin or a named pipe). If the algorithm expects random access to files or uses libraries that require seekable file handles (like many image-processing or custom Python scripts using `open()`), it will fail because a pipe is a sequential, non-seekable stream. SageMaker’s built-in algorithms like BlazingText and XGBoost support Pipe mode, but custom algorithms often do not unless explicitly coded for it.

Exam trap

The trap here is that candidates confuse Pipe mode with File mode and assume all algorithms can use Pipe mode, but SageMaker explicitly requires the algorithm to support streaming input, and many custom containers do not.

How to eliminate wrong answers

Option A is wrong because insufficient memory would cause an out-of-memory error, not a 'cannot read the data' error, and Pipe mode actually reduces memory usage by streaming data. Option B is wrong because missing s3:GetObject permission would cause an S3 access denied error, not a container read failure, and SageMaker would report a different error message. Option C is wrong because Pipe mode can handle compressed data (e.g., .gzip) as long as the algorithm supports decompression on the fly; SageMaker automatically decompresses for supported algorithms.

Option D is wrong because cross-Region S3 access is fully supported by SageMaker; the training job would still be able to read the data, though latency may increase.

869
MCQmedium

A data scientist is analyzing a time-series dataset and wants to check for stationarity. Which EDA technique is most appropriate?

A.Plot the autocorrelation function (ACF).
B.Use time-series cross-validation.
C.Perform the Augmented Dickey-Fuller (ADF) test.
D.Create a scatter plot of the series against its lag.
AnswerC

ADF test formally tests for unit root (non-stationarity).

Why this answer

The Augmented Dickey-Fuller (ADF) test is a formal statistical hypothesis test specifically designed to check for stationarity in a time series. It tests the null hypothesis that a unit root is present, indicating non-stationarity, against the alternative of stationarity. This makes it the most appropriate EDA technique for directly assessing stationarity.

Exam trap

AWS often tests the distinction between visual EDA techniques (like ACF plots) and formal statistical tests (like ADF), trapping candidates who confuse diagnostic plots with hypothesis testing for stationarity.

How to eliminate wrong answers

Option A is wrong because plotting the autocorrelation function (ACF) is a visual diagnostic for identifying autocorrelation patterns and model order (e.g., AR or MA terms), but it does not provide a formal statistical test for stationarity. Option B is wrong because time-series cross-validation is a model evaluation technique used to assess predictive performance, not a method for testing stationarity. Option D is wrong because a scatter plot of the series against its lag can reveal linear relationships and autocorrelation, but it lacks a formal hypothesis test and cannot definitively confirm or reject stationarity.

870
Multi-Selecthard

A company is training a deep learning model on SageMaker using multiple GPUs. The training is slow due to inefficient data loading. Which TWO actions can improve I/O performance?

Select 2 answers
A.Use instance store volumes for data.
B.Increase the instance count to a single large instance.
C.Use Pipe mode input for training data.
D.Use Amazon EBS volumes attached to training instances.
E.Use Amazon EFS as a shared file system.
AnswersC, E

Pipe mode streams data directly from Amazon S3 to the GPU instances without writing to disk, bypassing the filesystem bottleneck that slows I/O in multi-GPU training. This satisfies the constraint of inefficient data loading by eliminating disk-based staging, allowing GPUs to remain saturated with data during each epoch.

Why this answer

Pipe mode streams training data directly from Amazon S3 to the training algorithm, bypassing the need to download data to disk before training begins. This eliminates disk I/O bottlenecks and reduces data loading latency, which is critical for GPU-intensive training where GPUs may otherwise idle waiting for data.

Exam trap

The trap here is that candidates often confuse 'increasing instance size' with 'improving I/O performance,' but the real bottleneck is data loading latency, not compute capacity, and Pipe mode directly addresses this by streaming data without disk writes.

871
MCQeasy

A data scientist is training a decision tree classifier and notices that the model performs well on training data but poorly on test data. Which technique should the data scientist use to address this issue?

A.Use a different split criterion
B.Prune the tree
C.Apply L1 regularization
D.Increase tree depth
AnswerB

Pruning reduces overfitting.

Why this answer

Pruning the tree reduces overfitting by removing branches that have little statistical significance or that capture noise in the training data. This technique improves generalization to unseen test data, which directly addresses the symptom of high training accuracy and low test accuracy.

Exam trap

The MLS-C01 exam often tests the misconception that regularization techniques like L1/L2 apply universally, when in fact they are specific to models with learnable weights (e.g., linear regression, neural networks) and not to tree-based models.

How to eliminate wrong answers

Option A is wrong because using a different split criterion (e.g., Gini impurity vs. entropy) changes how splits are selected but does not inherently reduce model complexity or overfitting; it may still produce a deep, overfitted tree. Option C is wrong because L1 regularization is a technique for linear models (e.g., Lasso regression) and is not directly applicable to decision trees, which do not have coefficients to penalize. Option D is wrong because increasing tree depth makes the model more complex, exacerbating overfitting rather than fixing it.

872
MCQhard

An S3 event notification triggers an AWS Lambda function when a new object is created. The Lambda function parses the event and processes the object. The function is failing with a timeout error for large objects. Which approach should be used to handle large objects efficiently?

A.Increase the Lambda function timeout to 15 minutes
B.Use an SQS queue to buffer event notifications and configure Lambda with a batch window
C.Stream events to Amazon Kinesis Data Streams and process with Lambda
D.Use AWS Step Functions to orchestrate the processing
AnswerA

Increasing the Lambda timeout is the direct solution to timeout errors. Lambda allows a maximum timeout of 15 minutes, which can accommodate processing of larger objects.

Why this answer

Increasing the Lambda function timeout to the maximum of 15 minutes directly addresses the timeout error for large objects. This allows the function to complete processing within the allotted time. Option B (SQS queue) does not solve the timeout issue because the processing time itself is too long; buffering events does not reduce processing time.

Option C (Kinesis) adds unnecessary streaming complexity. Option D (Step Functions) adds orchestration overhead without addressing the timeout.

873
MCQeasy

A data scientist is analyzing a dataset with 500 features and 10,000 samples. After running a correlation matrix, they find that many feature pairs have correlation >0.95. What is the most appropriate next step to improve model performance?

A.Collect more training data to reduce the impact of correlated features.
B.Increase the regularization parameter in the model.
C.Apply principal component analysis (PCA) to reduce dimensionality.
D.Remove all features with correlation above 0.95.
AnswerC

PCA reduces multicollinearity by transforming correlated features into orthogonal components.

Why this answer

PCA reduces dimensionality by transforming correlated features into uncorrelated principal components, addressing multicollinearity while retaining most of the variance. Option A is wrong: collecting more data does not reduce correlation between features. Option B is wrong: increasing regularization (e.g., L2) can mitigate multicollinearity effects, but with 500 features and many highly correlated pairs, PCA is more effective as a dimensionality reduction technique.

Option D is wrong: removing all features with correlation >0.95 may discard useful information and is less systematic than PCA.

874
MCQhard

A team is performing exploratory data analysis on a dataset containing 10 million records stored in Amazon S3. They want to sample the data efficiently to build a representative subset for initial modeling. Which sampling method should they use to minimize bias and ensure the sample reflects the population distribution?

A.Stratified random sampling
B.Simple random sampling
C.Systematic sampling
D.Reservoir sampling
AnswerA

Stratified sampling ensures representation from all strata, reducing bias.

Why this answer

(Stratified random sampling) is correct because it divides the dataset into homogeneous subgroups (strata) and samples proportionally from each, ensuring all subgroups are represented and reducing bias. This is especially important when the data is imbalanced. Option B (Simple random sampling) is incorrect because it may underrepresent or miss rare subgroups, leading to biased samples.

Option C (Systematic sampling) is incorrect because it can introduce bias if the data has periodic patterns. Option D (Reservoir sampling) is incorrect because it is designed for streaming data where the total size is unknown, not for a static dataset of 10 million records in Amazon S3.

875
MCQhard

A data pipeline uses AWS Glue to transform data from Amazon RDS to Amazon S3. The team wants to ensure that only new or updated records are processed in each run, minimizing cost and time. Which AWS Glue feature should be used?

A.Use Glue triggers to run the job on a schedule.
B.Use Glue partition pruning to filter data.
C.Use Glue crawlers to detect new data.
D.Enable Glue Job Bookmarks.
AnswerD

Job Bookmarks maintain state and process only new or changed data.

Why this answer

Glue Job Bookmarks track processed data and persist state between job runs, enabling incremental processing of new or updated records from a source like Amazon RDS. This minimizes cost and time by avoiding full table scans and reprocessing unchanged data.

Exam trap

The trap here is confusing scheduling (triggers) or schema discovery (crawlers) with stateful incremental processing, leading candidates to overlook the bookmark mechanism that specifically tracks record-level changes.

How to eliminate wrong answers

Option A is wrong because Glue triggers schedule job execution but do not track which records have been processed, so they cannot ensure only new/updated records are handled. Option B is wrong because partition pruning filters data based on partition columns in S3, not on record-level changes from a relational database like RDS. Option C is wrong because Glue crawlers update the Data Catalog schema and detect new partitions, but they do not track incremental record changes or support stateful processing of updated rows.

876
MCQeasy

A machine learning engineer is performing exploratory data analysis on a dataset containing customer transaction records. The dataset has missing values in the 'age' column and outliers in the 'amount' column. Which combination of techniques should the engineer use to handle these issues during EDA?

A.Impute missing age values with the median and cap outliers in 'amount' using the interquartile range (IQR) method.
B.Remove rows with missing age and apply log transformation to 'amount'.
C.Impute missing age values with a constant (e.g., 0) and cap outliers using mean ± 3*std.
D.Impute missing age values with the mean and remove outliers in 'amount' using z-score.
AnswerA

Median is robust; IQR handles outliers.

Why this answer

Median imputation is robust to outliers, and IQR-based capping is a standard method for handling outliers. Option B is wrong because removing rows with missing age can lead to data loss, and log transformation reduces skewness but does not handle outliers by capping. Option C is wrong because imputing with a constant like 0 is arbitrary and can bias the data, and capping using mean ± 3*std is sensitive to outliers.

Option D is wrong because mean imputation is sensitive to outliers, and removing outliers via z-score can discard valid data points.

877
MCQmedium

Refer to the exhibit. An IAM policy is attached to an IAM role used by a SageMaker training job. The training job fails with an access denied error when trying to write model artifacts to an S3 bucket. What is the most likely cause?

A.The IAM role does not have permission to write to the S3 bucket
B.The training job is trying to write to a different S3 bucket
C.The IAM role does not have permission to read the training data
D.The IAM role does not have permission to create training jobs
AnswerA

The policy lacks s3:PutObject, so writing model artifacts is denied.

Why this answer

The IAM role attached to the SageMaker training job must have an IAM policy that grants s3:PutObject permission on the S3 bucket where model artifacts are written. The access denied error indicates that the role lacks the necessary write permissions for that specific bucket, causing the training job to fail when it attempts to upload the model output.

Exam trap

The trap in this question is that candidates may confuse a write failure with a read failure, or assume the role is missing a broader permission like creating training jobs, when the error is specifically about missing s3:PutObject permission for the model artifacts bucket.

How to eliminate wrong answers

Option B is wrong because if the training job were trying to write to a different S3 bucket, the error would still be an access denied error unless the role had permissions for that bucket, but the question states the job fails when trying to write to the specified bucket, not a different one. Option C is wrong because the error occurs during the write of model artifacts, not during reading training data; a read permission issue would cause a different error (e.g., during data loading). Option D is wrong because the training job is already running, meaning the role has permission to create training jobs; the error is specifically about writing to S3, not about job creation.

878
MCQhard

A data scientist is training a deep learning model for image segmentation using a U-Net architecture. The model overfits severely. The scientist tries L2 regularization, dropout, and data augmentation, but validation loss remains high while training loss approaches zero. Which additional strategy is most likely to reduce overfitting?

A.Implement early stopping based on validation loss
B.Increase the batch size
C.Use a larger learning rate
D.Add more convolutional layers to increase model capacity
AnswerA

Early stopping prevents overfitting by stopping training before the model starts to memorize the training data.

Why this answer

Early stopping monitors validation loss and halts training when it stops improving, directly addressing overfitting by preventing the model from memorizing noise after it has learned generalizable features. Since the training loss is near zero but validation loss remains high, the model has already started overfitting, and early stopping can cut training at the point just before overfitting worsens.

Exam trap

AWS often tests the misconception that increasing regularization (L2, dropout, augmentation) is always sufficient, but the trap here is that when those techniques fail, early stopping is the next logical step because it directly stops the overfitting process at the optimal point, whereas the other options either increase capacity or destabilize training.

How to eliminate wrong answers

Option B is wrong because increasing batch size typically reduces gradient noise and can lead to sharper minima, which often worsens generalization and overfitting, not reduces it. Option C is wrong because using a larger learning rate can cause the optimizer to overshoot minima, leading to unstable training and potentially higher validation loss, but it does not specifically target the overfitting problem when training loss is already near zero. Option D is wrong because adding more convolutional layers increases model capacity, which exacerbates overfitting when the model already has enough capacity to memorize the training data.

879
MCQmedium

Refer to the exhibit. A data scientist is trying to create a SageMaker training job but receives an access denied error. The IAM policy shown is attached to the user. What is the likely issue?

A.The policy does not allow sagemaker:CreateTrainingJob
B.The policy is missing s3:ListBucket permission
C.The policy does not allow sagemaker:CreateModel
D.The policy does not allow s3:PutObject
AnswerB

SageMaker needs to list objects in the bucket.

Why this answer

The policy allows s3:GetObject and s3:PutObject on the bucket, but SageMaker training jobs also require s3:ListBucket permission to read objects. Without it, access is denied. Option A is wrong because the policy includes sagemaker:CreateTrainingJob.

Option C is wrong because the error is about creating a training job, not a model. Option D is wrong because the policy does allow s3:PutObject.

880
MCQhard

A data scientist is training a binary classification model using SageMaker XGBoost and notices that training loss decreases but validation loss increases after a few epochs. Which action should the data scientist take to address this issue?

A.Increase the number of rounds
B.Set early stopping based on validation loss
C.Increase the learning rate
D.Increase the maximum tree depth
AnswerB

Stops training when validation loss stops improving.

Why this answer

The increasing validation loss while training loss decreases is a classic sign of overfitting. Setting early stopping based on validation loss halts training when the validation loss stops improving, preventing the model from memorizing noise in the training data. SageMaker XGBoost's `early_stopping_rounds` parameter monitors the evaluation metric on the validation set and stops training if no improvement is seen for a specified number of rounds.

Exam trap

AWS often tests the misconception that increasing model complexity (more rounds, deeper trees, higher learning rate) always improves performance, when in fact these actions worsen overfitting when validation loss diverges from training loss.

How to eliminate wrong answers

Option A is wrong because increasing the number of rounds would continue training further, exacerbating overfitting and making validation loss worse. Option C is wrong because increasing the learning rate makes the model converge faster but does not address overfitting; it can actually cause the model to overshoot optimal minima and worsen validation loss. Option D is wrong because increasing the maximum tree depth allows trees to grow deeper, capturing more complex patterns and increasing the risk of overfitting, which is the opposite of what is needed.

881
Multi-Selecthard

A data engineer is designing a data pipeline that ingests data from a relational database into a data lake on Amazon S3. The data must be incrementally loaded daily. Which TWO AWS services can be used together to achieve this?

Select 2 answers
A.AWS Glue
B.Amazon Kinesis Data Streams
C.Amazon Athena
D.Amazon Redshift
E.AWS Database Migration Service (DMS)
AnswersA, E

Glue can use job bookmarks for incremental loads.

Why this answer

AWS Glue is correct because it provides a managed ETL service that can extract data from a relational database using JDBC connections, transform it, and write it incrementally to Amazon S3. Glue's built-in job bookmarking feature tracks processed data, enabling incremental loads by automatically skipping already-processed records during subsequent runs.

Exam trap

The trap here is that candidates often confuse Amazon Kinesis Data Streams (real-time streaming) with batch ingestion, or assume Amazon Athena can perform data ingestion when it is only a query engine, leading them to overlook the correct combination of Glue and DMS for scheduled incremental loads.

882
MCQeasy

A machine learning engineer needs to deploy a TensorFlow model to a SageMaker endpoint. The model expects a specific input format. The engineer has the model artifacts stored in an S3 bucket. Which step is REQUIRED to deploy the model?

A.Register the model in SageMaker Model Registry.
B.Create a SageMaker training job to re-train the model.
C.Save the model as a SavedModel format.
D.Create a SageMaker Model object using the TensorFlow serving image.
AnswerD

A SageMaker Model object is required to specify the container and artifact location for deployment.

Why this answer

To deploy a TensorFlow model to a SageMaker endpoint, you must create a SageMaker Model object that references the model artifacts in S3 and specifies the appropriate TensorFlow Serving container image. This image handles loading the model and exposing a RESTful or gRPC inference endpoint. Without this step, SageMaker cannot associate the artifacts with a serving container to start the endpoint.

Exam trap

A common misconception is that model artifacts must be in a specific format (like SavedModel) before deployment, but the question explicitly states the artifacts are already stored, so the required step is the SageMaker Model object creation, not the format conversion.

How to eliminate wrong answers

Option A is wrong because registering the model in SageMaker Model Registry is optional for deployment; it is used for model versioning and governance, not a required step to deploy an endpoint. Option B is wrong because creating a training job to re-train the model is unnecessary if the model artifacts already exist; deployment only requires the artifacts and a serving container. Option C is wrong because while TensorFlow models are often saved as SavedModel format, the question states the artifacts are already stored in S3, and the required step is to create the Model object with the serving image, not to save the model again.

883
MCQeasy

A data scientist is building a regression model to predict house prices. The dataset contains many features, some of which are highly correlated. The model is overfitting. Which regularization technique should the scientist use to penalize large coefficients and perform feature selection?

A.L2 regularization (Ridge)
B.L1 regularization (Lasso)
C.Elastic Net regularization
D.Dropout
AnswerB

L1 regularization (Lasso) adds a penalty equal to the absolute value of the coefficients, which can shrink some coefficients to zero, performing feature selection.

Why this answer

L1 regularization (Lasso) adds a penalty equal to the absolute value of the coefficients, which can shrink some coefficients to zero, performing feature selection. L2 regularization (Ridge) penalizes squared coefficients but does not zero them out. Elastic Net combines both.

Dropout is for neural networks. Option A (L2 regularization) does not perform feature selection. Option B (L1 regularization) is correct for feature selection.

Option C (Elastic Net) combines both but L1 alone is simpler for feature selection. Option D (Dropout) is not applicable to linear regression.

884
Multi-Selecthard

A data scientist is analyzing a dataset and suspects the presence of outliers that could affect the mean and standard deviation. Which TWO methods are robust to outliers for measuring central tendency and dispersion?

Select 2 answers
A.Interquartile range (IQR)
B.Range
C.Standard deviation
D.Median
E.Mean
AnswersA, D

IQR is robust to outliers.

Why this answer

Median and interquartile range (IQR) are robust to outliers. Mean and standard deviation are sensitive to outliers. Range is also sensitive.

885
MCQhard

A SageMaker endpoint creation fails with the above CloudWatch Logs excerpt. What is the MOST likely cause?

A.The S3 bucket containing the model artifacts has incorrect permissions
B.The inference script has a syntax error
C.The instance type does not have enough memory to load the model
D.The model file is too large and takes longer than 300 seconds to load
AnswerD

The timeout indicates the model loading exceeds the default 300 seconds.

Why this answer

The CloudWatch Logs excerpt shows a timeout error during model loading. SageMaker has a default 300-second timeout for downloading and loading model artifacts from S3 into the inference container. If the model file is too large or the network is slow, the container fails to start within this window, causing the endpoint creation to fail with a timeout error.

Exam trap

The MLS-C01 exam often tests the distinction between timeout errors (which indicate slow download/extraction) and permission errors (which indicate access issues), leading candidates to incorrectly blame S3 permissions when the actual cause is a timeout.

How to eliminate wrong answers

Option A is wrong because incorrect S3 bucket permissions would result in an AccessDenied error, not a timeout. Option B is wrong because a syntax error in the inference script would cause a Python runtime error during invocation, not a timeout during model loading. Option C is wrong because insufficient memory would cause an OutOfMemory error or container crash, not a timeout; the instance type's memory is checked at container start, not via a timeout.

886
MCQhard

A data scientist is training a neural network on Amazon SageMaker. The network has many layers and the training is very slow. The scientist suspects that the gradients are vanishing. Which technique is most specifically designed to mitigate the vanishing gradient problem?

A.Use gradient clipping.
B.Use batch normalization.
C.Use data augmentation.
D.Use dropout layers.
AnswerB

Batch normalization reduces internal covariate shift and helps mitigate vanishing gradients.

Why this answer

Batch normalization helps by normalizing the activations, which reduces the problem of vanishing/exploding gradients. Dropout is for regularization. Data augmentation increases data.

Gradient clipping deals with exploding gradients, not vanishing.

887
MCQhard

A company is deploying a real-time inference endpoint using SageMaker. The model has a high memory footprint and requires GPU acceleration. Which instance type and configuration should be used to minimize cost while meeting latency requirements?

A.ml.p3.2xlarge with 1 GPU
B.ml.g4dn.xlarge with 1 GPU
C.ml.c5.xlarge with no GPU
D.ml.p3.16xlarge with 8 GPUs
AnswerA

Good balance of GPU and memory for high-memory models at reasonable cost.

Why this answer

(ml.p3.2xlarge with 1 GPU) is correct because it provides the required GPU acceleration for the high-memory-footprint model while using the smallest instance in the P3 family, which minimizes cost. The P3 instances use NVIDIA V100 GPUs with high memory bandwidth, suitable for real-time inference with low latency, and the 2xlarge size offers sufficient GPU memory without over-provisioning.

Exam trap

The trap here is that candidates often assume a larger instance with more GPUs (like ml.p3.16xlarge) is needed for high-memory models, but the question specifically asks to minimize cost while meeting latency, so the smallest GPU instance that fits the model is optimal.

How to eliminate wrong answers

Option B is wrong because the ml.g4dn.xlarge uses a T4 GPU with less memory and lower compute performance compared to the V100 in P3 instances, which may not meet the latency requirements for a high-memory-footprint model. Option C is wrong because ml.c5.xlarge has no GPU, making it incapable of GPU acceleration required by the model. Option D is wrong because ml.p3.16xlarge with 8 GPUs is over-provisioned for a single model endpoint, leading to unnecessary cost without latency benefit for a single inference request.

888
Multi-Selecteasy

Which TWO AWS services can be used to deploy a trained model for serverless inference? (Select TWO.)

Select 2 answers
A.AWS Lambda with a container image
B.Amazon SageMaker Serverless Inference
C.Amazon SageMaker batch transform
D.Amazon Elastic Container Service (ECS) with Fargate
E.Amazon EC2 instances
AnswersA, B

Serverless compute for small models.

Why this answer

AWS Lambda with a container image allows you to package a trained model and its dependencies into a Docker container and deploy it as a serverless function. Lambda automatically scales the inference endpoint in response to incoming requests, and you pay only for the compute time consumed during inference, with no idle infrastructure costs.

Exam trap

The trap here is that candidates often confuse serverless inference with batch processing or managed container services, mistakenly selecting SageMaker batch transform or ECS with Fargate because they think 'serverless' means any managed service, but the key requirement is automatic scaling to zero and pay-per-request billing.

889
Multi-Selectmedium

A data scientist is performing exploratory data analysis on a dataset with 10,000 rows and 20 features. The target variable is binary. The data scientist observes that one feature has 15% missing values. Which TWO actions are appropriate to handle this missing data? (Choose TWO.)

Select 2 answers
A.Replace missing values with the mode of the feature.
B.Identify and remove outliers from the feature.
C.Use multiple imputation to fill in the missing values.
D.Delete all rows that contain missing values for this feature.
E.Drop the entire feature from the dataset.
AnswersC, D

Multiple imputation creates several plausible imputed datasets and combines results.

Why this answer

Multiple imputation is a robust statistical technique that accounts for uncertainty in missing values by creating multiple complete datasets, analyzing each, and pooling results. This is particularly appropriate for a dataset with 10,000 rows and 20 features, as it preserves the sample size and avoids bias that simpler methods might introduce.

Exam trap

AWS often tests the misconception that mode imputation (Option A) is a safe default for missing data, but it ignores feature relationships and can distort distributions, whereas multiple imputation is preferred for non-trivial missingness.

890
MCQhard

A company is using SageMaker to train a model with a large dataset that is stored in S3. The training job is taking a long time due to high I/O latency. The team has already converted the data to RecordIO format. What should they do next to reduce I/O latency?

A.Use SageMaker fast file mode
B.Use multiple training instances
C.Use Amazon FSx for Lustre as the training data source
D.Shuffle the data before training
E.Use Pipe mode to stream the RecordIO data
AnswerE

Pipe mode avoids disk I/O by streaming data directly from S3.

Why this answer

Pipe mode streams data directly from S3 to the training algorithm in a sequential manner, eliminating the need to download files to the local disk. Since the data is already in RecordIO format, Pipe mode can efficiently read the serialized records, significantly reducing I/O latency compared to File mode.

Exam trap

The trap here is that candidates often confuse reducing I/O latency with improving data throughput or model performance, leading them to choose options like multiple instances or shuffling, which address different problems.

How to eliminate wrong answers

Option A is wrong because SageMaker fast file mode downloads files to the local disk, which still incurs I/O overhead and does not eliminate the latency from reading large datasets. Option B is wrong because using multiple training instances distributes the compute workload but does not reduce per-instance I/O latency; it may even increase overall data transfer time. Option C is wrong because Amazon FSx for Lustre is a high-performance file system that can reduce latency, but it requires additional setup and cost, and the question specifically asks for the next step after converting to RecordIO, where Pipe mode is the simplest and most direct solution.

Option D is wrong because shuffling data before training improves model convergence but does not address I/O latency during training.

891
MCQmedium

A company is using Amazon Athena to query a data lake in S3. Queries are slow and expensive. The data is stored as JSON. Which action will improve query performance and reduce cost?

A.Compress the JSON files using gzip
B.Partition the data by date
C.Convert the data to Parquet format
D.Increase the number of Athena workers
AnswerC

Parquet is columnar, reducing scanned data and improving performance.

Why this answer

Converting JSON data to Parquet format significantly improves Athena query performance and reduces cost. Parquet is a columnar storage format that allows Athena to scan only the columns needed for a query, drastically reducing the amount of data read from S3. This minimizes I/O and compute costs, as Athena charges based on the amount of data scanned.

In contrast, JSON is row-based and requires scanning entire files even for queries that only touch a few columns.

Exam trap

The trap here is that candidates often assume compression alone (gzip) is sufficient to improve performance, but they overlook that columnar formats like Parquet provide both compression and column pruning, which is the key to reducing scanned data and cost in Athena.

How to eliminate wrong answers

Option A is wrong because compressing JSON with gzip reduces storage size but does not change the row-based nature of JSON; Athena still must decompress and scan entire rows, limiting performance gains and cost reduction compared to columnar formats. Option B is wrong because partitioning by date improves query performance only if queries filter on that partition key, but it does not address the fundamental inefficiency of scanning entire JSON rows; partitioning alone is less effective than combining it with a columnar format. Option D is wrong because increasing the number of Athena workers (i.e., concurrency or DML query slots) does not reduce the amount of data scanned per query; it only allows more queries to run in parallel, which does not fix the root cause of slow and expensive queries.

892
MCQhard

Refer to the exhibit. A data scientist wants to use SageMaker to train a model using data stored in 'my-bucket'. The training job fails with an access denied error. What is the MOST likely cause?

A.The bucket uses AWS KMS key encryption instead of AES256
B.The bucket name in the policy does not match the actual bucket name
C.The training job is not requesting server-side encryption with AES256
D.The bucket is publicly accessible but the IAM role lacks permissions
AnswerC

The policy denies PutObject if encryption is not AES256, so the job must include the encryption header.

Why this answer

SageMaker training jobs require server-side encryption with AES256 when the S3 bucket uses default encryption with AES256. If the training job does not explicitly request SSE-S3 (AES256) in its S3 data source configuration, the S3 service denies access, resulting in an 'access denied' error even if the IAM role has full S3 permissions.

Exam trap

The trap here is that candidates often assume 'access denied' always means an IAM permissions issue, but AWS S3 can return 'Access Denied' for encryption policy violations when the request does not match the bucket's default encryption settings.

How to eliminate wrong answers

Option A is wrong because AWS KMS key encryption would cause a different error (e.g., KMS access denied) rather than a generic 'access denied' error, and the question does not mention KMS key permissions. Option B is wrong because a bucket name mismatch would produce a 'NoSuchBucket' error, not an 'access denied' error. Option D is wrong because if the bucket is publicly accessible, the training job would not need IAM role permissions for read access; the error would be a different type (e.g., 403 Forbidden) if the role lacked permissions, but the scenario points to an encryption mismatch.

893
MCQmedium

A company runs a machine learning pipeline on Amazon SageMaker. The pipeline consists of three steps: data preprocessing (using a custom container), training (using a built-in algorithm), and model evaluation (using a custom container). The pipeline is orchestrated using AWS Step Functions. Recently, the pipeline has been failing intermittently at the model evaluation step with a 'TimeoutError'. The evaluation step runs a Python script that loads the trained model and a test dataset from S3, computes metrics, and writes results back to S3. The step is configured with a timeout of 600 seconds. The test dataset size has grown over time. The data science team suspects that the timeout is due to the increased data size. They want a solution that minimizes changes to the existing infrastructure and avoids increasing the timeout arbitrarily. Which approach should the team take?

A.Increase the timeout to 1200 seconds and use a larger instance type for the evaluation step.
B.Increase the timeout to 1800 seconds to accommodate the larger dataset.
C.Modify the evaluation script to process the test dataset in parallel batches, and use multiprocessing to distribute the workload within the same container.
D.Switch the evaluation step to use the 'ml.m5.4xlarge' instance type for more memory and compute.
AnswerC

Reduces wall-clock time without increasing timeout or instance size.

Why this answer

It addresses the root cause—the evaluation script's inability to process the growing dataset within the 600-second timeout—by parallelizing the workload within the same container. This approach minimizes infrastructure changes (no instance type or timeout increase) and leverages Python's multiprocessing to reduce wall-clock time, directly tackling the 'TimeoutError' without arbitrary timeout extensions.

Exam trap

The trap here is that candidates often default to scaling up infrastructure (larger instances or higher timeouts) instead of optimizing the code, which is a classic 'throw hardware at the problem' misconception that the MLS-C01 exam tests by rewarding efficient, cost-conscious solutions.

How to eliminate wrong answers

Option A is wrong because increasing both timeout and instance type is an over-engineered solution that introduces unnecessary cost and complexity, and it does not address the underlying inefficiency in processing the dataset sequentially. Option B is wrong because simply increasing the timeout to 1800 seconds is a temporary band-aid that does not fix the performance bottleneck; as the dataset continues to grow, the timeout will need to be increased again, leading to an unsustainable pattern. Option D is wrong because switching to a larger instance type (ml.m5.4xlarge) only provides more memory and compute but does not change the sequential processing logic; the script will still take the same amount of time (or only marginally less) and may still hit the timeout if the dataset is large enough.

894
MCQeasy

A startup is using SageMaker to train a model using the built-in XGBoost algorithm. The training job runs successfully but the resulting model performs poorly on the test data. The data scientist suspects overfitting. The training data is relatively small (10,000 rows). Which action should be taken to reduce overfitting?

A.Decrease the number of trees (num_round) to 50
B.Increase the learning rate to 0.3
C.Increase the number of trees (num_round) to 500
D.Use a larger instance type
AnswerA

Fewer trees reduce overfitting.

Why this answer

Overfitting occurs when the model learns noise in the training data. Decreasing the number of trees (num_round) reduces model complexity, which helps prevent overfitting, especially with a small dataset (10,000 rows). Option B (increasing learning rate) can cause the model to converge too quickly to a suboptimal solution, potentially increasing overfitting.

Option C (increasing trees) increases complexity and overfitting. Option D (larger instance) does not affect overfitting as it only changes compute resources.

895
MCQmedium

A data scientist is using Amazon SageMaker to train a neural network. The training job fails with the error 'ResourceLimitExceeded: The account-level service limit for ml.p3.8xlarge for training job usage is 0.' What is the most likely cause and solution?

A.The training job is using spot instances; switch to on-demand instances.
B.The instance type is not available in the current region; switch to a different region.
C.The account has not requested a limit increase for ml.p3.8xlarge; submit a limit increase request via AWS Support.
D.The instance type is too large; use a smaller instance type like ml.m5.large.
AnswerC

ResourceLimitExceeded indicates the current limit is zero; a limit increase is needed.

Why this answer

The error message explicitly states that the account-level service limit for ml.p3.8xlarge for training job usage is 0, which means the account has not been granted any capacity for that instance type. AWS enforces service quotas (limits) per account per region, and for GPU-intensive instances like ml.p3.8xlarge, the default limit is often 0 unless a limit increase request has been submitted and approved. Therefore, the correct solution is to request a limit increase via AWS Support.

Exam trap

The trap here is that candidates may confuse a service limit error with instance availability or spot instance issues, but the specific phrase 'limit is 0' directly points to an unrequested quota increase, not a regional or pricing model problem.

How to eliminate wrong answers

Option A is wrong because the error is about a service limit of 0, not about spot instance availability; switching to on-demand instances would still fail because the limit applies to both spot and on-demand training jobs. Option B is wrong because the error message does not indicate regional unavailability; it specifically cites a limit of 0, meaning the instance type exists in the region but the account has no quota. Option D is wrong because the error is not about instance size or resource exhaustion; using a smaller instance type like ml.m5.large would avoid the GPU limit but does not address the root cause of the ml.p3.8xlarge limit being 0.

896
MCQhard

A company runs a real-time fraud detection pipeline using Amazon Kinesis Data Analytics. The pipeline reads from a Kinesis data stream, performs sliding window aggregations, and writes results to a DynamoDB table. The application is experiencing high latency during peak hours. Which action would MOST effectively reduce latency?

A.Enable DynamoDB auto scaling to handle write spikes.
B.Decrease the parallelism level in the Kinesis Data Analytics application.
C.Increase the number of shards in the Kinesis data stream.
D.Increase the sliding window size to reduce computational frequency.
AnswerC

More shards increase parallelism and reduce processing backlog.

Why this answer

Increasing the number of shards in the Kinesis data stream directly increases the ingestion capacity and parallelism of the stream, allowing the Kinesis Data Analytics application to consume and process records faster. This addresses the root cause of high latency during peak hours by scaling the data source throughput, which is the bottleneck in a streaming pipeline.

Exam trap

The trap here is that candidates confuse the symptom (high latency) with a downstream issue (DynamoDB write capacity) or computational efficiency (window size), rather than recognizing that the bottleneck is upstream at the data ingestion layer, which is the most common cause of latency in Kinesis-based streaming pipelines.

How to eliminate wrong answers

Option A is wrong because DynamoDB auto scaling adjusts write capacity based on load, but the latency issue originates upstream in the stream processing, not in the write destination; the pipeline is already writing to DynamoDB, and auto scaling would not reduce the time data spends waiting in the stream or being processed. Option B is wrong because decreasing parallelism in Kinesis Data Analytics reduces the number of concurrent processing tasks, which would increase latency by slowing down the sliding window aggregations, not reduce it. Option D is wrong because increasing the sliding window size reduces the frequency of computations but does not address the underlying throughput limitation; it may even increase latency by requiring more data to be buffered before results are emitted.

897
MCQmedium

During EDA, a data scientist finds that two features have a Pearson correlation coefficient of 0.95. What is the primary concern when using these features together in a linear regression model?

A.The model will underfit because of redundant information
B.Heteroscedasticity will be introduced
C.The model will overfit due to redundant features
D.Multicollinearity will make coefficient estimates unstable
AnswerD

High correlation between predictors leads to multicollinearity, increasing standard errors.

Why this answer

A Pearson correlation coefficient of 0.95 indicates strong multicollinearity between the two features. Multicollinearity inflates the variance of coefficient estimates, making them unstable and difficult to interpret. Option A is wrong because redundant information leads to multicollinearity, not underfitting; underfitting occurs when the model is too simple.

Option B is wrong because heteroscedasticity refers to non-constant variance of errors, not correlation between features. Option C is wrong because overfitting is more associated with model complexity and variance, not directly with redundant features; in fact, redundant features can cause numerical instability but not necessarily overfitting.

898
MCQmedium

A data scientist is tuning a neural network on a small dataset and observes that the training loss decreases but validation loss increases after a few epochs. Which technique should be applied to mitigate this issue?

A.Add dropout layers to the model.
B.Increase the learning rate.
C.Remove regularization terms from the loss function.
D.Increase the number of epochs.
AnswerA

Dropout randomly drops neurons, reducing overfitting.

Why this answer

The observed behavior—training loss decreasing while validation loss increasing—is a classic sign of overfitting. Adding dropout layers randomly drops a fraction of neurons during training, which forces the network to learn more robust features and reduces co-adaptation, thereby mitigating overfitting. This technique is specifically designed to improve generalization on small datasets.

Exam trap

The MLS-C01 exam often tests the misconception that increasing epochs always improves performance, but the trap here is that candidates may overlook overfitting and choose to increase epochs, not realizing that validation loss divergence signals the need for regularization instead.

How to eliminate wrong answers

Option B is wrong because increasing the learning rate can cause the optimizer to overshoot minima, leading to unstable training and potentially worse generalization, not reduced overfitting. Option C is wrong because removing regularization terms (e.g., L1/L2 penalties) would reduce the model's resistance to overfitting, exacerbating the validation loss increase. Option D is wrong because increasing the number of epochs would continue training on the same data, allowing the model to memorize noise further and worsen the overfitting, as validation loss would continue to rise.

899
MCQhard

A data scientist is analyzing a dataset with high cardinality categorical features (e.g., user IDs with millions of unique values). They want to visualize the relationship between these categorical features and a continuous target variable. Which approach is most effective for EDA?

A.Group rare categories into an 'Other' category and use box plots
B.Apply one-hot encoding and use scatter plots
C.Use a bar chart with all categories on x-axis
D.Remove the categorical features from analysis
E.Apply feature hashing and visualize the hashed values
AnswerA

Grouping reduces cardinality and box plots effectively show relationship with target.

Why this answer

For high cardinality categorical features like user IDs with millions of unique values, directly visualizing all categories is infeasible. Grouping rare categories into an 'Other' category reduces cardinality, enabling effective comparison of the continuous target distribution across categories using box plots. This approach preserves meaningful information while avoiding clutter.

Option B (one-hot encoding) creates an excessively wide feature set unsuitable for simple visualization. Option C (bar chart with all categories) would be overcrowded and unreadable. Option D (removing features) discards potentially valuable information.

Option E (feature hashing) is more appropriate for modeling pipelines, not for intuitive EDA visualization. Thus, Option A is the most effective approach.

900
MCQmedium

A data scientist is training a binary classification model on imbalanced data (95% negative, 5% positive). The model achieves 99% accuracy on the test set but fails to detect any positive cases. Which metric should the scientist focus on to evaluate model performance?

A.Accuracy
B.Recall
C.RMSE
D.Precision
AnswerB

Recall measures the proportion of actual positives correctly identified.

Why this answer

Recall (true positive rate) measures the ability to find all positive samples, which is critical for imbalanced datasets where accuracy can be misleading. Option A is wrong because accuracy is high but misleading in imbalanced data. Option C is wrong because RMSE is a regression metric, not suitable for classification.

Option D is wrong because precision focuses on the accuracy of positive predictions but does not capture missed positives; recall is more important for detecting all positive cases.

Page 11

Page 12 of 23

Page 13