Courseiva

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

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

Page 1

Page 2 of 23

Page 3
76
Multi-Selecthard

Which THREE measures can help reduce inference latency for a deep learning model deployed on SageMaker real-time endpoints? (Select THREE.)

Select 3 answers
A.Enable SageMaker Neo to compile the model.
B.Increase the batch size for inference.
C.Use GPU instances for inference.
D.Reduce the input data size (e.g., lower resolution images).
E.Use a multi-model endpoint to share the instance.
AnswersA, C, D

Neo optimizes models for target hardware, reducing latency.

Why this answer

A is correct because SageMaker Neo compiles the trained model into an optimized binary for the target hardware (e.g., CPU, GPU, or Inferentia), using Apache TVM to fuse operations and prune unused computations. This reduces inference latency by up to 2x without requiring code changes, making it a direct latency-reduction measure for real-time endpoints.

Exam trap

The MLS-C01 exam often tests the misconception that increasing batch size always reduces latency, but for real-time endpoints, larger batches increase per-request processing time, making it a throughput optimization, not a latency reduction technique.

77
MCQeasy

A company uses Amazon Redshift for its data warehouse. The data engineering team notices that queries are slow and wants to improve performance without changing the schema. Which action is most likely to improve query performance?

A.Decrease the number of nodes to reduce network overhead.
B.Disable compression on all tables to reduce CPU overhead.
C.Increase the number of nodes in the cluster.
D.Change the distribution style from AUTO to EVEN.
AnswerC

Adding nodes increases parallelism and improves query performance.

Why this answer

Increasing the number of nodes in an Amazon Redshift cluster distributes data and query processing across more compute resources, which directly improves parallel execution and reduces query execution time. This is the most effective way to boost performance without altering the schema, as it scales the cluster's CPU, memory, and I/O capacity.

Exam trap

The trap here is that candidates may confuse 'distribution style' with 'node count' and assume that changing to EVEN will always balance data evenly and improve performance, but in practice EVEN can cause costly data redistribution during joins, whereas scaling out nodes is a safer and more direct performance lever.

How to eliminate wrong answers

Option A is wrong because decreasing the number of nodes reduces the cluster's compute capacity and parallelism, which typically degrades query performance, and network overhead is not the primary bottleneck in Redshift. Option B is wrong because disabling compression on all tables increases the amount of data that must be read from disk and transferred over the network, raising I/O and CPU overhead, which slows queries. Option D is wrong because changing the distribution style from AUTO to EVEN may not improve performance; EVEN distributes rows evenly but can cause excessive data shuffling during joins, whereas AUTO lets Redshift choose the optimal style based on table usage, and forcing EVEN often worsens performance.

78
MCQmedium

A company uses Amazon Kinesis Data Firehose to deliver streaming data to an S3 bucket. The data is JSON and must be partitioned by year, month, and day. The delivery stream is configured with a buffer interval of 60 seconds and buffer size of 5 MB. The data producer sends about 1 MB per second. The data is arriving in S3 but the partitions are not being created as expected. What is the MOST likely reason?

A.The data is encrypted with AWS KMS and Firehose cannot write to encrypted buckets.
B.The delivery stream does not have dynamic partitioning enabled with the appropriate custom prefix.
C.The buffer interval is too short for the data volume, causing incomplete records.
D.The S3 bucket has versioning enabled, which prevents partitioning.
AnswerB

Without dynamic partitioning and the correct prefix, Firehose will not partition the data by year/month/day.

Why this answer

Kinesis Data Firehose requires dynamic partitioning to be explicitly enabled and configured with a custom prefix (e.g., 'year=!{timestamp:yyyy}/month=!{timestamp:MM}/day=!{timestamp:dd}/') to automatically partition data by year, month, and day. Without this setting, Firehose writes all data to a single S3 prefix, ignoring the desired partition structure.

Exam trap

The trap here is that candidates assume simply setting a prefix with date-like placeholders (e.g., 'data/year=2025/') is enough, but Firehose requires explicit dynamic partitioning to be enabled and the prefix must use the correct !{timestamp:...} syntax for automatic date-based partitioning.

How to eliminate wrong answers

Option A is wrong because Firehose can write to KMS-encrypted S3 buckets when the correct IAM permissions and KMS key policies are in place; encryption does not prevent partitioning. Option C is wrong because a 60-second buffer interval is sufficient for 1 MB/s data (60 MB per interval), and Firehose buffers complete records, not partial ones. Option D is wrong because S3 versioning does not affect Firehose's ability to write partitioned data; versioning simply maintains multiple versions of objects.

79
MCQmedium

A data scientist is using SageMaker Ground Truth to create a labeled dataset for object detection. After the labeling job completes, the scientist notices that the output manifest file contains incorrect labels. What is the most efficient way to correct these labels?

A.Create an incremental labeling job that includes only the mislabeled items.
B.Delete the labeling job and start over with a different set of workers.
C.Use the SageMaker console to edit the incorrect labels directly in the manifest file.
D.Create a new labeling job with the same dataset and manually verify all labels.
AnswerA

Efficiently corrects only errors.

Why this answer

SageMaker Ground Truth supports incremental labeling jobs that allow you to provide a new manifest with only mislabeled items, and the job will correct only those labels without re-labeling correctly labeled data. Option B is wrong because deleting and starting over is inefficient and loses all progress. Option C is wrong because the SageMaker console does not allow direct editing of manifest files; labels are fixed only through re-labeling.

Option D is wrong because it would re-label the entire dataset, wasting time and resources.

80
MCQhard

A financial services company is developing a fraud detection model using a highly imbalanced dataset where fraudulent transactions are only 0.1% of the data. The data scientist has trained a gradient boosting model that achieves 99.9% accuracy but only detects 20% of actual fraud cases. The business requirement is to detect at least 80% of fraud while minimizing false positives. The data scientist has access to SageMaker and can use any built-in algorithm or custom script. Which approach should the data scientist take to meet the business requirement?

A.Keep the model but adjust the classification threshold to increase recall.
B.Use random under-sampling of the majority class to balance the dataset and retrain the model.
C.Use Amazon SageMaker Random Cut Forest (RCF) algorithm for anomaly detection.
D.Use random oversampling of the minority class to balance the dataset and retrain the model.
AnswerC

RCF is designed for anomaly detection on highly imbalanced data and can detect fraud effectively.

Why this answer

Amazon SageMaker Random Cut Forest (RCF) is an unsupervised anomaly detection algorithm that is well-suited for highly imbalanced datasets like this one (0.1% fraud). Unlike supervised methods that struggle with extreme class imbalance, RCF isolates anomalies by measuring how many random cuts are needed to separate a point from the rest of the data, making it effective at detecting rare fraud cases without requiring balanced training data. This approach can meet the 80% fraud detection requirement while minimizing false positives by tuning the anomaly score threshold.

Exam trap

The trap here is that candidates assume a supervised model with threshold tuning (Option A) can solve the imbalance, but they overlook that the model's learned decision boundary is fundamentally biased, and unsupervised anomaly detection like RCF is specifically designed for such extreme imbalance scenarios.

How to eliminate wrong answers

Option A is wrong because simply adjusting the classification threshold on the existing gradient boosting model will increase recall but will also dramatically increase false positives, as the model was trained on imbalanced data and its decision boundary is already skewed toward the majority class. Option B is wrong because random under-sampling of the majority class discards a large amount of legitimate transaction data, which can lead to loss of valuable patterns and increase false positive rates, and it does not guarantee achieving 80% recall with minimal false positives. Option D is wrong because random oversampling of the minority class duplicates existing fraud examples, which can cause overfitting to those specific instances and reduce generalization, and it still relies on a supervised model that may not effectively learn the rare fraud patterns.

81
Multi-Selecteasy

Which TWO are common steps in exploratory data analysis?

Select 2 answers
A.Training a machine learning model.
B.Checking for missing values.
C.Visualizing distributions of features.
D.Deploying the model to production.
E.Tuning hyperparameters.
AnswersB, C

Missing value analysis is a key step.

82
Multi-Selectmedium

Which THREE actions should be taken to ensure data security when training a model using Amazon SageMaker with data stored in Amazon S3? (Choose 3.)

Select 3 answers
A.Use a VPC to isolate the SageMaker training job
B.Apply an S3 bucket policy that denies all access except from the SageMaker service
C.Attach an EBS volume for storing training data
D.Enable server-side encryption on the S3 bucket
E.Use an IAM role with least privilege permissions
AnswersA, D, E

Network isolation.

Why this answer

Using a VPC to isolate the SageMaker training job ensures that the training instance runs within a private network, preventing direct internet access and allowing traffic to flow only through controlled network interfaces. This reduces the attack surface and helps meet compliance requirements for data security.

Exam trap

The trap here is that candidates often confuse service-level bucket policies (like 'Deny all except SageMaker service') with IAM role-based access, leading them to select option B, which is technically invalid because SageMaker does not have a service principal for S3 access.

83
MCQmedium

A data engineer is troubleshooting an AWS Glue job that reads from an S3 bucket and writes to another S3 bucket. The job fails with an 'Access Denied' error when trying to write to the output bucket. The IAM policy attached to the Glue service role is shown. What is the MOST likely cause of the failure?

A.The user who runs the job does not have S3 permissions
B.The Glue job role does not have permissions to start a job run
C.The output bucket is not listed in the Resource of the IAM policy
D.The S3 bucket policy denies access to the Glue service
AnswerC

The policy only allows PutObject on example-bucket, not the output bucket.

Why this answer

The IAM policy attached to the Glue service role explicitly lists the output bucket in the Resource field. If the output bucket is not listed, the Glue job will receive an 'Access Denied' error when attempting to write to it, because the policy does not grant the necessary s3:PutObject permission for that bucket. This is the most direct cause of the failure.

Exam trap

The trap here is that candidates may overlook the Resource field and assume the error is due to missing actions or user permissions, rather than recognizing that the IAM policy must explicitly list the destination bucket ARN for the write operation to succeed.

How to eliminate wrong answers

Option A is wrong because the user who runs the job is not the entity making the S3 API calls; the Glue service role is. The IAM policy attached to that role is what matters, not the user's permissions. Option B is wrong because the error occurs during the write operation, not during job initiation; the job is already running, so permissions to start a job run are irrelevant.

Option D is wrong because the question states the IAM policy is the issue, and there is no mention of an S3 bucket policy; if a bucket policy denied access, it would be a separate explicit deny, but the most likely cause given the information is the missing resource in the IAM policy.

84
Multi-Selecteasy

A machine learning pipeline uses SageMaker Processing jobs for feature engineering. Which TWO are benefits of using SageMaker Processing over running a custom script on an EC2 instance?

Select 2 answers
A.Automatically manages the compute resources
B.Integrates with SageMaker Experiments for tracking
C.Provides a built-in VPC for network isolation
D.Allows use of custom Docker images from any registry
E.Supports multiple programming languages
AnswersA, B

SageMaker provisions and tears down resources.

Why this answer

SageMaker Processing automatically manages the underlying compute resources, including provisioning, scaling, and terminating instances. This eliminates the need for manual infrastructure management, which is required when running a custom script on an EC2 instance. Option B is correct because SageMaker Processing jobs natively integrate with SageMaker Experiments, allowing automatic tracking of parameters, metrics, and artifacts for reproducibility and comparison.

Exam trap

The trap here is that candidates often confuse SageMaker Processing's ability to use custom Docker images with support for any registry, but the service strictly requires images to be hosted in Amazon ECR.

85
MCQmedium

A data scientist is assigned an IAM policy as shown. The data scientist attempts to create a SageMaker endpoint to deploy a model, but the request fails. What is the most likely reason?

A.The data scientist does not have permission to upload the model to S3.
B.The data scientist does not have permission to create a training job.
C.The data scientist does not have permission to create an endpoint.
D.The data scientist does not have permission to pass roles.
AnswerC

The policy has a Deny for sagemaker:CreateEndpoint.

Why this answer

The IAM policy shown does not include the `sagemaker:CreateEndpoint` action, which is required to create a SageMaker endpoint. Even if the data scientist has permissions for other SageMaker actions like `CreateModel` or `CreateEndpointConfig`, the explicit absence of `CreateEndpoint` in the policy will cause the request to fail with an access denied error. AWS IAM policies must explicitly grant each action needed for the operation.

Exam trap

The trap here is that candidates assume that having permissions for model creation and configuration automatically implies permission for endpoint creation, but AWS requires each SageMaker API action to be explicitly listed in the IAM policy.

How to eliminate wrong answers

Option A is wrong because the policy includes `s3:PutObject` and `s3:GetObject` actions on the specified S3 bucket, so the data scientist has permission to upload the model to S3. Option B is wrong because the policy includes `sagemaker:CreateTrainingJob`, so the data scientist has permission to create a training job. Option D is wrong because the policy includes `iam:PassRole` on the specified role ARN, so the data scientist has permission to pass roles.

86
Multi-Selectmedium

A data scientist needs to deploy a model with a custom inference container. Which THREE requirements must the container meet for SageMaker hosting?

Select 3 answers
A.Provide a training script at /opt/ml/input/data
B.Use the SageMaker Python SDK to load the model
C.Implement a /ping endpoint for health checks
D.Serve on port 8080
E.Implement a /invocations endpoint for predictions
AnswersC, D, E

SageMaker uses /ping to check container health.

Why this answer

SageMaker requires custom inference containers to implement the /ping endpoint for health checks (C), serve on port 8080 (D), and implement the /invocations endpoint for predictions (E). Option A is for training containers, not inference. Option B is unnecessary; the container can load the model using any method.

87
Multi-Selecthard

A data scientist is using SageMaker to train a model. The training job needs to access data in an S3 bucket in a different AWS account. The data scientist has set up proper S3 bucket policies and IAM roles. Which THREE steps are necessary to allow SageMaker to access the cross-account S3 bucket? (Select THREE.)

Select 3 answers
A.Configure the S3 bucket policy to grant access to the SageMaker execution role ARN from the training account
B.Create a VPC endpoint for S3 in the training account
C.Create an IAM role in the data account with permissions to read from the S3 bucket
D.Use an AWS KMS key to encrypt the data in transit
E.Configure the SageMaker execution role in the training account to assume the IAM role in the data account
AnswersA, C, E

Bucket policy must allow cross-account access.

Why this answer

The S3 bucket policy in the data account must explicitly grant the SageMaker execution role ARN from the training account the necessary permissions (e.g., s3:GetObject, s3:ListBucket). This is the foundational step for cross-account access, as S3 bucket policies are resource-based policies that can specify principals from other AWS accounts.

Exam trap

The trap here is that candidates often confuse VPC endpoints or KMS encryption as mandatory for cross-account access, when in fact the core requirement is proper IAM role chaining and bucket policy configuration.

88
MCQhard

A data scientist needs to run a one-time training job on a 5 TB dataset stored in Amazon S3. The training algorithm requires random access to individual records. Which SageMaker input mode and data format combination would be MOST appropriate?

A.Use Pipe mode with Parquet format
B.Use Pipe mode with RecordIO-Protobuf format
C.Use File mode with RecordIO-Protobuf format
D.Use Pipe mode with CSV format
AnswerC

File mode downloads data to disk, allowing random access; Protobuf is efficient.

Why this answer

File mode loads the entire 5 TB dataset onto the SageMaker instance's local SSD, providing low-latency random access to individual records, which is required by the training algorithm. RecordIO-Protobuf format is optimized for SageMaker's internal data pipeline, enabling efficient deserialization and batching during training. This combination ensures the algorithm can randomly access any record without the sequential streaming constraints of Pipe mode.

Exam trap

Common misconception: Pipe mode is always faster or more efficient. However, because the algorithm requires random access to individual records, Pipe mode's sequential streaming makes it unsuitable. File mode with local SSD storage is necessary for non-sequential access to the 5 TB dataset.

How to eliminate wrong answers

Option A is wrong because Pipe mode streams data sequentially from S3, which does not support random access to individual records; Parquet format, while columnar, is not natively optimized for SageMaker's Pipe mode and would require additional parsing overhead. Option B is wrong because Pipe mode, even with RecordIO-Protobuf format, streams data in order and cannot provide random access; the algorithm would be forced to process records sequentially, violating the requirement. Option D is wrong because Pipe mode with CSV format streams data row by row, preventing random access, and CSV parsing is slower and less efficient than binary formats like RecordIO-Protobuf for SageMaker training jobs.

89
MCQmedium

A data scientist is analyzing a time series dataset of daily website traffic. The scientist notices a strong weekly seasonality. To better understand the underlying patterns, which decomposition method should the scientist use to separate the trend, seasonal, and residual components?

A.Additive decomposition using moving averages.
B.Use STL (Seasonal and Trend decomposition using Loess).
C.Fit an ARIMA model and examine residuals.
D.Apply an ETS (Error, Trend, Seasonal) model.
AnswerB

STL is robust and flexible for any seasonality.

Why this answer

STL (Seasonal and Trend decomposition using Loess) is a robust method for decomposing time series into trend, seasonal, and residual components. It can handle any seasonality period, including weekly seasonality in daily data, and is robust to outliers. Option A is wrong because additive decomposition using moving averages assumes fixed seasonal amplitude and is sensitive to outliers.

Option C is wrong because ARIMA is a forecasting model, not a decomposition method. Option D is wrong because ETS is an exponential smoothing framework for forecasting, not primarily for decomposition.

90
MCQmedium

Refer to the exhibit. A data engineer is creating an IAM policy for an AWS Glue ETL job that reads encrypted objects from an S3 bucket, transforms them, and writes the results back to the same bucket. The bucket uses SSE-KMS encryption with the KMS key specified. The ETL job is failing with an "Access Denied" error when trying to write data. What is the likely cause?

A.The policy is missing the kms:Decrypt permission
B.The policy is missing the s3:PutObjectAcl permission
C.The policy is missing the s3:PutObject permission
D.The policy is missing the kms:Encrypt permission
AnswerD

Writing with SSE-KMS requires kms:Encrypt.

Why this answer

The IAM policy must include the kms:Encrypt permission for the AWS Glue ETL job to write encrypted objects to the S3 bucket using SSE-KMS. The policy likely includes s3:PutObject, kms:Decrypt, and kms:GenerateDataKey, but kms:Encrypt is required for the write operation. Options A, B, and C are incorrect because the necessary permissions (kms:Decrypt, s3:PutObjectAcl, and s3:PutObject) are either already present or not required for writing.

91
Multi-Selecteasy

Which TWO approaches are appropriate for handling missing categorical data during exploratory data analysis? (Choose two.)

Select 2 answers
A.Use one-hot encoding to represent missingness as a binary feature.
B.Impute with the mode (most frequent) of the column.
C.Treat missing values as a separate 'Unknown' category.
D.Drop all rows with missing values in that column.
E.Impute missing values with the mean of the column.
AnswersB, C

Mode is a simple imputation for categorical data.

Why this answer

Options B and C are correct. Imputing with the mode (B) is a simple and effective method for categorical data, as it preserves the most frequent category without introducing new values. Treating missing values as a separate 'Unknown' category (C) allows the model to capture potential patterns associated with missingness, which can be informative.

Option A is incorrect because one-hot encoding is a technique for representing categorical variables, not for handling missing data; it requires the values to be known first. Option D is incorrect because dropping rows with missing values can result in significant data loss and may introduce bias, especially if missingness is not random. Option E is incorrect because mean imputation is suitable for numerical data, not categorical data.

92
MCQhard

A data scientist is exploring a dataset with 1,000 features and only 200 samples. The goal is to build a binary classifier. Which technique should be used first during exploratory data analysis to reduce dimensionality and avoid overfitting?

A.Compute pairwise correlations and remove highly correlated features.
B.Apply L1 regularization (Lasso) to select features.
C.Use t-SNE to visualize clusters and reduce dimensions.
D.Use principal component analysis (PCA) to reduce dimensions.
AnswerD

PCA reduces dimensionality while preserving variance.

Why this answer

PCA is an unsupervised dimensionality reduction technique that is well-suited for high-dimensional datasets with few samples, as it reduces features while retaining variance and helps avoid overfitting. Option A is wrong because pairwise correlation only captures linear relationships and may miss interactions, and removing correlated features may not be sufficient for high dimensionality. Option B is wrong because L1 regularization (Lasso) is a model-based feature selection method applied during training, not during initial exploratory data analysis (EDA).

Option C is wrong because t-SNE is a visualization technique for reducing dimensions to 2 or 3 for plotting, but it is not suitable for generating features for modeling and can be unstable with few samples.

93
MCQmedium

A company is training a deep learning model on Amazon SageMaker. The training job is taking a long time and the data scientist suspects that the model is overfitting. Which of the following actions can help reduce overfitting and improve generalization?

A.Increase the batch size used during training.
B.Add dropout layers to the model architecture.
C.Increase the number of training epochs.
D.Remove regularization terms from the loss function.
AnswerB

Dropout is a regularization technique that helps prevent overfitting by randomly dropping neurons during training.

Why this answer

Adding dropout layers is a regularization technique that randomly drops neurons during training to prevent overfitting. Increasing the number of epochs (Option B) would likely worsen overfitting. Using a larger batch size (Option C) can sometimes help generalization but is not a direct regularization technique.

Removing regularization (Option D) would increase overfitting.

94
MCQhard

A machine learning engineer is deploying a model using Amazon SageMaker. The model is a PyTorch model that performs real-time inference with low latency requirements. The engineer wants to use automatic scaling based on the number of concurrent requests. Which SageMaker feature should be used to achieve this?

A.Create an AWS Auto Scaling group for the SageMaker endpoint.
B.Enable Elastic Load Balancing for the endpoint.
C.Use Amazon SageMaker automatic scaling with a target tracking scaling policy.
D.Deploy the model behind Amazon API Gateway with a Lambda function.
AnswerC

This scales based on invocations per instance.

Why this answer

Amazon SageMaker automatic scaling with a target tracking scaling policy is the correct feature because it allows the endpoint to dynamically adjust the number of instances based on a predefined metric, such as the number of concurrent requests (e.g., using the SageMakerVariantInvocationsPerInstance metric). This directly meets the requirement for automatic scaling based on concurrent requests while maintaining low latency for real-time PyTorch inference.

Exam trap

The trap here is that candidates often confuse SageMaker's built-in scaling with generic AWS services like Auto Scaling groups or ELB, not realizing that SageMaker endpoints have their own integrated scaling mechanism via Application Auto Scaling.

How to eliminate wrong answers

Option A is wrong because AWS Auto Scaling groups are used for EC2 instances or other resources, not for SageMaker endpoints; SageMaker manages its own scaling mechanism. Option B is wrong because Elastic Load Balancing is not a feature of SageMaker endpoints; SageMaker endpoints use a built-in load balancer that distributes traffic across instances, but ELB is not separately configurable or required for scaling. Option D is wrong because deploying behind API Gateway with Lambda adds unnecessary latency and complexity for real-time inference, and it does not provide native SageMaker automatic scaling based on concurrent requests.

95
MCQeasy

A machine learning team is building a model to predict customer churn. They have a dataset with 10,000 samples and 50 features, including categorical variables with high cardinality (e.g., ZIP code). Which feature engineering technique is most appropriate to reduce dimensionality while preserving predictive information?

A.Principal Component Analysis (PCA)
B.One-hot encoding
C.Target encoding
D.Label encoding
AnswerC

Target encoding reduces dimensionality by replacing categories with target mean, preserving predictive information.

Why this answer

Target encoding replaces high-cardinality categories with the mean target value, reducing dimensionality while capturing predictive signal. Option A (PCA) is wrong because PCA is applied to numerical features, not categorical. Option B (One-hot encoding) is wrong because one-hot encoding creates many sparse features, increasing dimensionality.

Option D is wrong because label encoding imposes ordinality that may not exist.

96
Multi-Selecteasy

A data scientist is building a binary classifier and wants to evaluate model performance. Which THREE metrics are most commonly used?

Select 3 answers
A.Mean Absolute Error
B.RMSE
C.Precision
D.Recall
E.Accuracy
AnswersC, D, E

Common classification metric.

Why this answer

Precision is a core metric for binary classifiers, measuring the proportion of true positive predictions among all positive predictions. It is especially important when the cost of false positives is high, such as in spam detection or fraud alert systems.

Exam trap

AWS often tests the distinction between regression and classification metrics, and the trap here is that candidates mistakenly apply regression metrics like MAE or RMSE to binary classification problems.

97
MCQmedium

A deployed SageMaker endpoint is returning high latency. The model is a scikit-learn Random Forest. Which action is most likely to reduce latency?

A.Reduce the number of trees in the ensemble
B.Prune decision trees in the model
C.Increase the number of instances behind the endpoint
D.Switch to a GPU instance type
AnswerA

Fewer trees reduce computation time per inference.

Why this answer

Reducing the number of trees in a Random Forest ensemble directly decreases the total number of decision paths that must be evaluated per inference request. Since each tree contributes additively to the prediction time, fewer trees means fewer sequential or parallel evaluations, which lowers the per-request latency at the cost of some model accuracy.

Exam trap

The trap here is that candidates often confuse latency (per-request time) with throughput (requests per second) and incorrectly choose scaling out instances (Option C), or assume GPU acceleration universally speeds up inference (Option D), ignoring that scikit-learn models are CPU-only.

How to eliminate wrong answers

Option B is wrong because pruning decision trees (reducing depth or removing branches) primarily reduces model size and memory footprint, but the latency bottleneck in a Random Forest is dominated by the number of trees, not individual tree depth—pruning has a minor effect on inference time compared to reducing tree count. Option C is wrong because increasing the number of instances behind the endpoint improves throughput (handling more concurrent requests) but does not reduce the latency of a single inference request; it may even add network overhead. Option D is wrong because switching to a GPU instance type does not benefit scikit-learn Random Forest inference, as scikit-learn does not leverage GPU acceleration for tree-based models; the overhead of GPU context switching can actually increase latency.

98
MCQeasy

A data scientist is training a linear regression model to predict house prices. The dataset includes features such as square footage, number of bedrooms, and location. After training, the model achieves an R² of 0.85 on the training set but only 0.60 on the test set. Which of the following is the MOST likely cause of this discrepancy?

A.The model is overfitting the training data
B.There is multicollinearity among the features
C.The model is underfitting the training data
D.There is data leakage between the training and test sets
AnswerA

Overfitting causes high training performance but poor generalization to test data.

Why this answer

A high R² on the training set (0.85) paired with a significantly lower R² on the test set (0.60) is a classic symptom of overfitting. The model has learned noise and specific patterns in the training data that do not generalize to unseen data, causing poor test performance. Regularization techniques like Lasso or Ridge, or reducing model complexity, would typically address this issue.

Exam trap

The MLS-C01 exam often tests the distinction between overfitting and multicollinearity, where candidates mistakenly attribute a training-test R² gap to multicollinearity instead of recognizing it as a generalization failure.

How to eliminate wrong answers

Option B is wrong because multicollinearity inflates the variance of coefficient estimates but does not inherently cause a large gap between training and test R²; it affects interpretability and stability, not generalization performance directly. Option C is wrong because underfitting would result in low R² on both training and test sets (e.g., both below 0.60), not a high training R² with a much lower test R². Option D is wrong because data leakage would typically inflate both training and test R² artificially, making them both appear deceptively high, not creating a large discrepancy between them.

99
MCQhard

A data scientist is building a model to predict customer churn. The dataset contains categorical features with high cardinality (e.g., ZIP code, customer ID). Which encoding method is MOST suitable?

A.One-hot encoding
B.Label encoding
C.Hashing encoding
D.Target encoding
AnswerD

Target encoding captures information without expanding dimensionality.

Why this answer

Target encoding is most suitable for high-cardinality categorical features because it replaces each category with the mean of the target variable for that category, effectively capturing the predictive signal while keeping the feature space dense. This avoids the curse of dimensionality from one-hot encoding and the arbitrary ordinality of label encoding, which can mislead tree-based models.

Exam trap

The trap here is that candidates often choose one-hot encoding as the default for categorical data, failing to recognize that high cardinality makes it impractical, or they pick label encoding assuming it is safe for tree models, but it introduces false ordinality that can degrade performance.

How to eliminate wrong answers

Option A is wrong because one-hot encoding creates a binary column for each unique category, which with high cardinality (e.g., thousands of ZIP codes) leads to an extremely sparse feature matrix, causing memory issues and model overfitting. Option B is wrong because label encoding assigns arbitrary integer labels to categories, implying an ordinal relationship that does not exist, which can distort distance-based and tree-based models. Option C is wrong because hashing encoding maps categories to a fixed number of buckets via a hash function, which can cause collisions (different categories mapping to the same bucket) and loss of information, making it less reliable for churn prediction where each category's signal matters.

100
MCQmedium

A machine learning team is preparing a large dataset for training. The dataset consists of 10,000 CSV files, each about 100 MB, stored in Amazon S3. The team wants to transform the data using AWS Glue ETL jobs. The transformation involves filtering rows, adding new columns, and joining with a small reference table (100 KB). The team is concerned about job performance and cost. They currently have a Glue job with 10 DPU (Data Processing Units) and it takes about 2 hours to complete. The team wants to reduce the runtime and cost. Which approach should they take?

A.Use Amazon Athena to transform the data.
B.Increase the number of DPUs to 100.
C.Use Amazon EMR with Spot Instances instead of AWS Glue.
D.Convert the CSV files to Parquet format and partition the data by a column.
AnswerD

Parquet reduces I/O and partitioning reduces data scanned.

Why this answer

Converting the CSV files to Parquet format and partitioning the data by a column significantly reduces the amount of data scanned and processed by AWS Glue. Parquet is a columnar storage format that allows Glue to read only the necessary columns, and partitioning enables predicate pushdown to skip irrelevant partitions. This directly reduces I/O and compute requirements, leading to faster job runtime and lower cost without increasing DPU count.

Exam trap

AWS often tests the misconception that simply adding more compute resources (DPUs) will linearly improve performance, ignoring the critical impact of data format and partitioning on I/O and shuffle efficiency.

How to eliminate wrong answers

Option A is wrong because Amazon Athena is an interactive query service, not a data transformation engine; it cannot perform complex ETL transformations like adding columns or joining with a reference table in a single job, and it would still incur costs based on data scanned, which would be high with CSV files. Option B is wrong because increasing DPUs to 100 would linearly increase cost without addressing the root cause of slow performance—inefficient data format and lack of partitioning—and Glue jobs have diminishing returns beyond a certain DPU count due to overhead. Option C is wrong because while Amazon EMR with Spot Instances can be cost-effective, it introduces additional operational complexity (cluster management, provisioning) and does not inherently solve the performance bottleneck caused by CSV format; the team would still need to optimize data format and partitioning.

101
Multi-Selectmedium

A machine learning engineer is deploying a model on Amazon SageMaker. Which TWO steps are required to create a SageMaker endpoint?

Select 2 answers
A.Create a SageMaker model
B.Submit a training job
C.Create a SageMaker pipeline
D.Create an endpoint configuration
E.Create a SageMaker notebook instance
AnswersA, D

Model must be registered first.

Why this answer

A is correct because creating a SageMaker model is the first required step to define the model artifacts, inference code, and container image that will be used for predictions. Without a model object, SageMaker has no executable artifact to deploy behind the endpoint.

Exam trap

The trap here is that candidates confuse the training job (Option B) as a prerequisite for deployment, but SageMaker allows deploying a pre-trained model without ever running a training job, so only the model creation and endpoint configuration are mandatory.

102
MCQhard

Refer to the exhibit. A training job failed with the error shown. What is the most likely cause?

A.The model architecture is incorrect
B.The training data contains missing values or outliers that cause numerical instability
C.The instance type does not have enough memory
D.The training job exceeded the maximum runtime
AnswerB

Error indicates NaN or infinity in input.

Why this answer

The error message explicitly states that the input contains NaN or infinity, which indicates missing values or outliers in the training data. This causes numerical instability during training. Option A is incorrect because the error is about input data, not model architecture.

Option C is incorrect because the error is from the training script, not insufficient memory. Option D is incorrect because the error is about input values, not runtime limits.

103
MCQeasy

A data scientist is using Amazon SageMaker to train a model with the built-in XGBoost algorithm. The dataset contains missing values. What is the default behavior of SageMaker XGBoost regarding missing values?

A.It raises an error and stops training
B.It imputes missing values with the column mean
C.It removes rows with missing values
D.It automatically learns the best direction (left or right) for missing values during training
AnswerD

Correct. By default, XGBoost learns the best direction (left or right) for missing values at each split, minimizing the loss function.

Why this answer

SageMaker's built-in XGBoost algorithm treats missing values (i.e., NaN, None, or 0 by default) as a separate category. During training, it automatically learns the best direction (left or right) to assign missing values at each split, based on the reduction in loss. This is the default behavior (Option D).

Option A is incorrect because XGBoost does not raise an error; it handles missing values internally. Option B is incorrect because XGBoost does not impute with the column mean; that would require data preprocessing. Option C is incorrect because rows with missing values are not removed; they are included in training with the learned direction.

104
Multi-Selecthard

A company uses Amazon Redshift to run analytics on sales data. The data is loaded daily from S3 using COPY commands. The team notices that the COPY command performance degrades over time due to table bloat. The team needs to maintain query performance and reduce storage costs. Which combination of maintenance operations should the team perform regularly? (Choose THREE.)

Select 3 answers
A.Run the UNLOAD command to export data to S3 and then reload.
B.Change the distribution style of the table to KEY.
C.Run the VACUUM command to reclaim space and re-sort rows.
D.Run a DEEP COPY to recreate the table with optimal physical storage.
E.Run the ANALYZE command to update table statistics.
AnswersC, D, E

VACUUM removes deleted rows and re-sorts data.

Why this answer

The correct maintenance operations are VACUUM, DEEP COPY, and ANALYZE. VACUUM reclaims space from deleted or updated rows and re-sorts data if sort keys are defined, reducing bloat. DEEP COPY recreates the table to eliminate bloat completely by copying data to a new table and renaming.

ANALYZE updates table statistics, which helps the query planner optimize query performance. Option A (UNLOAD) is wrong because it exports data to S3, not a maintenance operation. Option B (changing distribution style) is a schema change that affects data distribution, not a regular maintenance task for bloat removal.

105
MCQmedium

A data scientist is exploring a dataset stored as a single 2 GB object in S3. The scientist wants to read only a subset of the file (e.g., the first 1000 lines) to perform initial data inspection. Which approach should the scientist take to minimize data transfer and cost?

A.Use the AWS CLI to download the entire file and then use head to get the first lines.
B.Use S3 Select with a SQL query to retrieve the first 1000 rows.
C.Use the S3 Range header to read the first 1 MB of the file and parse lines.
D.Use Amazon Athena to query the file with LIMIT 1000.
AnswerB

S3 Select efficiently retrieves only the required subset.

Why this answer

S3 Select enables retrieving a subset of data using SQL queries, such as SELECT * FROM s3object LIMIT 1000, minimizing data transfer and cost. Option A is inefficient as it downloads the entire 2 GB file. Option C retrieves bytes, not lines, and may still transfer excessive data or require multiple requests to locate line boundaries.

Option D scans the entire file with Athena, incurring cost and latency for a full table scan even with LIMIT 1000.

106
MCQmedium

A data scientist is performing exploratory data analysis on a dataset containing customer transactions. The dataset has 1 million rows with 50 features, including numerical and categorical variables. The goal is to identify patterns and potential data quality issues before building a model. Which approach should the data scientist take to efficiently explore the data?

A.Use AWS Glue DataBrew to profile the dataset, view data quality reports, and visualize distributions.
B.Use Amazon Athena to run SQL queries and generate summary statistics.
C.Use Amazon SageMaker Data Wrangler to import the data and create a flow for feature engineering.
D.Use Amazon SageMaker Ground Truth to label the data and then analyze the labels.
AnswerA

DataBrew provides an interactive interface for data profiling, cleaning, and visualization, making it suitable for EDA.

Why this answer

AWS Glue DataBrew is purpose-built for visual data preparation and profiling without writing code. It can directly profile the 1-million-row dataset, automatically generate data quality reports (e.g., missing values, outliers, data types), and provide distribution visualizations for both numerical and categorical features, making it the most efficient choice for exploratory data analysis.

Exam trap

The MLS-C01 exam often tests the distinction between tools for exploratory data analysis versus tools for data transformation or labeling, leading candidates to confuse SageMaker Data Wrangler (feature engineering) or Athena (SQL querying) with a dedicated profiling tool like DataBrew.

How to eliminate wrong answers

Option B is wrong because Amazon Athena is a serverless query engine for analyzing data in S3 using SQL, but it does not provide built-in profiling, data quality reports, or visualizations; it requires manual SQL queries to generate summary statistics, which is less efficient for exploratory analysis. Option C is wrong because Amazon SageMaker Data Wrangler is designed for importing, transforming, and creating feature engineering flows, not for initial data profiling and quality assessment; its primary purpose is preparing data for model training, not exploratory analysis. Option D is wrong because Amazon SageMaker Ground Truth is a data labeling service for creating labeled datasets, not for exploratory data analysis or profiling; using it to analyze labels would be an incorrect and inefficient use of the service.

107
MCQhard

A machine learning engineer is deploying a TensorFlow model to an Amazon SageMaker endpoint. The endpoint is behind an Application Load Balancer (ALB) for A/B testing. The engineer notices that the new variant is not receiving any traffic. What is the most likely cause?

A.The new variant's health checks are failing.
B.The ALB target group weight for the new variant is set to 0.
C.The model is not compatible with the ALB's protocol.
D.The ALB is not configured to route to SageMaker endpoints.
AnswerB

Weight of 0 means no traffic is sent.

Why this answer

If the ALB target group weight for the new variant is set to 0, the ALB will not route any traffic to that target group, even if the endpoint is healthy. In A/B testing setups, weights control the proportion of traffic sent to each variant; a weight of 0 effectively disables the variant.

Exam trap

The trap here is that candidates may confuse health check failures with traffic routing weights, assuming that a failing health check is the only reason a variant receives no traffic, when in fact a weight of 0 explicitly prevents traffic regardless of health status.

How to eliminate wrong answers

Option A is wrong because failing health checks would cause the ALB to mark the target as unhealthy and stop routing traffic, but the question states the new variant is not receiving any traffic at all, which is more consistent with a weight of 0 rather than a health check failure (which would still allow traffic if the target is healthy). Option C is wrong because TensorFlow models deployed to SageMaker endpoints use HTTPS, which is fully compatible with ALB's supported protocols (HTTP, HTTPS, gRPC). Option D is wrong because ALB can route to any HTTP/HTTPS endpoint, including SageMaker endpoints, as long as the target group is configured with the correct endpoint URL and port; there is no inherent restriction preventing ALB from routing to SageMaker.

108
MCQhard

A machine learning team is using Amazon SageMaker to train a model. The training data is stored in an S3 bucket. The team wants to ensure that the training job can access the data securely without using long-lived AWS credentials. Which approach should the team use?

A.Store AWS access keys in the training script
B.Use an S3 bucket policy that allows public access
C.Specify an IAM role in the SageMaker training job configuration
D.Create a new IAM user for each training job
AnswerC

SageMaker assumes the IAM role to access S3, providing temporary credentials and secure access.

Why this answer

SageMaker training jobs can assume an IAM role specified in the job configuration to obtain temporary security credentials via AWS Security Token Service (STS). This allows the training job to access the S3 bucket securely without embedding long-lived AWS access keys in code or configuration files.

Exam trap

The trap here is that candidates may think embedding credentials in code (Option A) is acceptable for automation, but AWS services like SageMaker are designed to use IAM roles for temporary, scoped access, making long-lived credentials unnecessary and insecure.

How to eliminate wrong answers

Option A is wrong because storing AWS access keys in the training script violates security best practices by exposing long-lived credentials that could be compromised; SageMaker provides IAM roles to avoid this. Option B is wrong because making the S3 bucket publicly accessible would expose the training data to anyone on the internet, creating a severe security risk and violating data privacy requirements. Option D is wrong because creating a new IAM user for each training job is impractical and insecure, as it would require managing many long-lived credentials and does not leverage SageMaker's built-in IAM role-based access control.

109
Multi-Selecthard

A data scientist is building a binary classification model to predict loan default. The dataset is highly imbalanced (5% default, 95% non-default). Which TWO techniques should the data scientist use to address the class imbalance?

Select 2 answers
A.Undersample the majority class
B.Use RMSE as the evaluation metric
C.Oversample the minority class using SMOTE
D.Use accuracy as the evaluation metric
E.Use class weights in the loss function
AnswersC, E

SMOTE generates synthetic samples for the minority class, balancing the dataset.

Why this answer

Oversampling the minority class using SMOTE (Synthetic Minority Oversampling Technique) is correct because it generates synthetic samples for the minority class by interpolating between existing minority instances, rather than simply duplicating them. This helps balance the dataset without introducing exact copies, which can reduce overfitting and improve the model's ability to generalize to the minority class.

Exam trap

AWS often tests the misconception that accuracy is a valid metric for imbalanced datasets, or that undersampling is always preferable to oversampling, when in fact accuracy can be highly misleading and undersampling can discard critical data.

110
MCQmedium

A data scientist is exploring a dataset stored in an Amazon S3 bucket. The dataset contains both numerical and categorical features. The scientist wants to compute summary statistics (mean, median, standard deviation) for all numerical features and count the distinct values for categorical features. Which AWS service is most appropriate for this task with minimal coding?

A.Amazon Athena
B.AWS Glue ETL jobs
C.AWS Glue DataBrew
D.Amazon SageMaker Data Wrangler
E.Amazon EMR
AnswerC

AWS Glue DataBrew provides a visual, no-code interface for data profiling, making it ideal for minimal coding.

Why this answer

AWS Glue DataBrew is the most appropriate service for this task because it provides a visual, no-code interface for data preparation and profiling. It can automatically compute summary statistics (mean, median, standard deviation) for numerical features and count distinct values for categorical features without writing any code. Amazon Athena requires writing SQL queries, which is not 'minimal coding' and is less suitable for profiling.

AWS Glue ETL jobs require writing Python or Scala code, so it is more code-intensive. Amazon SageMaker Data Wrangler also requires some setup and integration with SageMaker, and while it can perform similar tasks, it is not as straightforward for simple profiling as DataBrew. Amazon EMR requires managing clusters and writing code, making it the least minimal coding option.

111
MCQeasy

A machine learning engineer notices that the target variable in a regression dataset has a long-tailed distribution. Which visualization technique is most appropriate to assess the distribution before applying a log transformation?

A.Bar chart
B.Histogram with density curve
C.Box plot
D.Scatter plot
AnswerB

Histogram and density curve show the distribution shape, including long tails.

Why this answer

(Histogram with density curve) is the most appropriate visualization for assessing a long-tailed distribution because it clearly shows the shape, spread, and tail behavior of the target variable. A histogram with an overlaid density curve helps identify skewness and the need for a log transformation. Option A (Bar chart) is for categorical data, not continuous distributions.

Option C (Box plot) provides quartiles and outliers but does not fully reveal the distribution shape, especially the length of tails. Option D (Scatter plot) visualizes relationships between two variables, not a univariate distribution.

112
MCQhard

A data scientist is analyzing a dataset with a timestamp column and several numeric measurements. The goal is to detect seasonality and trends. Which AWS service can be used directly from SageMaker Studio to perform this analysis without writing code?

A.Amazon Forecast
B.Amazon SageMaker Data Wrangler
C.Amazon QuickSight ML Insights
D.AWS Glue DataBrew
AnswerB

Includes built-in time series analysis.

Why this answer

SageMaker Data Wrangler is the correct choice because it integrates directly with SageMaker Studio and includes built-in time series analysis capabilities such as seasonality detection and trend analysis, all without writing code. Option A (Amazon Forecast) is a forecasting service that requires a separate workflow and is not directly usable for exploratory analysis from Studio. Option C (Amazon QuickSight ML Insights) is for visualization and anomaly detection but not for time series decomposition within SageMaker Studio.

Option D (AWS Glue DataBrew) is a data preparation tool that does not provide native time series analysis features.

113
MCQmedium

A data scientist is using SageMaker to train a model that requires access to a private S3 bucket in another account. The scientist has set up the correct IAM roles and bucket policies. However, the training job fails with an access denied error. What is the most likely cause?

A.The SageMaker execution role does not have s3:GetObject permission
B.The S3 objects are encrypted with SSE-KMS and the KMS key is not accessible
C.The training instance type does not support S3 access
D.The VPC used for training does not have a route to S3 (e.g., missing VPC endpoint or NAT)
AnswerD

If training is in a VPC without S3 access, the job cannot reach S3 despite correct IAM policies.

Why this answer

When a SageMaker training job runs inside a VPC (which is common for cross-account access), the VPC must have a route to S3, either through a VPC endpoint (Gateway or Interface) or a NAT gateway. Without such a route, the training instances cannot reach the private S3 bucket in the other account, even if IAM roles and bucket policies are correctly configured, resulting in an 'access denied' error because the network path is blocked.

Exam trap

The trap here is that candidates often assume 'access denied' always means an IAM or bucket policy issue, but in cross-account scenarios with VPCs, network misconfigurations (like missing VPC endpoints) are a common hidden cause that produces the same error message.

How to eliminate wrong answers

Option A is wrong because the question states that the correct IAM roles and bucket policies have been set up, so the execution role likely already has s3:GetObject permission; the error is not due to missing IAM permissions. Option B is wrong because while SSE-KMS can cause access issues, the question specifically says the scientist set up correct IAM roles and bucket policies, and there is no mention of KMS key configuration; the most likely cause in a cross-account scenario with VPC is network connectivity. Option C is wrong because all SageMaker training instance types support S3 access via the SageMaker-managed S3 client; there is no instance type that inherently lacks S3 connectivity.

114
Multi-Selecthard

A data scientist is training a binary classification model using Amazon SageMaker's built-in XGBoost algorithm. The dataset is highly imbalanced (95% negative class, 5% positive class). The model achieves high accuracy but poor recall on the positive class. Which TWO actions should the data scientist take to improve recall without significantly sacrificing precision?

Select 2 answers
A.Perform random undersampling of the majority class.
B.Set scale_pos_weight to the ratio of negative to positive samples.
C.Increase the max_depth hyperparameter.
D.Reduce the learning rate (eta) and increase num_round.
E.Use SMOTE to generate synthetic samples of the minority class.
AnswersB, E

This parameter assigns higher weight to the minority class, penalizing misclassifications more.

Why this answer

Options B and E are correct. Using scale_pos_weight adjusts the weight of the positive class, directly addressing imbalance. SMOTE oversamples the minority class to balance the dataset.

Option A is wrong because subsampling the majority class may lose information. Option C is wrong because increasing max_depth may overfit. Option D is wrong because reducing eta may slow convergence but not directly help imbalance.

115
MCQhard

A data scientist is training a binary classifier on a dataset with 1 million rows and 500 features. The model uses XGBoost and achieves an AUC of 0.95 on the training set but only 0.72 on the test set. The scientist suspects overfitting. Which combination of hyperparameter adjustments is most likely to improve generalization?

A.Increase 'max_depth' and decrease 'learning_rate'
B.Increase 'subsample' and decrease 'colsample_bytree'
C.Decrease 'max_depth' and increase 'min_child_weight'
D.Decrease 'gamma' and increase 'learning_rate'
AnswerC

Decreasing max_depth reduces tree complexity; increasing min_child_weight prevents overfitting by requiring more samples per leaf.

Why this answer

Decreasing 'max_depth' reduces the complexity of individual trees, preventing the model from learning overly specific patterns in the training data. Increasing 'min_child_weight' forces the algorithm to require a higher sum of instance weights (hessian) before further partitioning, which acts as a regularization mechanism that discourages splits on noisy or sparse data. Together, these adjustments directly combat overfitting in XGBoost by limiting tree depth and requiring more evidence for splits, which improves generalization from the training AUC of 0.95 to a higher test AUC.

Exam trap

The MLS-C01 exam often tests the misconception that increasing regularization parameters like 'max_depth' or decreasing 'learning_rate' alone will fix overfitting, when in fact the correct approach is to reduce model complexity (decrease 'max_depth') and increase split regularization (increase 'min_child_weight').

How to eliminate wrong answers

Option A is wrong because increasing 'max_depth' makes trees deeper and more complex, which exacerbates overfitting, and decreasing 'learning_rate' alone does not compensate for the added depth; this combination would likely worsen the generalization gap. Option B is wrong because increasing 'subsample' (the fraction of rows sampled per tree) actually reduces randomness and can increase overfitting, while decreasing 'colsample_bytree' (the fraction of features sampled) adds some regularization but is insufficient to counterbalance the increased subsample; the net effect is ambiguous and not the most direct fix for overfitting. Option D is wrong because decreasing 'gamma' (the minimum loss reduction required for a split) allows more splits, increasing model complexity and overfitting, and increasing 'learning_rate' makes the model converge faster but with larger steps, which can also lead to overfitting; this combination moves in the wrong direction for regularization.

116
MCQhard

A data scientist is analyzing a dataset stored in Amazon S3 (100 GB, CSV format) using Amazon SageMaker Studio. The dataset contains 500 columns and 10 million rows. The data scientist wants to understand the distribution of each column, detect missing values, and identify outliers. However, the SageMaker Studio notebook instance runs out of memory when loading the entire dataset into a pandas DataFrame. The data scientist needs to complete the EDA efficiently without modifying the source data. What should the data scientist do?

A.Write a script that loads only a random 10% sample of rows to reduce memory usage.
B.Use AWS Glue ETL to transform the data into Parquet format and then load into pandas.
C.Launch a larger notebook instance with more memory (e.g., ml.r5.24xlarge) and reload the data.
D.Use Amazon SageMaker Data Wrangler to create a data flow that samples and profiles the data.
AnswerD

Data Wrangler can handle large datasets efficiently.

Why this answer

SageMaker Data Wrangler is purpose-built for EDA on large datasets; it automatically samples data and profiles columns without requiring the entire dataset to be loaded into memory. Option A (sampling 10% of rows) could work but risks missing critical patterns or outliers, and is less integrated than Data Wrangler. Option B (converting to Parquet with AWS Glue) adds complexity and still requires memory to load into pandas.

Option C (larger instance) may still be insufficient and is more expensive. Data Wrangler provides a seamless, integrated experience within SageMaker Studio for efficient EDA.

117
MCQeasy

During EDA, a data scientist finds that a categorical feature 'city' has 500 unique values but only 10 cities account for 90% of the data. What is a recommended way to handle the rare categories?

A.Group rare categories into a single 'Other' category.
B.Apply label encoding to all categories.
C.One-hot encode all 500 categories.
D.Drop all rows with rare categories.
AnswerA

Reduces cardinality and retains data.

Why this answer

Grouping rare categories into 'Other' reduces cardinality, avoids overfitting from high-dimensional sparse features, and retains the majority of data from the top 10 cities. Option B (label encoding) is not recommended as it imposes an arbitrary ordinal relationship that may mislead the model. Option C (one-hot encoding all 500 categories) would create 499 dummy features, leading to the curse of dimensionality and sparse data.

Option D (dropping rows with rare categories) discards potentially valuable data and may introduce bias.

118
MCQhard

A data scientist is performing exploratory data analysis on a dataset with mixed data types (numerical, categorical, text). The goal is to identify clusters of similar records. Which technique is most appropriate?

A.DBSCAN
B.Hierarchical clustering
C.K-means clustering
D.K-prototypes clustering
AnswerD

K-prototypes is designed for mixed numerical and categorical data.

Why this answer

K-prototypes extends k-means to handle mixed data by combining Euclidean distance for numerical and Hamming distance for categorical. K-means only works with numerical data. DBSCAN works on numerical data.

Hierarchical clustering typically uses numerical distance. Gower distance can be used but is less common in clustering algorithms.

119
MCQmedium

A company is building a data pipeline that ingests data from on-premises databases into Amazon S3 using AWS Database Migration Service (AWS DMS). The company wants to capture continuous changes from the source database and replicate them to S3 in near-real time. Which AWS DMS configuration should the company use?

A.Create a full-load task to copy the existing data
B.Create a full-load plus CDC task with S3 target
C.Create a validation task to compare source and target
D.Create a CDC-only task with S3 as the target endpoint
AnswerD

CDC-only captures and replicates changes in near-real time.

Why this answer

Using a CDC-only task with S3 as the target endpoint replicates continuous changes to S3. Option A is wrong because a full-load task only migrates existing data. Option B is wrong because a full-load plus CDC task includes both, but the requirement is only changes.

Option C is wrong because a validation task is for data validation, not replication.

120
Multi-Selecteasy

A company wants to deploy a machine learning model on Amazon SageMaker and needs to monitor the model's performance in production. Which TWO AWS services can be used to set up monitoring?

Select 2 answers
A.Amazon CloudWatch
B.AWS X-Ray
C.Amazon Inspector
D.Amazon SageMaker Model Monitor
E.AWS Config
AnswersA, D

CloudWatch monitors endpoint metrics like latency and invocations.

Why this answer

Amazon CloudWatch is correct because it provides comprehensive monitoring for SageMaker endpoints, including metrics like latency, invocation counts, and error rates. It can also trigger alarms and dashboards for performance degradation. Amazon SageMaker Model Monitor is correct because it specifically detects data drift, feature attribution drift, and quality issues in production models by analyzing inference data against a baseline.

Exam trap

The trap here is that candidates may confuse AWS X-Ray (application tracing) or AWS Config (resource compliance) with model monitoring, but only CloudWatch and SageMaker Model Monitor directly address production ML performance and data quality monitoring.

121
Multi-Selectmedium

A data scientist is deploying a model to a SageMaker endpoint and needs to optimize for cost while maintaining low latency. Which TWO actions should the data scientist take?

Select 2 answers
A.Use a larger instance type
B.Deploy to a single instance
C.Switch to batch transform
D.Use SageMaker Serverless Inference
E.Enable Auto Scaling on the endpoint
AnswersD, E

Pay per inference, scales automatically, cost-effective.

Why this answer

SageMaker Serverless Inference (Option D) automatically scales compute resources based on request volume, charging only for the compute time used during inference. This eliminates the cost of idle provisioned instances, making it ideal for optimizing cost while maintaining low latency for variable or intermittent traffic patterns.

Exam trap

The trap here is that candidates often assume 'larger instances' or 'single instance' are cost-saving measures, but the exam tests understanding that cost optimization for variable traffic requires dynamic scaling (Auto Scaling) or fully serverless compute, not static instance choices.

122
Multi-Selecteasy

A data analyst is using AWS Glue to catalog datasets for exploratory analysis. The analyst wants to understand the schema and data types. Which TWO tools can the analyst use to view the schema of a table in the AWS Glue Data Catalog? (Choose TWO.)

Select 2 answers
A.Amazon Athena
B.Amazon Redshift query editor
C.Amazon QuickSight
D.AWS Glue console
E.Amazon S3 console
AnswersA, D

Athena can query the Glue Data Catalog using SHOW CREATE TABLE or INFORMATION_SCHEMA.

Why this answer

Amazon Athena can query the AWS Glue Data Catalog using SQL, including viewing table schemas via the INFORMATION_SCHEMA or by running DESCRIBE statements on tables. The AWS Glue console directly displays the schema of tables in the Data Catalog under the 'Tables' section. Amazon Redshift query editor is for querying Redshift data warehouses, not for directly viewing Glue Catalog schemas unless a federated query is set up.

Amazon QuickSight is a business intelligence tool for visualizing data, not for schema exploration. Amazon S3 console only shows objects in S3 buckets, not the schema of Glue tables.

123
Multi-Selecthard

A company is using AWS Glue ETL jobs to transform data. The jobs are failing due to insufficient memory. The data processing involves complex joins and aggregations. Which THREE actions can improve job performance and reduce memory usage?

Select 3 answers
A.Filter and project data early in the transformation to reduce data volume
B.Decrease the number of DPUs allocated to the job
C.Repartition the data and use bucketing to reduce shuffle size
D.Increase the number of DPUs (workers) allocated to the job
E.Use a single node cluster to avoid shuffle overhead
AnswersA, C, D

Reduces memory footprint.

Why this answer

Filtering and projecting data early in the transformation reduces the volume of data that must be processed in subsequent operations like joins and aggregations. By using pushdown predicates and selecting only necessary columns, you minimize the data shuffled across the cluster, which directly reduces memory pressure and improves job performance in AWS Glue ETL.

Exam trap

The trap here is that candidates often assume reducing resources (Option B) or eliminating parallelism (Option E) will solve memory issues, when in fact these actions exacerbate the problem by increasing the data load per executor or removing the benefits of distributed processing.

124
MCQmedium

A data scientist is training a binary classifier on an imbalanced dataset where the positive class represents 1% of the data. The model is evaluated using accuracy, but the accuracy is 99% even though the model predicts all instances as negative. Which metric should the data scientist use to properly evaluate the model?

A.Root mean squared error (RMSE)
B.Mean squared error (MSE)
C.F1 score
D.Accuracy
AnswerC

F1 score combines precision and recall, providing a better measure for imbalanced classification.

Why this answer

The F1 score is the harmonic mean of precision and recall, making it robust to class imbalance. With 99% negative instances, accuracy is misleadingly high even if the model never predicts the positive class. F1 captures both false positives and false negatives, providing a balanced evaluation of the minority class performance.

Exam trap

The trap here is that candidates see 99% accuracy and assume the model is performing well, failing to recognize that accuracy is unreliable for imbalanced datasets, and they may incorrectly choose accuracy or a regression metric without considering the need for a precision-recall based metric like F1.

How to eliminate wrong answers

Option A is wrong because RMSE is a regression metric that measures the square root of the average squared differences between predicted and actual values, not suitable for binary classification evaluation. Option B is wrong because MSE is also a regression metric that penalizes larger errors quadratically, and it does not account for class imbalance or the confusion matrix structure. Option D is wrong because accuracy is dominated by the majority class in imbalanced datasets; a model predicting all negatives achieves 99% accuracy but fails to identify any positive instances, making it a misleading metric.

125
MCQeasy

A company is using Amazon SageMaker to train a model. The training data is stored in an S3 bucket encrypted with AWS KMS. The SageMaker training role has the necessary permissions to decrypt the data. However, the training job fails with an access denied error. What is the most likely cause?

A.The S3 bucket policy does not grant access to the training role
B.The training image is not compatible with encrypted data
C.The training role does not have kms:Decrypt permission for the KMS key
D.CloudTrail logging is disabled
E.The training job is not in the same VPC as the S3 bucket
AnswerC

KMS requires explicit decrypt permission.

Why this answer

The error message 'access denied' during a SageMaker training job with KMS-encrypted S3 data typically indicates that the training role lacks the kms:Decrypt permission for the specific KMS key used to encrypt the S3 objects. Even if the role has S3 read permissions (s3:GetObject), SageMaker must decrypt the data before reading it, which requires explicit KMS key policy or IAM policy granting kms:Decrypt. Without this, the training job fails with an access denied error.

Exam trap

The MLS-C01 exam often tests the misconception that S3 bucket policies alone control access to encrypted data, but the trap here is that KMS decryption permissions are a separate, required layer — candidates may overlook the need for kms:Decrypt when the role already has s3:GetObject.

How to eliminate wrong answers

Option A is wrong because the S3 bucket policy does not need to grant access to the training role if the role already has an IAM policy allowing s3:GetObject; the error is specifically about decryption, not S3 access. Option B is wrong because training images are containerized environments that can read decrypted data from SageMaker's managed infrastructure; compatibility with encrypted data is not a factor — the decryption happens at the S3/KMS layer before the image reads the data. Option D is wrong because CloudTrail logging is an auditing feature that records API calls but does not affect permissions or cause access denied errors during training job execution.

Option E is wrong because SageMaker training jobs can access S3 buckets across different VPCs or even outside VPCs via internet or VPC endpoints; the training job does not need to be in the same VPC as the S3 bucket, and VPC mismatch does not cause access denied errors for KMS-decrypted data.

126
MCQhard

A machine learning engineer is deploying a model that predicts customer churn. The model outputs probabilities between 0 and 1. The business requires that at least 90% of customers flagged for churn actually churn (precision >= 0.9). Currently, the model's precision is 0.85 at the default threshold of 0.5. Which threshold adjustment should the engineer consider?

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

Higher threshold increases precision by requiring higher confidence for positive predictions.

Why this answer

Increasing the threshold to 0.7 raises the probability cutoff for classifying a customer as churning. This means only customers with a high predicted probability (strong model confidence) are flagged, which reduces false positives and increases precision. Since the current precision at 0.5 is 0.85 and the goal is ≥0.9, moving the threshold higher is the correct direction to achieve the required precision.

Exam trap

The trap here is that candidates often associate higher thresholds with lower recall and assume precision will drop, but in reality, increasing the threshold filters out low-confidence positives, which reduces false positives and increases precision.

How to eliminate wrong answers

Option A is wrong because decreasing the threshold to 0.4 would classify more customers as churn, including those with lower probabilities, which typically increases false positives and lowers precision further below 0.9. Option B is wrong because decreasing the threshold to 0.3 would have an even more extreme effect, flooding the flagged set with low-confidence predictions and worsening precision. Option D is wrong because keeping the threshold at 0.5 maintains the current precision of 0.85, which does not meet the business requirement of at least 0.9.

127
MCQeasy

A team is using SageMaker to train a model. They want to track hyperparameters, metrics, and model artifacts. Which SageMaker feature should they use?

A.SageMaker Pipelines
B.SageMaker Experiments
C.SageMaker Debugger
D.SageMaker Model Registry
AnswerB

Experiments track hyperparameters, metrics, and artifacts.

Why this answer

SageMaker Experiments is the correct choice because it is purpose-built for tracking hyperparameters, metrics, and model artifacts across training runs. It automatically captures input parameters, output metrics, and artifact locations (e.g., S3 paths) for each trial, enabling comparison and lineage tracking without manual logging.

Exam trap

AWS often tests the distinction between tracking (Experiments) and orchestration (Pipelines), leading candidates to choose Pipelines because they think 'tracking a workflow' is the same as 'tracking experiment details'.

How to eliminate wrong answers

Option A is wrong because SageMaker Pipelines is a CI/CD orchestration service for building end-to-end ML workflows (e.g., data processing, training, deployment), not a tool for tracking individual experiment runs or hyperparameters. Option C is wrong because SageMaker Debugger monitors training jobs in real time for issues like vanishing gradients or overfitting, but it does not log hyperparameters or store model artifacts for experiment comparison. Option D is wrong because SageMaker Model Registry is a catalog for managing model versions, approvals, and deployment metadata, not for tracking hyperparameters or metrics from training runs.

128
MCQmedium

A data scientist is working on a project to predict customer churn for a telecom company. The dataset includes 50,000 records with 20 features, including customer demographics, account information, and service usage. The data scientist uses Amazon SageMaker Studio and loads the data into a pandas DataFrame. During EDA, the data scientist notices that the target variable 'churn' has only 10% positive cases. Additionally, several features have missing values: 'income' has 5% missing, 'age' has 2% missing, and 'total_charges' has 1% missing. The data scientist also observes that 'income' is highly skewed with a long right tail, and 'age' is moderately skewed. The data scientist wants to handle missing values and prepare the data for modeling. Which course of action is most appropriate?

A.Impute 'income' with median, 'age' with median, 'total_charges' with median, and use SMOTE to handle class imbalance after splitting the data.
B.Remove all rows with any missing values, and use random oversampling to handle class imbalance.
C.Impute 'income' with mode, 'age' with mode, 'total_charges' with mode, and use SMOTE after splitting.
D.Impute all missing values with the mean of each column, and use stratified sampling to handle class imbalance.
AnswerA

Median is robust to skewness. SMOTE is appropriate for imbalance.

Why this answer

Median imputation is robust to skewness (particularly for income and age), and SMOTE is applied after splitting to avoid data leakage and handle class imbalance. Option B is wrong because removing rows with missing values would discard roughly 8% of the data (5%+2%+1% with potential overlap), which is a significant loss of information; additionally, random oversampling may lead to overfitting. Option C is wrong because mode imputation is appropriate for categorical data, not for continuous features like income, age, and total_charges.

Option D is wrong because mean imputation is sensitive to outliers and skewness, especially for income with a long right tail; also, stratified sampling only ensures proportional representation in train/test splits, it does not generate synthetic samples to address imbalance.

129
MCQhard

A data scientist is building a model to predict housing prices using a dataset with 100,000 records and 50 features. The features include 'sqft_living', 'sqft_lot', 'bedrooms', 'bathrooms', 'floors', 'waterfront', 'view', 'condition', 'grade', etc. The data scientist uses Amazon SageMaker Data Wrangler for EDA. Upon reviewing the data, the data scientist finds that 'sqft_living' has a correlation of 0.7 with 'sqft_above' (square footage above ground) and 0.6 with 'sqft_basement'. Also, 'grade' (overall grade of the house) is highly correlated with 'condition' (0.8). The target variable 'price' is right-skewed. The data scientist plans to use a linear regression model. Which set of actions should the data scientist take to improve model performance?

A.Apply standard scaling to all numeric features and use the data as is, since linear regression is robust to multicollinearity.
B.Remove all features that have correlation >0.5 with any other feature to eliminate multicollinearity, and apply standard scaling to all numeric features.
C.Apply principal component analysis (PCA) to all features to reduce dimensionality, and then fit linear regression on the principal components.
D.Apply log transformation to the target variable 'price' to reduce skewness, and remove either 'sqft_above' or 'sqft_living' and either 'grade' or 'condition' to handle multicollinearity.
AnswerD

Log transform addresses skewness; removing one of each pair reduces multicollinearity.

Why this answer

Log-transforming the right-skewed target variable 'price' helps meet the normality assumption of linear regression residuals. Additionally, removing either 'sqft_above' or 'sqft_living' (correlated 0.7) and either 'grade' or 'condition' (correlated 0.8) reduces multicollinearity, which can destabilize coefficient estimates. Option A is incorrect because standard scaling does not address skewness or multicollinearity.

Option B is incorrect because removing all features with correlation >0.5 is too aggressive and may discard useful information. Option C is incorrect because PCA reduces dimensionality but the components may be less interpretable, and log transformation is still needed for the target.

130
MCQhard

A data scientist is setting up an IAM policy for a SageMaker notebook instance that needs to read and write data in the 'training/' folder of an S3 bucket, and also list objects in the bucket. Does the policy satisfy the requirements?

A.Yes, the policy correctly grants the required permissions.
B.No, the policy must also include s3:DeleteObject for data cleaning.
C.No, the policy misses s3:GetObject for the bucket itself.
D.No, the condition on ListBucket is invalid.
AnswerA

Assuming the policy grants the minimal permissions described, it satisfies the requirements. The explanation should note the missing policy.

Why this answer

The stem does not include the IAM policy, so the question cannot be definitively answered as written. However, assuming a typical policy that grants s3:GetObject and s3:PutObject on the training/ prefix and s3:ListBucket with a condition restricting the prefix to training/*, the policy meets the requirements. Therefore, option A is correct under that interpretation.

Option B is wrong because s3:DeleteObject is not required for reading and writing. Option C is wrong because s3:GetObject is allowed on the training/ objects, not on the bucket itself. Option D is wrong because the condition on ListBucket is valid and correctly limits listing to the training/ prefix.

Exam trap

This question is invalid because it references a policy that is not displayed. In a real exam, the policy would be shown. Traps include overlooking the condition on ListBucket or assuming extra permissions are needed.

131
MCQeasy

A data scientist is training a binary classification model on an imbalanced dataset where the positive class is rare. The model currently achieves 95% accuracy but only 10% recall on the positive class. Which metric should the data scientist prioritize to improve model performance?

A.F1 score
B.AUC-ROC
C.Precision
D.Accuracy
AnswerA

F1 score combines precision and recall, making it suitable for imbalanced datasets where both false positives and false negatives are important.

Why this answer

The F1 score is the harmonic mean of precision and recall, making it the best single metric to optimize when the positive class is rare and both false positives and false negatives are costly. With 95% accuracy but only 10% recall, the model is likely predicting the majority class almost exclusively, so improving recall without sacrificing precision is critical — the F1 score directly balances this trade-off.

Exam trap

The MLS-C01 exam often tests the misconception that accuracy is always the best metric, but the trap here is that on imbalanced datasets, accuracy is misleadingly high even when the model fails to detect the rare positive class, so candidates must recognize that F1 score (or precision-recall AUC) is the appropriate choice.

How to eliminate wrong answers

Option B (AUC-ROC) is wrong because AUC-ROC measures the model's ability to rank positive instances higher than negative ones across all thresholds, but it can be misleading on highly imbalanced datasets — a high AUC-ROC can still correspond to poor recall if the model scores all positives slightly above negatives but never predicts them. Option C (Precision) is wrong because optimizing precision alone would further reduce recall, making the model even less useful for detecting the rare positive class — precision focuses on minimizing false positives, not on capturing true positives. Option D (Accuracy) is wrong because accuracy is dominated by the majority class in imbalanced settings; a model that predicts the negative class for every instance can achieve 95% accuracy while having 0% recall, which is the exact problem described.

132
MCQeasy

A data scientist wants to deploy a PyTorch model for real-time inference with latency under 100 ms. Which AWS service is most suitable?

A.Amazon SageMaker real-time endpoint
B.Amazon SageMaker Processing
C.AWS Lambda with container image
D.Amazon SageMaker Batch Transform
AnswerA

Provides low-latency inference suitable for real-time applications.

Why this answer

Amazon SageMaker real-time endpoints are designed for low-latency inference, typically under 100 ms, by hosting a model behind an HTTPS endpoint that auto-scales based on traffic. They support PyTorch natively via pre-built containers or custom containers, making them the most suitable choice for this requirement.

Exam trap

The trap here is that candidates may confuse SageMaker Batch Transform or Lambda with real-time inference, but Batch Transform is asynchronous and Lambda has cold start overhead, neither of which guarantees sub-100 ms latency for PyTorch models.

How to eliminate wrong answers

Option B (Amazon SageMaker Processing) is wrong because it is a batch-oriented service for data processing and model training, not for real-time inference. Option C (AWS Lambda with container image) is wrong because Lambda has a maximum invocation duration of 15 minutes and cold start latency can exceed 100 ms, making it unsuitable for sub-100 ms real-time inference. Option D (Amazon SageMaker Batch Transform) is wrong because it is designed for asynchronous batch predictions on large datasets, not for real-time, low-latency inference.

133
MCQmedium

A company is using SageMaker to deploy a real-time inference endpoint for a natural language processing model. The model receives input text and returns predictions. The data scientist notices that the endpoint latency increases significantly under load. Which design change would MOST effectively reduce latency?

A.Enable data capture for monitoring
B.Switch to batch transform for real-time predictions
C.Increase the number of instances behind the endpoint
D.Use an inference pipeline to combine preprocessing and model inference
AnswerD

Inference pipelines reduce network overhead between preprocessing and prediction.

Why this answer

An inference pipeline in SageMaker allows you to chain preprocessing logic directly with the model inference within the same endpoint container. This eliminates the need for separate Lambda functions or client-side preprocessing, which reduces network round-trips and serialization overhead, thereby lowering latency under load.

Exam trap

The trap here is that candidates often assume scaling out (Option C) is the universal fix for latency, but the question specifically targets latency under load caused by preprocessing overhead, not throughput limits.

How to eliminate wrong answers

Option A is wrong because enabling data capture for monitoring adds additional I/O overhead and storage writes, which can increase latency rather than reduce it. Option B is wrong because batch transform is designed for offline, asynchronous predictions on large datasets, not for real-time inference; switching to it would break the real-time requirement and introduce significant latency due to job queuing. Option C is wrong because increasing the number of instances behind the endpoint improves throughput and availability but does not directly reduce per-request latency; it may even add slight overhead from load balancing.

134
MCQmedium

During exploratory data analysis, a data scientist notices that the distribution of a continuous feature is heavily right-skewed. Which transformation should be applied to make the distribution more symmetric for linear regression?

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

Log transformation reduces right skewness.

Why this answer

Log transformation is commonly used to reduce right skewness and make the distribution more symmetric. Standardization (z-score) does not change the shape of the distribution; it only centers and scales. One-hot encoding is for categorical features, not continuous.

Min-max scaling also does not affect skewness; it rescales the range but preserves shape.

135
MCQmedium

A company is using Amazon Kinesis Data Streams to ingest real-time clickstream data. The data is consumed by a Kinesis Data Analytics application that runs SQL queries. The application has been failing intermittently with 'ProvisionedThroughputExceededException' errors. Which action should be taken to resolve this issue?

A.Disable error logging in the Kinesis Data Analytics application.
B.Increase the record size in the Kinesis data stream.
C.Switch from Kinesis Data Analytics to Kinesis Data Firehose.
D.Increase the number of shards in the Kinesis data stream.
AnswerD

Correct: More shards increase read throughput capacity.

Why this answer

The 'ProvisionedThroughputExceededException' error indicates that the Kinesis Data Stream's read or write throughput limits have been exceeded. Increasing the number of shards in the stream directly increases the total provisioned throughput, allowing the Kinesis Data Analytics application to consume data without throttling.

Exam trap

The trap here is that candidates may confuse 'ProvisionedThroughputExceededException' with a data format or service selection issue, rather than recognizing it as a direct capacity scaling problem that requires increasing shard count.

How to eliminate wrong answers

Option A is wrong because disabling error logging does not resolve the underlying throughput issue; it only hides the error messages. Option B is wrong because increasing the record size does not increase the number of records per second or the total throughput; it may actually exacerbate throttling by consuming more capacity per record. Option C is wrong because switching to Kinesis Data Firehose does not address the throughput exception; Firehose is a delivery service that can also be throttled by the same stream limits and does not provide SQL query capabilities.

136
MCQhard

A data scientist ran a hyperparameter tuning job for an XGBoost model. The tuning job completed, but the best validation RMSE is 2.34. The data scientist believes the model can perform better. Based on the exhibit, which change to the tuning strategy is most likely to improve the model's performance?

A.Use random search instead of Bayesian optimization
B.Change the objective to binary:logistic
C.Increase the maximum value of eta to 1.0
D.Increase the static num_round hyperparameter to 500
AnswerD

The tuning job fixed num_round to 100; increasing it allows more boosting rounds, which can improve model performance.

Why this answer

Increasing the static `num_round` hyperparameter to 500 allows the model to train for more boosting rounds, which can reduce underfitting and lower the RMSE further. The current best validation RMSE of 2.34 suggests the model may not have converged, and additional rounds can help the XGBoost model learn more complex patterns, provided overfitting is monitored with early stopping.

Exam trap

The trap here is that candidates may think increasing `eta` to 1.0 accelerates learning, but they overlook that a high learning rate without sufficient boosting rounds or regularization often causes the model to overshoot the optimal solution, degrading RMSE.

How to eliminate wrong answers

Option A is wrong because random search is less efficient than Bayesian optimization for hyperparameter tuning, as it does not learn from previous trials to focus on promising regions, so switching to random search would likely degrade performance. Option B is wrong because changing the objective to binary:logistic is for binary classification tasks, but the RMSE metric indicates a regression problem, so this would be a fundamental mismatch. Option C is wrong because increasing the maximum value of `eta` (learning rate) to 1.0 would make the model take overly large steps during training, likely causing divergence or poor convergence, which would worsen RMSE rather than improve it.

137
MCQeasy

A data engineering team needs to orchestrate a complex workflow that involves multiple AWS Glue jobs, Lambda functions, and S3 operations. The workflow must run on a schedule and allow monitoring of each step. Which AWS service should they use?

A.Amazon Simple Workflow Service (SWF)
B.AWS Step Functions
C.AWS Data Pipeline
D.Amazon CloudWatch Events
AnswerB

Step Functions provides state machines to orchestrate multi-step workflows.

Why this answer

AWS Step Functions is a serverless orchestration service that lets you coordinate multiple AWS services, including AWS Glue jobs, Lambda functions, and S3 operations, into a state machine workflow. It provides built-in scheduling via Amazon EventBridge (formerly CloudWatch Events) and offers visual monitoring, logging, and error handling for each step, making it the ideal choice for complex, multi-step workflows that require observability.

Exam trap

The trap here is that candidates often confuse AWS Step Functions with Amazon CloudWatch Events (EventBridge) because both can schedule tasks, but they fail to recognize that EventBridge only triggers a single target per rule and cannot orchestrate multi-step workflows with conditional logic, retries, or parallel execution.

How to eliminate wrong answers

Option A is wrong because Amazon Simple Workflow Service (SWF) is a legacy service designed for long-running, human-interactive workflows and does not natively integrate with modern AWS services like Glue or Lambda as seamlessly as Step Functions; it also lacks the built-in scheduling and visual monitoring capabilities required. Option C is wrong because AWS Data Pipeline is primarily a batch data processing and movement service focused on ETL jobs with predefined activities, not a general-purpose workflow orchestrator for arbitrary AWS services like Lambda or Glue jobs; it also does not provide step-level monitoring or retry logic for custom workflows. Option D is wrong because Amazon CloudWatch Events (now part of Amazon EventBridge) is a scheduling and event routing service that can trigger workflows but cannot orchestrate multiple steps with dependencies, error handling, or state management; it only initiates a single target per rule, not a multi-step sequence.

138
MCQmedium

A data scientist is analyzing a dataset with a skewed target variable for a regression problem. During EDA, the scientist wants to transform the target variable to approximate a normal distribution. Which transformation should the scientist apply first?

A.Quantile transformation
B.Min-Max scaling
C.Log transformation
D.Box-Cox transformation
AnswerD

Box-Cox automatically finds the best power transformation to achieve normality.

Why this answer

Box-Cox transformation (D) is a parametric transformation that identifies the optimal power transformation to make data more normally distributed. For skewed target variables in regression, it is often preferred as a first approach because it can handle various skewness patterns and includes log transformation as a special case (lambda=0). Quantile transformation (A) is non-parametric and can overfit; Min-Max scaling (B) only rescales range, not shape; Log transformation (C) is a specific case that works for positive data but may not be optimal for all skewness.

Therefore, Box-Cox is the best first choice.

139
MCQhard

A data scientist is training an LSTM model for time series forecasting using Amazon SageMaker. The model is overfitting. Which action is LEAST likely to reduce overfitting?

A.Add dropout layers
B.Increase the number of LSTM layers
C.Reduce the number of hidden units
D.Use early stopping
AnswerB

Increases complexity, likely overfits more.

Why this answer

Increasing the number of LSTM layers (Option B) is least likely to reduce overfitting because it increases model complexity, which can actually worsen overfitting. In contrast, adding dropout layers (Option A), reducing the number of hidden units (Option C), and using early stopping (Option D) are all techniques that help reduce overfitting by imposing regularization or limiting training time.

140
MCQmedium

A data engineer is using Amazon SageMaker Data Wrangler to perform exploratory data analysis on a large dataset stored in S3. The analysis reveals high cardinality in a categorical feature with over 1 million unique values. What is the best approach to handle this before training a model?

A.Apply one-hot encoding.
B.Use label encoding to convert categories to integers.
C.Drop the high-cardinality feature.
D.Use target encoding based on the mean of the target variable per category.
AnswerD

Target encoding reduces cardinality and captures target relationship.

Why this answer

Target encoding (also known as mean encoding) replaces each category with the mean of the target variable for that category, effectively handling high cardinality without exploding dimensionality or imposing ordinal relationships. Option A is wrong because one-hot encoding on a feature with 1 million unique values would create over 1 million columns, making the dataset sparse and computationally expensive. Option B is wrong because label encoding assigns arbitrary integers, which may introduce unintended ordinal relationships and mislead the model.

Option C is wrong because dropping the feature could discard valuable predictive information.

141
MCQmedium

A data scientist runs the AWS CLI command shown in the exhibit to list objects larger than 100 KB in an S3 bucket. The data scientist wants to understand the size distribution of these files. What is the most significant limitation of this approach for EDA?

A.The command only returns objects larger than 100 KB, not equal to.
B.The command may return incomplete results if there are more than 1000 objects.
C.The command uses the wrong query syntax and will fail.
D.The command does not return the file names, only sizes.
AnswerB

S3 list-objects returns up to 1000 objects per call; pagination is required for more.

Why this answer

The AWS CLI `list-objects` command returns a maximum of 1000 objects by default. If the bucket contains more than 1000 objects larger than 100 KB, the command will only return the first 1000, leading to incomplete results for EDA. Option A is incorrect because the command uses `> 100000` which excludes objects exactly 100 KB, but that is not the most significant limitation.

Option C is incorrect because the query syntax is valid. Option D is incorrect because the command does return the object keys (file names) as well as sizes.

142
MCQmedium

A data scientist is using Amazon SageMaker Data Wrangler to explore a dataset. They notice that a feature has a very high correlation (0.95) with the target variable. What should they do to avoid overfitting?

A.Use L2 regularization in the model
B.Apply PCA to reduce dimensionality
C.Standardize the feature using StandardScaler
D.Remove the feature from the dataset
AnswerD

Correct: High correlation with target can indicate data leakage; removing is safest.

Why this answer

The feature with a 0.95 correlation to the target is likely leaking target information (data leakage), which would cause the model to overfit on training data but fail on new data. Removing the feature (Option D) directly addresses the leakage. Option A (L2 regularization) helps with overfitting from noisy features but does not remove the leaked information.

Option B (PCA) reduces dimensionality but the leak would still be present in the principal components. Option C (StandardScaler) only normalizes the feature, not removes it. Therefore, the best action is to remove the feature.

143
MCQeasy

A data scientist is training a regression model on a dataset with 50 features. After training a linear regression model, the model achieves an R-squared of 0.85 on the training set but only 0.55 on the test set. Which technique is most likely to reduce the generalization error?

A.Add more features
B.Remove highly correlated features
C.Increase the polynomial degree of the model
D.Apply L2 regularization (Ridge regression)
AnswerD

L2 regularization shrinks coefficients, reducing variance and improving test performance.

Why this answer

The model exhibits high variance (overfitting): high training R² (0.85) but much lower test R² (0.55). L2 regularization (Ridge regression) shrinks coefficients toward zero, reducing model complexity and penalizing large weights, which directly combats overfitting and improves generalization to unseen data.

Exam trap

AWS often tests the distinction between overfitting (high variance) and underfitting (high bias), and candidates mistakenly choose feature removal or polynomial adjustment when regularization is the direct fix for variance-dominated error.

How to eliminate wrong answers

Option A is wrong because adding more features would increase model complexity and likely worsen overfitting, not reduce generalization error. Option B is wrong because removing highly correlated features addresses multicollinearity, which inflates coefficient variance but is not the primary cause of the large train-test gap (overfitting) seen here. Option C is wrong because increasing the polynomial degree would further increase model flexibility and exacerbate overfitting, leading to even lower test performance.

144
MCQmedium

A data scientist is training a multiclass classification model to categorize support tickets into 50 categories. The dataset has 100,000 labeled tickets. The scientist uses a random forest classifier with 100 trees. The model achieves 90% accuracy on the test set, but the F1-score for some rare categories is below 0.1. The scientist wants to improve performance on rare categories without significantly reducing overall accuracy. Which approach should the scientist try?

A.Increase the maximum depth of trees
B.Reduce the number of trees to 50 to prevent overfitting
C.Switch to a one-vs-rest logistic regression model
D.Use class_weight='balanced' or compute custom class weights
AnswerD

Class weights penalize misclassifications of rare classes more heavily.

Why this answer

(use class_weight='balanced' or compute custom class weights) helps the model focus on rare classes by assigning higher penalties to misclassifications of minority classes. Option B (reduce the number of trees to 50) may reduce model capacity and hurt overall performance. Option C (switch to a one-vs-rest logistic regression model) may not handle rare classes well without class weighting.

Option A (increase the maximum depth of trees) could lead to overfitting and may not address class imbalance.

145
MCQmedium

A company uses AWS Glue ETL jobs to process data from multiple sources. The job fails with the error: 'An error occurred while calling o123.pyWriteDynamicFrame. Insufficient memory.' The job runs on a G.1X worker type with 10 workers. What should be changed to resolve this error?

A.Increase the number of workers to 20.
B.Enable the Spark UI to monitor the job.
C.Change the worker type to G.2X.
D.Reduce the number of partitions in the DynamicFrame.
AnswerA

More workers increase parallelism and reduce memory pressure per worker.

Why this answer

The error 'Insufficient memory' in AWS Glue ETL jobs typically indicates that the total memory across all executors is insufficient for the data being processed. Increasing the number of workers from 10 to 20 doubles the total memory and compute capacity available, allowing the job to handle larger datasets without running out of memory. This is the most direct and effective fix for a memory exhaustion error when using the G.1X worker type.

Exam trap

The trap here is that candidates often confuse 'insufficient memory' with a per-worker memory limit and choose to upgrade the worker type (G.2X), but the error is about total cluster memory, which is more effectively addressed by increasing the number of workers.

How to eliminate wrong answers

Option B is wrong because enabling the Spark UI only provides monitoring and debugging capabilities; it does not allocate additional memory or resolve the underlying memory shortage. Option C is wrong because changing the worker type to G.2X doubles the memory per worker (from 16 GB to 32 GB), but the error is about total memory insufficiency, and increasing the number of workers (option A) is a more scalable and cost-effective approach that directly addresses the error without requiring a change in worker type. Option D is wrong because reducing the number of partitions in the DynamicFrame would actually increase the data size per partition, potentially worsening memory pressure on individual executors, not resolving the overall memory shortage.

146
MCQhard

A team is deploying a model for fraud detection. The dataset is highly imbalanced (99% legitimate, 1% fraudulent). They trained a logistic regression model and achieved 99% accuracy on the test set. However, the model fails to detect most fraud cases. Which metric should the team focus on to evaluate the model?

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

Recall measures the proportion of actual fraud cases correctly identified.

Why this answer

For imbalanced datasets, accuracy is misleading because it can be high even if the model misses all fraud cases. Recall (true positive rate) measures the proportion of actual fraud cases correctly identified. Option A (Mean squared error) is for regression tasks, not classification.

Option B (Precision) measures the proportion of predicted fraud cases that are actually fraud, but it may be high even if recall is low. Option D (Accuracy) is high (99%) but does not reflect the model's poor performance on the minority class. Therefore, recall is the most appropriate metric.

147
MCQmedium

A company's machine learning model is overfitting to the training data. The data scientist has already tried reducing the model complexity and adding regularization, but the model still overfits. Which technique could the data scientist use to further reduce overfitting?

A.Use data augmentation to increase the training dataset size
B.Decrease the batch size
C.Increase the number of training epochs
D.Increase the learning rate
AnswerA

Data augmentation creates more training examples, which helps the model generalize better and reduces overfitting.

Why this answer

Data augmentation artificially increases the size and diversity of the training dataset by applying transformations (e.g., rotations, flips, noise injection) to existing samples. This exposes the model to more varied examples, reducing its tendency to memorize noise and improving generalization — directly countering overfitting when other methods have failed.

Exam trap

The MLS-C01 exam often tests the misconception that hyperparameter tuning (e.g., batch size, learning rate) is a primary cure for overfitting, when in fact these parameters primarily affect optimization dynamics, not the fundamental data scarcity or memorization issue that data augmentation directly addresses.

How to eliminate wrong answers

Option B is wrong because decreasing the batch size introduces noisier gradient estimates, which can sometimes act as a mild regularizer, but it does not fundamentally address overfitting caused by insufficient or repetitive training data. Option C is wrong because increasing the number of training epochs typically worsens overfitting by allowing the model more iterations to memorize the training set. Option D is wrong because increasing the learning rate can destabilize training (e.g., divergence) and does not reduce overfitting; it may even cause the model to skip over generalizable minima.

148
MCQmedium

A machine learning engineer is deploying a model to an Amazon SageMaker endpoint for real-time inference. The model requires a preprocessing step that involves tokenizing text and converting it to a numerical format. To minimize latency, where should the preprocessing logic be implemented?

A.Inside the SageMaker inference container using the inference.py script
B.Using Amazon SageMaker batch transform
C.As a separate AWS Lambda function called before the endpoint
D.On the client side before sending the request
AnswerA

Including preprocessing in the container reduces latency by processing data locally.

Why this answer

To minimize latency, it's best to include the preprocessing logic inside the inference container that serves the model. This avoids additional network calls to separate preprocessing services.

149
MCQmedium

A data scientist is using SageMaker to train a deep learning model for image classification. The training job is taking too long. Which approach can reduce training time?

A.Use SageMaker's distributed data parallelism
B.Use SageMaker Neo to compile the model
C.Increase the number of epochs
D.Use a smaller image size
AnswerA

Distributed training speeds up training by parallelizing across GPUs.

Why this answer

SageMaker's distributed data parallelism splits the training data across multiple GPUs or instances, allowing each worker to process a different subset of the data simultaneously. This reduces the wall-clock time per epoch by parallelizing the computation, which directly addresses the 'taking too long' issue for deep learning image classification models.

Exam trap

AWS often tests the distinction between training acceleration (distributed data parallelism) and inference optimization (Neo), leading candidates to mistakenly choose Neo for training speed improvements.

How to eliminate wrong answers

Option B is wrong because SageMaker Neo compiles trained models for optimized inference on target hardware, not for speeding up training. Option C is wrong because increasing the number of epochs increases training time, the opposite of what is needed. Option D is wrong because using a smaller image size reduces model accuracy and may not significantly reduce training time if the model architecture and batch size remain unchanged; it is a data preprocessing choice, not a training acceleration technique.

150
MCQhard

A company's ML pipeline uses AWS Step Functions to orchestrate data preprocessing, training, and evaluation. The training step occasionally fails due to a transient error. What is the most robust way to handle this without manual intervention?

A.Implement a retry policy with exponential backoff on the training step in the state machine
B.Configure a CloudWatch alarm to notify the team when the step fails
C.Use a parallel state to run multiple training instances simultaneously
D.Use a custom Lambda function to catch the error and restart the training step
AnswerA

Step Functions supports retry policies for transient errors.

Why this answer

AWS Step Functions natively supports retry policies with exponential backoff, which automatically retries failed tasks after a delay that increases progressively. This handles transient errors (e.g., resource contention, network glitches) without manual intervention, making the pipeline robust and self-healing.

Exam trap

The trap here is that candidates often over-engineer solutions (like custom Lambda functions) or choose monitoring-only options, missing the fact that Step Functions has a built-in, declarative retry mechanism that is the simplest and most robust approach for transient failures.

How to eliminate wrong answers

Option B is wrong because a CloudWatch alarm only notifies the team of a failure; it does not automatically recover the step, requiring manual intervention to restart the pipeline. Option C is wrong because running multiple training instances in parallel does not handle a single step's failure; it increases cost and complexity without addressing transient errors in the specific failing step. Option D is wrong because using a custom Lambda function to catch errors and restart the step is an anti-pattern; Step Functions already provides built-in retry logic, and a Lambda adds unnecessary complexity, latency, and potential for additional failure points.

Page 1

Page 2 of 23

Page 3