Courseiva

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

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

Page 5

Page 6 of 23

Page 7
376
MCQeasy

A company wants to deploy a machine learning model that requires very low latency predictions (under 10ms). The model is a small ensemble of decision trees. Which SageMaker deployment option is most suitable?

A.SageMaker Notebook instance
B.AWS Lambda function with the model packaged
C.SageMaker endpoint with a single instance
D.SageMaker Batch Transform
AnswerC

Provides real-time low-latency inference.

Why this answer

C is correct because a SageMaker endpoint with a single instance provides a persistent, real-time inference API that can achieve sub-10ms latency for a small ensemble of decision trees. The endpoint keeps the model loaded in memory and uses synchronous HTTP requests, minimizing cold start and network overhead, which is essential for low-latency predictions.

Exam trap

The trap here is that candidates often confuse batch processing (Batch Transform) with real-time inference, or assume that serverless options like Lambda are always the fastest, ignoring cold start and timeout constraints.

How to eliminate wrong answers

Option A is wrong because a SageMaker Notebook instance is an interactive development environment, not a deployment target; it cannot serve real-time predictions with a stable endpoint. Option B is wrong because AWS Lambda has a maximum execution timeout of 15 minutes and a cold start latency that often exceeds 10ms, especially when loading a model package; it is designed for short, stateless functions, not persistent low-latency inference. Option D is wrong because SageMaker Batch Transform is an asynchronous, batch processing service that processes large datasets offline; it does not provide real-time endpoints and has no latency guarantee under 10ms.

377
MCQmedium

A data scientist needs to run complex ETL transformations on a large dataset stored in Amazon S3. The transformations are written in PySpark and require occasional access to Hive metastore. The solution should minimize operational overhead and allow the data scientist to focus on code development. Which AWS service should be used?

A.Amazon Redshift
B.Amazon EMR
C.AWS Glue
D.Amazon SageMaker
AnswerB

EMR provides a managed Spark environment with Hive support and allows custom PySpark code.

Why this answer

Amazon EMR is the correct choice because it natively supports PySpark and Hive metastore integration, allowing the data scientist to run complex ETL transformations on large datasets stored in S3 with minimal operational overhead. EMR provides managed clusters that automatically scale and handle infrastructure, enabling the data scientist to focus on code development rather than cluster management.

Exam trap

The trap here is that candidates often confuse AWS Glue's serverless Spark environment with the ability to run arbitrary PySpark code with Hive metastore access, but Glue abstracts away cluster management and does not provide the same level of control or direct Hive metastore integration as EMR.

How to eliminate wrong answers

Option A is wrong because Amazon Redshift is a data warehouse optimized for SQL-based analytics and does not natively run PySpark transformations; it would require additional services or workarounds to execute PySpark code. Option C is wrong because AWS Glue is a serverless ETL service that uses Apache Spark under the hood but abstracts away cluster management and does not provide direct access to Hive metastore for occasional use; it is designed for simpler, automated ETL jobs rather than complex, custom PySpark transformations requiring metastore access. Option D is wrong because Amazon SageMaker is a machine learning platform focused on building, training, and deploying models, not for running general-purpose ETL transformations or PySpark jobs with Hive metastore access.

378
MCQeasy

A data scientist is training a binary classifier on an imbalanced dataset (95% negative, 5% positive). The model achieves 99% accuracy but only correctly identifies 2% of the positive samples. Which metric should the data scientist focus on to improve the model's performance?

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

Recall measures the proportion of actual positives correctly identified.

Why this answer

(Recall). Recall measures the proportion of actual positive samples correctly identified, which is critical for an imbalanced dataset where the model fails to detect positives. Option A (Precision) is not the primary focus because it measures the accuracy of positive predictions, not the ability to find all positives.

Option B (RMSE) is a regression metric, not suitable for binary classification. Option D (Accuracy) is misleading because a model can achieve high accuracy by simply predicting the majority class, as seen here.

379
MCQmedium

A data scientist is training a binary classification model on a highly imbalanced dataset (0.1% positive class). To improve recall, the team decides to use SageMaker's built-in XGBoost algorithm. Which parameter adjustment is most likely to increase recall without significantly sacrificing precision?

A.Increase max_depth from 5 to 10
B.Reduce num_round from 100 to 50
C.Increase subsample from 0.8 to 1.0
D.Set scale_pos_weight to the ratio of negative to positive samples
AnswerD

scale_pos_weight adjusts class weights to focus on the minority class, improving recall.

Why this answer

Setting scale_pos_weight to the ratio of negative to positive samples (approximately 999:1) tells XGBoost to assign a higher penalty to misclassifications of the minority positive class. This directly increases the gradient contribution from positive samples during training, which shifts the decision boundary to improve recall while maintaining a balance that avoids excessive false positives, thus preserving precision.

Exam trap

The MLS-C01 exam often tests the misconception that simply increasing model complexity (max_depth) or data usage (subsample) will fix imbalance, when the correct approach is to use a class-weighting parameter like scale_pos_weight that directly addresses the skewed gradient contributions.

How to eliminate wrong answers

Option A is wrong because increasing max_depth from 5 to 10 makes the model more complex and prone to overfitting, which can actually hurt generalization and may not specifically target recall improvement for the minority class. Option B is wrong because reducing num_round from 100 to 50 decreases the number of boosting iterations, which typically reduces model capacity and can lower recall by underfitting the minority class patterns. Option C is wrong because increasing subsample from 0.8 to 1.0 uses all training data for each tree, which reduces randomness and can increase overfitting without addressing class imbalance; it does not directly influence recall for the positive class.

380
MCQeasy

A data scientist is building a model to predict customer churn. The dataset includes both numerical features (e.g., account age, usage minutes) and categorical features (e.g., region, plan type). The data scientist wants to use a linear classifier. Which feature engineering step is required before training?

A.Normalize numerical features
B.Impute missing values
C.Remove outliers
D.One-hot encode categorical features
AnswerD

Linear models require numerical input; one-hot encoding converts categories to binary vectors.

Why this answer

Linear classifiers (e.g., logistic regression, linear SVM) require numerical input and cannot directly process categorical text labels. One-hot encoding converts each categorical feature into binary indicator columns, allowing the linear model to learn separate weights for each category. Without this step, the model would either fail to train or treat categorical strings as ordinal values, which is mathematically invalid for linear decision boundaries.

Exam trap

The trap here is that candidates may assume normalization (A) is the most critical step for linear models, overlooking that categorical features must be converted to numerical form before any linear classifier can process them.

How to eliminate wrong answers

Option A is wrong because normalizing numerical features is beneficial for convergence speed and weight interpretation but is not strictly required before training a linear classifier; many implementations handle unscaled data. Option B is wrong because imputing missing values is a data cleaning step that may be necessary but is not specific to the requirement of using a linear classifier with categorical features. Option C is wrong because removing outliers is a data preprocessing technique that can improve model robustness but is not a mandatory step for linear classifiers to function with categorical data.

381
MCQhard

A bank is building a credit risk model using a large dataset with 500 features and 2 million samples. The dataset contains many categorical features with high cardinality (e.g., zip code, occupation). The model must be deployed on SageMaker and provide real-time predictions with low latency. They also need to explain individual predictions for regulatory compliance. Which approach is most appropriate?

A.Use a linear model with target encoding for categorical features and deploy with SageMaker's built-in linear learner algorithm
B.Use a deep neural network with embedding layers for categorical features and use SageMaker's built-in Debugger for explanations
C.Use XGBoost with one-hot encoding for categorical features and deploy with SageMaker's built-in SHAP explainer
D.Use a gradient boosting model with ordinal encoding for categorical features and use SageMaker's built-in XGBoost with SHAP
AnswerD

Ordinal encoding handles high cardinality without explosion; XGBoost captures interactions; SHAP provides explanations.

Why this answer

XGBoost with ordinal encoding and SHAP balances performance, latency, and explainability.

382
MCQhard

A machine learning engineer is deploying a model using SageMaker and wants to use automatic scaling for the endpoint based on the number of concurrent requests. The engineer has defined a scaling policy using the SageMakerVariantInvocationsPerInstance metric. However, the scaling is not triggering as expected. What could be the issue?

A.A scheduled scaling action must be created first.
B.The scaling policy does not have a cooldown period configured, or the cooldown period is too long.
C.The metric must be published to CloudWatch manually.
D.The metric is not available for automatic scaling.
AnswerB

Cooldown prevents scaling actions from triggering too frequently.

Why this answer

A missing or excessively long cooldown period can prevent the scaling policy from triggering. Cooldown periods (default 300 seconds) allow metrics to stabilize before initiating another scaling activity. Option A is incorrect because scheduled scaling actions are separate from dynamic scaling policies and are not required.

Option C is incorrect because the SageMakerVariantInvocationsPerInstance metric is automatically published to CloudWatch. Option D is incorrect because this metric is specifically designed for automatic scaling.

383
MCQeasy

A data scientist is using Amazon SageMaker to train a model. The training job is taking longer than expected. The scientist wants to reduce training time without changing the algorithm or the hardware. Which action is most likely to help?

A.Increase the batch size used during training.
B.Add regularization to the loss function.
C.Use data augmentation to increase the dataset size.
D.Reduce the number of training epochs.
AnswerA

Increasing the batch size allows the model to process more samples per gradient update, reducing the number of iterations per epoch and thus speeding up training. This is a common technique to reduce training time without changing the algorithm or hardware.

Why this answer

Increasing the batch size allows the model to process more samples per gradient update, reducing the number of iterations per epoch and thus speeding up training. This is a common technique to reduce training time without changing the algorithm or hardware. While it may affect convergence, it is the most direct way among the options to shorten training time.

Adding regularization (B) introduces extra computation and does not reduce time. Data augmentation (C) increases the dataset size, which increases training time. Reducing epochs (D) also reduces training time, but it decreases the number of times the model sees the data, which can significantly harm model performance, making it less desirable than increasing batch size.

384
MCQeasy

A data scientist is analyzing a dataset with 1,000 features. They suspect many features are redundant and want to reduce dimensionality before training a model. Which technique is most appropriate for identifying the most important features?

A.Apply principal component analysis (PCA) and select the top components
B.Use L1 regularization (Lasso) to shrink coefficients to zero
C.Train a random forest and remove features with low importance
D.Compute the correlation matrix and remove features with high correlation
AnswerB

L1 regularization (Lasso) is correct because it shrinks coefficients of less important features to zero, thereby selecting the most important original features.

Why this answer

L1 regularization (Lasso) is the most appropriate technique for identifying the most important features because it performs feature selection by shrinking the coefficients of less important features to zero, effectively selecting a subset of original features. This directly identifies which features are most relevant. PCA, while a dimensionality reduction technique, creates new components that are linear combinations of original features and does not identify the importance of original features.

Random forest feature importance and correlation matrix methods can identify redundant features but are less direct for selecting the most important subset.

Exam trap

Candidates often confuse dimensionality reduction with feature selection. PCA reduces dimensions by creating new features, whereas Lasso selects original features.

385
MCQhard

A company uses Amazon Kinesis Data Analytics for real-time anomaly detection on a stream of IoT sensor data. The application is experiencing high latency. The data volume has doubled. Which action would MOST effectively reduce latency?

A.Increase the Parallelism setting of the Kinesis Data Analytics application
B.Change the record format from JSON to Avro
C.Decrease the retention period of the source stream
D.Increase the number of shards in the source Kinesis stream
AnswerA

More KPUs allow parallel processing of records.

Why this answer

Increasing the Parallelism setting of the Kinesis Data Analytics application directly allocates more processing resources (e.g., more Kinesis Processing Units or KPUs) to handle the doubled data volume. This allows the application to process records concurrently, reducing the per-record processing time and overall latency. Parallelism is the primary scaling mechanism for Kinesis Data Analytics to match throughput increases.

Exam trap

The trap here is that candidates often confuse scaling the source stream (shards) with scaling the processing application (parallelism), mistakenly thinking that increasing shards will automatically reduce latency, when in fact the bottleneck is the application's compute capacity, not the stream's ingestion rate.

How to eliminate wrong answers

Option B is wrong because changing the record format from JSON to Avro reduces data size and may improve deserialization efficiency, but it does not address the root cause of high latency from doubled data volume—it only optimizes the existing processing path without adding capacity. Option C is wrong because decreasing the retention period of the source Kinesis stream only controls how long data is stored before automatic deletion; it does not affect the rate at which data is consumed or processed by the analytics application, so it cannot reduce current processing latency. Option D is wrong because increasing the number of shards in the source Kinesis stream increases the ingestion capacity and read throughput, but the bottleneck is in the Kinesis Data Analytics application's processing capacity, not in data ingestion; without increasing the application's parallelism, the additional shards will not reduce latency and may even cause backpressure.

386
MCQeasy

A data scientist is using Amazon SageMaker to train a model using a built-in algorithm. The training job uses a large dataset stored in Amazon S3, and the scientist wants to use pipe mode to stream the data directly from S3 to the training instance, reducing the time needed to download the data. The training job is configured with 'InputMode' set to 'Pipe'. However, the training job fails with an error indicating that the algorithm does not support pipe mode. What should the scientist do to resolve this issue?

A.Change the 'InputMode' to 'File'
B.Use a different instance type that supports pipe mode
C.Use AWS Glue to stream the data to the training instance
D.Switch to a different built-in algorithm that supports pipe mode
AnswerA

Changing InputMode to 'File' resolves the issue because the algorithm works with file mode, which downloads the data fully before training. This is the simplest fix.

Why this answer

When a built-in algorithm does not support pipe mode, the simplest solution is to change the InputMode to 'File', which downloads the entire dataset before training. Option B is incorrect because pipe mode support depends on the algorithm, not the instance type. Option C is incorrect because AWS Glue is used for ETL and cannot directly stream data to a SageMaker training job.

Option D is incorrect because while switching to an algorithm that supports pipe mode is possible, it may be unnecessary if the current algorithm works well with file mode, and changing the input mode is a simpler fix without altering the algorithm.

387
MCQeasy

A team uses AWS Glue ETL jobs to preprocess data for SageMaker training. The job runs successfully but the output data is empty. What is the most likely cause?

A.There is a data type mismatch between source and target
B.The source data is partitioned and only a subset of partitions is read
C.The filter transformation condition is too restrictive, removing all rows
D.The Glue job runs out of memory and fails silently
AnswerC

Filtering all rows results in empty output.

Why this answer

A filter transformation in AWS Glue ETL jobs can remove all rows if the condition is too restrictive, resulting in an empty output dataset. This is a common logic error where the filter predicate (e.g., `df.filter("value > 100")`) matches no records, causing the DynamicFrame to be empty after transformation. The job succeeds because no runtime error occurs, but the output is empty.

Exam trap

The trap here is that candidates assume empty output must be caused by a failure or resource issue (like memory or partitioning), rather than a logical error in the transformation logic that silently removes all data.

How to eliminate wrong answers

Option A is wrong because a data type mismatch between source and target typically causes a job failure or data truncation, not a successful job with empty output; Glue would raise a schema mismatch error or convert types implicitly. Option B is wrong because reading only a subset of partitions would produce a non-empty output (the subset data), not an empty output, unless the subset itself has no data, which is a different scenario. Option D is wrong because if the Glue job runs out of memory, it would fail with an out-of-memory error (e.g., Java heap space or container killed), not succeed silently with empty output.

388
MCQhard

A machine learning engineer is using Amazon SageMaker to train a deep learning model. The training job is taking longer than expected. The engineer notices that the GPU utilization is low (around 30%) while CPU utilization is high. Which action is most likely to improve training speed?

A.Increase the number of data loading workers
B.Use a smaller instance type with fewer GPUs
C.Decrease the number of data loading workers
D.Increase the batch size
AnswerA

More workers can parallelize data loading and reduce I/O bottleneck, improving GPU utilization.

Why this answer

Low GPU utilization with high CPU utilization suggests a data loading bottleneck. Increasing the number of data loading workers keeps the GPU fed. Reducing batch size or using a smaller instance would not help.

Using Pipe mode (streaming) might help but not as directly as increasing workers.

389
MCQhard

A company has a large dataset of customer transactions stored in Amazon Redshift. A data scientist wants to perform EDA using Python libraries like pandas and matplotlib. The dataset is too large to fit into memory on a single EC2 instance. What is the most efficient approach?

A.Launch an Amazon SageMaker notebook instance with an attached EBS volume large enough to hold the data
B.Use Amazon Athena Federated Query to run SQL queries against Redshift and retrieve aggregated results
C.Use a SQLAlchemy connection to read the entire table into a pandas DataFrame and sample it
D.Export the Redshift table to Amazon S3 in Parquet format, then use pandas to read the Parquet files
AnswerB

Amazon Athena Federated Query allows running SQL queries directly against Redshift, returning only aggregated results. This avoids moving the entire dataset and reduces memory usage on the notebook instance, making it the most efficient approach for EDA.

Why this answer

Amazon Athena Federated Query can query data in Amazon Redshift directly, allowing the data scientist to run SQL queries that aggregate the data before returning results. This avoids moving the entire dataset and reduces memory usage. Option A is wrong because even with a large EBS volume, the data must still be loaded into memory (pandas DataFrame) on the notebook instance, which may not fit.

Option C is wrong because using SQLAlchemy to read the entire table into a pandas DataFrame would require loading all data into memory, causing an out-of-memory error. Option D is wrong because exporting to S3 and then reading with pandas still requires loading the entire dataset into memory, which is inefficient for large datasets.

390
Multi-Selectmedium

A company uses Amazon SageMaker to train models. The data scientist wants to automate the retraining process whenever new data arrives in an S3 bucket. Which THREE services can be used together to achieve this? (Choose THREE.)

Select 3 answers
A.Amazon S3
B.Amazon EC2
C.AWS Lambda
D.Amazon SageMaker
E.AWS Glue
AnswersA, C, D

S3 events can trigger the pipeline.

Why this answer

Amazon S3 is correct because it acts as the event source, emitting notifications (e.g., s3:ObjectCreated:*) when new data arrives. These events can be captured by AWS Lambda, which is correct because it can run a function that invokes Amazon SageMaker to start a retraining job. Amazon SageMaker is correct because it performs the actual model training.

Together, S3 triggers the pipeline, Lambda orchestrates the invocation, and SageMaker executes the retraining. Options B (EC2) and E (Glue) are not directly required for this automated retraining workflow; EC2 is a compute service that would add unnecessary complexity, and Glue (data transformation) is not needed for the core trigger-and-train flow.

Exam trap

The trap here is that candidates often select AWS Glue (Option E) thinking it is needed for data transformation before retraining, but the question asks for services that directly enable the automation of retraining when new data arrives, and Glue is not required for the core trigger-and-train flow.

391
MCQhard

A data scientist trains a gradient boosting model on a large dataset using SageMaker. The training completes successfully, but when deploying the model to a real-time endpoint, inference latency is too high. Which change is MOST likely to reduce latency without significant accuracy loss?

A.Use a larger instance type for the endpoint
B.Prune the trees by removing nodes with low importance
C.Increase the number of trees in the ensemble
D.Use SageMaker Batch Transform instead of real-time
AnswerB

Pruning reduces model size and inference time.

Why this answer

Pruning trees by removing nodes with low importance reduces the model's complexity, which directly decreases inference latency because fewer decision paths need to be evaluated. In gradient boosting, this can be done with minimal accuracy loss if the removed nodes correspond to splits that contribute little to the overall prediction, as measured by feature importance or gain.

Exam trap

The trap here is that candidates often confuse scaling the endpoint (Option A) as the primary fix for latency, when the real issue is model complexity that can be reduced through pruning without significant accuracy loss.

How to eliminate wrong answers

Option A is wrong because using a larger instance type may reduce latency through more CPU/memory, but it does not address the root cause of high latency from model complexity and increases cost; it is a scaling workaround, not a model optimization. Option C is wrong because increasing the number of trees in the ensemble would increase model size and inference computation, making latency worse, not better. Option D is wrong because SageMaker Batch Transform is designed for offline, asynchronous inference on large datasets and does not provide real-time endpoints; switching to batch transform would not meet the requirement for a real-time endpoint and introduces significant latency for individual predictions.

392
MCQmedium

A machine learning engineer is performing exploratory data analysis on a large dataset stored in S3 using Amazon Athena. The dataset contains a timestamp column 'event_time' of type string. The engineer wants to analyze daily trends. Which approach is the most cost-effective and efficient?

A.Create a view that casts the column to timestamp and query the view.
B.Use the CAST function in the SELECT statement to convert the string to timestamp.
C.Convert the data to Parquet format with a timestamp column and re-query.
D.Partition the table by date derived from the event_time string and query using partition filtering.
AnswerD

Partitioning the table by date derived from the event_time string allows Athena to use partition pruning, which significantly reduces the data scanned when querying daily trends, making it the most cost-effective and efficient approach.

Why this answer

Converting the string to a date type in the query allows Athena to use partition pruning if the table is partitioned by date, reducing scanned data. Option A is wrong because creating a view does not reduce data scanned; CAST still processes all rows. Option B is wrong because using CAST in the SELECT statement still scans all data.

Option C is wrong because converting to Parquet is beneficial but not the most direct for the given task.

393
Multi-Selectmedium

Which TWO of the following are appropriate techniques for handling missing data during exploratory data analysis? (Select TWO.)

Select 2 answers
A.Ignore missing values and proceed with modeling
B.Replace missing values with -1 to indicate missing
C.Impute missing values using mean or median for numerical features
D.Visualize the missing data pattern using heatmaps or bar charts
E.Delete all rows with any missing values
AnswersC, D

Mean/median imputation is a common EDA technique.

Why this answer

Options C and D are correct. Imputing missing values using mean or median for numerical features (C) is a common technique during EDA to preserve data size. Visualizing the missing data pattern with heatmaps or bar charts (D) helps understand the distribution and mechanism of missingness.

Option A is incorrect because ignoring missing values can introduce bias and lead to inaccurate models. Option B is incorrect because replacing with -1 may distort the data distribution and is not a standard practice. Option E is incorrect because deleting all rows with missing values can cause significant data loss, especially if missingness is not random.

394
MCQmedium

A machine learning engineer is responsible for deploying a model that was trained using a custom algorithm in Amazon SageMaker. The engineer has built a Docker container that includes the inference code and has tested it locally. The engineer now wants to deploy the container to a SageMaker endpoint for real-time inference. The engineer has already created the model in SageMaker by specifying the image URI and the model artifacts location in S3. However, when the engineer tries to create an endpoint configuration, the operation fails with an error indicating that the model is not in an 'Active' state. What should the engineer do to resolve this issue?

A.Check the CloudWatch logs for the container to ensure the inference server starts correctly
B.Create the endpoint configuration with a different model name
C.Delete and re-create the model, then wait for a few minutes
D.Re-create the model using a different image URI
AnswerA

The health check requires the container to respond to a ping request. Logs will show if the server failed to start.

Why this answer

When a model is not in 'Active' state after creation, it typically indicates that the container's health check failed. Checking CloudWatch logs for the container helps identify why the inference server is not starting correctly. Option B is incorrect because the issue is with the model's state, not its name.

Option C is incorrect because deleting and recreating the model would not resolve the underlying health check problem without fixing the container. Option D is incorrect because using a different image URI would change the container but not address the health check failure if the root cause is in the inference code or configuration.

395
Multi-Selecthard

A data engineer is designing a data pipeline to process streaming data from Amazon Kinesis Data Streams and store the results in Amazon S3 in Parquet format. The data must be available for querying in Amazon Athena within minutes of arrival. Which THREE services should be used together? (Choose THREE.)

Select 3 answers
A.Amazon EMR
B.Amazon Redshift
C.Amazon Kinesis Data Firehose
D.Amazon Kinesis Data Analytics
E.AWS Glue
AnswersC, D, E

Amazon Kinesis Data Firehose is correct because it is a fully managed service that can directly ingest streaming data from Kinesis Data Streams, convert it to Parquet format, and deliver it to Amazon S3 with minimal latency (typically 60 seconds). This enables near-real-time querying via Athena without custom code or infrastructure management.

Why this answer

Amazon Kinesis Data Firehose can directly ingest streaming data from Kinesis Data Streams, convert it to Parquet, and deliver to S3 with low latency. Amazon Kinesis Data Analytics can process and analyze the stream in real-time (e.g., aggregations or filtering) before sending to Firehose. AWS Glue provides a data catalog for the S3 data, making it queryable by Athena.

Together, these three services enable near-real-time querying of streaming data in Athena.

Exam trap

The trap is that candidates may overlook Kinesis Data Analytics if they think only Firehose and Glue are needed, but Data Analytics enables real-time processing transformations that are often required in machine learning pipelines. Alternatively, they might incorrectly include EMR or Redshift, which are not necessary for this simple streaming-to-S3 pattern.

396
MCQhard

An IAM policy attached to an AWS Glue job allows reading and writing to an S3 bucket and accessing Glue Data Catalog. The job fails with an access denied error when trying to create a table in the Data Catalog. What is the likely issue?

A.The Glue Data Catalog is not enabled for the account.
B.The job does not have permission to write to the S3 bucket.
C.The S3 bucket is encrypted with a KMS key that the job cannot access.
D.The policy does not include the glue:CreateTable action.
AnswerD

Only GetTable and GetDatabase are allowed, not CreateTable.

Why this answer

The policy allows GetTable and GetDatabase actions, but not CreateTable. The job needs glue:CreateTable permission. The S3 actions are sufficient.

The error is specifically about creating a table.

397
MCQeasy

A data analyst is examining the distribution of a continuous variable and notices that its histogram is heavily skewed to the right. Which transformation should the analyst apply to make the distribution more symmetrical?

A.Box-Cox transformation with lambda=2.
B.Logarithmic transformation (log).
C.Standardization (z-score).
D.Square root transformation.
AnswerB

Log transformation reduces right skewness.

Why this answer

Logarithmic transformation compresses the long tail of right-skewed data, making the distribution more symmetrical. Option A (Box-Cox with lambda=2) is actually a square transformation, which would exacerbate right skewness. Option C (standardization) only centers and scales the data without altering the shape.

Option D (square root) can reduce moderate right skew but is less effective than log for severe skewness.

398
MCQeasy

A company is using Amazon SageMaker to build a binary classification model. The dataset is highly imbalanced, with 95% negative class and 5% positive class. Which technique should be used to address the class imbalance?

A.Use a weighted loss function during training.
B.Use accuracy as the primary evaluation metric.
C.Perform random under-sampling of the majority class.
D.Remove all examples from the majority class.
AnswerA

Weighted loss penalizes errors on minority class more heavily.

Why this answer

Using a weighted loss function (e.g., class weights in SageMaker's built-in XGBoost or custom PyTorch loss) assigns a higher penalty to misclassifications of the minority positive class. This directly addresses the 95:5 imbalance by making the model more sensitive to the positive class during gradient updates, without discarding data.

Exam trap

The trap here is that candidates often choose under-sampling (Option C) as a quick fix, but the exam tests understanding that under-sampling discards data and can hurt performance, while weighted loss preserves all data and is the preferred technique in SageMaker for imbalanced classification.

How to eliminate wrong answers

Option B is wrong because accuracy is misleading for imbalanced datasets; a model predicting all negatives would achieve 95% accuracy but fail to identify any positives. Option C is wrong because random under-sampling of the majority class discards valuable data, potentially losing patterns and reducing model generalization, especially when the majority class is 95% of the data. Option D is wrong because removing all majority class examples eliminates most of the training data, making it impossible to learn the negative class distribution and leading to severe overfitting or model failure.

399
MCQmedium

A data scientist uses SageMaker to train a model and wants to automatically stop the training job if the loss is not improving after a certain number of steps. Which feature should be used?

A.SageMaker Experiments
B.SageMaker Debugger
C.SageMaker Automatic Model Tuning
D.SageMaker Ground Truth
AnswerB

Debugger can monitor and stop jobs based on rules.

Why this answer

SageMaker Debugger provides built-in rules that monitor training metrics (e.g., loss) in real time and can trigger actions such as stopping the training job when the loss stops improving for a specified number of steps. This is done via the `StopTrainingJobOnRuleEvaluation` action, which automatically halts the job when a rule like `loss_not_decreasing` is violated.

Exam trap

The trap here is that candidates confuse SageMaker Debugger's monitoring and auto-stop capability with SageMaker Experiments' tracking features, or mistakenly think hyperparameter tuning (Automatic Model Tuning) can stop individual training jobs based on loss improvement.

How to eliminate wrong answers

Option A is wrong because SageMaker Experiments is designed for tracking, comparing, and managing multiple training runs and their metadata, not for real-time monitoring or automated job termination based on metric thresholds. Option C is wrong because SageMaker Automatic Model Tuning (hyperparameter tuning) optimizes hyperparameters by launching multiple training jobs, but it does not monitor loss within a single training job to stop it early. Option D is wrong because SageMaker Ground Truth is a data labeling service for creating training datasets, not a tool for monitoring or stopping training jobs.

400
MCQmedium

A company is building a data pipeline that ingests data from multiple sources into a centralized data lake on Amazon S3. The data must be transformed before it is available for analysis. The pipeline should be event-driven, automatically triggering transformation jobs when new data arrives. Which combination of AWS services should be used?

A.Amazon Kinesis Data Analytics for transformation
B.Amazon S3 event notifications to invoke AWS Lambda, which triggers an AWS Glue job
C.Amazon EMR with automatic scaling
D.AWS Step Functions to orchestrate the pipeline
AnswerB

S3 events trigger Lambda, which starts a Glue ETL job; this is event-driven and serverless.

Why this answer

Amazon S3 event notifications can be configured to invoke an AWS Lambda function when new objects are created in an S3 bucket. The Lambda function can then trigger an AWS Glue job to perform the necessary data transformations. This creates an event-driven, serverless pipeline that automatically processes data as it arrives, meeting the requirements for a centralized data lake on S3.

Exam trap

The trap here is that candidates may choose AWS Step Functions (Option D) because it is a powerful orchestrator, but they overlook that it is not directly event-driven from S3 without an intermediary like Lambda or EventBridge, and it does not perform the actual transformation.

How to eliminate wrong answers

Option A is wrong because Amazon Kinesis Data Analytics is designed for real-time stream processing using SQL or Apache Flink, not for batch transformation jobs triggered by new data arriving in S3. Option C is wrong because Amazon EMR with automatic scaling is a managed Hadoop cluster for big data processing, but it is not inherently event-driven; it requires additional services like Lambda or Step Functions to trigger jobs based on S3 events, making it an overcomplicated and less direct solution. Option D is wrong because AWS Step Functions is a workflow orchestration service that can coordinate multiple AWS services, but it does not directly react to S3 events; it would need an event source like S3 notifications or EventBridge to start execution, and it is not a transformation service itself.

401
Multi-Selecteasy

Which TWO actions are appropriate when handling missing data in a dataset for machine learning? (Select TWO.)

Select 2 answers
A.Use a machine learning model to predict missing values based on other features
B.Drop all rows that contain any missing value
C.Impute missing values with the mean or median of the feature
D.Remove the feature entirely if it contains missing values
E.Fill missing values with zero
AnswersA, C

Correct. Using a model to predict missing values based on other features is a sophisticated imputation method that leverages correlations in the data.

Why this answer

Options A and C are correct. Using a machine learning model to predict missing values is a valid imputation technique that can preserve relationships in the data. Imputing with the mean or median is a standard approach for numerical features and maintains the dataset size.

Option B is incorrect because dropping all rows with any missing values can lead to significant data loss, especially if missingness is widespread. Option D is incorrect because removing an entire feature due to missing values might discard predictive information unless the feature is mostly missing. Option E is incorrect because filling all missing values with zero can introduce bias and distort distributions, as zero may not be a natural placeholder for the data.

402
MCQhard

A data scientist notices that a linear regression model trained on a dataset has high variance. The model performs well on the training data but poorly on the test data. Which action is most likely to reduce the variance?

A.Decrease the amount of training data
B.Apply L2 regularization to the model
C.Increase the number of gradient descent iterations
D.Add more features to the model
AnswerB

L2 regularization shrinks coefficients and reduces model complexity, thereby reducing variance.

Why this answer

High variance indicates the model is overfitting to the training data. L2 regularization (ridge regression) adds a penalty proportional to the square of the magnitude of the coefficients, which shrinks them toward zero. This reduces the model's sensitivity to noise in the training data, thereby lowering variance and improving generalization to the test set.

Exam trap

The MLS-C01 exam often tests the bias-variance tradeoff by making candidates confuse regularization with optimization steps or feature engineering, so the trap here is assuming that more training data or more iterations always improve model performance without considering their effect on variance.

How to eliminate wrong answers

Option A is wrong because decreasing the amount of training data typically increases variance, as the model has fewer examples to learn from and is more likely to overfit. Option C is wrong because increasing gradient descent iterations does not reduce variance; it only ensures the optimization converges to a minimum, which may even worsen overfitting if the model is already complex. Option D is wrong because adding more features increases model complexity, which generally raises variance and exacerbates overfitting, not reduces it.

403
MCQhard

A data scientist queried an Athena table and got only one row back, but the CSV file is 1 MB. What is the most likely reason?

A.The table is partitioned but the partition is not correctly defined
B.The CSV file contains only one row
C.The table is not an external table
D.Athena does not support CSV format
AnswerA

Correct: If date partition is not correctly mapped, the filter may return no data.

Why this answer

A 1 MB CSV file likely contains many rows, but querying returns only one row, which indicates that the table's partition mapping is incorrect. Athena uses partitions to minimize data scanned; if the partition definition does not match the actual data location, the query may only read (or miss) certain partitions, resulting in fewer rows. Option B is wrong because a 1 MB file is too large to contain only one row, as typical CSV rows are much smaller.

Option C is irrelevant: whether the table is external does not affect row count. Option D is wrong because Athena supports CSV format.

404
Multi-Selecthard

A data engineer is designing an ETL pipeline using AWS Glue to process data from Amazon S3 and load it into Amazon Redshift. The pipeline must handle incremental data loads and ensure data consistency. Which THREE features should the engineer use to achieve this? (Choose THREE.)

Select 3 answers
A.Pushdown predicates to filter partitions in S3
B.Glue data preview to validate transformation logic
C.Glue partition filters to limit data scanned
D.Redshift transactional tables with automatic commit
E.Glue job bookmarks to track processed data
AnswersA, D, E

Pushdown predicates reduce the amount of data read from S3, improving performance.

Why this answer

(pushdown predicates) filters S3 partitions, reducing data scanned and enabling efficient incremental loads. Option D (Redshift transactional tables with automatic commit) ensures data consistency during writes. Option E (Glue job bookmarks) tracks processed data, supporting incremental processing.

Option B (Glue data preview) is used for development and does not contribute to incremental loading or consistency. Option C (Glue partition filters) is less efficient than pushdown predicates for filtering partitions.

405
MCQeasy

A data scientist is training a linear regression model and notices high bias in the training set. What action is most likely to reduce bias?

A.Apply L1 regularization.
B.Increase the learning rate.
C.Increase the amount of training data.
D.Add more relevant features to the model.
AnswerD

Adding features increases model capacity, which can reduce high bias.

Why this answer

High bias indicates that the model is underfitting the training data, meaning it is too simple to capture the underlying patterns. Adding more relevant features increases the model's capacity to learn complex relationships, directly reducing bias. This is a standard approach in linear regression to address underfitting.

Exam trap

The trap here is that candidates confuse high bias with high variance and incorrectly choose increasing training data (Option C) or regularization (Option A), which are solutions for overfitting, not underfitting.

How to eliminate wrong answers

Option A is wrong because L1 regularization (Lasso) reduces overfitting by shrinking coefficients to zero, which increases bias rather than reducing it. Option B is wrong because increasing the learning rate affects the convergence speed of gradient descent, not the model's bias; it may cause divergence or oscillation. Option C is wrong because increasing the amount of training data helps reduce variance (overfitting) but does not address high bias; with high bias, the model is already too simple to fit the data well.

406
MCQmedium

A company uses AWS Glue to catalog data in S3. Data is partitioned by year, month, day. The Glue crawler runs daily but sometimes misses new partitions. What should be done to ensure all partitions are cataloged?

A.Use a custom classifier to detect partition patterns.
B.Increase the crawler schedule to run every hour.
C.Configure the crawler to update all partitions on each run.
D.Enable partition indexing in the Glue table properties.
AnswerC

Configuring the crawler to update all partitions on each run ensures that the crawler scans the entire dataset and registers any new or missed partitions.

Why this answer

Configuring the Glue crawler to 'update all partitions on each run' forces the crawler to scan the entire S3 path and register any new partitions it finds, even if the partition structure hasn't changed. This ensures all missed partitions are cataloged. Partition indexing (D) improves query performance by creating an index over existing partitions, but does not automatically discover new partitions.

Exam trap

The trap is that candidates may confuse partition indexing (which optimizes queries on already-cataloged partitions) with automatic partition discovery. The correct solution is to adjust the crawler's update behavior to scan all partitions, not to rely on indexing for cataloging.

How to eliminate wrong answers

Option A is wrong because custom classifiers are used to infer the schema of data formats (e.g., CSV, JSON) and do not affect partition discovery or cataloging. Option B is wrong because increasing the crawler schedule to run every hour does not guarantee that all partitions are cataloged if the crawler fails or if partitions are added between runs; it only reduces the window of missed partitions but does not solve the underlying issue of missed partitions. Option C is wrong because configuring the crawler to update all partitions on each run would be inefficient and does not address the root cause of missed partitions; the crawler still depends on its schedule and may skip partitions if they are not present during the crawl.

407
Multi-Selectmedium

A data engineering team is designing a data lake on AWS for machine learning workloads. The data includes structured, semi-structured, and unstructured data. The team needs to ensure that the data is cataloged, easily discoverable, and can be queried by Amazon Athena and Amazon EMR. The team also wants to enforce fine-grained access control at the column and row level for sensitive data. Which combination of AWS services should the team use? (Select TWO.)

Select 2 answers
A.AWS Lake Formation
B.AWS Identity and Access Management (IAM)
C.AWS Glue Data Catalog
D.Amazon RDS for PostgreSQL
E.Amazon DynamoDB
AnswersA, C

Lake Formation provides fine-grained access control and integrates with Glue Catalog.

Why this answer

AWS Lake Formation is correct because it provides a centralized service to build, secure, and manage data lakes on AWS. It enables fine-grained access control at the column and row level for sensitive data, which directly meets the requirement for enforcing such controls. Additionally, Lake Formation integrates with Amazon Athena and Amazon EMR for querying and processing the cataloged data.

Exam trap

The trap here is that candidates often assume IAM alone can handle fine-grained data access control, but IAM lacks the column- and row-level filtering capabilities that Lake Formation provides through its integration with the Glue Data Catalog and query engines.

408
Matchingmedium

Match each AWS AI service to its capability.

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

Concepts
Matches

Natural language processing

Language translation

Text-to-speech

Speech-to-text

Conversational chatbots

Why these pairings

The correct matches are: Amazon Comprehend for extracting insights from text, Amazon Lex for building conversational interfaces, and Amazon Polly for text-to-speech. Distractors swap capabilities between services.

409
MCQhard

An ML team is using SageMaker Processing jobs to run feature engineering scripts. The scripts require a specific Python package not included in the default SageMaker image. How should the team provide this package?

A.Include 'pip install <package>' in the processing script
B.Use the SageMaker prebuilt deep learning container with the package
C.Place a requirements.txt file in the input data S3 bucket
D.Create a custom Docker image that includes the package and use it for the Processing job
AnswerD

Standard best practice for custom dependencies.

Why this answer

SageMaker Processing jobs run in isolated Docker containers, and the default SageMaker images only include pre-installed packages. To add a custom Python package, the team must create a custom Docker image that includes the package (e.g., via a Dockerfile with 'pip install <package>'), then specify that image URI in the Processing job configuration. This ensures the package is available in the container environment before the script executes.

Exam trap

AWS often tests the misconception that runtime commands (like 'pip install' in the script) or external configuration files (like requirements.txt in S3) can modify the container environment, when in fact SageMaker Processing jobs require all dependencies to be pre-installed in the Docker image.

How to eliminate wrong answers

Option A is wrong because 'pip install <package>' inside the processing script would attempt to install the package at runtime, but the container may lack internet access or sufficient permissions, and it violates the principle of immutable infrastructure — the package should be baked into the image. Option B is wrong because SageMaker prebuilt deep learning containers are optimized for frameworks like TensorFlow, PyTorch, or MXNet, and they do not include arbitrary third-party Python packages; the team would still need to customize the image to add the specific package. Option C is wrong because placing a requirements.txt file in the input data S3 bucket does not automatically install packages; SageMaker Processing jobs do not parse requirements.txt from input data — the container must be pre-configured with dependencies.

410
MCQmedium

Refer to the exhibit. An IAM policy is attached to a SageMaker notebook instance role. When the data scientist tries to run a training job that writes model artifacts to 's3://my-bucket/models/', the job fails with an access denied error. What is the MOST likely cause?

A.The IAM role does not have a trust policy
B.Missing s3:PutObject permission for the output S3 bucket
C.The policy does not include any S3 actions
D.The sagemaker:CreateTrainingJob action is not allowed on the specific resource
AnswerB

Write access is needed for model artifacts.

Why this answer

The error occurs because the IAM policy attached to the SageMaker notebook instance role does not grant the s3:PutObject permission on the 's3://my-bucket/models/' path. SageMaker training jobs require this permission to write model artifacts to the specified S3 output bucket. Without it, the API call to upload the model fails with an access denied error, even if other S3 actions are allowed.

Exam trap

The trap here is that candidates often assume the error is due to a missing trust policy or a missing sagemaker:CreateTrainingJob permission, but the actual failure is at the S3 write step, which requires explicit s3:PutObject on the output bucket.

How to eliminate wrong answers

Option A is wrong because a trust policy is not required for the SageMaker notebook instance role to assume itself; trust policies are needed for cross-account access or service-to-service role assumption, not for the role's own permissions. Option C is wrong because the statement says the policy is attached to the role, and while it may include S3 actions, the specific s3:PutObject action is missing for the output bucket; the problem is not the absence of all S3 actions but the missing write permission. Option D is wrong because the sagemaker:CreateTrainingJob action is allowed on the SageMaker resource (the notebook role has permissions to create training jobs), but the failure occurs at the S3 write step, not at the training job creation step.

411
MCQmedium

A team is training an XGBoost model using SageMaker with a large dataset in S3 (100 GB). Training is taking too long. Which change will most likely reduce training time without sacrificing accuracy?

A.Reduce the number of training instances
B.Configure Pipe mode for data input
C.Enable SageMaker Managed Spot Training
D.Use a larger instance type with more vCPUs
AnswerB

Pipe mode streams data directly from S3, reducing I/O bottleneck and training time.

Why this answer

Configuring Pipe mode for data input streams data directly from S3 to the training algorithm, significantly reducing I/O overhead and training time without affecting model accuracy. Option A (reducing the number of training instances) would actually increase training time, not reduce it. Option C (enabling SageMaker Managed Spot Training) is primarily for cost savings and does not reduce training time.

Option D (using a larger instance type) may provide some speedup but is less effective than addressing the I/O bottleneck with Pipe mode, and it may increase costs unnecessarily.

412
MCQhard

A data scientist is training a deep learning model on a large dataset using SageMaker. The training job is taking too long. Upon reviewing the CloudWatch logs, the scientist notices that the GPU utilization is below 10% most of the time. Which change is MOST likely to improve GPU utilization and reduce training time?

A.Increase the batch size in the training script.
B.Use a different optimizer that requires less computation.
C.Switch to a smaller instance type to reduce data transfer overhead.
D.Reduce the size of the training dataset.
AnswerA

Increasing batch size can improve GPU utilization by processing more data per step.

Why this answer

Low GPU utilization (below 10%) indicates that the GPU is idle most of the time, waiting for data to be fed. Increasing the batch size allows each training step to process more samples per forward/backward pass, keeping the GPU busy with larger matrix operations and reducing the relative overhead of data loading and kernel launches. This directly improves GPU throughput and reduces total training time.

Exam trap

The trap here is that candidates mistakenly think reducing instance size or dataset size will speed up training, when in fact the core issue is underutilization of the existing GPU due to insufficient work per step.

How to eliminate wrong answers

Option B is wrong because using a different optimizer that requires less computation (e.g., switching from Adam to SGD) does not address the root cause of low GPU utilization; it may even worsen convergence speed without improving hardware saturation. Option C is wrong because switching to a smaller instance type reduces compute capacity (fewer GPU cores, less memory), which would likely increase training time and further lower utilization due to smaller batch sizes fitting in memory. Option D is wrong because reducing the size of the training dataset would reduce total training time but does not improve GPU utilization per step; the model would still underutilize the GPU during each iteration.

413
Multi-Selectmedium

A company wants to use Amazon SageMaker to train a model using data stored in Amazon S3. The data is sensitive and must be encrypted at rest and in transit. Which THREE steps should be taken to ensure data security?

Select 3 answers
A.Configure the SageMaker training job to use an IAM role with least privilege and enable network isolation
B.Enable default encryption on the S3 bucket using AWS KMS
C.Use an S3 VPC endpoint to keep traffic within the AWS network
D.Store the data in Amazon Redshift instead of S3
E.Allow internet access for the SageMaker notebook instance
AnswersA, B, C

Network isolation ensures no internet egress.

Why this answer

Configuring the SageMaker training job with an IAM role that follows least privilege ensures that only necessary permissions are granted, reducing the risk of unauthorized access. Enabling network isolation prevents the training job from accessing the internet, which mitigates data exfiltration risks and ensures that data remains within the controlled AWS environment.

Exam trap

The trap here is that candidates might think storing data in a different service like Redshift or enabling internet access for notebooks is necessary, but the exam tests the understanding that S3 with VPC endpoints and network isolation provide sufficient security without overcomplicating the architecture.

414
Multi-Selectmedium

A company is using Amazon SageMaker to train an XGBoost model. The training data contains missing values. Which TWO methods can XGBoost handle missing values internally?

Select 2 answers
A.Use surrogate splits to handle missing values.
B.Drop rows with missing values.
C.Learn the best direction to go when a value is missing.
D.Treat missing values as a separate category.
E.Impute missing values with the mean of the feature.
AnswersC, D

XGBoost uses a sparsity-aware algorithm that learns the optimal split direction for missing values.

Why this answer

XGBoost can handle missing values internally using a sparsity-aware algorithm. Option C correctly states that XGBoost learns the best direction to go when a value is missing. Option D correctly states that XGBoost treats missing values as a separate category.

Option A (surrogate splits) is not used by XGBoost; Option B (dropping rows) is not an internal method; Option E (imputing with mean) is not an internal method.

415
MCQeasy

A team is building a data pipeline using Amazon Kinesis Data Firehose to deliver real-time clickstream data to an Amazon S3 bucket. The data must be partitioned by year, month, day, and hour. Which configuration should the team use to achieve this?

A.Configure an S3 lifecycle rule to move data into partition folders after delivery
B.Use an AWS Lambda function to write data to S3 with the desired partition structure
C.Enable dynamic partitioning in Firehose and configure the partition keys as YYYY/MM/dd/HH
D.Use Amazon Athena partition projection to dynamically create partitions
AnswerC

Firehose dynamic partitioning automatically creates folder structures.

Why this answer

Amazon Kinesis Data Firehose supports dynamic partitioning, which allows you to automatically partition incoming data in S3 based on keys like YYYY/MM/dd/HH. By enabling this feature and configuring the partition keys to match the desired year, month, day, and hour format, Firehose will write data directly into the corresponding S3 prefix structure without requiring additional processing.

Exam trap

The trap here is that candidates often confuse S3 lifecycle rules or Athena partition projection as methods for creating partition structures, when in fact they are post-ingestion management or query-time features, not ingestion-time partitioning mechanisms.

How to eliminate wrong answers

Option A is wrong because S3 lifecycle rules are used for managing object lifecycle (e.g., transitioning to Glacier or deleting), not for creating partition folders at delivery time; they cannot retroactively reorganize data into a partition structure. Option B is wrong because while a Lambda function could write data with a custom partition structure, this approach adds complexity, latency, and cost, and is not the recommended or native way to achieve partitioning with Firehose; Firehose's built-in dynamic partitioning is designed for this exact use case. Option D is wrong because Athena partition projection is a feature for querying data in S3 by dynamically inferring partitions, not for writing or organizing data into partitioned folders during ingestion.

416
MCQmedium

A data scientist is performing EDA on a dataset with 500 features. The dataset has a mix of numeric and categorical features. The scientist wants to identify which features have a strong nonlinear relationship with the target variable. Which technique is most appropriate?

A.Use ANOVA to compare feature means across target classes.
B.Compute Pearson correlation coefficients.
C.Calculate mutual information between each feature and the target.
D.Perform chi-squared tests for each feature.
AnswerC

Mutual information measures any dependency, including nonlinear.

Why this answer

Mutual information can capture any kind of dependency (including nonlinear) between features and target. Option A (ANOVA) compares means across groups but assumes linearity. Option B (Pearson correlation) only captures linear relationships.

Option D (Chi-squared test) is for categorical features, not suitable for the mix of numeric and categorical features.

417
Multi-Selecthard

A company uses SageMaker to train a model. The training job fails with 'ResourceLimitExceeded' error. Which TWO actions should the company take to resolve this?

Select 2 answers
A.Launch the training job in a different AWS region.
B.Use a different instance type that is not at its limit.
C.Use SageMaker Managed Spot Training to reduce cost.
D.Compress the training data to reduce storage requirements.
E.Request a service limit increase for SageMaker training job resources.
AnswersB, E

Different instance types may have separate limits.

Why this answer

The 'ResourceLimitExceeded' error indicates that the requested instance type has reached its concurrent usage limit in the current AWS region. Switching to a different instance type that is not at its limit allows the training job to proceed without exceeding the service quota. Option E is correct because requesting a service limit increase for SageMaker training job resources directly raises the cap on the number of concurrent instances or total instance count, resolving the underlying quota issue.

Exam trap

The trap here is that candidates confuse 'ResourceLimitExceeded' with cost or storage issues, leading them to select Managed Spot Training or data compression, which do not address the underlying AWS service quota limit.

418
MCQmedium

A data engineer runs the AWS CLI command above to inspect an object in S3. The engineer wants to query this metadata (kafka-offset) using Amazon Athena to track processing progress. How can the engineer make this metadata available for Athena queries without modifying the existing data pipeline?

A.Use S3 object tags instead of metadata and query the tags using Athena.
B.Use an AWS Lambda function to copy the metadata into the object's content as a new line.
C.Use AWS Glue to create a table that includes the metadata as a column by running an ETL job.
D.Use Amazon Athena to query the object metadata directly by referencing the metadata field.
AnswerC

A Glue ETL job can read objects, extract metadata, and write to a table that Athena can query.

Why this answer

AWS Glue ETL jobs can read the S3 object's user-defined metadata (e.g., 'kafka-offset') and write it as a column in a new or transformed dataset, which Athena can then query. This approach does not modify the existing data pipeline, as the original objects remain unchanged; the metadata is extracted and stored in a queryable format (e.g., Parquet or CSV) in a separate location. Glue's ability to access S3 object metadata via the `getObjectMetadata` API during ETL processing makes this a clean, pipeline-agnostic solution.

Exam trap

The trap here is that candidates assume Athena can natively query S3 object metadata (like HTTP headers) because Athena can query data in S3, but Athena has no access to object-level metadata—it only reads the content of files, not the object's key-value metadata fields.

How to eliminate wrong answers

Option A is wrong because S3 object tags are separate from user-defined metadata and cannot be directly queried by Athena; Athena queries data in files, not object tags, and there is no built-in Athena integration for tag-based queries. Option B is wrong because copying metadata into the object's content as a new line would modify the original object, violating the requirement to not alter the existing data pipeline, and it would also require additional orchestration to avoid race conditions or data duplication. Option D is wrong because Athena cannot query S3 object metadata directly; Athena only reads the content of objects (e.g., CSV, JSON, Parquet) and has no SQL access to HTTP headers or object-level metadata fields.

419
MCQmedium

A team wants to build a data pipeline that processes incoming JSON files from an S3 bucket and loads them into a Redshift table. The pipeline must handle schema evolution and data validation. Which combination of services would be MOST appropriate?

A.Amazon S3 + AWS Glue + Amazon Redshift
B.Amazon S3 + Amazon SQS + Amazon Redshift
C.Amazon S3 + AWS Data Pipeline + Amazon Redshift
D.Amazon S3 + AWS Lambda + Amazon Redshift
AnswerA

Glue provides schema inference and ETL.

Why this answer

AWS Glue provides built-in schema discovery and evolution capabilities via its crawlers and the Data Catalog, which automatically detect and adapt to changes in JSON schemas. Combined with Glue ETL jobs for data validation and transformation, it seamlessly loads processed data into Amazon Redshift, making it the most appropriate choice for handling schema evolution and validation in this pipeline.

Exam trap

The trap here is that candidates often choose AWS Lambda for its simplicity and event-driven nature, overlooking its limitations with large files, lack of schema evolution, and inability to perform complex ETL within execution constraints.

How to eliminate wrong answers

Option B is wrong because Amazon SQS is a message queuing service that does not provide schema evolution, data validation, or ETL capabilities; it would only decouple components without addressing the core requirements. Option C is wrong because AWS Data Pipeline is a batch-oriented orchestration service that lacks native schema discovery and evolution features, requiring manual handling of schema changes and validation logic. Option D is wrong because AWS Lambda is stateless and has a 15-minute execution timeout, making it unsuitable for processing large JSON files or complex ETL tasks, and it does not offer built-in schema evolution or data validation capabilities.

420
MCQeasy

A data scientist is using Amazon SageMaker to train a deep learning model with a large dataset. The training job fails with a 'CUDA out of memory' error. What is the MOST efficient way to resolve this issue?

A.Switch to a CPU-only instance
B.Use a larger instance type with more GPUs
C.Increase the batch size
D.Reduce the batch size
AnswerD

Smaller batch size reduces memory consumption per GPU.

Why this answer

The 'CUDA out of memory' error occurs when the GPU's memory is insufficient to hold the model parameters, gradients, optimizer states, and the current batch of data. Reducing the batch size decreases the memory footprint per training step, allowing the model to fit within the available GPU memory without requiring a more expensive instance or sacrificing GPU acceleration.

Exam trap

AWS often tests the misconception that 'more resources' (larger instance or more GPUs) is always the best fix, when in fact adjusting hyperparameters like batch size is the most efficient and cost-effective first step.

How to eliminate wrong answers

Option A is wrong because switching to a CPU-only instance would eliminate GPU acceleration entirely, drastically slowing training for deep learning workloads, and does not address the root cause of memory pressure. Option B is wrong because using a larger instance with more GPUs is an expensive overprovisioning solution that does not optimize resource usage; it may also introduce additional complexity with multi-GPU data parallelism. Option C is wrong because increasing the batch size would increase GPU memory consumption, exacerbating the out-of-memory error rather than resolving it.

421
MCQeasy

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

A.The pipeline tries to update an existing endpoint, but the sagemaker:UpdateEndpoint action is not allowed.
B.The pipeline tries to create a new endpoint, but the sagemaker:CreateEndpoint action is denied.
C.The pipeline tries to delete the old endpoint, but the sagemaker:DeleteEndpoint action is denied by a Deny statement.
D.The pipeline attempts to invoke the endpoint, but the sagemaker:InvokeEndpoint action is denied.
AnswerA

The policy does not include sagemaker:UpdateEndpoint, which is required to update an existing endpoint. Without this permission, the update fails.

Why this answer

The pipeline is attempting to deploy an updated model to an existing SageMaker endpoint, which requires the sagemaker:UpdateEndpoint action. The IAM policy shown in the exhibit (not provided here but implied) does not include this action, so the API call fails with an access denied error. Without explicit permission to update the endpoint, the CI/CD pipeline cannot modify the deployed configuration.

Exam trap

The trap here is that candidates may confuse the actions required for updating an existing endpoint (UpdateEndpoint) with those for creating a new one (CreateEndpoint), leading them to incorrectly select Option B when the pipeline is actually performing an update.

How to eliminate wrong answers

Option B is wrong because the pipeline is not creating a new endpoint; it is updating an existing one, so sagemaker:CreateEndpoint is not the required action. Option C is wrong because the pipeline does not need to delete the old endpoint; SageMaker endpoints are updated in-place via UpdateEndpoint, which handles traffic shifting automatically. Option D is wrong because the pipeline is not invoking the endpoint during deployment; InvokeEndpoint is used for inference requests, not for model deployment operations.

422
Multi-Selecthard

A company is using Amazon DynamoDB as a source for a machine learning pipeline. The data is exported nightly to Amazon S3 using DynamoDB Streams and an AWS Glue job. The Glue job reads the stream records, transforms them, and writes to S3 in Parquet format. The team notices that the Glue job is taking too long and consuming high DynamoDB read capacity. Which THREE actions would reduce the load on DynamoDB and improve performance? (Choose THREE.)

Select 3 answers
A.Use Amazon DynamoDB export to S3 (incremental) feature instead of Glue
B.Increase the DynamoDB write capacity units to handle the stream writes
C.Use DynamoDB Streams with AWS Lambda to write data directly to S3 in near-real-time, bypassing Glue
D.Increase the DynamoDB read capacity units to handle Glue's workload
E.Configure Glue to read from a S3 snapshot exported earlier instead of directly from DynamoDB
AnswersA, C, E

The export feature does not consume read capacity and can be automated.

Why this answer

DynamoDB's native export to S3 (incremental) feature directly exports data to S3 without consuming read capacity units (RCUs) or requiring a separate compute service like AWS Glue. This eliminates the bottleneck of Glue reading from DynamoDB Streams, which consumes RCUs and adds latency, thereby reducing load on DynamoDB and improving overall performance.

Exam trap

The trap here is that candidates often assume increasing DynamoDB capacity (RCUs or WCUs) is the solution to performance issues, but the exam tests understanding that native export features and architectural changes (like using Lambda or S3 snapshots) can eliminate the root cause of high read consumption without scaling capacity.

423
Multi-Selectmedium

Which THREE factors should a data engineer consider when choosing between Amazon S3 and Amazon Redshift for storing large datasets used for machine learning? (Choose 3.)

Select 3 answers
A.Query performance and latency requirements
B.Encryption at rest capabilities
C.Cost of storage vs. compute
D.Data format and compression support
E.Data retention policies
AnswersA, C, D

Redshift provides fast SQL analytics; S3 queries are slower.

Why this answer

When choosing between Amazon S3 and Amazon Redshift for ML data storage, key considerations include: (A) Query performance and latency: Redshift offers low-latency SQL querying on structured data, while S3 provides higher latency for direct access, making performance needs critical. (C) Cost of storage vs. compute: S3 decouples storage and compute, allowing independent scaling; Redshift combines them, affecting cost. (D) Data format and compression: S3 supports any format, but Redshift works best with columnar formats like Parquet. (B) Encryption at rest and (E) Data retention policies are available in both, so they are not differentiating factors.

Exam trap

A common mistake is assuming encryption or retention policies are unique to one service, when in fact both S3 and Redshift offer equivalent capabilities, making them irrelevant for this comparison.

424
Multi-Selectmedium

A data scientist is building a regression model to predict house prices. The dataset contains 10 features, including 'number_of_bedrooms' and 'square_footage'. The scientist observes that the model has high variance. Which TWO actions are most appropriate to reduce overfitting? (Choose TWO.)

Select 2 answers
A.Reduce model complexity by using a simpler model
B.Add L2 regularization to the model
C.Increase the number of training epochs
D.Decrease the amount of training data
E.Add more polynomial features
AnswersA, B

Simpler models have lower variance.

Why this answer

A is correct because reducing model complexity, such as using a simpler model (e.g., linear regression instead of a high-degree polynomial), directly decreases variance by limiting the model's capacity to fit noise in the training data. This aligns with the bias-variance tradeoff, where simpler models have higher bias but lower variance, making them less prone to overfitting.

Exam trap

The MLS-C01 exam often tests the misconception that adding more data or features always improves model performance, but the trap here is that reducing training data or adding polynomial features increases variance, while regularization and simpler models are the correct countermeasures for overfitting.

425
MCQmedium

A data science team is training a binary classification model using Amazon SageMaker. The dataset is highly imbalanced (95% negative class, 5% positive class). The team wants to maximize the F1 score. Which built-in SageMaker algorithm is most appropriate?

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

XGBoost has scale_pos_weight parameter to handle imbalance and can optimize for F1.

Why this answer

XGBoost supports scale_pos_weight to handle class imbalance, directly optimizing for F1. Linear Learner with balanced class weights can also help but typically optimizes log loss. K-Means is unsupervised.

PCA is for dimensionality reduction.

426
Multi-Selectmedium

A company is using Amazon Kinesis Data Streams to ingest clickstream data. The data is consumed by a fleet of EC2 instances running a custom consumer application. The consumer is falling behind and the shard iterator age is increasing. Which TWO actions should the data engineer take to improve consumer performance? (Choose TWO.)

Select 2 answers
A.Increase the number of shards in the stream
B.Decrease the data retention period
C.Use an AWS Lambda function to process the data
D.Enable enhanced fan-out on the stream
E.Switch to the Kinesis Client Library (KCL)
AnswersA, D

More shards increase the total read capacity.

Why this answer

Increasing the number of shards in the stream directly increases the total read capacity of the Kinesis Data Stream. Each shard provides a fixed read throughput of 2 MB/s (or 5 read transactions per second), so adding shards allows the consumer fleet to parallelize processing across more data partitions, reducing the backlog and shard iterator age.

Exam trap

The trap here is that candidates often confuse 'switching to KCL' (a library) with a performance fix, when in fact KCL is just a helper for checkpointing and load balancing, not a throughput booster.

427
Multi-Selectmedium

A data scientist is building a binary classifier using logistic regression. The dataset has 10 features and 100,000 observations. The model achieves 99% accuracy on the test set, but the precision is 50% and recall is 90%. Which TWO actions should the data scientist take to improve model performance? (Choose 2.)

Select 2 answers
A.Increase the regularization strength (C) in logistic regression.
B.Adjust the decision threshold to increase precision at the cost of recall.
C.Use a random forest classifier instead of logistic regression.
D.Collect more training data.
E.Remove features that have low correlation with the target.
AnswersB, C

Lowering threshold increases recall; raising threshold increases precision.

Why this answer

The model has high recall (90%) but low precision (50%), indicating many false positives. Two effective approaches are: adjusting the decision threshold (Option B) to require a higher predicted probability for the positive class, which reduces false positives and increases precision at the cost of some recall. Switching to a random forest classifier (Option C) can capture complex interactions and non-linearities, often improving precision by better separating classes.

Option A: Increasing regularization strength (i.e., decreasing C in logistic regression) may help reduce overfitting but does not directly target precision; it may marginally help but is not a primary action. Option D: Collecting more data does not address the underlying class separation issue; it might even amplify imbalance. Option E: Removing features with low correlation could discard valuable information and worsen performance.

428
MCQmedium

A data scientist is using Amazon SageMaker to perform hyperparameter tuning for a neural network. The tuning job uses the 'Random' search strategy. After 10 training jobs, the best objective metric has plateaued. The scientist wants to improve the results without increasing the total number of training jobs. Which approach should they take?

A.Use a different objective metric that is easier to optimize
B.Normalize the input features to have zero mean and unit variance
C.Increase the maximum number of training jobs
D.Switch the hyperparameter tuning strategy to 'Bayesian'
AnswerD

Bayesian optimization uses past trials to inform future hyperparameter choices, often converging faster.

Why this answer

Switching to Bayesian search (e.g., 'Bayesian' strategy) is more efficient because it uses past results to choose the next hyperparameters, potentially finding better values in fewer jobs. Increasing the number of jobs would increase cost. Random search might get lucky but is less efficient.

Changing the objective metric or scaling features would not directly improve the tuning process.

429
MCQmedium

A data engineer runs the AWS CLI command shown in the exhibit to find large log files in S3. The command returns an empty list, but the engineer knows there are files larger than 1 MB in that prefix. What is the MOST likely issue?

A.The JMESPath query syntax is incorrect
B.The command does not paginate through all objects; only the first 1000 are returned
C.The prefix is incorrect; there are no objects under that prefix
D.The Size value is in kilobytes, not bytes
AnswerB

list-objects limits to 1000 keys; use --max-items or pagination.

Why this answer

The `list-objects` command returns up to 1000 objects per call. If there are more than 1000 objects under the prefix, the command only examines the first 1000 objects. Since the engineer knows there are files larger than 1 MB, those files likely appear after the first 1000 objects.

To find them, pagination is required (e.g., using `--page-size` or `--max-items` and `--starting-token`). Option A is incorrect because the JMESPath query is syntactically valid. Option C is incorrect because the engineer confirmed objects exist under the prefix.

Option D is incorrect because `Size` is in bytes, so `1000000` correctly represents 1 MB.

430
MCQeasy

An ML engineer needs to store and version training datasets and model artifacts. Which AWS service should they use?

A.Amazon DynamoDB
B.Amazon Simple Storage Service (S3)
C.Amazon Elastic File System (EFS)
D.Amazon Elastic Block Store (EBS)
AnswerB

S3 supports versioning and is commonly used for ML artifacts.

Why this answer

Amazon S3 is the correct choice because it provides scalable, durable, and cost-effective object storage with built-in versioning capabilities, making it ideal for storing and versioning large training datasets and model artifacts. S3's versioning feature allows you to preserve, retrieve, and restore every version of an object, which is essential for reproducibility in ML workflows.

Exam trap

The trap here is that candidates often confuse storage services for ML artifacts with database or file system services, mistakenly choosing DynamoDB for its versioning-like features (e.g., DynamoDB Streams) or EFS for its shared file system access, without recognizing that S3 is the only service that offers native, durable object versioning at scale for ML use cases.

How to eliminate wrong answers

Option A is wrong because Amazon DynamoDB is a NoSQL key-value and document database designed for low-latency, high-throughput transactional workloads, not for storing large binary objects like datasets or model artifacts, and it lacks native versioning for such files. Option C is wrong because Amazon EFS is a scalable, elastic NFS file system for use with EC2 instances, but it does not provide built-in object versioning and is less cost-effective for long-term archival of large ML artifacts compared to S3. Option D is wrong because Amazon EBS provides block-level storage volumes for use with EC2 instances, but it lacks native versioning capabilities and is tied to a single Availability Zone, making it unsuitable for durable, versioned storage of datasets and models across regions.

431
MCQhard

Refer to the exhibit. A data scientist queries the table with 'SELECT COUNT(*) FROM mytable' in Athena and gets a result of 1000 rows. However, the scientist knows there are 1500 data files in the S3 location. What is the most likely reason for the discrepancy?

A.Some files may use a different delimiter (e.g., tab) and are not parsed correctly, resulting in zero rows from those files.
B.The table schema does not match the data, causing some files to be skipped.
C.Some files may be empty or contain only headers, so they contribute 0 rows.
D.Athena skips files larger than a certain size to prevent scanning too much data.
AnswerC

Correct. Files that are empty or contain only a header row contribute zero data rows, explaining the discrepancy.

Why this answer

Athena counts rows from data files; if files are empty or contain only headers, they contribute 0 rows. With 1500 files and only 1000 rows, it is plausible that many files are empty or header-only, especially if the data pipeline produces such files. Option A is incorrect because Athena still parses lines even with a delimiter mismatch, treating each line as a row (though columns may be incorrect).

Option B is incorrect because schema mismatch typically causes query errors, not silent skipping. Option D is false because Athena does not skip files based on size limits.

432
Multi-Selecteasy

A data scientist is analyzing a dataset with a mix of numerical and categorical features. The target variable is binary. The data scientist wants to visualize the distribution of a numerical feature across the two target classes. Which TWO visualization techniques are appropriate? (Choose 2.)

Select 2 answers
A.Heatmap of the correlation matrix
B.Stacked bar chart of the feature binned
C.Overlapping histograms with transparency
D.Side-by-side boxplots
E.Scatter plot with color-coded classes
AnswersC, D

Histograms show distribution shapes; transparency allows comparison.

Why this answer

Correct answers are options C and D. Option C (Overlapping histograms with transparency) is appropriate because it allows comparing the distribution of a numerical feature across two classes by overlaying histograms, making it easy to see shape, central tendency, and spread. Option D (Side-by-side boxplots) is appropriate because it succinctly displays median, quartiles, and outliers for each class, facilitating comparison.

Option A (Heatmap of the correlation matrix) is not suitable as it visualizes correlations between features, not distribution of a single feature across classes. Option B (Stacked bar chart of the feature binned) is intended for categorical data, not numerical distributions. Option E (Scatter plot with color-coded classes) requires two numerical variables and is used to show relationships, not distribution of a single numerical feature.

433
MCQmedium

A data scientist is working with a dataset that has missing values in 30% of rows for a categorical feature 'city'. Which EDA step should be performed before deciding on imputation?

A.Check if missingness is related to other features or random
B.Impute missing values with the mode of the column
C.Drop all rows with missing values
D.Encode the city feature using label encoding
AnswerA

Before deciding on imputation, you must investigate the pattern of missingness to determine if it is MCAR, MAR, or MNAR. This involves checking if missingness in 'city' is related to other features or random. Understanding the missing mechanism informs the appropriate imputation strategy.

Why this answer

Before deciding on imputation for the 'city' feature, the first exploratory data analysis (EDA) step is to investigate the pattern of missingness. Option A is correct because you must determine whether the missing data are Missing Completely at Random (MCAR), Missing at Random (MAR), or Missing Not at Random (MNAR). This involves checking if missingness in 'city' is related to other features or is random.

Understanding the missing mechanism informs the appropriate imputation strategy. Option B (impute with mode) is an imputation method, not a diagnostic step; applying it without prior analysis risks introducing bias. Option C (drop rows) may be valid only if missingness is MCAR and the amount of data loss is acceptable, but it should not be the first step.

Option D (label encoding) transforms categorical data and does not address missing values.

434
Multi-Selecteasy

Which TWO are appropriate visualizations for exploring the distribution of a single numeric variable? (Select TWO.)

Select 2 answers
A.Heatmap
B.Histogram
C.Bar chart
D.Scatter plot
E.Box plot
AnswersB, E

Histogram displays frequency distribution of a single numeric variable.

Why this answer

Options B and E are correct. A histogram displays the frequency distribution of a single numeric variable by binning the data, and a box plot shows the five-number summary (minimum, first quartile, median, third quartile, maximum) to visualize spread and outliers. Option A (heatmap) is typically used for two numeric variables to show density or correlation.

Option C (bar chart) is for categorical data, not numeric distribution. Option D (scatter plot) visualizes the relationship between two numeric variables, not the distribution of one.

435
MCQhard

A machine learning team trains a deep learning model on SageMaker. The training job uses a single ml.p3.2xlarge instance and takes 12 hours. The team needs to reduce training time without changing the algorithm. Which approach is most effective?

A.Increase the learning rate
B.Switch to a larger instance type, such as ml.p3.16xlarge
C.Use managed Spot Training
D.Use SageMaker's distributed data parallelism across multiple instances
AnswerD

Distributed data parallelism scales training across GPUs, reducing wall-clock time.

Why this answer

Using SageMaker's distributed data parallelism (e.g., with SageMaker distributed training libraries) across multiple GPUs can significantly reduce training time by splitting the mini-batches across GPUs. Increasing instance type to a single larger GPU (e.g., p3.16xlarge) helps but is less effective than multi-GPU distribution. Hyperparameter tuning doesn't directly reduce training time.

Spot instances may interrupt.

436
MCQmedium

A company captures streaming data from IoT devices using Amazon Kinesis Data Streams. The data is consumed by a custom application that processes records in near real-time. Recently, the application has been falling behind, and the stream is showing increased 'iterator age' metrics in CloudWatch. Which action is MOST likely to reduce the iterator age?

A.Increase the data retention period of the stream
B.Decrease the number of shards in the stream
C.Increase the number of shards in the stream
D.Reduce the data retention period of the stream
AnswerC

More shards increase throughput, allowing the consumer to process faster.

Why this answer

The 'iterator age' metric in Amazon Kinesis Data Streams measures the time between the oldest unread record in a shard and the current time. An increasing iterator age indicates that consumers are reading data slower than it is being produced. Increasing the number of shards increases the stream's total read capacity, allowing the custom application to process records in parallel and reduce the backlog.

Exam trap

Common misconception: increasing retention period helps with processing backlogs, but retention only affects data durability, not throughput; the correct solution is to scale shards to match consumer throughput.

How to eliminate wrong answers

Option A is wrong because increasing the data retention period (up to 365 days) only extends how long records are stored, not the throughput capacity; it does not help consumers catch up. Option B is wrong because decreasing the number of shards reduces the stream's read and write capacity, worsening the backlog and increasing iterator age. Option D is wrong because reducing the data retention period (minimum 24 hours) would cause older unprocessed records to be deleted, but it does not increase read throughput or help the application process faster.

437
MCQmedium

A data scientist is analyzing a dataset with a binary target variable. They compute the correlation matrix and find that all features have correlations between -0.1 and 0.1 with the target. They suspect that the relationship might be non-linear. Which of the following techniques should they use to detect non-linear relationships?

A.ANOVA test
B.Spearman's rank correlation
C.Pearson correlation coefficient
D.Mutual information
AnswerD

Measures any kind of dependency, linear or non-linear.

Why this answer

Mutual information is the correct technique because it measures the dependency between variables and can capture any type of relationship, including non-linear and non-monotonic. Options A and C are incorrect: ANOVA is used for comparing means of categorical vs continuous variables, and Pearson correlation only measures linear relationships. Option B is also incorrect: Spearman's rank correlation captures monotonic relationships but may miss other non-linear patterns.

438
Multi-Selecthard

A company uses Amazon Redshift for data warehousing. The data engineering team notices that query performance has degraded over time. Which THREE actions should the team take to improve performance? (Choose THREE.)

Select 3 answers
A.Increase the number of nodes in the Redshift cluster
B.Define appropriate sort keys on large tables
C.Define appropriate distribution keys on large tables
D.Delete old data that is no longer needed
E.Run the ANALYZE command to update table statistics
AnswersB, C, E

Sort keys minimize the amount of data scanned, improving query performance.

Why this answer

Sort keys in Amazon Redshift define the order in which data is stored on disk within each node. By defining appropriate sort keys on large tables, the query engine can use zone maps to skip entire blocks of data that do not match the query's filter predicates, dramatically reducing the amount of data scanned and improving query performance.

Exam trap

The trap here is that candidates often confuse scaling up (adding nodes) with performance tuning, but the MLS-C01 exam expects you to recognize that data engineering best practices—like proper sort keys, distribution keys, and updated statistics—are the primary levers for improving query performance in Redshift, not just adding more hardware.

439
Multi-Selectmedium

Which THREE of the following are best practices for training deep learning models on Amazon SageMaker?

Select 3 answers
A.Disable automatic scaling to avoid interruptions
B.Use SageMaker Debugger to profile system bottlenecks
C.Use Pipe mode for training data stored in S3 to reduce startup time
D.Always use the largest instance type available for faster training
E.Use managed spot training to reduce cost
AnswersB, C, E

Debugger provides insights into GPU utilization and I/O bottlenecks.

Why this answer

SageMaker Debugger is a best practice because it provides real-time profiling of system bottlenecks such as CPU/GPU utilization, memory I/O, and network throughput during training. This allows you to identify and resolve performance issues early, optimizing training efficiency and cost. It integrates directly with SageMaker's training jobs without requiring code changes.

Exam trap

The trap here is that candidates may confuse 'avoiding interruptions' with disabling automatic scaling, when in fact automatic scaling is designed to prevent interruptions by dynamically adjusting capacity, and disabling it increases the risk of failures.

440
MCQeasy

During exploratory data analysis, a data scientist notices that a feature has a highly skewed distribution. Which transformation is most likely to make the distribution approximately normal?

A.Log transformation
B.Min-max scaling
C.One-hot encoding
D.Standardization (z-score)
AnswerA

Log transformation reduces right skewness and makes the distribution approximately normal.

Why this answer

Log transformation is commonly used to reduce right skewness and make the distribution approximately normal. Option B (min-max scaling) is incorrect because it does not change the shape of the distribution. Option C (one-hot encoding) is incorrect because it is used for categorical variables, not for transforming continuous skewed data.

Option D (standardization) is incorrect because it does not change the shape of the distribution.

441
MCQmedium

A team is using SageMaker to train a model with hyperparameter tuning. The training jobs are taking too long. The team wants to reduce time without sacrificing model quality. Which approach should they take?

A.Use random search instead of Bayesian optimization.
B.Enable early stopping in the hyperparameter tuning job.
C.Increase the maximum number of training jobs.
D.Reduce the maximum runtime per training job.
AnswerB

Early stops poorly performing training jobs, saving time.

Why this answer

Enabling early stopping terminates poorly performing training jobs early, saving time without sacrificing model quality. Option A is incorrect: random search may be faster but does not guarantee quality as it is less efficient than Bayesian optimization. Option C is incorrect: increasing the maximum number of training jobs would increase time.

Option D is incorrect: reducing the maximum runtime per training job may prevent convergence, harming model quality.

442
MCQhard

A machine learning engineer is training a deep learning model using the SageMaker built-in XGBoost algorithm. The training job is taking longer than expected. The engineer notices that the training data is stored in S3 in CSV format and is 500 GB in size. The instance type is ml.c4.8xlarge with 10 instances. Which change would most likely reduce training time?

A.Convert the data to Parquet format.
B.Increase the number of instances to 20.
C.Use Pipe input mode instead of File input mode.
D.Increase the size of the EBS volume attached to each instance.
AnswerC

Pipe mode streams data directly, reducing I/O bottleneck.

Why this answer

Pipe input mode streams data directly from S3 to the training instances without first downloading it to the local EBS volume, eliminating the I/O bottleneck of reading a 500 GB CSV file. This reduces the time spent on data loading and allows the XGBoost algorithm to begin training sooner, which is especially beneficial for large datasets.

Exam trap

The MLS-C01 exam often tests the distinction between data format optimization (Parquet) and data ingestion mode (Pipe vs. File), where candidates mistakenly choose a format change without recognizing that the primary bottleneck is the data transfer mechanism, not the storage format.

How to eliminate wrong answers

Option A is wrong because converting to Parquet format would reduce storage size and improve read efficiency, but the primary bottleneck here is the data transfer time from S3 to the instances, not the format overhead; Pipe mode addresses the transfer bottleneck more directly. Option B is wrong because increasing the number of instances to 20 would add more parallelism but also increase the overhead of data distribution and coordination, and the training job is already bottlenecked by data ingestion, not compute capacity. Option D is wrong because increasing the EBS volume size does not improve I/O throughput for reading from S3; the data must still be downloaded from S3 to the EBS volume, so the bottleneck remains.

443
MCQmedium

A data scientist is analyzing a dataset with 10 million rows and 50 columns. The target variable is highly imbalanced (99% negative, 1% positive). Which approach is most appropriate for exploratory data analysis before modeling?

A.Remove all negative examples and analyze only the positive ones.
B.Take a random sample of 100,000 rows from the entire dataset.
C.Take a stratified sample that preserves the 99:1 ratio.
D.Up-sample the minority class to balance the dataset before analysis.
AnswerC

Stratified sampling ensures representation of both classes.

Why this answer

C is correct because stratified sampling preserves the original class proportion (99:1) in the sample, which is important for exploratory data analysis on imbalanced data without artificially altering the distribution. Option A (remove all negatives) loses all negative data, preventing analysis of majority class patterns. Option B (random sample) may result in insufficient positive examples due to imbalance.

Option D (up-sample minority) would change the distribution and could lead to misleading visualizations and statistics during EDA.

444
MCQeasy

A data scientist needs to detect outliers in a dataset with multiple features that follow different distributions. Which method is most robust for multivariate outlier detection?

A.Z-score threshold
B.Interquartile range (IQR)
C.DBSCAN clustering
D.Isolation Forest
AnswerD

Correct: Isolation Forest works well for multivariate data without distributional assumptions.

Why this answer

Isolation Forest is an ensemble method that isolates anomalies effectively in high-dimensional spaces without assuming any specific distribution. Option A is wrong because Z-score assumes a normal distribution. Option B is wrong because IQR is univariate and does not capture multivariate interactions.

Option C is wrong because DBSCAN is primarily a clustering algorithm and is not specifically designed for outlier detection, though it can identify outliers as noise; however, Isolation Forest is more robust for this purpose.

445
Multi-Selecteasy

Which TWO actions should a data scientist take when exploring a dataset that contains missing values and outliers? (Select TWO.)

Select 2 answers
A.Calculate the percentage of missing values per column.
B.Normalize all features using Min-Max scaling.
C.Remove all rows with outliers.
D.Impute missing values with the mean immediately.
E.Visualize the distribution of each feature using histograms.
AnswersA, E

Missing value counts inform imputation strategy.

Why this answer

Calculating the percentage of missing values per column is a standard first step in exploratory data analysis (EDA) to quantify data completeness. This informs downstream decisions such as whether to impute, drop, or flag missing data, and helps assess the risk of bias or information loss. It is a diagnostic action, not a transformation, and should precede any imputation or removal.

Exam trap

The MLS-C01 exam often tests the distinction between EDA actions (diagnostic) and preprocessing actions (transformative), so the trap here is that candidates confuse immediate imputation or scaling with proper exploratory steps, leading them to select B, C, or D instead of the correct diagnostic actions A and E.

446
MCQmedium

A data scientist is analyzing a dataset with a target variable that is heavily imbalanced (e.g., 99% negative class, 1% positive class). Which exploratory data analysis technique is most appropriate to understand the relationship between features and the target before modeling?

A.Randomly sample 10% of the data and plot feature distributions by class.
B.Apply PCA to reduce dimensionality, then visualize the first two components.
C.Use stratified sampling to create a balanced subset, then compute correlation matrices and box plots.
D.Focus only on the majority class features to avoid bias.
AnswerC

Stratified sampling preserves class proportions, enabling meaningful EDA.

Why this answer

Stratified sampling preserves the class distribution in the sample, allowing you to create a balanced subset for exploratory analysis. Computing correlation matrices and box plots on this balanced subset reveals feature-target relationships without being overwhelmed by the majority class, which is critical for imbalanced datasets like 99% negative vs. 1% positive.

Exam trap

The trap here is that candidates may think random sampling (Option A) is sufficient for EDA, but they overlook that severe class imbalance (99:1) makes random samples uninformative for the minority class, whereas stratified sampling explicitly addresses this by ensuring both classes are represented in the analysis subset.

How to eliminate wrong answers

Option A is wrong because random sampling of 10% of the data will likely preserve the original class imbalance (99:1), so feature distributions by class will still be dominated by the negative class, obscuring patterns for the rare positive class. Option B is wrong because PCA is an unsupervised dimensionality reduction technique that does not use the target variable; the first two components may capture variance unrelated to the target, and the resulting visualization may not highlight class-specific separations. Option D is wrong because focusing only on the majority class features ignores the minority class entirely, which is the very class of interest in imbalanced problems; this approach would miss important discriminative features and introduce bias.

447
MCQmedium

An IAM policy attached to a SageMaker notebook role is shown in the exhibit. A data scientist is trying to run a training job from the notebook, but the job fails with an access denied error. The training job needs to read data from 'my-bucket' and write output to 'my-bucket'. What is the most likely cause of the failure?

A.The policy does not allow s3:ListBucket
B.The training job execution role does not have the same permissions
C.The policy does not allow sagemaker:CreateTrainingJob
D.The S3 bucket is not specified in the Resource
E.The policy does not allow s3:GetObject
AnswerB

The notebook role is used for the notebook; the training job uses an execution role that may lack permissions.

Why this answer

The IAM policy shown is attached to the SageMaker notebook role, which is used by the data scientist to interact with the notebook. However, when a training job is launched, it runs under a separate execution role (the SageMaker execution role for training jobs), not the notebook role. The training job fails because that execution role lacks the necessary S3 permissions (e.g., s3:GetObject, s3:PutObject) to read from and write to 'my-bucket'.

The notebook role's permissions are irrelevant to the training job's runtime actions.

Exam trap

The trap here is that candidates assume the notebook role's permissions automatically apply to the training job, but SageMaker requires a separate execution role for the training job, and the failure is due to that role lacking S3 permissions.

How to eliminate wrong answers

Option A is wrong because s3:ListBucket is not required for reading or writing objects; it is needed for listing bucket contents, which is not the operation causing the failure. Option C is wrong because the policy does include sagemaker:CreateTrainingJob (as shown in the exhibit), so that permission is not missing. Option D is wrong because the S3 bucket is specified in the Resource field of the policy (e.g., 'arn:aws:s3:::my-bucket/*'), so the resource is correctly defined.

Option E is wrong because the policy does allow s3:GetObject (as shown in the exhibit), so that permission is not the issue.

448
MCQeasy

A data scientist needs to run a one-time training job on a large dataset using SageMaker. The job requires a specific PyTorch version and custom dependencies. Which approach is MOST efficient?

A.Create a custom Docker container and push to ECR.
B.Launch a SageMaker notebook instance, install dependencies, and run training script.
C.Use the SageMaker PyTorch estimator with a pre-built container.
D.Use the SageMaker generic container and install PyTorch via a lifecycle configuration.
AnswerC

The framework estimator manages the container and allows adding custom dependencies via source_dir.

Why this answer

The SageMaker PyTorch estimator provides a pre-built, optimized container with the specified PyTorch version, eliminating the need to manage custom Docker images or manual dependency installation. For a one-time training job, this approach is the most efficient as it requires minimal setup and leverages SageMaker's managed infrastructure for training.

Exam trap

The MLS-C01 exam often tests the distinction between using a fully managed estimator (like PyTorch) versus manual containerization or notebook-based training, where candidates may overcomplicate the solution by choosing custom Docker (Option A) due to familiarity with containerization, missing that pre-built containers are more efficient for standard frameworks.

How to eliminate wrong answers

Option A is wrong because creating a custom Docker container and pushing it to ECR introduces unnecessary overhead for a one-time job, including Dockerfile creation, image building, and registry management, which is not efficient compared to using a pre-built container. Option B is wrong because launching a SageMaker notebook instance, installing dependencies, and running the training script manually is not a managed training solution; it requires ongoing instance management and does not scale or handle job orchestration as efficiently as the SageMaker training service. Option D is wrong because the SageMaker generic container does not include PyTorch, and installing it via a lifecycle configuration adds complexity and runtime overhead, making it less efficient than using the dedicated PyTorch estimator with a pre-built container.

449
MCQeasy

A data scientist runs the following AWS CLI command: aws s3api head-object --bucket my-bucket --key data.csv The output is: { "AcceptRanges": "bytes", "LastModified": "2021-08-21T12:00:00+00:00", "ContentLength": 1048576, "ETag": "\"d41d8cd98f00b204e9800998ecf8427e\"", "ContentType": "text/csv", "Metadata": {} } What can be concluded from the output?

A.The ETag can be used for integrity checking.
B.The file is 1 GB in size.
C.The object has S3 versioning enabled.
D.The file has not been preprocessed.
AnswerA

The ETag can be used for integrity checking, as it is an MD5 hash of the object content.

Why this answer

The ETag can be used for integrity checking, as it is an MD5 hash of the object content. Option B is wrong because ContentLength 1048576 corresponds to 1 MB, not 1 GB. Option C is wrong because S3 versioning is indicated by VersionId, not ETag.

Option D is wrong because the output does not provide any information about preprocessing; the presence of metadata like 'preprocessed' is not shown.

450
MCQmedium

A data scientist builds a Random Forest model using SageMaker. The model performs well on training data but poorly on test data. Which step is most likely to reduce overfitting?

A.Reduce the maximum depth of each tree
B.Increase the number of trees
C.Switch to a linear model
D.Increase the number of features considered at each split
AnswerA

Shallower trees reduce model complexity and help prevent overfitting.

Why this answer

Reducing the maximum depth of each tree limits the complexity of individual decision trees, preventing them from memorizing noise and specific patterns in the training data. This directly addresses overfitting by enforcing simpler, more generalized splits, which improves performance on unseen test data.

Exam trap

The trap here is that candidates often assume adding more trees (Option B) always improves generalization, but they miss that overfitting in Random Forest is primarily caused by individual trees being too deep, not by the ensemble size.

How to eliminate wrong answers

Option B is wrong because increasing the number of trees in a Random Forest does not reduce overfitting; it typically reduces variance and improves generalization, but if trees are already deep and overfit, more trees will still produce overfit predictions. Option C is wrong because switching to a linear model is an extreme and unnecessary step; Random Forest can be regularized effectively by tuning hyperparameters like max_depth, and a linear model may underfit if the data has non-linear relationships. Option D is wrong because increasing the number of features considered at each split increases tree diversity but also allows each tree to potentially overfit to more features, especially if the features are noisy or irrelevant, thus not reducing overfitting.

Page 5

Page 6 of 23

Page 7