Courseiva

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

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

Page 15

Page 16 of 23

Page 17
1126
MCQeasy

A data scientist is using Amazon SageMaker to train a model. The training job is taking longer than expected. The data scientist notices that the GPU utilization is low. Which action would most likely improve GPU utilization?

A.Change to a CPU-based instance
B.Increase the batch size
C.Decrease the batch size
D.Use a larger instance type
E.Enable data augmentation
AnswerB

Larger batch sizes keep GPU busy.

Why this answer

Low GPU utilization during training often indicates that the GPU is waiting for data to process, a condition known as data bottleneck. Increasing the batch size allows the GPU to process more samples per forward/backward pass, keeping it busier and improving utilization. In SageMaker, this directly impacts the training loop by reducing the frequency of data loading and model update steps.

Exam trap

The trap here is that candidates often assume low GPU utilization means the GPU is underpowered, leading them to choose a larger instance (Option D), when in fact the issue is a data bottleneck that can be mitigated by increasing batch size.

How to eliminate wrong answers

Option A is wrong because switching to a CPU-based instance would likely worsen performance, as CPUs are slower for parallel matrix operations than GPUs. Option C is wrong because decreasing the batch size reduces the amount of work per GPU step, potentially increasing idle time and lowering utilization further. Option D is wrong because using a larger instance type (e.g., more GPUs or faster GPUs) does not address the root cause of low utilization; it may even exacerbate the bottleneck if data loading is the issue.

Option E is wrong because enabling data augmentation adds computational overhead to the data pipeline, which can further slow data delivery and reduce GPU utilization.

1127
MCQeasy

A company is building a recommendation system for an e-commerce platform. The data includes user IDs and item IDs. Which SageMaker built-in algorithm is most appropriate?

A.BlazingText
B.XGBoost
C.Factorization Machines
D.Image Classification
AnswerC

Designed for recommendation.

Why this answer

Factorization Machines (FM) are specifically designed for recommendation tasks with sparse, high-dimensional categorical data like user IDs and item IDs. They model pairwise interactions between features (e.g., user-item interactions) using factorized parameters, making them highly effective for collaborative filtering and implicit feedback scenarios in e-commerce.

Exam trap

The trap here is that candidates often choose XGBoost (B) because it is a versatile algorithm, but they overlook that FM is purpose-built for sparse, high-dimensional interaction data and directly models pairwise feature interactions without manual feature engineering.

How to eliminate wrong answers

Option A is wrong because BlazingText is optimized for word embeddings and text classification, not for collaborative filtering or sparse user-item interaction matrices. Option B is wrong because XGBoost is a gradient boosting tree-based algorithm that struggles with extremely sparse, high-cardinality categorical features without extensive feature engineering, and it does not inherently model pairwise interactions like FM. Option D is wrong because Image Classification is designed for convolutional neural network tasks on pixel data, not for tabular or recommendation data with user and item IDs.

1128
MCQhard

A data engineer is building a data pipeline that uses AWS Lambda to process records from an SQS queue and write results to an S3 bucket. The Lambda function processes each record individually and writes a separate file to S3. The team notices high latency and wants to reduce the number of S3 PUT requests to improve performance and reduce cost. Which approach should the data engineer take?

A.Use S3 multipart upload for each record to improve throughput.
B.Increase the Lambda function's memory allocation to improve processing speed.
C.Use S3 Batch Operations to process the records in batches.
D.Aggregate multiple records into a single file in a DynamoDB table, then periodically write the aggregated data to S3.
AnswerD

Aggregation reduces the number of S3 PUT requests by writing larger files less frequently.

Why this answer

It reduces the number of S3 PUT requests by aggregating multiple records into a single file in DynamoDB and then periodically writing the aggregated data to S3. This approach directly addresses the high latency and cost issue caused by writing a separate S3 object per record, as S3 PUT requests are billed per operation and have overhead. By batching records before writing, the pipeline reduces the total number of PUT requests, improving throughput and lowering costs.

Exam trap

The trap here is that candidates often confuse 'multipart upload' (Option A) with batching, but multipart upload is for large files, not for reducing the count of small PUT requests, and they may overlook that S3 Batch Operations (Option C) is a post-ingestion tool, not a streaming aggregation mechanism.

How to eliminate wrong answers

Option A is wrong because S3 multipart upload is designed for large objects (over 100 MB) to improve upload throughput and resilience, not for reducing the number of PUT requests for many small records; using it per record would actually increase overhead and cost. Option B is wrong because increasing Lambda memory allocation improves CPU and network throughput for a single invocation, but it does not reduce the number of S3 PUT requests or address the fundamental issue of writing one file per record. Option C is wrong because S3 Batch Operations is used for bulk actions on existing S3 objects (e.g., copying, tagging, restoring), not for processing records from an SQS queue or writing aggregated data from a Lambda pipeline.

1129
MCQeasy

A data engineer needs to ingest streaming data from an on-premises Kafka cluster into Amazon S3 with minimal operational overhead. Which AWS service should be used to stream the data into S3 without managing servers?

A.Amazon Kinesis Data Streams
B.AWS Glue
C.Amazon Managed Streaming for Apache Kafka (Amazon MSK)
D.Amazon Kinesis Data Firehose
AnswerD

Kinesis Data Firehose can directly ingest streaming data and deliver to S3 without managing servers.

Why this answer

Amazon Kinesis Data Firehose is the correct choice because it is a fully managed service that can directly ingest streaming data from an on-premises Kafka cluster (via a Kinesis Data Firehose HTTP endpoint or a custom producer) and deliver it to Amazon S3 without requiring any server management. It handles scaling, buffering, and compression automatically, minimizing operational overhead.

Exam trap

The trap here is that candidates often confuse Amazon MSK (a managed Kafka cluster) with a direct S3 ingestion service, but MSK still requires you to build and manage the pipeline to S3, whereas Kinesis Data Firehose is purpose-built for serverless streaming to destinations like S3.

How to eliminate wrong answers

Option A is wrong because Amazon Kinesis Data Streams is a real-time data streaming service that requires you to manage consumers and write custom code to load data into S3, which increases operational overhead. Option B is wrong because AWS Glue is a serverless ETL service for batch data processing and cataloging, not designed for real-time streaming ingestion into S3. Option C is wrong because Amazon MSK is a managed Kafka service that still requires you to manage Kafka producers, consumers, and configurations, and does not directly stream data into S3 without additional components like Kafka Connect or custom consumers.

1130
MCQhard

A company has a real-time inference endpoint on Amazon SageMaker that uses a custom container. The endpoint is experiencing high latency and occasional 502 errors. The logs from the container show that the model inference time is low, but the overall response time is high. Which step is MOST likely to reduce the latency?

A.Switch to batch transform to process requests in batches
B.Use a larger instance type for the endpoint
C.Optimize the model to reduce inference time
D.Increase the number of instances and enable auto-scaling
AnswerD

More instances can handle more concurrent requests, reducing queuing and latency.

Why this answer

Increasing the number of instances and enabling auto-scaling helps distribute the incoming request load, reducing queuing delays at the endpoint. The logs show inference time is low, so the high latency is likely due to request queuing behind other requests. Scaling out addresses this.

Option A is wrong because batch transform is designed for offline, batch processing, not real-time inference. Option B is wrong because using a larger instance type may provide more compute but does not directly address queuing; it is also less cost-effective than scaling out. Option C is wrong because the model inference time is already low, so further optimization would have minimal impact on overall latency.

1131
MCQmedium

A model deployed on a SageMaker endpoint is producing predictions that are consistently biased against a certain demographic. Which step should the team take FIRST to address this issue?

A.Enable SageMaker Model Monitor to track prediction quality
B.Switch to a different algorithm that is less prone to bias
C.Use SageMaker Clarify to analyze bias in the training data and predictions
D.Retrain the model with balanced data
AnswerC

Clarify can detect and explain bias, guiding corrective actions.

Why this answer

The first step is to analyze the data and model for bias. SageMaker Clarify can detect bias in training data and predictions, making option C the correct first step. Option A (SageMaker Model Monitor) tracks prediction quality but does not specifically analyze bias.

Option B (switching algorithm) is a reactive change without understanding the bias source. Option D (retraining with balanced data) is a potential fix but should come after bias analysis.

1132
MCQhard

A team is using Amazon SageMaker Data Wrangler to perform exploratory data analysis on a large dataset stored in S3. The dataset contains missing values, outliers, and categorical variables with high cardinality. The team wants to understand data distributions and relationships before modeling. Which combination of Data Wrangler features should they use?

A.Generate a data quality report, view histograms, and create scatter plots for selected features.
B.Drop rows with missing values and visualize box plots for numerical features.
C.Use imputation to handle missing values and one-hot encoding for categorical features.
D.Generate a data quality report and a correlation heatmap.
AnswerA

Data quality report provides summary statistics and missing values; histograms and scatter plots show distributions and relationships.

Why this answer

SageMaker Data Wrangler provides built-in features for exploratory data analysis, including data quality reports (with summary statistics and missing value analysis), histograms for distribution visualization, and scatter plots to explore relationships between features. These are ideal for understanding distributions and correlations early in the pipeline. Option B is incorrect because dropping rows is a data cleaning transformation, not an EDA step, and box plots alone are insufficient for understanding relationships.

Option C is incorrect because imputation and one-hot encoding are data preparation transformations applied after EDA. Option D is incorrect because while Data Wrangler generates a data quality report, it does not directly include correlation heatmaps; scatter plots (as in A) are a more direct way to assess relationships.

1133
MCQhard

A data scientist is performing exploratory data analysis on a large dataset stored in Amazon S3 (100 GB, CSV format, 500 columns). The dataset contains customer transaction records with features such as transaction amount, timestamp, customer ID, and numerous categorical variables (e.g., product category, payment method, location). The scientist wants to understand the distribution of transaction amounts across different product categories and identify any outliers. They have an Amazon SageMaker notebook instance with a ml.t3.medium instance and are using pandas. However, when trying to load the entire dataset into a DataFrame using pd.read_csv('s3://bucket/data.csv'), the notebook crashes with a memory error. Additionally, the scientist suspects that some categorical columns have high cardinality (e.g., product category has thousands of unique values), and there are missing values in several columns. What is the MOST efficient approach to perform the EDA without modifying the original dataset or using additional AWS services? Options: A) Use the SageMaker SDK to launch a parallel processing job with PySpark and read the data into a Spark DataFrame, then compute statistics and visualize with matplotlib. B) Use pandas with chunksize parameter to iterate through the dataset in chunks, compute per-chunk statistics, and aggregate results; for high-cardinality columns, use value_counts() with dropna=False and then plot the top 20 categories. C) Use the S3 Select API to filter rows and columns before loading into pandas, reducing the data size; then use pandas for EDA. D) Use SageMaker Data Wrangler to import the dataset, create a flow to handle missing values and reduce cardinality, and export a sample to the notebook for analysis.

A.Use the SageMaker SDK to launch a parallel processing job with PySpark and read the data into a Spark DataFrame, then compute statistics and visualize with matplotlib.
B.Use the S3 Select API to filter rows and columns before loading into pandas, reducing the data size; then use pandas for EDA.
C.Use SageMaker Data Wrangler to import the dataset, create a flow to handle missing values and reduce cardinality, and export a sample to the notebook for analysis.
D.Use pandas with chunksize parameter to iterate through the dataset in chunks, compute per-chunk statistics, and aggregate results; for high-cardinality columns, use value_counts() with dropna=False and then plot the top 20 categories.
AnswerD

Directly solves memory issue by chunking; handles high cardinality by limiting to top categories; no extra services needed.

Why this answer

It addresses the memory issue by reading the data in chunks using the chunksize parameter, allowing processing without loading the entire dataset into memory. It computes per-chunk statistics and aggregates them, which is efficient for EDA. For high-cardinality categorical columns, it uses value_counts() with dropna=False to capture missing values, and then plots the top 20 categories, which is manageable and insightful.

This approach stays within pandas and the existing SageMaker notebook without requiring additional services or changing the dataset. Option A is incorrect because launching a separate PySpark job adds complexity and extra cost, and is not the most efficient for an ad-hoc EDA. Option B (S3 Select) can reduce the data volume but cannot natively perform complex aggregations like distribution across categories without pulling all rows; it is more suited for simple filtering.

Option C (SageMaker Data Wrangler) is a separate service that requires additional setup and is overkill for this simple EDA task; it also modifies the workflow and is not the most efficient for immediate analysis.

1134
MCQmedium

A company is building a binary classifier to detect fraudulent transactions. The dataset is highly imbalanced with only 0.1% positive cases. The data scientist uses logistic regression and obtains 99.9% accuracy on the test set. Which metric should the data scientist use to evaluate the model's performance?

A.ROC AUC
B.Precision-recall curve
C.Precision
D.F1 score
AnswerB

Precision-recall curves focus on the positive class and handle imbalance well.

Why this answer

With only 0.1% positive cases, accuracy is misleading because a model that always predicts 'not fraudulent' achieves 99.9% accuracy. The precision-recall curve focuses on the positive class and is robust to extreme class imbalance, showing the trade-off between precision and recall across thresholds. This makes it the best choice for evaluating a binary classifier on highly imbalanced fraud detection data.

Exam trap

The trap here is that candidates see 'ROC AUC' as a standard metric and forget that it can be inflated by a large number of true negatives in imbalanced datasets, making precision-recall the correct choice for evaluating rare event classifiers.

How to eliminate wrong answers

Option A is wrong because ROC AUC can be overly optimistic on highly imbalanced datasets; the area under the ROC curve is dominated by the large number of true negatives, masking poor performance on the rare positive class. Option C is wrong because precision alone is a single-point metric that does not capture the trade-off with recall, so it cannot fully evaluate model performance across different decision thresholds. Option D is wrong because the F1 score is a harmonic mean of precision and recall at a single threshold, which may not reflect the model's overall ability to rank positive cases; it is less informative than the full precision-recall curve for threshold selection in imbalanced settings.

1135
MCQhard

A data scientist creates the above IAM policy and attaches it to a role used by an Amazon SageMaker notebook instance. When trying to save a file to the S3 bucket, the operation fails. What is the missing permission?

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

If the bucket uses SSE-KMS, PutObject requires kms:GenerateDataKey to encrypt the object.

Why this answer

(kms:GenerateDataKey) because the S3 bucket is likely encrypted with a KMS key. When SageMaker writes an object to an encrypted bucket, it needs permission to call kms:GenerateDataKey to generate a data key for encryption. Option A (kms:Decrypt) is for decryption, not encryption.

Option B (s3:ListBucket) allows listing objects, not writing. Option D (s3:GetObject) allows reading objects, not writing. The error when saving indicates missing encryption permissions.

Exam trap

The missing permission is often kms:GenerateDataKey for writing to KMS-encrypted buckets, not s3:PutObject which is already granted.

1136
MCQmedium

A company wants to deploy a machine learning model that requires GPU acceleration for inference. The model is small and can fit on a single GPU. Which SageMaker endpoint configuration is MOST cost-effective?

A.Use a ml.p3.16xlarge instance with 8 GPUs.
B.Use a SageMaker Serverless Inference endpoint.
C.Use a Multi-Model Endpoint on a ml.g4dn.xlarge instance.
D.Use a ml.p3.2xlarge instance with 1 GPU and enable automatic scaling.
AnswerD

A single GPU instance with scaling provides cost-effective real-time inference.

Why this answer

The most cost-effective because it uses a single-GPU ml.p3.2xlarge instance, which matches the requirement that the model fits on one GPU, and enables automatic scaling to handle variable traffic without over-provisioning. This avoids paying for unused GPU capacity while still providing the necessary GPU acceleration for inference.

Exam trap

The trap here is that candidates often choose a larger GPU instance (like A) thinking it provides better performance, or select Serverless Inference (B) assuming it supports all instance types, but the exam tests the specific constraint that GPU acceleration is required and that Serverless Inference is CPU-only.

How to eliminate wrong answers

Option A is wrong because a ml.p3.16xlarge instance with 8 GPUs is massively over-provisioned for a model that fits on a single GPU, leading to unnecessary cost. Option B is wrong because SageMaker Serverless Inference does not support GPU acceleration; it uses CPU-based compute, which would not meet the GPU requirement. Option C is wrong because a Multi-Model Endpoint on a ml.g4dn.xlarge instance, while cost-effective for hosting multiple models, uses a single GPU that must be shared among all loaded models, potentially causing contention and not being the most cost-effective for a single model that fits on one GPU.

1137
MCQmedium

Refer to the exhibit. A data scientist is deploying a PyTorch model on a SageMaker endpoint. When the endpoint is invoked, the above error appears in CloudWatch logs. What is the MOST likely cause?

A.The endpoint instance type does not support the required CUDA version.
B.The endpoint instance does not have enough memory to load the model.
C.The input tensor shape does not match the model's expected input shape.
D.The model artifact was not properly saved or is missing from the S3 location.
AnswerD

If the model file is missing or corrupted, load_model returns None.

Why this answer

The error shown in CloudWatch logs is a `FileNotFoundError` or `No such file or directory` when SageMaker attempts to load the model artifact. This indicates that the model file (e.g., `model.pth` or `model.pt`) is missing from the specified S3 bucket path or was not properly packaged during training. SageMaker endpoints require the model artifact to be present and correctly referenced in the `model_data_url` parameter; otherwise, the container fails to load the model and throws this error.

Exam trap

The MLS-C01 exam often tests the distinction between model-loading errors (missing artifact) and inference-time errors (shape mismatch, memory), so candidates mistakenly attribute a file-not-found error to a shape or memory issue instead of recognizing it as a deployment configuration problem.

How to eliminate wrong answers

Option A is wrong because CUDA version compatibility issues typically manifest as runtime errors (e.g., 'CUDA error: no kernel image is available for execution on the device') or driver errors, not as file-not-found errors in CloudWatch logs. Option B is wrong because insufficient memory would cause an `OutOfMemoryError` or a container crash (e.g., 'CUDA out of memory' or 'Cannot allocate memory'), not a missing file error. Option C is wrong because an input tensor shape mismatch would produce a runtime inference error (e.g., 'RuntimeError: size mismatch') during invocation, not a model-loading failure at startup.

1138
MCQhard

A data scientist is building a binary classifier for loan default prediction. The cost of a false negative (missing a default) is 10 times higher than the cost of a false positive. Which evaluation metric is MOST appropriate?

A.Precision
B.F-beta score with beta=2
C.Accuracy
D.Area under the ROC curve
AnswerB

F-beta with beta>1 gives more weight to recall, minimizing costly false negatives.

Why this answer

The F-beta score with beta=2 is the most appropriate metric because it weights recall (sensitivity) higher than precision, which is critical when false negatives are 10 times more costly than false positives. Beta=2 means recall is considered 2^2 = 4 times more important than precision, directly aligning with the asymmetric cost structure. This allows the model to be tuned to minimize missed defaults, even at the expense of more false alarms.

Exam trap

The trap here is that candidates often default to AUC-ROC as a 'balanced' metric without realizing it does not incorporate asymmetric error costs, leading them to overlook the F-beta score which is explicitly designed for such scenarios.

How to eliminate wrong answers

Option A is wrong because precision focuses only on the proportion of true positives among positive predictions, ignoring false negatives entirely, so it cannot account for the higher cost of missing defaults. Option C is wrong because accuracy treats all correct predictions equally and is misleading when classes are imbalanced, which is common in loan default prediction, and it does not incorporate the differential cost of errors. Option D is wrong because the area under the ROC curve (AUC-ROC) measures the model's ability to discriminate between classes across all thresholds but does not directly optimize for a specific cost ratio; it is a rank-based metric that does not penalize false negatives more heavily.

1139
MCQeasy

A data scientist is building a time series forecasting model for monthly sales. The data shows strong seasonality with a yearly pattern. They plan to use Amazon Forecast. Which algorithm should they choose?

A.XGBoost
B.K-means clustering
C.DeepAR+
D.Linear regression
AnswerC

DeepAR+ is designed for time series with seasonality and trends.

Why this answer

DeepAR+ is purpose-built for time series forecasting with strong seasonality, as it uses recurrent neural networks (RNNs) to capture complex temporal dependencies and automatically models seasonal patterns like yearly cycles. Amazon Forecast natively supports DeepAR+ for such use cases, making it the optimal choice over general-purpose or non-forecasting algorithms.

Exam trap

The trap here is that candidates often choose XGBoost (A) because it is a powerful general-purpose algorithm, but they overlook that Amazon Forecast provides specialized algorithms like DeepAR+ for time series tasks, and XGBoost is not a native Forecast algorithm.

How to eliminate wrong answers

Option A is wrong because XGBoost is a gradient boosting algorithm designed for tabular data and does not inherently model temporal dependencies or seasonality without extensive feature engineering (e.g., lag features, time-based indicators), making it suboptimal for raw time series forecasting. Option B is wrong because K-means clustering is an unsupervised learning algorithm for grouping data points based on similarity, not for predicting future values in a time series, and it cannot capture sequential or seasonal patterns. Option D is wrong because linear regression assumes a linear relationship between features and target and cannot model complex, non-linear seasonality or long-range temporal dependencies without manual feature engineering, unlike DeepAR+ which learns these patterns automatically.

1140
Multi-Selecthard

Which THREE of the following are common causes of overfitting in machine learning models?

Select 3 answers
A.Using a complex model like a deep neural network on a small dataset
B.Model has too many parameters relative to the number of training samples
C.Having a large dataset with many samples
D.Training for too many epochs
E.Using regularization techniques
AnswersA, B, D

Complex models on small data overfit.

Why this answer

A complex model like a deep neural network has high capacity and can easily memorize noise and patterns specific to a small dataset, rather than learning generalizable features. With limited training samples, the model fails to capture the underlying data distribution, leading to poor performance on unseen data.

Exam trap

The MLS-C01 exam often tests the misconception that more data or regularization causes overfitting, when in fact both are standard countermeasures; the trap is confusing correlation with causation in model training dynamics.

1141
MCQeasy

A machine learning engineer is using Amazon SageMaker to train a model. The training dataset is 2 TB and is stored in Amazon S3. The engineer wants to reduce the training time by improving data loading performance. Which data ingestion mode should be used?

A.Pipe mode
B.Incremental mode
C.File mode
D.Fast file mode
AnswerA

Pipe mode streams data from S3 directly to the algorithm, reducing I/O wait time.

Why this answer

Pipe mode is the correct choice because it streams data directly from Amazon S3 to the training container via a Unix named pipe, bypassing disk writes and reducing I/O latency. For a 2 TB dataset, this eliminates the bottleneck of downloading data to the training instance's Amazon Elastic Block Store (EBS) volume, significantly improving data loading performance and reducing overall training time.

Exam trap

The trap here is that candidates may confuse 'Fast file mode' as a superior alternative to Pipe mode, but Fast file mode still requires writing data to a file system (e.g., FSx for Lustre), which introduces additional latency compared to Pipe mode's direct streaming, making Pipe mode the optimal choice for reducing training time with large datasets.

How to eliminate wrong answers

Option B (Incremental mode) is wrong because it is not a valid SageMaker data ingestion mode; SageMaker supports Pipe, File, and Fast File modes, but not Incremental mode. Option C (File mode) is wrong because it downloads the entire dataset from S3 to the EBS volume before training begins, which for a 2 TB dataset would incur high latency and storage overhead, negating the goal of reducing training time. Option D (Fast file mode) is wrong because it is a variant of File mode that uses a high-performance file system (e.g., Amazon FSx for Lustre) but still requires data to be written to a file system, adding overhead compared to the direct streaming approach of Pipe mode.

1142
MCQhard

A data scientist is examining a dataset for a binary classification problem. The target variable has a 1:1000 imbalance. Which technique should be used to assess model performance during exploratory data analysis?

A.Area under the Precision-Recall curve
B.F1 score
C.Area under the ROC curve
D.Cohen's kappa
AnswerA

PR AUC is sensitive to class imbalance and focuses on the positive class.

Why this answer

With a 1:1000 class imbalance, the positive class is extremely rare. The Area Under the Precision-Recall curve (AUPRC) focuses on the performance of the positive class and is sensitive to changes in precision and recall, making it a robust metric for imbalanced datasets. Unlike ROC AUC, which can be overly optimistic when negatives dominate, AUPRC provides a realistic assessment of model performance on the minority class.

Exam trap

The trap here is that candidates often default to ROC AUC as the universal metric for classification, not realizing that in extreme imbalance, ROC AUC can be misleadingly high because the false positive rate is diluted by the vast number of true negatives.

How to eliminate wrong answers

Option B (F1 score) is wrong because it is a threshold-dependent metric that evaluates a single point on the precision-recall curve, not the overall performance across all thresholds, and it can be misleading when comparing models without a fixed threshold. Option C (Area under the ROC curve) is wrong because ROC AUC is insensitive to class imbalance; it treats false positive rate (which is dominated by the majority class) equally, often yielding deceptively high scores even when the model fails to identify the minority class. Option D (Cohen's kappa) is wrong because it measures inter-rater agreement adjusted for chance, which is not a standard metric for binary classification model evaluation and does not specifically address the imbalance problem.

1143
MCQhard

A data scientist is tuning a gradient boosting model using Amazon SageMaker's Automatic Model Tuning (hyperparameter optimization). The objective metric is validation:auc. After 50 training jobs, the best model still has a validation AUC of only 0.65. The scientist suspects overfitting because the training AUC is 0.99. Which hyperparameter configuration is MOST likely to reduce overfitting?

A.Increase lambda from 1 to 10
B.Increase num_round from 100 to 500
C.Increase max_depth from 6 to 12
D.Increase subsample from 0.5 to 1.0
AnswerA

Higher L2 regularization reduces overfitting by penalizing large weights.

Why this answer

Increasing lambda (L2 regularization) from 1 to 10 adds a stronger penalty on the magnitude of leaf weights in the gradient boosting model. This directly reduces overfitting by discouraging the model from fitting noise in the training data, which is consistent with the observed gap between training AUC (0.99) and validation AUC (0.65). In XGBoost, lambda controls the L2 regularization term on weights, and a higher value forces the model to be simpler and more generalizable.

Exam trap

The trap here is that candidates often assume increasing model complexity (e.g., more rounds, deeper trees) will improve performance, but the question explicitly describes overfitting, so the correct answer must reduce complexity or increase regularization, which is lambda.

How to eliminate wrong answers

Option B is wrong because increasing num_round (number of boosting rounds) from 100 to 500 would increase model complexity and training time, likely worsening overfitting by allowing the model to further memorize the training data. Option C is wrong because increasing max_depth from 6 to 12 allows trees to grow deeper, capturing more specific interactions and noise, which exacerbates overfitting rather than reducing it. Option D is wrong because increasing subsample from 0.5 to 1.0 means using all training data for each tree, removing the stochastic regularization effect that subsampling provides, which would reduce generalization and increase overfitting risk.

1144
MCQeasy

A company is using SageMaker Autopilot to automatically build a binary classification model. After the AutoML job completes, the data scientist wants to understand which features are most important for the best candidate model. How can the scientist get feature importance?

A.Open the SageMaker Autopilot job details and view the 'Explainability' tab
B.Re-run the best model using SageMaker built-in XGBoost with the 'feature_importance' hyperparameter
C.Check the CloudWatch Logs for the training job
D.Use SageMaker Ground Truth to label a new dataset
AnswerA

Autopilot provides feature importance in the explainability tab for the best candidate.

Why this answer

SageMaker Autopilot automatically generates a 'Explainability' tab within the job details for the best candidate model. This tab uses SHAP (SHapley Additive exPlanations) values to provide feature importance, showing which features most influence the model's predictions. The data scientist can directly access this information without any additional configuration or re-running the model.

Exam trap

AWS often tests the misconception that feature importance must be manually extracted via code or logs, when in fact SageMaker Autopilot provides it directly in the UI under the 'Explainability' tab for the best candidate model.

How to eliminate wrong answers

Option B is wrong because SageMaker built-in XGBoost does not have a 'feature_importance' hyperparameter; feature importance is a property of the trained model object (e.g., via `get_fscore()` or `plot_importance()`), not a hyperparameter set before training. Option C is wrong because CloudWatch Logs for the training job contain training metrics, loss values, and algorithm logs, but not structured feature importance data; feature importance is not emitted to logs by default. Option D is wrong because SageMaker Ground Truth is a data labeling service for creating labeled datasets, not for extracting feature importance from a trained model; it is unrelated to model interpretability.

1145
Multi-Selecteasy

A data scientist wants to identify outliers in a dataset. Which TWO techniques are commonly used for outlier detection during EDA?

Select 2 answers
A.Box plot
B.Heatmap
C.Z-score analysis
D.Bar chart
E.Pearson correlation coefficient
AnswersA, C

Box plots show outliers as points outside the whiskers.

Why this answer

Box plots (A) visually identify outliers as points beyond the whiskers (typically 1.5×IQR). Z-score analysis (C) flags data points with an absolute Z-score greater than 3, indicating they are far from the mean. Heatmaps (B) show correlations between variables, not outliers.

Pearson correlation (E) measures linear relationships, not outliers. Bar charts (D) display categorical frequencies and do not detect outliers.

1146
MCQhard

A data scientist wants to run a one-time SQL query on a large dataset stored in Amazon S3 (CSV format, 2 TB) using Amazon Athena. The query involves joining this dataset with a smaller table stored in Amazon RDS. What is the MOST cost-effective and performant approach?

A.Export the RDS table to S3 in Parquet format, then use Athena to join the two S3 datasets
B.Use Amazon Redshift Spectrum to query both S3 and RDS
C.Use Athena Federated Query to query RDS directly
D.Use AWS Glue ETL to join the data and write results back to S3, then query with Athena
AnswerA

This keeps the query in Athena's environment, avoiding data movement and using columnar format for performance.

Why this answer

Exporting the RDS table to S3 as Parquet and running the join in Athena avoids data transfer costs and leverages Athena's fast query engine. Option B (federated query) adds complexity and may be slower. Option C (Redshift Spectrum) requires a Redshift cluster.

Option D (Glue ETL) is overkill for a one-time query.

1147
Multi-Selecthard

A company is using Amazon SageMaker to deploy a model for real-time inference. The model is a deep neural network that requires GPU for low latency. The endpoint currently uses a single ml.p3.2xlarge instance. Traffic is expected to increase by 5x. Which TWO actions should the company take to handle the increased traffic?

Select 2 answers
A.Use a larger instance type with more GPUs
B.Switch to a CPU-based instance
C.Enable auto-scaling on the endpoint
D.Use a multi-model endpoint
E.Decrease the batch size
AnswersA, C

Larger instance provides more GPU compute.

Why this answer

The correct actions are A and C. Using a larger instance type with more GPUs (e.g., ml.p3.8xlarge) increases the compute capacity per instance, allowing the model to handle more requests without increasing latency, as GPUs are essential for low-latency inference on deep neural networks. Enabling auto-scaling on the endpoint dynamically adds or removes instances based on traffic, ensuring the endpoint can scale out to handle the 5x increase without manual intervention.

Option B is incorrect because switching to CPU would significantly increase latency, as deep neural networks benefit from GPU acceleration. Option D is incorrect because multi-model endpoints are designed to host multiple models on a single instance, not to increase throughput for a single model. Option E is incorrect because decreasing batch size would reduce throughput per request, worsening performance under increased traffic.

1148
MCQeasy

A data scientist is performing exploratory data analysis on a dataset stored in Amazon S3 using Amazon SageMaker Studio. The dataset has missing values in several columns. Which approach is the MOST efficient way to handle missing values within SageMaker Studio?

A.Run a Jupyter notebook on a local machine to clean the data and upload back to S3.
B.Use SageMaker Data Wrangler to impute missing values with mean, median, or mode.
C.Use AWS Glue to run a find-and-replace operation.
D.Write a custom Python script using pandas to drop rows with missing values.
AnswerB

Data Wrangler provides a visual interface for imputation.

Why this answer

SageMaker Data Wrangler provides a visual interface to handle missing values efficiently within SageMaker Studio, allowing imputation with mean, median, or mode without writing custom code. Option A is inefficient because it requires moving data out of SageMaker. Option C uses an external service (AWS Glue) which adds complexity and overhead.

Option D, while possible, is less efficient than using Data Wrangler's built-in capabilities.

1149
MCQhard

A research lab stores large genomic datasets in Amazon S3 Glacier Deep Archive. They need to run a one-time analysis on a subset of 10 PB of data. The analysis will use an Amazon EMR cluster with Amazon S3 as the data source. What is the MOST cost-effective and performant way to make the data available for the EMR cluster?

A.Restore the data to S3 Standard-IA and delete after the analysis
B.Configure the EMR cluster to read directly from Glacier Deep Archive using S3 Console
C.Initiate a Bulk retrieval request and restore the data to S3 Standard for the duration of the analysis
D.Initiate an Expedited retrieval request and use the temporary copy for the EMR cluster
AnswerC

Bulk retrieval is the lowest cost tier, and restoring to Standard avoids IA minimum charges.

Why this answer

Bulk retrieval is the most cost-effective retrieval tier for large, non-urgent data from S3 Glacier Deep Archive, completing within 48 hours. Restoring to S3 Standard provides direct, high-throughput access for the EMR cluster, and deleting the data after analysis avoids ongoing storage costs. This approach balances performance (EMR reads from S3 Standard) with minimal cost (Bulk retrieval is the cheapest retrieval option).

Exam trap

The trap here is that candidates assume Expedited retrieval is always the fastest and thus best for performance, ignoring the massive cost difference at petabyte scale and the fact that Bulk retrieval's 48-hour window is acceptable for a one-time analysis.

How to eliminate wrong answers

Option A is wrong because restoring to S3 Standard-IA still incurs retrieval costs and per-GB storage fees, and the data must first be restored from Glacier Deep Archive (which requires a retrieval request) before it can be transitioned to Standard-IA; it does not avoid the retrieval step. Option B is wrong because Amazon EMR cannot read directly from S3 Glacier Deep Archive; S3 Glacier Deep Archive is not a real-time data source and requires a restoration process to make objects readable. Option D is wrong because Expedited retrieval is designed for urgent, small-scale retrievals (typically 1–5 minutes for archives up to 250 MB) and is prohibitively expensive for 10 PB of data, making it cost-ineffective for a one-time analysis.

1150
MCQhard

A company is migrating its on-premises Apache Hadoop cluster to AWS. The cluster processes large datasets using Spark jobs. The company wants to minimize operational overhead and use native AWS services. Which combination of services should the company use?

A.Amazon EMR with Spark and Amazon S3
B.Amazon Redshift with Spectrum and Amazon S3
C.Amazon Athena and AWS Glue
D.Amazon EC2 instances with Apache Spark installed and Amazon S3
AnswerA

EMR is a managed service that runs Spark and integrates with S3.

Why this answer

Amazon EMR is a managed Hadoop framework that natively supports Spark jobs, and Amazon S3 provides scalable and durable object storage for the data. This combination minimizes operational overhead as EMR automatically handles cluster provisioning, scaling, and monitoring. Option B is incorrect because Amazon Redshift is a data warehouse, not a Hadoop cluster, and Spectrum is for querying data in S3, not for running Spark jobs.

Option C is incorrect because Amazon Athena is a serverless query service for SQL-based analytics, not for executing Spark jobs, and AWS Glue is an ETL service, not a compute engine for Spark. Option D is incorrect because running Apache Spark on EC2 instances requires manual setup, maintenance, and scaling of the cluster, increasing operational overhead compared to using a managed service like EMR.

1151
Multi-Selecteasy

Which TWO of the following are appropriate techniques for detecting outliers in a univariate continuous dataset? (Select TWO.)

Select 2 answers
A.Z-score method
B.IQR (Interquartile Range) method
C.Box plot visualization
D.Pearson correlation coefficient
E.K-means clustering
AnswersA, B

Z-scores beyond a threshold (e.g., 3) indicate outliers.

Why this answer

Options A and B are correct. Z-score method flags points beyond a threshold (e.g., 3 standard deviations) from the mean. IQR-based outlier detection identifies points beyond 1.5*IQR from the quartiles.

Option C is wrong because box plots visualize outliers but are not a detection technique per se; they rely on IQR. Option D is wrong because Pearson correlation is bivariate and not used for univariate outlier detection. Option E is wrong because K-means clustering is typically used for multivariate data and not a standard univariate outlier detection method.

1152
Multi-Selecteasy

A data scientist is using Amazon SageMaker to train a large neural network on a GPU instance. The training is taking longer than expected. The scientist wants to reduce training time without changing the model architecture. Which TWO approaches should the scientist consider?

Select 2 answers
A.Use SageMaker Automatic Model Tuning to find optimal hyperparameters.
B.Use SageMaker Managed Spot Training to reduce cost.
C.Use SageMaker's distributed training with multiple GPU instances.
D.Switch to a larger GPU instance type with more CUDA cores.
E.Enable SageMaker Debugger to capture training metrics.
AnswersC, D

Distributed training parallelizes computation, reducing wall-clock time.

Why this answer

SageMaker's distributed training can split the large neural network across multiple GPU instances, reducing wall-clock training time through data parallelism or model parallelism. Option D is correct because switching to a larger GPU instance type with more CUDA cores increases the computational throughput per step, directly accelerating training without altering the model architecture.

Exam trap

The trap here is that candidates confuse cost-saving techniques (Spot Training) or monitoring tools (Debugger) with performance optimization, or mistakenly think hyperparameter tuning reduces training time when it actually increases total compute effort.

1153
MCQhard

A machine learning team is using Amazon SageMaker to train a model using a custom Docker container. The training job fails with an error: 'Unable to write to /opt/ml/model'. The container does not have root access. What is the most likely cause?

A.The /opt/ml/model directory does not exist in the container
B.The container is using an unsupported operating system
C.The container does not have internet access
D.The container process does not have write permission to /opt/ml/model
AnswerD

The process user lacks write permissions to the directory.

Why this answer

SageMaker expects training containers to write the model artifact to /opt/ml/model. The container process must have write permissions to that directory. Root access is not required; the container runs with the 'sagemaker' user.

The directory may not exist or permissions are wrong. The error indicates a write issue, likely permissions.

1154
MCQhard

A company uses Amazon SageMaker to host a model for fraud detection. The model uses a custom XGBoost container. The endpoint receives about 100 requests per second, each with 50 features. The team notices that the model's predictions are occasionally incorrect for a subset of requests. Which approach should the team take to debug the issue?

A.Use SageMaker Debugger to capture tensors during inference.
B.Scale the endpoint to more instances to reduce load.
C.Enable SageMaker Model Monitor to capture and analyze inference data.
D.Enable detailed CloudWatch Logs for the endpoint.
AnswerC

Model Monitor captures input data and predictions, enabling analysis of data quality and drift.

Why this answer

SageMaker Model Monitor captures inference data (input features and predictions) and compares them against a baseline to detect data drift or quality issues. This allows the team to identify if incorrect predictions stem from distribution shifts or anomalous input patterns, which is the most direct debugging approach for sporadic prediction errors.

Exam trap

The trap here is that candidates confuse SageMaker Debugger (for training debugging) with Model Monitor (for inference monitoring), or assume scaling or logging alone can diagnose prediction quality issues without analyzing input data distributions.

How to eliminate wrong answers

Option A is wrong because SageMaker Debugger is designed for training jobs to capture tensors and gradients, not for inference endpoints; it cannot debug live prediction errors. Option B is wrong because scaling the endpoint to more instances addresses throughput or latency issues, not the root cause of incorrect predictions for a subset of requests. Option D is wrong because detailed CloudWatch Logs provide request/response metadata and system metrics but do not analyze feature distributions or detect data drift, which is needed to debug why specific predictions are incorrect.

1155
MCQhard

A data scientist is exploring a dataset with 200 features. They compute the pairwise correlation matrix and notice that many features have correlations above 0.95. They want to reduce redundancy before modeling. Which of the following techniques is most appropriate for identifying and removing highly correlated features?

A.Compute mutual information between each feature and the target.
B.Apply PCA and keep the first 50 components.
C.Use Lasso regression to select features.
D.Perform hierarchical clustering on the correlation matrix and select one feature per cluster.
AnswerD

This systematically removes redundancy while retaining representative features.

Why this answer

Hierarchical clustering on correlations groups correlated features; then one can select a representative from each cluster. Option A is wrong because mutual information with the target does not capture pairwise redundancy among features. Option B is wrong because PCA creates new features but does not remove original ones.

Option C is wrong because Lasso regression performs feature selection but may not handle multicollinearity well and does not directly identify redundant groups.

1156
MCQhard

A team is building a model to predict house prices. They have a dataset with features like 'SquareFootage', 'Bedrooms', 'YearBuilt', and 'Neighborhood'. They notice that 'SquareFootage' has a few extreme values (e.g., 50,000 sq ft) that are likely data entry errors. They want to handle these outliers without losing all the data. Which of the following approaches is most robust?

A.Cap 'SquareFootage' at the 99th percentile value.
B.Replace extreme values with the mean of 'SquareFootage'.
C.Apply log transformation to 'SquareFootage'.
D.Remove rows where 'SquareFootage' is above 3 standard deviations from the mean.
AnswerA

Capping limits extremes while retaining the records.

Why this answer

Capping 'SquareFootage' at the 99th percentile limits extreme values while retaining most data points, making it robust against data entry errors. Option B is incorrect because replacing extreme values with the mean distorts the distribution and can bias the model. Option C is incorrect because a log transformation does not fix data entry errors; it only changes the scale.

Option D is incorrect because removing rows with values above 3 standard deviations from the mean may discard valid data points and is not robust when the data contains errors.

1157
MCQeasy

A retail company uses Amazon Redshift for its data warehouse. The data engineering team runs ETL jobs that load data from multiple sources into Redshift daily. They notice that the load performance is slow and the cluster CPU utilization is high during the ETL window. The team wants to improve load performance without changing the cluster configuration. They currently load data using INSERT statements from a staging table. What should they do?

A.Run VACUUM and ANALYZE before loading
B.Use the COPY command to load data from S3 in parallel
C.Increase the number of nodes in the Redshift cluster
D.Apply compression encoding on the staging table
AnswerB

COPY is optimized for bulk loading.

Why this answer

The COPY command is the most efficient way to load large amounts of data into Amazon Redshift because it uses the cluster's nodes in parallel to read data from Amazon S3, maximizing throughput. Option A (VACUUM and ANALYZE) are maintenance operations that reclaim space and update statistics, but they do not improve load performance. Option C (increasing node count) contradicts the requirement to not change cluster configuration.

Option D (compression encoding) can reduce storage and improve scan performance but does not significantly speed up the initial load.

1158
MCQhard

A data scientist is building a model to predict customer churn. The dataset has 20 features, including categorical variables with high cardinality (e.g., ZIP code). The data scientist wants to use a linear model. Which feature engineering technique is MOST appropriate for the high-cardinality categorical features?

A.One-hot encoding
B.Target encoding
C.TF-IDF
D.Standard scaling
AnswerB

Target encoding handles high cardinality well.

Why this answer

Target encoding is the most appropriate technique for high-cardinality categorical features when using a linear model because it replaces each category with the mean of the target variable for that category, creating a numeric feature that captures the relationship between the category and the target without exploding the feature space. One-hot encoding would create an unmanageable number of binary columns (e.g., thousands of ZIP codes), leading to the curse of dimensionality and making the linear model unstable or computationally infeasible.

Exam trap

AWS often tests the trap that candidates default to one-hot encoding for all categorical variables, failing to recognize that high cardinality makes it impractical for linear models, whereas target encoding is a more efficient alternative that preserves feature information without dimensionality explosion.

How to eliminate wrong answers

Option A is wrong because one-hot encoding for high-cardinality features like ZIP code would generate thousands of dummy variables, causing the linear model to suffer from the curse of dimensionality, multicollinearity, and overfitting. Option C is wrong because TF-IDF is designed for text data to weigh term frequency against inverse document frequency, not for encoding categorical variables like ZIP codes in a churn prediction task. Option D is wrong because standard scaling is a normalization technique for numerical features, not a method for encoding categorical variables, and applying it to raw categorical labels would be meaningless.

1159
MCQeasy

A machine learning engineer needs to process a large dataset that does not fit on a single Amazon SageMaker notebook instance's EBS volume. The data is stored in S3. What is the MOST efficient way to access the data from the notebook?

A.Increase the EBS volume size to 5 TB.
B.Mount the S3 bucket as a file system using s3fs.
C.Read the data directly from S3 using the boto3 library.
D.Use SageMaker File input mode in the notebook.
AnswerC

Reading directly from S3 avoids storage limitations and is efficient for large datasets.

Why this answer

Reading data directly from S3 using the boto3 library is the most efficient approach for a dataset that exceeds the notebook instance's EBS volume capacity. Boto3 allows you to stream data in chunks or use S3 Select for server-side filtering, avoiding the need to download the entire dataset to local storage. This method leverages S3's high-throughput API and eliminates the bottleneck of writing to a local EBS volume, which is limited in size and I/O performance.

Exam trap

The trap here is that candidates confuse SageMaker's File input mode (designed for training jobs) with a general-purpose data access method for notebooks, or they assume that mounting S3 as a filesystem (s3fs) is efficient for large-scale data processing, when in reality it introduces performance penalties due to FUSE overhead and lack of native parallel I/O.

How to eliminate wrong answers

Option A is wrong because increasing the EBS volume to 5 TB does not solve the fundamental issue of the dataset not fitting; it only postpones the problem and incurs unnecessary cost, and SageMaker notebook instances have a maximum EBS volume size of 5 TB, which may still be insufficient for extremely large datasets. Option B is wrong because mounting an S3 bucket as a file system using s3fs relies on FUSE (Filesystem in Userspace), which introduces significant latency and overhead due to metadata caching and POSIX translation, and is not designed for high-throughput data processing in a notebook environment. Option D is wrong because SageMaker File input mode is a training job feature that streams data from S3 to the training container, not a method for accessing data within a notebook instance; it cannot be used directly in a notebook's kernel.

1160
MCQmedium

A data scientist is building a regression model to predict house prices. The dataset includes a feature 'zip_code' with 1,000 unique values. What is the best way to handle this categorical feature in the exploratory data analysis phase?

A.One-hot encode the zip_code feature
B.Apply target encoding using the mean house price per zip code
C.Replace zip_code with the frequency of each zip code in the dataset
D.Use label encoding: assign each zip code a unique integer
AnswerB

Target encoding uses the mean house price per zip code, effectively capturing the relationship between zip code and the target while keeping dimensionality low.

Why this answer

Target encoding (option B) is the best approach for high-cardinality categorical features like zip_code. It captures the relationship between the category and the target variable (house price) without creating an excessive number of dummy variables. One-hot encoding (option A) would create 1,000 columns, leading to high dimensionality and sparsity.

Label encoding (option D) implies an ordinal relationship, which does not exist for zip codes. Frequency encoding (option C) may not capture price variation well because two zip codes with the same frequency could have very different average prices.

1161
Multi-Selecteasy

Which TWO services can be used to perform hyperparameter tuning in Amazon SageMaker? (Choose two.)

Select 2 answers
A.Amazon SageMaker Automatic Model Tuning
B.Amazon SageMaker Experiments
C.AWS Glue
D.Amazon SageMaker Ground Truth
E.Amazon EMR
AnswersA, B

This is the native hyperparameter tuning service.

Why this answer

Amazon SageMaker Automatic Model Tuning (option A) is the native hyperparameter tuning service in SageMaker, which automatically searches for the best hyperparameter values by launching training jobs with different combinations and evaluating them against a specified objective metric. Amazon SageMaker Experiments (option B) is used to organize, track, and compare machine learning experiments, including hyperparameter tuning runs, by capturing parameters, metrics, and artifacts for reproducibility and analysis.

Exam trap

The trap here is that candidates may confuse Amazon SageMaker Experiments as merely a tracking tool rather than a service that can be used to perform and manage hyperparameter tuning, or they might incorrectly associate AWS Glue or EMR with machine learning tuning due to their data processing roles.

1162
MCQhard

A company runs a real-time fraud detection model on a SageMaker endpoint. The model is a TensorFlow neural network trained on transactional data. The endpoint uses a single ml.p3.2xlarge instance. Recently, the application’s latency has increased from 50ms to 500ms on average. The CloudWatch metrics show that CPU utilization is at 90%, GPU utilization is at 30%, and memory utilization is at 40%. The number of requests per second has remained stable. The ML team suspects the model is not fully utilizing the GPU. What action should the team take to reduce latency without changing the instance type?

A.Switch to SageMaker Batch Transform to process requests in batches
B.Change the endpoint to a compute-optimized instance like ml.c5.large
C.Use SageMaker Neo to compile the model for the target instance
D.Increase the number of instances behind the endpoint and use a load balancer
AnswerC

Neo optimizes model to better utilize GPU.

Why this answer

SageMaker Neo compiles the model to optimize inference for the target hardware, improving GPU utilization and reducing latency. Option A is incorrect because SageMaker Batch Transform is for offline inference, not real-time requests. Option B is incorrect because switching to a CPU-based instance (ml.c5.large) would not leverage the GPU and could increase latency.

Option D is incorrect because adding more instances improves throughput, not per-request latency, and does not address GPU underutilization.

1163
MCQmedium

A data scientist is using Amazon SageMaker Ground Truth to create a labeled dataset for object detection. The team has limited budget and wants to minimize labeling costs while ensuring high-quality labels. Which approach is MOST cost-effective?

A.Use only a private workforce of domain experts to label all data.
B.Use a public workforce and have each data point labeled by three workers.
C.Use active learning to automatically label high-confidence data and send only uncertain data to a private workforce.
D.Use the built-in automated labeling feature without human review.
AnswerC

Active learning reduces labeling cost while ensuring quality.

Why this answer

Active learning uses the model to automatically label high-confidence data points, while only sending low-confidence or uncertain data to a private workforce for human labeling. This significantly reduces the number of data points requiring manual labeling, thereby minimizing costs while still ensuring high-quality labels through expert review of challenging cases. Option A is incorrect because using only a private workforce for all data is expensive due to the high cost of domain experts.

Option B is incorrect because using a public workforce with three workers per data point increases labeling costs without necessarily guaranteeing higher quality than a focused approach. Option D is incorrect because relying solely on automated labeling without human review can introduce errors and reduce label quality, especially for uncertain cases.

1164
MCQmedium

A data scientist is using Amazon SageMaker to train a model using the built-in XGBoost algorithm. The training job is taking a long time. The data scientist notices that the input data is in CSV format and the training job is using File mode. The data size is 50 GB. What is the BEST way to reduce training time?

A.Use a larger instance type with more vCPUs.
B.Convert the data to Parquet format.
C.Reduce the number of features in the dataset.
D.Switch the input mode to Pipe.
AnswerD

Pipe mode reduces I/O wait time by streaming data.

Why this answer

Pipe mode streams data directly from S3 to the training algorithm, reducing I/O overhead and improving throughput compared to File mode, which downloads the entire dataset first. Option A (larger instance) may not help if the bottleneck is I/O rather than compute. Option B (Parquet format) can improve performance but is not as impactful as Pipe mode for streaming.

Option C (reduce features) could reduce training time but at the cost of model accuracy, making it not the best approach.

1165
MCQmedium

An ML team uses Amazon SageMaker to train a deep learning model. The training job runs on a single ml.p3.2xlarge instance and is taking 10 hours. The team wants to reduce the training time to under 2 hours without changing the model architecture. Which approach is MOST effective?

A.Use SageMaker distributed training with multiple ml.p3.2xlarge instances.
B.Use SageMaker Managed Spot Training to reduce cost.
C.Switch to a single ml.p3.16xlarge instance with more GPUs.
D.Enable SageMaker Debugger to identify bottlenecks.
AnswerA

Distributed training partitions the model or data across instances, reducing wall-clock time.

Why this answer

A is correct because SageMaker's distributed training framework can partition the training workload across multiple ml.p3.2xlarge instances, each with one NVIDIA V100 GPU, enabling data parallelism that scales near-linearly. With sufficient instances (e.g., 5 or more), the 10-hour job can be reduced to under 2 hours without altering the model architecture, as the framework handles gradient synchronization via AllReduce.

Exam trap

The trap here is that candidates assume more GPUs on a single instance (Option C) always yields proportional speedup, but they overlook the diminishing returns from intra-instance GPU contention and the fact that distributed training across multiple instances often scales better for deep learning workloads.

How to eliminate wrong answers

Option B is wrong because Managed Spot Training reduces cost by using spare EC2 capacity, but it does not reduce training time; it may even increase time due to interruptions and checkpoint restarts. Option C is wrong because switching to a single ml.p3.16xlarge instance provides 8 GPUs, but the model may not be large enough to fully utilize all GPUs on one instance, and the speedup is limited by GPU memory bandwidth and intra-instance communication overhead, often achieving less than 8x improvement. Option D is wrong because SageMaker Debugger monitors training metrics and identifies bottlenecks (e.g., CPU/GPU utilization, memory), but it does not directly reduce training time; it only provides insights for optimization.

1166
MCQmedium

A company is training a deep learning model on SageMaker using a large dataset stored in S3. The training job is taking a long time due to I/O bottlenecks. Which action would MOST effectively reduce the I/O bottleneck?

A.Use Amazon EFS as the data source.
B.Use Amazon FSx for Lustre as the data source.
C.Increase the number of training instances.
D.Use Pipe input mode in the SageMaker estimator.
AnswerD

Pipe mode streams data, reducing disk I/O.

Why this answer

Pipe input mode streams training data directly from S3 to the algorithm without writing intermediate files to disk, eliminating I/O wait time. Option A (using Amazon EFS) introduces network file system latency, which would not reduce I/O bottleneck. Option B (using Amazon FSx for Lustre) could improve throughput but is more complex to set up and may not be as effective as Pipe mode for streaming.

Option C (increasing the number of training instances) might distribute computation but does not directly reduce per-instance I/O bottleneck.

1167
MCQmedium

A company is using Amazon Rekognition to detect objects in images stored in S3. They want to reduce costs by processing images only when they are uploaded. Which AWS service should be used to trigger Rekognition automatically?

A.Amazon CloudWatch Events
B.Amazon Simple Notification Service (SNS)
C.AWS Lambda
D.AWS Step Functions
AnswerC

Lambda can be triggered by S3 event and call Rekognition.

Why this answer

AWS Lambda is the correct service because it can be triggered directly by S3 events (e.g., s3:ObjectCreated:Put) to invoke Amazon Rekognition's DetectLabels API on the newly uploaded image. This serverless architecture ensures processing occurs only on upload, eliminating idle costs and manual polling.

Exam trap

The trap here is that candidates often confuse S3 event notifications with CloudWatch Events or SNS, thinking those services can directly invoke Rekognition, but only Lambda (or an HTTP endpoint) can execute custom code to call the Rekognition API.

How to eliminate wrong answers

Option A is wrong because Amazon CloudWatch Events (now Amazon EventBridge) is designed for scheduling or reacting to AWS service state changes, not for direct S3 object-level event triggers; it would require an intermediary like Lambda to invoke Rekognition. Option B is wrong because Amazon SNS is a pub/sub messaging service that cannot directly invoke Rekognition; it would need a subscriber (e.g., Lambda or an HTTP endpoint) to process the notification and call the API. Option D is wrong because AWS Step Functions is an orchestration service for coordinating multiple AWS services, but it is not directly triggered by S3 upload events; it would require an S3 event notification to Lambda or EventBridge to start execution, adding unnecessary complexity and cost.

1168
Multi-Selectmedium

Which TWO configurations are required to enable AWS Glue to access data stored in a VPC? (Choose two.)

Select 2 answers
A.A VPC endpoint for Amazon S3.
B.An AWS Glue connection object that specifies the VPC, subnet, and security group.
C.A NAT gateway in a public subnet.
D.An Internet gateway attached to the VPC.
E.An S3 bucket policy that allows access from the Glue service principal.
AnswersA, B

Correct: Allows Glue jobs in VPC to access S3 without Internet.

Why this answer

A VPC endpoint for Amazon S3 (Option A) is required because it allows AWS Glue to access S3 data privately over the AWS network without traversing the public internet, which is necessary when Glue runs inside a VPC. An AWS Glue connection object (Option B) is required because it defines the VPC, subnet, and security group that Glue will use to launch its resources within the VPC, enabling it to access data stores in that VPC.

Exam trap

The trap here is that candidates often think a NAT gateway or Internet gateway is needed for Glue to access S3 from within a VPC, but AWS Glue can use a VPC endpoint for S3 to keep traffic private and avoid internet routing.

1169
Multi-Selectmedium

A data engineer is exploring a large dataset in Amazon Athena. The dataset is partitioned by date and stored in Parquet format. The engineer wants to check the number of distinct values in a column for a specific date range. Which THREE practices reduce query cost and improve performance?

Select 3 answers
A.Use the COUNT(DISTINCT column) function.
B.Filter the query with a WHERE clause on the partition column.
C.Use ORDER BY to sort the results.
D.Use SELECT * to retrieve all columns.
E.Ensure the table is columnar (Parquet) to reduce I/O.
AnswersA, B, E

Efficiently counts distinct values without fetching all rows.

Why this answer

Options A, B, and E are correct. Using COUNT(DISTINCT column) (A) is a precise way to count distinct values, and while it scans the column, it avoids fetching unnecessary data. Filtering with a WHERE clause on the partition column (B) limits the data scanned to only the relevant partitions, significantly reducing cost and improving performance.

Using a columnar format like Parquet (E) reduces I/O by reading only the required columns. Option C (ORDER BY) is incorrect because it requires sorting the entire result set, increasing processing time and cost. Option D (SELECT *) is incorrect as it retrieves all columns, negating the benefits of columnar storage and increasing data scanned.

1170
MCQmedium

A data scientist is using Amazon SageMaker to build a text classification model. The dataset has 100,000 labeled samples and 20 classes. The scientist wants to use a pre-trained BERT model and fine-tune it. Which approach is MOST cost-effective?

A.Train a BERT model from scratch using a larger instance.
B.Fine-tune a pre-trained BERT-base model using a GPU instance.
C.Use a pre-trained BERT-large model with a larger instance.
D.Train a CNN model from scratch using CPU instances.
AnswerB

BERT-base is cost-effective and fine-tuning is efficient.

Why this answer

Fine-tuning a pre-trained BERT-base model on a GPU instance is the most cost-effective approach. Pre-trained BERT models already capture general language features, so fine-tuning requires less computation and data compared to training from scratch. BERT-base is smaller than BERT-large, reducing cost while still being effective for text classification.

Option A is wrong because training BERT from scratch is extremely expensive and unnecessary. Option C is wrong because BERT-large has higher cost and may overfit given the dataset size. Option D is wrong because CNN models from scratch would require more hyperparameter tuning and may not achieve comparable accuracy to a fine-tuned transformer.

1171
Multi-Selectmedium

Which TWO data formats are columnar and optimized for analytics queries in Amazon S3?

Select 2 answers
A.CSV
B.ORC
C.JSON
D.Avro
E.Parquet
AnswersB, E

ORC is columnar and optimized for analytics.

Why this answer

ORC (Optimized Row Columnar) is a columnar storage format that stores data in a column-oriented manner, enabling efficient compression and predicate pushdown for analytics queries on Amazon S3. It is designed for high-performance read operations in big data frameworks like Apache Hive and Spark, making it ideal for aggregation and filtering workloads.

Exam trap

The trap here is that candidates often confuse 'binary format' (Avro) or 'structured text' (JSON, CSV) with columnar optimization, failing to recognize that only columnar formats like ORC and Parquet provide the compression and predicate pushdown needed for analytics at scale.

1172
Multi-Selecthard

A machine learning team is using SageMaker Pipelines to orchestrate a multi-step workflow. The pipeline fails with a 'ThrottlingException' when submitting a training job. Which TWO actions can reduce the likelihood of throttling?

Select 2 answers
A.Use SageMaker Model Registry to version models
B.Implement retry logic with exponential backoff in the pipeline
C.Increase the number of parallel training jobs
D.Reduce the number of concurrent pipeline steps
E.Request a service quota increase for training jobs
AnswersB, D

Exponential backoff reduces request rate after throttling.

Why this answer

ThrottlingException occurs when the API request rate exceeds service limits. Implementing retry logic with exponential backoff (option B) helps handle transient throttling by automatically retrying requests with increasing delays. Reducing the number of concurrent pipeline steps (option D) decreases the rate of API calls, reducing the likelihood of hitting rate limits.

Option A (Model Registry) is unrelated to throttling. Option C (increasing parallel training jobs) would increase concurrent API calls, worsening throttling. Option E (requesting a quota increase) raises the limit but does not reduce the immediate likelihood of throttling; it is a longer-term mitigation, not a direct action to reduce throttling in the current pipeline.

1173
Multi-Selecthard

A data scientist is performing exploratory data analysis on a time-series dataset of website traffic. The dataset contains hourly page views for the past two years. The scientist wants to analyze seasonality and trends. Which THREE techniques are appropriate for this analysis? (Choose THREE.)

Select 3 answers
A.Moving average smoothing
B.Box plot by month
C.Time series decomposition (additive or multiplicative)
D.Linear regression on time index
E.Autocorrelation (ACF) plot
AnswersA, C, E

Smoothing reveals underlying trend.

Why this answer

Decomposition separates time series into trend, seasonal, and residual components. Autocorrelation plot (ACF) helps identify seasonality. Moving average smooths to reveal trends.

Linear regression is not typical for seasonal decomposition. Box plot by month can show seasonal patterns but is less common for trend.

1174
MCQmedium

A data scientist is analyzing a dataset and finds that the target variable has a bimodal distribution. Which preprocessing step is most appropriate before modeling?

A.Standardize the target variable to have mean 0 and variance 1.
B.Remove outliers from the target variable.
C.Consider clustering to separate the two modes and model them separately.
D.Apply a log transformation to the target variable.
AnswerC

Bimodal distribution may indicate two subpopulations.

Why this answer

Bimodal distributions indicate two distinct underlying groups. Clustering can separate the modes, allowing separate models for each cluster, which often improves performance. Option A is incorrect because standardizing does not change distribution shape.

Option B is incorrect because removing outliers would not address bimodality; outliers are extreme values, not necessarily related to modes. Option D is incorrect because log transformation is for skewed unimodal distributions, not bimodal.

1175
MCQmedium

A data scientist needs to deploy a PyTorch model for real-time inference. Which AWS service is best suited for this task?

A.Amazon SageMaker Batch Transform
B.Amazon ECS with Fargate
C.AWS Lambda with custom container
D.Amazon SageMaker real-time endpoint
AnswerD

SageMaker provides managed real-time endpoints with auto-scaling and built-in model hosting.

Why this answer

Amazon SageMaker real-time endpoints are purpose-built for hosting ML models that require low-latency, synchronous inference. They automatically manage the underlying infrastructure, including scaling, load balancing, and health checks, and support custom PyTorch containers via the SageMaker inference toolkit. This makes them the optimal choice for deploying a PyTorch model for real-time inference.

Exam trap

The trap here is that candidates often confuse batch inference with real-time inference, or assume that any container service (like ECS or Lambda) is equally suitable, failing to recognize that SageMaker endpoints provide ML-specific optimizations like model versioning, A/B testing, and built-in CloudWatch metrics for inference latency.

How to eliminate wrong answers

Option A is wrong because Amazon SageMaker Batch Transform is designed for asynchronous, batch predictions on large datasets, not for real-time, low-latency inference. Option B is wrong because Amazon ECS with Fargate is a general-purpose container orchestration service that lacks built-in ML-specific features like model hosting, automatic scaling based on inference traffic, and integration with SageMaker model artifacts. Option C is wrong because AWS Lambda with a custom container has a maximum execution timeout of 15 minutes and is intended for short-lived, event-driven workloads, not for persistent, real-time inference serving that requires continuous availability and low latency.

1176
MCQmedium

A team is using Amazon SageMaker to train a deep learning model for image classification. The training job is taking too long, and they want to reduce training time without sacrificing model accuracy. Which approach is most effective?

A.Reduce the batch size
B.Reduce the number of training epochs
C.Reduce the image resolution
D.Use transfer learning with a pre-trained model and fine-tune on the target dataset
AnswerD

Transfer learning uses features learned from a large dataset, allowing faster convergence and similar accuracy.

Why this answer

Transfer learning uses a pre-trained model that already has learned feature representations from a large dataset. Fine-tuning this model on the target dataset requires significantly less training time compared to training from scratch, while still achieving high accuracy. Option A is wrong because reducing batch size can slow down training and may cause convergence issues.

Option B is wrong because reducing epochs can lead to underfitting and lower accuracy. Option C is wrong because reducing image resolution may remove important details, degrading model performance.

1177
MCQeasy

A data scientist is using Amazon SageMaker to train an XGBoost model on a dataset with missing values. The dataset has both numeric and categorical features. Which preprocessing step is MOST appropriate before training?

A.Impute missing numeric values with the mean and categorical values with the mode, then train without encoding
B.Remove all rows with missing values and train on the remaining data
C.One-hot encode categorical features and let XGBoost handle missing values natively
D.Label encode categorical features and use the built-in missing value handling of XGBoost
AnswerC

XGBoost handles missing values by default; one-hot encoding is appropriate for categorical data.

Why this answer

XGBoost has a built-in mechanism to handle missing values by learning the best direction to split on during training, making explicit imputation unnecessary. One-hot encoding categorical features is required because XGBoost only accepts numeric inputs, and this encoding preserves the categorical information without imposing ordinal relationships. This approach avoids data leakage from imputation and leverages XGBoost's native sparsity-aware algorithm.

Exam trap

The trap here is that candidates often assume missing values must always be imputed or rows removed, overlooking XGBoost's built-in missing value handling, and they may also confuse label encoding with one-hot encoding, thinking XGBoost can handle categorical features directly without encoding.

How to eliminate wrong answers

Option A is wrong because imputing missing values with the mean or mode can introduce bias and reduce variance, and training without encoding categorical features is invalid since XGBoost cannot process non-numeric data directly. Option B is wrong because removing all rows with missing values can discard a significant portion of the dataset, leading to loss of information and potential bias, especially when missingness is not completely at random. Option D is wrong because label encoding categorical features imposes an arbitrary ordinal relationship that can mislead the model, and while XGBoost handles missing values natively, the label encoding is inappropriate for nominal categories.

1178
MCQhard

A company uses an Amazon SageMaker notebook to train a model using data from an S3 bucket. The IAM role attached to the notebook has the following policy. What is the MOST specific change needed to allow the notebook to read from the bucket 'ml-data-123'?

A.Add an Allow statement for 's3:GetObject' on 'ml-data-123' to the IAM policy.
B.Remove the Deny statement from the IAM policy.
C.Create an S3 access point and update the IAM policy to use the access point ARN.
D.Add a bucket policy on 'ml-data-123' that grants access to the notebook's IAM role.
AnswerB

An explicit deny overrides any allow; removing the deny allows the existing S3 actions to work.

Why this answer

The existing IAM policy includes an explicit Deny statement that blocks all s3:GetObject access to the bucket 'ml-data-123'. In IAM, an explicit Deny overrides any Allow, so even if other policies grant read access, the Deny prevents it. Removing the Deny statement is the most specific change because it eliminates the blocking condition without requiring additional permissions or resources.

Exam trap

The trap here is that candidates often focus on adding Allow permissions or alternative access methods (like access points or bucket policies) without recognizing that an explicit Deny in the IAM policy is the absolute blocker that must be removed first.

How to eliminate wrong answers

Option A is wrong because adding an Allow statement for 's3:GetObject' on 'ml-data-123' would still be overridden by the existing explicit Deny statement, so it would not resolve the issue. Option C is wrong because creating an S3 access point and updating the IAM policy does not address the root cause—the explicit Deny—and adds unnecessary complexity; the Deny would still block access through the access point. Option D is wrong because adding a bucket policy that grants access to the notebook's IAM role cannot override an explicit Deny in the IAM policy; the Deny takes precedence regardless of bucket policy.

1179
MCQmedium

A company uses Amazon SageMaker to deploy a real-time inference endpoint for a regression model. The endpoint is experiencing high latency during spikes in traffic. The data scientist needs to reduce latency while maintaining cost efficiency. Which action should the data scientist take?

A.Use batch transform instead of real-time inference
B.Use a larger instance type for the endpoint
C.Deploy the model on a multi-model endpoint
D.Enable automatic scaling for the endpoint
AnswerD

Automatic scaling adds instances during traffic spikes, reducing latency.

Why this answer

Enabling automatic scaling for the SageMaker endpoint allows the number of instances to dynamically adjust based on traffic patterns, reducing latency during spikes by adding capacity when needed and removing it during low traffic to maintain cost efficiency. Automatic scaling uses CloudWatch metrics (e.g., InvocationsPerInstance or CPUUtilization) to trigger scale-out and scale-in policies, ensuring the endpoint can handle bursts without over-provisioning.

Exam trap

The trap here is that candidates confuse automatic scaling with simply adding more resources (Option B) or assume multi-model endpoints (Option C) are a latency solution, when in fact automatic scaling is the only option that directly addresses both latency spikes and cost efficiency through dynamic instance management.

How to eliminate wrong answers

Option A is wrong because batch transform is designed for offline, asynchronous inference on large datasets and does not support real-time inference, so it cannot reduce latency for a real-time endpoint. Option B is wrong because using a larger instance type may reduce latency for individual requests but increases cost significantly and does not dynamically adapt to traffic spikes, leading to either over-provisioning or continued high latency during bursts. Option C is wrong because a multi-model endpoint hosts multiple models on the same instance to improve resource utilization, but it does not inherently reduce latency during traffic spikes; in fact, it can increase latency due to model loading/unloading overhead and contention for shared resources.

1180
MCQeasy

A data scientist is using Amazon SageMaker to train a linear learner model for regression. After reviewing the training logs, the data scientist notices that the loss is not decreasing and remains high. The learning rate is set to 0.01. The data is normalized. What should the data scientist do to improve convergence?

A.Normalize the data again.
B.Reduce the mini-batch size.
C.Try different learning rates, such as 0.001 or 0.1.
D.Increase the number of epochs.
AnswerC

Tuning the learning rate is a common first step to improve convergence.

Why this answer

The loss is not decreasing, which often indicates an inappropriate learning rate. Trying different learning rates (e.g., 0.001 or 0.1) can help find a rate that allows the model to converge. Option A is incorrect because the data is already normalized; normalizing again would have no effect.

Option B is incorrect because reducing the mini-batch size introduces more stochasticity but does not directly address learning rate issues. Option D is incorrect because increasing epochs does not help if the learning rate prevents convergence; the model may continue to oscillate or plateau.

1181
Multi-Selecteasy

A data scientist is training a text classification model using Amazon SageMaker's built-in BlazingText algorithm. The dataset contains 1 million documents. Which TWO hyperparameters are most important to tune for improving model accuracy?

Select 2 answers
A.Learning rate
B.Batch size
C.Loss function
D.Type of optimizer
E.Number of epochs
AnswersA, E

Learning rate controls the step size during optimization and is crucial for convergence.

Why this answer

Learning rate and number of epochs are critical hyperparameters for training neural networks like BlazingText. They control how quickly the model learns and how long it trains.

1182
Multi-Selectmedium

A data scientist is using Amazon SageMaker to deploy a model for real-time inference. The endpoint receives a large number of requests with variable traffic patterns. The team wants to minimize cost while ensuring low latency. Which THREE actions should the team take? (Choose THREE.)

Select 3 answers
A.Use a multi-model endpoint to host multiple models on the same instance.
B.Enable auto-scaling for the endpoint based on the invocation count.
C.Set the initial variant weight to 1 and increase the number of instances.
D.Use a single large instance to handle all traffic.
E.Create a production variant with a smaller instance type.
AnswersA, B, E

Multi-model endpoints reduce cost by sharing resources.

Why this answer

Options A, B, and E are correct. Option A: Using a multi-model endpoint allows multiple models to be hosted on the same instance, reducing costs by sharing resources. Option B: Enabling auto-scaling based on invocation count dynamically adjusts capacity to match variable traffic patterns, minimizing cost while maintaining low latency.

Option E: Creating a production variant with a smaller instance type reduces per-instance cost. Option C is incorrect because setting the initial variant weight to 1 and increasing the number of instances does not directly minimize cost; it is a traffic distribution strategy. Option D is incorrect because a single large instance may be over-provisioned for variable traffic, leading to higher costs.

1183
MCQmedium

A data scientist ran an AWS Glue ETL job that failed with the error shown. What is the most likely cause?

A.The CSV file has a header mismatch
B.The DataFrame does not have a column named 'age'
C.The schema is evolving incorrectly
D.The data type of 'age' is incompatible
AnswerB

Correct: The error states 'age' is not in the input columns.

Why this answer

The error message indicates that the column 'age' is not found in the DataFrame, which only contains columns [id, name, salary]. Option A is incorrect because the error is about a missing column, not a header mismatch. Option C is incorrect because schema evolution would add a column, not cause a missing column error.

Option D is incorrect because there is no indication of a data type issue; the error is about column existence.

1184
Multi-Selecthard

Which TWO of the following are valid configurations for SageMaker Training Job resource limits? (Select TWO.)

Select 2 answers
A.Maximum number of instances
B.Maximum wait time in seconds
C.Maximum run time in seconds
D.Minimum number of instances
E.Maximum number of spot instances
AnswersA, C

You can limit the number of instances used by the training job.

Why this answer

SageMaker Training Jobs allow you to set a resource limit on the maximum number of instances that can be used for distributed training, which helps control costs and prevent accidental over-provisioning. Option C is correct because you can specify a maximum run time in seconds for a training job; if the job exceeds this limit, SageMaker automatically stops it, ensuring you don't incur unexpected charges.

Exam trap

The trap here is that candidates often confuse 'maximum run time' with 'maximum wait time' (a non-existent parameter) or assume that SageMaker supports minimum instance counts or separate spot instance limits, which are not part of the resource limit configuration.

1185
MCQmedium

An IAM policy is attached to a group. A user in the group tries to read the object s3://data-lake-bucket/sensitive/file.txt from an IP address 192.168.1.1. What will happen?

A.The request is allowed because the Allow statement grants s3:GetObject
B.The request is allowed because the Deny condition does not match
C.The request is denied because of the Deny statement
D.The request is denied because the policy has no explicit Allow for the sensitive prefix
AnswerC

Deny applies when condition is met.

Why this answer

The Deny statement explicitly denies any S3 action on the sensitive prefix when the source IP is not from 10.0.0.0/8. Since the IP 192.168.1.1 is not in that range, the Deny applies. Deny statements override Allow statements.

So the user is denied access.

1186
MCQmedium

A company is building a fraud detection model using a random forest classifier. The dataset is highly imbalanced with 99% legitimate transactions and 1% fraudulent. The model currently achieves 99% accuracy on the test set, but the fraud recall is only 10%. The business requires at least 80% recall for fraud. The data scientist has tried oversampling the minority class and adjusting class weights, but recall remains below 40%. The dataset contains millions of transactions with hundreds of features. Which approach should the data scientist try next to improve fraud recall?

A.Randomly undersample the majority class to a 50:50 ratio
B.Use a gradient boosting machine (e.g., XGBoost) with scale_pos_weight parameter
C.Apply PCA to reduce dimensionality before training
D.Use a logistic regression model with L2 regularization
AnswerB

Gradient boosting often outperforms random forest on imbalance with proper weighting.

Why this answer

The current model uses random forest but still has low recall after oversampling and class weights. Gradient boosting machines like XGBoost can handle imbalanced data well with the scale_pos_weight parameter, which adjusts the weight of the positive class. This approach often yields better recall than random forest on very imbalanced datasets.

Option A (random undersampling) would discard too much majority data and reduce model performance. Option C (PCA) is not directly targeting the imbalance issue and may remove important features. Option D (logistic regression) is a linear model that typically underperforms on complex, high-dimensional data with severe imbalance.

1187
MCQeasy

A data scientist needs to store and version machine learning models, along with metadata such as hyperparameters and metrics. Which AWS service is designed for this purpose?

A.Amazon S3 with versioning enabled
B.Amazon SageMaker Model Registry
C.Amazon DynamoDB
D.Amazon Elastic Container Registry (ECR)
AnswerB

Amazon SageMaker Model Registry is specifically designed to catalog, version, and manage ML models with metadata such as hyperparameters and metrics.

Why this answer

Amazon SageMaker Model Registry is a purpose-built service for cataloging, versioning, and managing machine learning models along with their metadata such as hyperparameters and metrics. It provides a central repository to track model versions, lineage, and approval status. Option A (S3 with versioning) is object storage that can store model artifacts but lacks metadata management and versioning capabilities for ML models.

Option C (DynamoDB) is a NoSQL database, not designed for ML model management. Option D (ECR) is for storing container images, not ML models directly.

1188
MCQhard

A company processes large streams of IoT sensor data using Amazon Kinesis Data Streams with 100 shards. Each sensor reading is about 1 KB. The data is consumed by an Amazon EMR cluster running Spark Streaming jobs. The team notices that the Spark Streaming job's processing time is gradually increasing, and the stream is falling behind. They suspect the issue is due to skewed data distribution across shards. Which approach should the team take to diagnose and resolve the issue?

A.Increase the number of shards to 200 to provide more parallelism.
B.Modify the producer to add a random prefix to the partition key, ensuring even distribution across all shards, and monitor the stream using CloudWatch.
C.Check Amazon CloudWatch metrics for Kinesis to identify hot shards, then manually redistribute the data by repartitioning in Spark.
D.Use the Kinesis Client Library (KCL) with a custom worker to rebalance the load across shards.
AnswerB

Adding a random prefix to partition keys uniformizes distribution, eliminating hot shards; CloudWatch helps confirm the fix.

Why this answer

Adding a random prefix to the partition key ensures that sensor data is evenly distributed across all 100 shards, eliminating hot shards that cause processing delays. This directly addresses the skewed data distribution issue without requiring infrastructure changes, and the team can monitor the improvement using CloudWatch metrics like IncomingBytes and ReadProvisionedThroughputExceeded.

Exam trap

The trap here is that candidates often confuse consumer-side rebalancing (KCL or Spark repartitioning) with producer-side data distribution, and incorrectly assume that increasing shards or using Spark repartitioning can fix a hot shard caused by a poor partition key.

How to eliminate wrong answers

Option A is wrong because simply increasing the number of shards to 200 does not fix the root cause of skewed distribution; it only adds more shards that may still be unevenly loaded if the partition key remains the same, potentially worsening the imbalance. Option C is wrong because while CloudWatch metrics can identify hot shards, manually redistributing data by repartitioning in Spark does not change how data is written to Kinesis shards; the producer-side partition key must be fixed to prevent future skew. Option D is wrong because the Kinesis Client Library (KCL) rebalances consumers across shards, but it cannot change how data is distributed across shards at the producer level; the skew originates from the producer's partition key selection.

1189
MCQeasy

A company uses Amazon SageMaker to train a model and wants to track metrics like loss and accuracy in real-time. Which SageMaker feature should be used?

A.SageMaker Model Monitor
B.SageMaker metrics and CloudWatch dashboards
C.SageMaker Experiments
D.SageMaker Debugger
AnswerB

Provides real-time training metrics.

Why this answer

SageMaker's built-in metrics integration with CloudWatch allows real-time tracking of training metrics such as loss and accuracy. Option A (SageMaker Model Monitor) is for monitoring inference quality and data drift after deployment, not real-time training metrics. Option C (SageMaker Experiments) is for organizing, tracking, and comparing different experiment runs, but it does not provide real-time streaming of metrics during training.

Option D (SageMaker Debugger) is used for debugging training issues like gradient anomalies, not for real-time metric tracking.

1190
MCQeasy

A data engineer is tasked with building a data pipeline that moves data from an on-premises database to Amazon S3 for analytics. The database is a MySQL instance that is 2 TB in size. The company has a 1 Gbps dedicated network connection to AWS (AWS Direct Connect). The data must be transferred once daily. The engineer needs to choose the most efficient and reliable service for this task. Which service should they use?

A.AWS DataSync
B.AWS Database Migration Service (DMS)
C.AWS Glue
D.Amazon S3 Transfer Acceleration
AnswerB

DMS is designed for database migrations and supports S3 as a target.

Why this answer

AWS Database Migration Service (DMS) is the correct choice because it is purpose-built for migrating databases to AWS, supporting continuous replication and one-time migrations from MySQL to Amazon S3. It can handle the 2 TB dataset efficiently over a 1 Gbps Direct Connect link by using change data capture (CDC) for ongoing replication and parallel tasks for throughput, ensuring reliability with built-in monitoring and restart capabilities.

Exam trap

The trap here is that candidates often confuse AWS DataSync (a file-transfer service) with a database migration tool, overlooking that DMS is the only option that natively supports extracting data from a relational database like MySQL and writing it to Amazon S3 in a structured format.

How to eliminate wrong answers

Option A is wrong because AWS DataSync is designed for file and object storage transfers (e.g., NFS, SMB, S3), not for direct database-to-S3 migration; it cannot connect to a MySQL database natively. Option C is wrong because AWS Glue is an ETL service that requires a schema and transformation logic, not a direct database migration tool; it would need additional setup (e.g., JDBC connections and crawlers) and lacks the optimized CDC and bulk load capabilities of DMS for a 2 TB database. Option D is wrong because Amazon S3 Transfer Acceleration only speeds up uploads to S3 over the public internet by using edge locations, but it does not handle database extraction or schema conversion; it is irrelevant when a Direct Connect connection is already in place.

1191
MCQeasy

A machine learning engineer is analyzing a text classification dataset with 50,000 documents. Which EDA step is most important to understand the vocabulary size and frequency distribution?

A.Compute TF-IDF matrix
B.Plot frequency of each word in a bar chart
C.Generate bigram collocations
D.Plot histogram of document lengths
AnswerB

Plotting the frequency of each word in a bar chart directly shows the vocabulary size and the frequency distribution (e.g., Zipfian distribution). This EDA step helps decide vocabulary cutoff by identifying very rare words that can be removed.

Why this answer

Plotting the frequency of each word in a bar chart directly shows the vocabulary size and the frequency distribution (e.g., Zipfian distribution). This EDA step helps decide vocabulary cutoff by identifying very rare words that can be removed. Option A is wrong because TF-IDF is a feature transformation, not an exploratory step.

Option C is wrong because bigram collocations are for detecting phrases, not for basic word frequency. Option D is wrong because document length distribution pertains to the number of words per document, not vocabulary size or word frequency.

1192
Multi-Selecthard

Which THREE techniques can help reduce overfitting in a neural network trained on a small dataset?

Select 3 answers
A.Apply L2 weight regularization
B.Increase the number of hidden layers
C.Train for more epochs
D.Use data augmentation
E.Add dropout layers
AnswersA, D, E

L2 regularization penalizes large weights.

Why this answer

L2 weight regularization (also known as weight decay) penalizes large weights by adding a term to the loss function proportional to the sum of squared weights. This forces the network to learn simpler patterns and reduces sensitivity to noise in the training data, which is especially helpful when the dataset is small and prone to overfitting.

Exam trap

The MLS-C01 exam often tests the misconception that increasing model complexity (more layers or epochs) always improves performance, when in fact on small datasets it reliably worsens overfitting.

1193
MCQhard

A machine learning engineer is using Amazon SageMaker to deploy a model for real-time inference. The model is a large ensemble that requires 4 GB of memory and has a latency requirement of 100 ms. Which instance type and deployment configuration should the engineer choose to optimize cost while meeting requirements?

A.ml.m5.large (2 vCPU, 8 GB memory)
B.SageMaker Serverless Inference
C.ml.c5.large (2 vCPU, 4 GB memory)
D.ml.p3.2xlarge (8 vCPU, 61 GB memory, 1 GPU)
AnswerA

8 GB memory provides headroom, and cost is moderate.

Why this answer

ml.m5.large provides 8 GB memory, sufficient for a 4 GB model plus overhead, and is cost-effective for real-time inference with moderate latency requirements. Option B (SageMaker Serverless Inference) is incorrect because cold start latency may exceed the 100 ms requirement. Option C (ml.c5.large) has only 4 GB memory, insufficient for the model.

Option D (ml.p3.2xlarge) is GPU-accelerated and expensive, making it overkill for a non-GPU workload.

1194
MCQhard

A data engineer is building a data pipeline that uses Amazon S3 to store raw data, AWS Lambda for transformation, and Amazon DynamoDB for serving. The Lambda function experiences high latency when writing to DynamoDB. Which action will most effectively reduce the latency?

A.Enable DynamoDB Accelerator (DAX) for caching
B.Use Amazon S3 instead of DynamoDB
C.Configure a VPC gateway endpoint for DynamoDB
D.Increase the DynamoDB write capacity units
AnswerD

Increasing write capacity units directly addresses throttling and reduces write latency by providing more throughput.

Why this answer

Increasing write capacity units for DynamoDB directly reduces write latency by minimizing throttling. DAX (Option A) is a read cache and does not improve write latency. Option B is incorrect because using S3 would increase latency due to its different access pattern.

Option C is incorrect because VPC gateway endpoint improves network connectivity but does not reduce write latency.

1195
MCQhard

A company runs a critical data pipeline using Apache Spark on Amazon EMR. The pipeline reads data from Amazon S3, performs complex transformations, and writes results back to S3. The job runs every hour and must complete within 30 minutes. Recently, the job has been taking longer and occasionally failing due to executor losses. The team suspects memory pressure. Which action should the team take to improve stability and performance without increasing cost?

A.Increase the spark.executor.memory setting to allocate more memory per executor.
B.Increase the number of core nodes in the EMR cluster.
C.Decrease the number of shuffle partitions (spark.sql.shuffle.partitions) to reduce overhead.
D.Enable Spark dynamic allocation to adjust executors based on workload.
AnswerD

Dynamic allocation helps utilize resources efficiently and prevents over-allocation.

Why this answer

Enabling Spark dynamic allocation allows the cluster to automatically scale the number of executors up and down based on the workload. This helps alleviate memory pressure by releasing idle executors and requesting additional executors only when needed, improving resource utilization without increasing overall cluster cost. Option A is incorrect because simply increasing spark.executor.memory may cause YARN container failures if the instance memory is exceeded, and does not address the root cause of executor losses.

Option B is incorrect because adding core nodes increases cost and may not resolve memory pressure if the issue is inefficient resource allocation. Option C is incorrect because decreasing shuffle partitions reduces parallelism and can increase memory per task, potentially worsening memory pressure and prolonging job runtime.

1196
MCQmedium

A data engineer uses AWS Glue to run ETL jobs that transform data from JSON to Parquet. The job runs successfully but takes 30 minutes longer than expected. CloudWatch metrics show high memory utilization and disk spills. What is the most likely cause?

A.The number of DPUs is too low
B.The sink bucket has insufficient I/O throughput
C.The source data format is too large
D.The data is skewed and not evenly distributed across partitions
AnswerD

Data skew causes some tasks to take longer, leading to spills and increased runtime.

Why this answer

High memory utilization and disk spills in AWS Glue indicate that the data is not evenly distributed across partitions, causing some executors to handle a disproportionate amount of data. This data skew leads to excessive spilling to disk as memory is exhausted, which significantly slows down the job. Option D directly addresses this root cause, as skewed data prevents efficient parallel processing.

Exam trap

The trap here is that candidates often assume high memory usage means insufficient resources (DPUs) and choose Option A, but the real culprit is data skew causing inefficient resource utilization, not a lack of total compute capacity.

How to eliminate wrong answers

Option A is wrong because increasing DPUs would add more parallelism but does not fix the underlying data skew; it may even worsen memory pressure if the skewed partitions are not repartitioned. Option B is wrong because insufficient I/O throughput to the sink bucket would manifest as write throttling or retries, not as high memory utilization and disk spills during transformation. Option C is wrong because the source data format being large is not inherently a problem—Parquet is columnar and efficient; the issue is how the data is distributed across partitions, not its total size.

1197
MCQmedium

Refer to the exhibit. A data engineer is troubleshooting an AWS Glue job that fails with an 'AccessDenied' error when trying to write to the S3 bucket 'my-data-lake'. The IAM policy attached to the Glue service role is shown. What is the missing permission?

A.s3:ListBucket
B.s3:PutObjectAcl
C.s3:GetBucketLocation
D.s3:DeleteObject
AnswerA

Correct: Glue needs ListBucket to list objects in the bucket.

Why this answer

The policy allows s3:GetObject and s3:PutObject on the bucket's objects, but it does not allow s3:ListBucket on the bucket itself. Many Glue operations require ListBucket to discover objects. Option A (s3:ListBucket) is the missing permission.

Option B (s3:PutObjectAcl) is not needed. Option C (s3:GetBucketLocation) is not required. Option D (s3:DeleteObject) is not needed.

1198
MCQhard

An ML team is building a recommendation system. The training data includes user-item interactions stored in Amazon DynamoDB. The team wants to export this data to S3 in Parquet format for use with Amazon SageMaker. The export should be incremental (only new or changed records) and run daily. Which approach meets these requirements with MINIMAL operational overhead?

A.Use the DynamoDB Export to S3 feature and schedule it daily with AWS Glue.
B.Use DynamoDB Streams with AWS Lambda to write changes to S3 in Parquet format.
C.Use a script that scans the DynamoDB table and filters by last updated timestamp.
D.Set up an Amazon EMR cluster running Spark jobs to read DynamoDB and write to S3.
AnswerB

Streams capture changes in near-real-time, enabling incremental exports with minimal overhead.

Why this answer

DynamoDB Streams capture every change (insert, update, delete) in near real-time, and AWS Lambda can process these events to write only the changed records to S3 in Parquet format. This approach provides incremental, daily exports with minimal operational overhead, as it is fully serverless and requires no infrastructure management.

Exam trap

The trap here is that candidates often choose Option A because they assume 'Export to S3' is incremental, but it actually exports the entire table, not just changes, leading to higher costs and redundant data processing.

How to eliminate wrong answers

Option A is wrong because the DynamoDB Export to S3 feature exports the entire table snapshot, not incremental changes, and scheduling it with AWS Glue adds unnecessary complexity and cost for a full export each day. Option C is wrong because scanning the entire DynamoDB table daily and filtering by last updated timestamp is inefficient, costly (consumes read capacity), and does not capture deletions; it also requires custom scripting and handling of large datasets. Option D is wrong because setting up and managing an Amazon EMR cluster introduces significant operational overhead for a simple incremental export task, and it is overkill compared to the serverless Streams + Lambda approach.

1199
MCQhard

A company is building a real-time fraud detection system using Amazon SageMaker. The model must have low latency (under 10ms) and high throughput (thousands of predictions per second). The team has trained a gradient boosting model using XGBoost. Which SageMaker inference option is MOST suitable?

A.Use SageMaker asynchronous inference.
B.Deploy the model on a SageMaker real-time endpoint with a multi-model endpoint.
C.Deploy the model on a SageMaker serverless endpoint.
D.Use a batch transform job.
AnswerB

Multi-model endpoints optimize cost and latency for high throughput.

Why this answer

A multi-model endpoint (MME) on SageMaker is the most suitable option because it allows you to host multiple XGBoost models on a single endpoint, sharing the underlying instance to maximize throughput and minimize latency. MMEs keep models loaded in memory and route requests to the correct model with sub-10ms overhead, meeting the low-latency and high-throughput requirements for real-time fraud detection.

Exam trap

The trap here is that candidates often confuse 'real-time' with 'serverless' or 'asynchronous', failing to recognize that serverless endpoints introduce cold-start latency and throughput limits that break the sub-10ms and high-throughput requirements.

How to eliminate wrong answers

Option A is wrong because asynchronous inference is designed for large payloads or long processing times (e.g., batch processing with minutes of latency), not for real-time sub-10ms predictions. Option C is wrong because serverless endpoints have a cold-start latency that can exceed 10ms and are throttled at lower concurrency, making them unsuitable for thousands of predictions per second. Option D is wrong because batch transform jobs are offline, not real-time, and cannot provide sub-10ms latency or handle streaming prediction requests.

1200
MCQeasy

A data scientist is building a regression model to predict energy consumption. The dataset includes features like temperature, humidity, day of week, and holiday flags. The scientist uses a linear regression model and obtains an R-squared of 0.85 on training and 0.40 on test. The scientist suspects the model is not capturing non-linear relationships. Which approach should the scientist use to capture non-linearity?

A.Apply PCA to the feature set
B.Increase L1 regularization using Lasso
C.Remove features with low correlation to the target
D.Add polynomial features (e.g., squared terms and interactions)
AnswerD

Polynomial features allow linear model to fit non-linear patterns.

Why this answer

(add polynomial features) captures non-linear relationships by introducing squared terms and interactions, allowing the linear model to fit curvature. Option A (PCA) reduces dimensionality but does not add non-linearity. Option B (L1 regularization using Lasso) reduces overfitting by shrinking coefficients but does not introduce non-linear terms.

Option C (removing features with low correlation) may lose information and does not help with non-linearity.

Page 15

Page 16 of 23

Page 17