Courseiva

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

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

Page 16

Page 17 of 23

Page 18
1201
MCQhard

A company is using AWS Glue to run ETL jobs that transform data from multiple sources into a data lake on S3. The jobs are scheduled to run hourly. Recently, the jobs have been failing intermittently with 'MemoryError' exceptions. The data volume has grown over time. The data engineer needs to resolve this issue cost-effectively. Which action should be taken?

A.Increase the number of DPUs allocated to the Glue job and use a larger worker type.
B.Increase the S3 timeout settings in the Glue job configuration.
C.Switch the Glue job type from Spark to Python shell to reduce memory overhead.
D.Repartition the data using Spark's repartition method before processing.
AnswerA

More DPUs and larger worker types provide more memory to handle larger data volumes.

Why this answer

The 'MemoryError' exception indicates that the Glue job is running out of memory as data volume grows. Increasing the number of DPUs (Data Processing Units) and using a larger worker type (e.g., from Standard to G.1X or G.2X) provides more memory and compute capacity per worker, allowing the job to handle larger datasets without failing. This is the most cost-effective approach because it scales resources only as needed, avoiding over-provisioning.

Exam trap

The trap here is that candidates may confuse memory errors with data skew or partitioning issues, leading them to choose repartitioning (Option D) instead of recognizing that the root cause is insufficient total memory for the growing dataset.

How to eliminate wrong answers

Option B is wrong because S3 timeout settings control how long the job waits for S3 operations, not the memory allocation; memory errors are unrelated to network timeouts. Option C is wrong because switching from Spark to Python shell would drastically reduce processing capability and memory, likely causing the job to fail entirely on large datasets, not solve the memory issue. Option D is wrong because repartitioning data with Spark's repartition method can increase parallelism but does not directly increase the total memory available to the job; it may even cause more memory pressure if partitions are increased without adding resources.

1202
MCQmedium

A company is using Amazon SageMaker to deploy a model for real-time predictions. The model requires access to a DynamoDB table to look up features. The SageMaker endpoint is configured with a VPC and subnet. However, the endpoint cannot connect to DynamoDB. What is the most likely reason?

A.The security group does not allow outbound traffic to DynamoDB
B.The IAM role for the endpoint does not have dynamodb:GetItem permission
C.The VPC does not have a VPC endpoint for DynamoDB or a NAT gateway
D.The DynamoDB table is in a different AWS Region
E.The CloudWatch logs show no errors
AnswerC

Without a route to DynamoDB, the endpoint cannot connect.

Why this answer

A SageMaker endpoint deployed in a VPC, by default, cannot access public AWS services like DynamoDB unless the VPC has a VPC endpoint for DynamoDB (Gateway endpoint) or a NAT gateway to route traffic through an internet gateway. Without either, the endpoint's private subnet has no route to DynamoDB's public endpoints, causing the connection failure.

Exam trap

The trap here is that candidates often assume the issue is IAM permissions (Option B) or security group rules (Option A), overlooking the fundamental network routing requirement for private VPC resources to access public AWS services.

How to eliminate wrong answers

Option A is wrong because security groups control inbound and outbound traffic by IP address or security group ID, but DynamoDB is accessed via a public endpoint (not a specific IP), so the issue is network routing, not security group rules. Option B is wrong because the IAM role lacking dynamodb:GetItem would cause an authorization failure (e.g., AccessDeniedException), not a network connectivity failure; the endpoint would still be able to reach DynamoDB but be denied the action. Option D is wrong because DynamoDB is a global service; cross-region access is possible and would not inherently block connectivity—the issue is network routing within the VPC.

Option E is wrong because CloudWatch logs showing no errors does not diagnose the root cause; the endpoint may silently fail to connect without logging network-level errors.

1203
MCQhard

A machine learning team is building a fraud detection system using Amazon SageMaker. The training data is highly imbalanced (99% legitimate, 1% fraudulent). They need to maximize the recall of the fraud class while keeping precision above 90%. Which approach should they take?

A.Undersample the majority class to create a balanced dataset and train a Random Forest
B.Train a model using the original data, then adjust the decision threshold on the validation set to maximize recall while precision > 90%
C.Train an XGBoost model with scale_pos_weight parameter set to 99
D.Use SMOTE to oversample the fraud class and then train a logistic regression
AnswerB

Threshold tuning directly optimizes recall with a precision constraint.

Why this answer

Adjusting the decision threshold on the validation set directly optimizes the trade-off between recall and precision. By lowering the threshold, the model classifies more instances as fraud, increasing recall, while the precision constraint (≥90%) ensures the threshold is set at a point where false positives remain acceptably low. This approach works with any probabilistic classifier and does not alter the training data distribution.

Exam trap

The trap here is that candidates often assume resampling (undersampling, oversampling, or SMOTE) or class-weight adjustments are the only ways to handle imbalance, but they overlook the simpler and more precise method of threshold tuning, which directly controls the recall-precision trade-off without altering the training data.

How to eliminate wrong answers

Option A is wrong because undersampling the majority class discards 99% of legitimate transactions, which can cause the model to lose valuable patterns and lead to high variance and poor generalization on real-world data. Option C is wrong because setting scale_pos_weight to 99 in XGBoost adjusts the loss function to penalize misclassifications of the minority class more heavily, but it does not guarantee that precision will stay above 90%—it only helps with class imbalance, not with meeting a specific precision constraint. Option D is wrong because SMOTE oversamples the fraud class by creating synthetic examples, which can introduce noise and overfitting, and logistic regression may not capture complex fraud patterns; more importantly, this approach does not provide a mechanism to precisely control the recall-precision trade-off to meet the 90% precision requirement.

1204
MCQeasy

A data scientist is building a classification model to predict customer churn. The dataset has 10,000 samples with 100 features. After training a logistic regression model, the scientist observes that the model has high variance (overfitting). Which technique can reduce overfitting?

A.Remove the regularization term
B.Use L2 regularization (Ridge)
C.Add polynomial features
D.Use a smaller learning rate
AnswerB

L2 regularization penalizes large weights, reducing overfitting.

Why this answer

L2 regularization (Ridge) adds a penalty on large coefficients, reducing overfitting. Removing features may help but is not the best practice. Increasing model complexity (polynomial features) would worsen overfitting.

Increasing training data helps but not listed.

1205
MCQmedium

A data scientist is using Amazon SageMaker to train a model. The training dataset is stored in S3 as CSV files. The scientist wants to use the SageMaker built-in Linear Learner algorithm. Which input mode should be used for optimal performance?

A.Augmented manifest file mode
B.File mode
C.Pipe mode
D.Fast file mode
AnswerC

Pipe mode streams data, reducing I/O overhead and improving performance.

Why this answer

Pipe mode streams data directly from S3 to the algorithm without writing to disk, reducing I/O overhead. File mode downloads the entire dataset to disk, which is slower. Fast file mode is not a SageMaker feature.

Augmented manifest is for additional metadata, not performance.

1206
MCQhard

A company runs a real-time recommendation system on SageMaker with a model that uses a deep neural network. The endpoint uses a single ml.p3.2xlarge instance. Recently, the number of users has grown, and the endpoint's latency has increased from 50ms to 200ms, exceeding the SLA of 100ms. The model inference code is optimized and cannot be improved further. The company wants to reduce latency while minimizing cost. The data scientist has the following options: A. Switch to a larger instance type with more GPU memory, such as ml.p3.8xlarge. B. Use SageMaker's Elastic Inference to attach an EI accelerator to the existing instance. C. Deploy the model on multiple smaller instances (e.g., ml.p3.2xlarge) behind a load balancer and distribute traffic. D. Convert the model to use TensorFlow Lite and deploy on a CPU-based instance. Which option is the MOST cost-effective and meets the latency requirement?

A.Convert to TensorFlow Lite on CPU
B.Use SageMaker's Elastic Inference
C.Switch to a larger instance type, e.g., ml.p3.8xlarge
D.Deploy on multiple smaller instances behind a load balancer
AnswerB

Elastic Inference provides cost-effective GPU acceleration.

Why this answer

The most cost-effective option is B (Use SageMaker's Elastic Inference) because it provides dedicated GPU acceleration at a fraction of the cost of a full GPU instance, reducing inference latency without requiring a larger instance. Option C (Switch to a larger instance type) would increase cost significantly. Option D (Deploy on multiple smaller instances behind a load balancer) would increase complexity and cost, and may not guarantee latency reduction.

Option A (Convert to TensorFlow Lite on CPU) could reduce cost but may not meet the latency requirement as CPU inference is slower than GPU for deep neural networks, and model conversion might impact accuracy.

1207
MCQmedium

Refer to the exhibit. An IAM policy is attached to a SageMaker notebook instance. A data scientist is trying to invoke the endpoint 'my-endpoint' from the notebook but receives an AccessDenied error. What is the likely cause?

A.The policy allows InvokeEndpoint only for endpoints with the exact ARN, but the endpoint ARN is different.
B.The policy uses a wildcard for CreateEndpoint, which is too permissive.
C.The policy does not allow sagemaker:CreateEndpoint for the specific endpoint.
D.The policy is not attached to the IAM role used by the notebook instance.
AnswerD

Without the policy, InvokeEndpoint is denied.

Why this answer

The error 'AccessDenied' when invoking a SageMaker endpoint from a notebook instance typically indicates that the IAM role attached to the notebook does not have the required permissions. The policy shown in the exhibit grants sagemaker:InvokeEndpoint for the specific endpoint ARN, but if the policy is not attached to the IAM role that the notebook instance is using, the role lacks the permission, resulting in the AccessDenied error. Attaching the policy to the correct IAM role resolves the issue.

Exam trap

AWS often tests the distinction between having a policy defined versus having it attached to the correct IAM role; candidates mistakenly assume that if a policy exists in the account, it automatically applies to all resources, but IAM policies must be explicitly attached to the role or user making the request.

How to eliminate wrong answers

Option A is wrong because the policy explicitly allows InvokeEndpoint for the endpoint ARN 'arn:aws:sagemaker:us-east-1:123456789012:endpoint/my-endpoint', so if the endpoint ARN matches, this is not the cause. Option B is wrong because the wildcard for CreateEndpoint is irrelevant to the InvokeEndpoint action; the error is about invoking, not creating, and a permissive CreateEndpoint policy does not cause an AccessDenied on InvokeEndpoint. Option C is wrong because the policy does not need to allow sagemaker:CreateEndpoint for invoking an endpoint; the required action is sagemaker:InvokeEndpoint, which is already allowed in the policy.

1208
Multi-Selecteasy

Which TWO of the following are appropriate use cases for Amazon SageMaker built-in algorithms?

Select 2 answers
A.Classifying customer churn using tabular data
B.Reinforcement learning using Q-learning
C.Classifying text documents using word embeddings
D.Image classification using a custom CNN architecture
E.Time series forecasting using ARIMA
AnswersA, C

XGBoost or Linear Learner can be used.

Why this answer

XGBoost is suitable for tabular classification. BlazingText is for text classification on word embeddings. Image classification using custom CNNs may use built-in but not necessarily.

Time series forecasting is not a built-in algorithm (use DeepAR). Reinforcement learning is not a built-in algorithm.

1209
MCQeasy

A machine learning engineer is using Amazon SageMaker to train a model. The training job fails with an out-of-memory error. The training data size is 10 GB and the instance is ml.m5.xlarge (16 GB memory). Which change is MOST likely to resolve the issue without increasing cost?

A.Reduce the batch size in the training script.
B.Switch to a GPU instance like p3.2xlarge.
C.Use a larger instance type like ml.m5.4xlarge.
D.Decrease the training dataset size.
AnswerA

Smaller batch size reduces memory footprint per iteration.

Why this answer

Many algorithms allow you to set a batch size, and reducing it lowers memory usage. Option B is wrong because changing to GPU may not help and could increase cost. Option C is wrong because increasing instance type increases cost.

Option D is wrong because decreasing the dataset size may lose information.

1210
MCQmedium

A data scientist is performing EDA on a time series dataset of daily website visits. The scientist wants to identify any seasonality patterns. Which visualization is most appropriate?

A.Correlation matrix of visits with lagged versions of itself.
B.Scatter plot of visits against the day of the month.
C.Histogram of daily visit counts.
D.Line plot with day on x-axis and visits on y-axis, highlighting weekends.
AnswerD

Reveals periodic patterns over time.

Why this answer

A line plot with day on the x-axis and visits on the y-axis, with weekends highlighted, can reveal weekly seasonality patterns. Option A (correlation matrix with lags) can detect autocorrelation but is not a direct visualization of seasonality. Option B (scatter plot vs day of month) could show monthly patterns but is less effective for daily seasonality and does not preserve time order as clearly as a line plot.

Option C (histogram) shows distribution, not temporal patterns. Therefore, option D is best.

1211
Multi-Selecteasy

A data scientist is evaluating a linear regression model. Which TWO metrics are appropriate for evaluating the model's performance?

Select 2 answers
A.R-squared
B.Root Mean Squared Error (RMSE)
C.Precision
D.Area Under the ROC Curve (AUC-ROC)
E.F1 score
AnswersA, B

R-squared measures the proportion of variance explained by the model.

Why this answer

R-squared is a standard metric for linear regression that measures the proportion of variance in the dependent variable explained by the independent variables. It ranges from 0 to 1, with higher values indicating better fit, making it directly appropriate for evaluating regression model performance.

Exam trap

AWS often tests the distinction between regression and classification metrics, and the trap here is that candidates mistakenly apply classification metrics like Precision, AUC-ROC, or F1 score to a regression problem, not recognizing they are fundamentally incompatible with continuous outputs.

1212
MCQeasy

A company is using Amazon Kinesis Data Firehose to load streaming data into Amazon S3. The data is in JSON format, and they want to convert it to Parquet before storage. What should they configure?

A.Enable data format conversion in Firehose and specify a Glue table
B.Use an AWS Lambda function to transform the data
C.Run an AWS Glue ETL job after data is in S3
D.Use Kinesis Data Analytics for Apache Flink to convert the format
AnswerA

Firehose can convert to Parquet using a Glue table schema.

Why this answer

Amazon Kinesis Data Firehose supports built-in data format conversion from JSON to Parquet or ORC. By enabling this feature and specifying an AWS Glue table that defines the schema, Firehose automatically converts incoming JSON records to Parquet before delivering them to the S3 destination. This eliminates the need for additional compute resources or post-processing steps.

Exam trap

The trap here is that candidates often assume they need a separate transformation service like Lambda or Glue, not realizing that Firehose itself has a native, serverless data format conversion feature that directly writes Parquet to S3.

How to eliminate wrong answers

Option B is wrong because using an AWS Lambda function for transformation would require custom code to convert JSON to Parquet, adding complexity and latency, and Lambda has a maximum execution time and payload size limit that may not suit high-throughput streaming data. Option C is wrong because running an AWS Glue ETL job after data is in S3 introduces a batch processing step, which defeats the purpose of real-time or near-real-time conversion and incurs additional storage and compute costs. Option D is wrong because Kinesis Data Analytics for Apache Flink is designed for real-time stream processing and analytics, not for format conversion to Parquet for S3 storage; it would require custom Flink code and does not integrate directly with Firehose's S3 delivery.

1213
MCQhard

A team deployed a SageMaker endpoint for real-time inference using a PyTorch model. After monitoring, they notice that the latency is highly variable, with p99 latency 10x the p50 latency. The endpoint uses a single ml.c5.2xlarge instance with auto-scaling based on average CPU utilization. Which change is most likely to reduce latency variability?

A.Increase the batch size for inference
B.Pre-warm the model by sending dummy requests every minute
C.Switch to a GPU instance type
D.Change the auto-scaling metric to 'InvocationsPerInstance'
AnswerD

Scaling on invocations per instance prevents overload and reduces queueing.

Why this answer

Scaling based on InvocationsPerInstance allows the endpoint to react more quickly to changes in request volume, reducing the queueing that causes high p99 latency. Option A (increasing batch size) would actually increase latency. Option B (pre-warming) helps with cold starts but not queueing from traffic spikes.

Option C (GPU instance) is unlikely to help if the model is CPU-bound and would not address the root cause of latency variability.

1214
MCQeasy

A data scientist wants to deploy a PyTorch model for real-time inference. Which SageMaker deployment option provides the lowest latency for single-digit millisecond responses?

A.SageMaker Real-Time Inference endpoint
B.SageMaker Asynchronous Inference
C.SageMaker Serverless Inference
D.SageMaker Batch Transform
AnswerA

Real-Time endpoints provide the lowest latency for online inference.

Why this answer

SageMaker Real-Time Inference endpoints (Option A) are optimized for low-latency, real-time predictions, often achieving single-digit millisecond response times because they maintain a persistent endpoint with pre-warmed instances. Option B (SageMaker Asynchronous Inference) is designed for non-real-time workloads with higher latency due to queuing. Option C (SageMaker Serverless Inference) can introduce cold starts and higher latency, especially for sporadic traffic.

Option D (SageMaker Batch Transform) is for offline batch processing and not suitable for real-time inference.

1215
Multi-Selecteasy

Which TWO options are best practices for managing access to data stored in Amazon S3 for a data lake?

Select 2 answers
A.Use S3 access control lists (ACLs) for granular permissions
B.Enable default encryption with SSE-S3
C.Use IAM policies to control user and role permissions
D.Use S3 bucket policies to grant cross-account access
E.Generate pre-signed URLs for all data access
AnswersC, D

IAM policies are central to access management.

Why this answer

C is correct because IAM policies are the primary mechanism for controlling access to AWS services, including S3, for users and roles within an AWS account. They allow you to define fine-grained permissions based on identity, which is a best practice for managing access to a data lake. This aligns with the principle of least privilege and centralized access control.

Exam trap

The trap here is that candidates often confuse encryption mechanisms (like SSE-S3) with access control, or mistakenly think that legacy ACLs are still a best practice for granular permissions in modern data lake architectures.

1216
MCQeasy

A company wants to perform automated hyperparameter tuning for a model. Which Amazon SageMaker feature should be used?

A.Amazon SageMaker Clarify
B.Amazon SageMaker Ground Truth
C.Amazon SageMaker Debugger
D.Amazon SageMaker automatic model tuning
AnswerD

Purpose-built for hyperparameter optimization.

Why this answer

Amazon SageMaker automatic model tuning (also known as hyperparameter tuning) is the correct feature because it automates the process of searching for the optimal combination of hyperparameters for a machine learning model. It uses algorithms like Bayesian optimization, random search, or Hyperband to efficiently explore the hyperparameter space and find the best-performing configuration based on a specified objective metric.

Exam trap

The trap here is that candidates may confuse SageMaker Debugger (which monitors training) with hyperparameter tuning, or assume that Ground Truth or Clarify are involved in model optimization, when in fact they serve entirely different purposes in the ML pipeline.

How to eliminate wrong answers

Option A is wrong because Amazon SageMaker Clarify is designed for bias detection and explainability, not for hyperparameter tuning. Option B is wrong because Amazon SageMaker Ground Truth is used for creating and managing labeled datasets for training, not for tuning hyperparameters. Option C is wrong because Amazon SageMaker Debugger monitors training jobs for anomalies, profiles system resources, and captures tensors for debugging, but it does not perform hyperparameter optimization.

1217
Multi-Selectmedium

A data scientist is performing EDA on a dataset with a binary target variable. Which THREE techniques can help assess the relationship between a continuous feature and the target?

Select 3 answers
A.Scatter plot against another continuous feature
B.KDE plot grouped by target
C.Histogram colored by target
D.Bar chart of feature values
E.Box plot grouped by target
AnswersB, C, E

KDE plots show smoothed density per class.

Why this answer

Box plots (comparing distributions for each class), histograms (overlay or side-by-side), and KDE plots (probability density) are all effective for visualizing the relationship between a continuous feature and a binary target. Option A (scatter plot) requires two continuous variables. Option D (bar chart) is for categorical features.

1218
MCQhard

A company is building a sentiment analysis model using Amazon SageMaker BlazingText. The training data consists of 100,000 product reviews. The data scientist wants to use the Word2Vec algorithm to generate word embeddings. Which configuration is required to use the continuous bag-of-words (CBOW) architecture?

A.Set the mode parameter to 'supervised'.
B.Set the mode parameter to 'batch_skipgram'.
C.Set the mode parameter to 'cbow'.
D.Set the mode parameter to 'skipgram'.
AnswerC

The 'cbow' mode enables the continuous bag-of-words architecture in BlazingText.

Why this answer

In BlazingText, the 'mode' parameter controls the training objective. Setting 'mode' to 'cbow' enables the continuous bag-of-words architecture. 'skipgram' is for skip-gram. 'batch_skipgram' is for large-scale skip-gram. 'supervised' is for text classification.

1219
MCQhard

A data scientist is building a binary classification model to predict customer churn. The dataset is highly imbalanced, with only 5% of customers churning. The scientist evaluates several models using accuracy, precision, recall, and F1 score. Which metric is most appropriate for comparing model performance in this scenario?

A.Accuracy
B.F1 score
C.Precision
D.Recall
AnswerB

In a highly imbalanced dataset with only 5% churn, accuracy is misleading because a model predicting all non-churn achieves 95% accuracy yet fails entirely at detecting churn. F1 score combines precision and recall via their harmonic mean, penalising extreme imbalance between false positives and false negatives. This directly addresses the constraint of class imbalance, rewarding models that correctly identify the minority churn class without sacrificing precision.

Why this answer

F1 score is the harmonic mean of precision and recall and is suitable for imbalanced datasets where accuracy can be misleading. Accuracy would be high even if the model predicts no churn ever (95% accuracy). Precision and recall each consider only one aspect, but F1 balances both.

1220
MCQmedium

A data scientist is exploring a dataset with a large number of features. The scientist suspects that some features are redundant because they are highly correlated with each other. Which technique should the scientist use during EDA to identify and remove such redundant features?

A.Chi-square test
B.Principal Component Analysis (PCA)
C.Correlation matrix heatmap
D.Variance Inflation Factor (VIF)
AnswerD

VIF measures how much the variance of a regression coefficient is inflated due to multicollinearity.

Why this answer

Variance Inflation Factor (VIF) quantifies multicollinearity by measuring how much the variance of a coefficient is inflated due to correlation with other features. Features with high VIF (typically >5 or >10) are considered highly correlated and can be removed. Option A is incorrect because chi-square test is used for testing independence between categorical variables, not for identifying redundant features.

Option B is incorrect because PCA reduces dimensionality by creating new uncorrelated features, but it does not directly identify which original features are redundant. Option C is incorrect because while a correlation matrix heatmap can show pairwise correlations, it does not account for multicollinearity among multiple features; VIF is more comprehensive.

1221
Multi-Selecteasy

A data scientist is building a binary classification model to predict customer churn. The dataset has 10,000 samples with 500 churners (positive class). Which TWO techniques should be used to address the class imbalance? (Choose 2.)

Select 2 answers
A.Use a higher learning rate during training
B.Use L1 regularization on the model
C.Use random undersampling of the majority class
D.Use SMOTE to generate synthetic samples for the minority class
E.Use principal component analysis (PCA) to reduce dimensionality
AnswersC, D

Undersampling reduces majority class samples, balancing the dataset.

Why this answer

Random undersampling of the majority class (Option C) reduces the number of non-churner samples to balance the dataset, preventing the model from being biased toward the majority class. SMOTE (Option D) generates synthetic samples for the minority class by interpolating between existing minority instances, which increases the representation of churners without simply duplicating data. Both techniques directly address class imbalance by modifying the training data distribution.

Exam trap

The MLS-C01 exam often tests the misconception that regularization or dimensionality reduction can fix class imbalance, but these techniques address overfitting or computational efficiency, not skewed class distributions.

1222
MCQeasy

A data scientist is training a binary classification model on a dataset where the positive class represents only 1% of the data. The model's accuracy is 99%, but the recall for the positive class is 0%. Which metric should the scientist use to evaluate the model's performance effectively?

A.Area under the ROC curve (ROC AUC)
B.Area under the Precision-Recall curve (PR AUC)
C.Accuracy
D.F1 score
AnswerB

PR AUC is robust to class imbalance.

Why this answer

In a highly imbalanced dataset where the positive class is only 1%, accuracy is misleading because a model can achieve 99% accuracy by simply predicting the negative class for all samples, resulting in 0% recall for the positive class. The Area under the Precision-Recall curve (PR AUC) is the correct metric because it focuses on the performance of the positive class by evaluating the trade-off between precision and recall, making it sensitive to changes in the minority class. Unlike ROC AUC, which can be overly optimistic in imbalanced settings due to the large number of true negatives, PR AUC provides a more realistic assessment of model performance for rare events.

Exam trap

The trap here is that candidates often choose ROC AUC (Option A) because it is a common default metric, but they fail to recognize that in severe class imbalance, ROC AUC can be artificially inflated by the dominance of true negatives, whereas PR AUC is the correct choice for evaluating minority class performance.

How to eliminate wrong answers

Option A is wrong because ROC AUC evaluates the trade-off between true positive rate and false positive rate, and in highly imbalanced datasets with a large number of true negatives, it can remain high even when the model fails to identify positive samples, giving a false sense of good performance. Option C is wrong because accuracy is a global metric that counts overall correct predictions; in this 1% positive class scenario, a model that always predicts the negative class achieves 99% accuracy but has 0% recall, making it completely useless for detecting the positive class. Option D is wrong because the F1 score, while better than accuracy, is a single threshold-dependent metric that can be misleading if the model's precision is high but recall is zero (F1 would be 0), and it does not capture performance across all thresholds like PR AUC does.

1223
MCQeasy

A data scientist is using Amazon SageMaker to train a model and wants to automatically stop the training job if the loss does not improve for a certain number of epochs. Which SageMaker feature can be used for this purpose?

A.SageMaker Experiments
B.Custom early stopping callback in the training script
C.SageMaker Automatic Model Tuning
D.SageMaker Debugger
AnswerB

Implementing a custom callback that stops training when loss stagnates is the most direct method.

Why this answer

SageMaker provides built-in early stopping via the 'StoppingCondition' parameter in the training job definition, or through custom training scripts that use callbacks. The simplest way is to set MaxRuntimeInSeconds, but for early stopping based on loss, the data scientist should implement a custom callback in the training script.

1224
MCQhard

A team is building a data pipeline to process terabytes of log data daily using Amazon EMR. The data arrives in 5-minute windows and must be available for querying within 30 minutes. The data is originally in gzip-compressed CSV files. Which approach will minimize processing time and cost?

A.Use Amazon EMR with Spark to convert data to Parquet and use on-demand instances.
B.Use Amazon EMR with Spark to convert data to Parquet and store in S3, using spot instances for task nodes.
C.Use AWS Glue to convert data to gzip-compressed CSV and query with Athena.
D.Use Amazon EMR with Hive to transform data to compressed CSV and store in S3.
AnswerB

Parquet reduces scan size, spot instances reduce cost.

Why this answer

Converting gzip-compressed CSV to Parquet reduces storage size and improves query performance due to columnar storage and predicate pushdown. Using spot instances for task nodes significantly lowers compute cost, while the 30-minute SLA is achievable with Spark on EMR processing 5-minute windows of data.

Exam trap

The trap here is that candidates may overlook the cost savings of spot instances for transient, fault-tolerant workloads, or assume that any compression (like gzip CSV) is sufficient for performance, ignoring the benefits of columnar formats like Parquet for analytical queries.

How to eliminate wrong answers

Option A is wrong because using on-demand instances for task nodes increases cost unnecessarily; spot instances are suitable for fault-tolerant, transient workloads like data transformation. Option C is wrong because AWS Glue is not optimized for high-volume, low-latency ETL on terabytes of daily log data, and converting to gzip-compressed CSV does not improve query performance over Parquet. Option D is wrong because Hive on EMR is slower than Spark for large-scale data processing, and storing as compressed CSV does not provide the performance benefits of columnar formats like Parquet.

1225
MCQeasy

A company has deployed a real-time inference endpoint using SageMaker for a fraud detection model. The model uses a Random Forest classifier. The endpoint receives predictions but the latency is too high. The metric shows p99 latency of 500ms, but the requirement is under 200ms. The team has already optimized the instance type to the maximum allowed by their budget. The data scientist suggests: A) Reducing the number of trees in the Random Forest model. B) Switching to a linear model like Logistic Regression. C) Enabling SageMaker's batch transform instead of real-time endpoint. D) Adding more instances to the endpoint behind a load balancer. Which option will MOST effectively reduce latency while maintaining acceptable accuracy?

A.Switch to a linear model like Logistic Regression
B.Reduce the number of trees in the Random Forest model
C.Enable SageMaker's batch transform
D.Add more instances to the endpoint
AnswerB

Fewer trees mean faster inference, though accuracy may drop slightly; it's a direct latency reduction.

Why this answer

(Reducing the number of trees) is the most effective method to reduce latency while maintaining acceptable accuracy. Fewer trees directly decrease inference time of the Random Forest model, although it may slightly impact accuracy. Switching to a linear model (Option A) would reduce latency but likely result in significant accuracy loss.

Batch transform (Option C) is not suitable for real-time inference. Adding more instances (Option D) improves throughput but not per-request latency.

1226
Multi-Selecthard

A company is deploying a machine learning model using Amazon SageMaker. To reduce costs, they want to use SageMaker Managed Spot Training. Which THREE conditions must be met for the training job to use spot instances? (Choose THREE.)

Select 3 answers
A.The model must be deployed to a serverless endpoint
B.The training job must be able to handle interruptions gracefully
C.The chosen instance type must be available in the spot market
D.The training script must save checkpoints to an S3 bucket periodically
E.The training job must be configured to run in a VPC
AnswersB, C, D

Spot instances can be reclaimed; the job must be fault-tolerant.

Why this answer

For SageMaker Managed Spot Training, the training job must be able to handle interruptions (B) because spot instances can be reclaimed. The chosen instance type must be available in the spot market (C). Additionally, the training script should save checkpoints to S3 periodically (D) to resume training if interrupted.

Option A is incorrect because spot training is for training, not deploying endpoints. Option E is not required; training can run inside or outside a VPC.

Exam trap

A common trap is to think that serverless endpoints or VPC configuration are required for spot training. They are not. The key requirements are interruption handling and checkpointing.

1227
Multi-Selectmedium

Which TWO metrics are appropriate for evaluating a binary classification model when the cost of false negatives is high?

Select 2 answers
A.Accuracy
B.AUC-ROC
C.Recall
D.F1 score
E.Precision
AnswersC, D

Recall measures the proportion of actual positives correctly identified.

Why this answer

When false negatives are costly, we want to minimize them, so recall (true positive rate) is important. Precision is also important to avoid too many false positives, but F1 score balances both. Recall directly measures false negatives, and F1 combines precision and recall.

AUC-ROC is a general measure, and accuracy can be misleading. Therefore, the two appropriate metrics are Recall (option C) and F1 score (option D).

1228
Multi-Selecthard

A company is using Amazon Redshift for data warehousing. The data engineering team observes that query performance degrades over time due to data skew. Which three strategies should the team implement to improve performance?

Select 3 answers
A.Choose appropriate distribution keys based on join and group-by columns.
B.Increase the number of nodes in the Redshift cluster.
C.Run VACUUM and ANALYZE commands regularly.
D.Define appropriate sort keys to minimize the number of blocks scanned.
E.Drop unused indexes on large tables.
AnswersA, C, D

Good distribution keys reduce data movement and improve performance.

Why this answer

Choosing appropriate distribution keys based on join and group-by columns minimizes data movement across nodes during query execution. In Amazon Redshift, data is distributed across compute nodes according to the distribution key; aligning it with frequently joined or aggregated columns ensures that related rows are co-located on the same slice, reducing network shuffling and improving query performance.

Exam trap

The trap here is that candidates often confuse Redshift's distribution and sort keys with traditional database indexes, leading them to select option E, or they mistakenly believe that scaling out nodes (option B) automatically fixes skew-related performance issues.

1229
MCQhard

An ML team is using SageMaker Autopilot to automatically build a binary classification model. The dataset has 500,000 rows and 200 columns, with a severe class imbalance (1% positive). Which configuration should the team set to address the imbalance?

A.Specify the 'objective' as 'F1' or 'AUC' to optimize for imbalanced data.
B.Set the 'problem_type' to 'MulticlassClassification' to handle imbalance.
C.Use the 'AutoML' job with 'EnsembleMode' and 'SMOTE' sampling.
D.Configure the data split to use stratified sampling based on the target.
AnswerA

F1 and AUC are better metrics for imbalanced classification.

Why this answer

SageMaker Autopilot allows specifying the objective metric for optimization. For imbalanced datasets, metrics like F1 score or AUC are more appropriate than accuracy because they account for precision and recall or the trade-off between true positive and false positive rates. By setting the objective to 'F1' or 'AUC', Autopilot will optimize the model for these metrics, which better handle class imbalance.

Option B (MulticlassClassification) is for multi-class problems, not binary imbalance; Option C (SMOTE) is not supported by Autopilot; Option D (stratified splitting) helps ensure representative validation splits but does not directly address the imbalance in model optimization.

1230
MCQhard

A machine learning engineer is using SageMaker to train an XGBoost model on a dataset with a severe class imbalance (1:1000). The goal is to maximize recall on the minority class. Which hyperparameter tuning strategy is MOST appropriate?

A.Set max_delta_step to a high value
B.Increase subsample ratio to 1.0
C.Set scale_pos_weight to the ratio of negative to positive samples
D.Set objective to 'binary:logistic' and tune max_depth
AnswerC

This parameter adjusts the weight of the minority class, improving recall.

Why this answer

XGBoost's 'scale_pos_weight' parameter can be set to the ratio of negative to positive instances to help the model focus on the minority class. Adjusting max_delta_step or subsample may help but are secondary. Setting objective to 'binary:logistic' is default, not addressing imbalance.

1231
MCQmedium

Refer to the exhibit. A data scientist is configuring SageMaker Model Monitor for data quality checks. The configuration above is used. What is the purpose of the `ProbabilityThresholdAttribute` set to "0.5"?

A.It filters the input data to only include predictions above the threshold
B.It specifies the threshold for sampling data for monitoring
C.It sets the threshold for the accuracy metric
D.It defines the probability threshold used to convert model output to binary predictions for monitoring
AnswerD

This threshold is used to compute predicted labels for monitoring purposes.

Why this answer

In SageMaker Model Monitor, the `ProbabilityThresholdAttribute` parameter is used for binary classification models to define the probability threshold for converting model output probabilities (e.g., 0.7) to binary predictions (0 or 1). This threshold is used to monitor drift in the distribution of predictions over time, not to set the endpoint inference threshold. Option D correctly identifies this purpose.

Option A is incorrect because it does not filter input data; it only defines the threshold for converting probabilities to labels for monitoring. Option B is incorrect as it does not specify a sampling threshold; sampling is configured separately. Option C is incorrect because it does not set the accuracy metric threshold; accuracy is a separate metric.

1232
MCQhard

A data scientist is building a recommender system using collaborative filtering. The dataset is sparse (99% missing values). Which algorithm is best suited?

A.Random Forest
B.K-Nearest Neighbors
C.Matrix Factorization (e.g., SVD)
D.Hidden Markov Model
AnswerC

Matrix factorization works well on sparse data.

Why this answer

Matrix factorization (e.g., SVD) is best suited for sparse collaborative filtering because it learns latent factors that capture underlying user-item interactions, effectively handling the 99% missing values by generalizing patterns rather than relying on explicit pairwise similarities. Unlike memory-based methods, it decomposes the sparse user-item matrix into lower-dimensional representations, enabling accurate predictions even when most entries are unobserved.

Exam trap

The MLS-C01 exam often tests the misconception that K-Nearest Neighbors (KNN) is the default for collaborative filtering, but the trap here is that extreme sparsity (99% missing) makes pairwise similarity calculations unreliable, whereas matrix factorization explicitly models latent factors to overcome data sparsity.

How to eliminate wrong answers

Option A is wrong because Random Forest is a supervised ensemble method that requires a dense feature matrix and cannot inherently handle missing values in a collaborative filtering context; it would fail to leverage the implicit feedback structure of the sparse user-item matrix. Option B is wrong because K-Nearest Neighbors (KNN) is a memory-based collaborative filtering approach that computes similarities between users or items, but with 99% missing values, pairwise distances become unreliable and the algorithm suffers from poor scalability and the 'curse of dimensionality'. Option D is wrong because Hidden Markov Model (HMM) is designed for sequential or temporal data with hidden states, not for static user-item interaction matrices; it does not model the latent factor structure needed for collaborative filtering in sparse settings.

1233
Multi-Selecthard

Which TWO SageMaker features can be used to perform hyperparameter optimization? (Choose 2)

Select 2 answers
A.SageMaker Debugger
B.SageMaker Pipelines
C.SageMaker Model Monitor
D.SageMaker automatic model tuning
E.SageMaker Experiments
AnswersD, E

This is the built-in hyperparameter tuning service.

Why this answer

The correct answers are D (SageMaker automatic model tuning) and E (SageMaker Experiments). SageMaker automatic model tuning is the built-in feature that performs hyperparameter optimization by running multiple training jobs with different hyperparameter combinations. SageMaker Experiments can be used to track, organize, and analyze hyperparameter tuning jobs, including running multiple trials with different parameters, effectively performing HPO through manual or automated trial management.

SageMaker Debugger (A) monitors training metrics and conditions but does not perform HPO. SageMaker Pipelines (B) orchestrates workflows but is not a direct tuning feature. SageMaker Model Monitor (C) detects data drift in deployed models and is unrelated to HPO.

1234
MCQeasy

During training of a SageMaker built-in object detection algorithm, the loss is not decreasing after several epochs. Which troubleshooting step should be taken first?

A.Increase the mini-batch size
B.Add more classes to the dataset
C.Check whether the learning rate is appropriate
D.Increase the number of epochs
AnswerC

Learning rate is a critical hyperparameter; incorrect value often causes loss not to decrease.

Why this answer

When the loss is not decreasing during training of a SageMaker built-in object detection algorithm, the most common cause is an inappropriate learning rate. A learning rate that is too high can cause the loss to oscillate or diverge, while one that is too low can cause the loss to plateau. Checking and adjusting the learning rate is the first troubleshooting step because it directly controls the step size of gradient updates and is a fundamental hyperparameter in optimization.

Exam trap

The trap here is that candidates often assume increasing the number of epochs (Option D) will always reduce loss, but they fail to recognize that a plateauing loss is typically a sign of a hyperparameter issue like learning rate, not insufficient training time.

How to eliminate wrong answers

Option A is wrong because increasing the mini-batch size typically stabilizes gradient estimates but does not directly address a plateauing loss; it can even slow convergence if the batch size becomes too large. Option B is wrong because adding more classes to the dataset increases task complexity and would likely worsen the loss, not help it decrease. Option D is wrong because increasing the number of epochs does not fix the underlying optimization issue; if the loss is not decreasing due to a poor learning rate, more epochs will simply continue the same ineffective training.

1235
MCQhard

A company wants to serve a scikit-learn model via SageMaker. The inference code requires a custom preprocessing step that is not in the default scikit-learn container. What is the simplest way to deploy?

A.Create a custom Docker image extending the SageMaker scikit-learn container
B.Package the code in a Lambda layer and use SageMaker hosting
C.Use SageMaker Batch Transform with a custom processing script
D.Use SageMaker Neo to compile the model and add preprocessing
AnswerA

Extending the container with the custom preprocessing is straightforward and supported.

Why this answer

Extending the SageMaker scikit-learn container with a custom Docker image is the simplest and most direct way to add custom preprocessing logic that is not included in the default container. SageMaker's pre-built scikit-learn container supports only standard scikit-learn inference code; any additional dependencies or custom preprocessing steps require you to build a custom image that inherits from the official SageMaker scikit-learn image and adds your code. This approach avoids the complexity of managing separate inference pipelines or external services.

Exam trap

The trap here is that candidates often confuse SageMaker's built-in algorithm containers with the ability to inject arbitrary code via environment variables or Lambda layers, when in fact custom preprocessing requires a custom Docker image that extends the official container.

How to eliminate wrong answers

Option B is wrong because Lambda layers are used to package dependencies for AWS Lambda functions, not for SageMaker hosting endpoints; SageMaker hosting does not support Lambda layers for inference code. Option C is wrong because SageMaker Batch Transform is designed for offline, batch predictions and does not provide a real-time inference endpoint; it also requires a separate processing script rather than integrating preprocessing directly into the model serving container. Option D is wrong because SageMaker Neo is a model compilation and optimization service that targets hardware acceleration, not a mechanism for adding custom preprocessing logic to inference code.

1236
MCQmedium

A company is using Amazon SageMaker to deploy a real-time inference endpoint for a computer vision model. The endpoint receives bursts of traffic with up to 500 requests per second, but the load is unpredictable. Which scaling strategy is MOST cost-effective while maintaining low latency?

A.Manually provision enough instances to handle peak load
B.Use provisioned concurrency on SageMaker Serverless Inference
C.Use a multi-model endpoint to reduce the number of instances
D.Configure automatic scaling with a target tracking policy and add a buffer to handle bursts
AnswerD

Autoscaling with a target tracking policy adjusts instances based on demand, and a buffer helps absorb sudden spikes.

Why this answer

Amazon SageMaker's automatic scaling with a target tracking policy dynamically adjusts the number of instances based on a target metric (e.g., InvocationsPerInstance), which handles unpredictable bursts cost-effectively. Adding a buffer (e.g., a higher target value or a cooldown period) ensures low latency by pre-scaling before traffic spikes, avoiding cold starts and over-provisioning.

Exam trap

The trap here is that candidates often confuse provisioned concurrency (Option B) as a cost-effective burst solution, but it is actually designed for serverless functions with predictable traffic and incurs costs for idle capacity, making it unsuitable for high-throughput, unpredictable bursts.

How to eliminate wrong answers

Option A is wrong because manually provisioning enough instances for peak load leads to significant over-provisioning and wasted cost during low-traffic periods, as the endpoint runs idle instances continuously. Option B is wrong because SageMaker Serverless Inference with provisioned concurrency is designed for intermittent or low-throughput workloads, not for sustained bursts of 500 requests per second, and it incurs costs for provisioned concurrency even when idle, plus potential cold start latency. Option C is wrong because a multi-model endpoint reduces the number of instances by hosting multiple models on shared instances, but it does not inherently address scaling for traffic bursts; it still requires manual or auto-scaling configuration to handle load spikes and can suffer from model loading latency during bursts.

1237
Multi-Selecthard

A company needs to build a data lake on AWS for analytics. The data includes structured, semi-structured, and unstructured data. The solution must support schema-on-read, provide fine-grained access control, and be cost-effective for storing rarely accessed data. Which THREE services should be used? (Choose THREE)

Select 3 answers
A.AWS Glue Data Catalog for schema-on-read.
B.Amazon Redshift for data warehousing.
C.Amazon S3 as the primary storage layer.
D.Amazon EMR for data processing.
E.S3 Lifecycle policies to transition data to Glacier.
AnswersA, C, E

Glue enables schema-on-read for analytics.

Why this answer

AWS Glue Data Catalog is correct because it provides a centralized metadata repository that enables schema-on-read for data stored in Amazon S3. It allows you to define table schemas and partitions without transforming the underlying data, so analytics tools like Amazon Athena and Amazon EMR can query the data with the schema applied at read time.

Exam trap

The trap here is that candidates often confuse Amazon Redshift as a data lake storage layer due to its analytics capabilities, but it is a data warehouse with schema-on-write and higher costs for infrequently accessed data, making it unsuitable for the described requirements.

1238
MCQmedium

A data scientist is using Amazon SageMaker to train a linear regression model. After training, the scientist notices that the model has a high bias. What is the most likely cause?

A.The training dataset has too many features
B.The model is too complex and overfits the data
C.The regularization parameter is too high
D.The model is too simple and underfits the data
AnswerD

Linear regression can underfit if relationship is nonlinear.

Why this answer

High bias indicates that the model is underfitting the training data, meaning it is too simple to capture underlying patterns. Option D correctly identifies this cause. Option A is incorrect because too many features typically lead to high variance (overfitting), not high bias.

Option B is incorrect because overfitting is associated with high variance, not high bias. Option C is incorrect because while an excessively high regularization parameter can increase bias, it is less likely than the model being too simple; regularization is designed to prevent overfitting, and its improper tuning is not the most common cause of high bias.

1239
MCQhard

A data scientist is analyzing a dataset with a large number of categorical features. The target variable is binary. Which technique should the scientist use to assess the relationship between each categorical feature and the target?

A.ANOVA
B.Point-biserial correlation
C.Cramér's V
D.Chi-square test of independence
AnswerD

Chi-square tests association between two categorical variables.

Why this answer

The chi-square test of independence is appropriate for testing association between categorical features and a binary target. ANOVA is for continuous target. Mutual information measures dependency but is not a hypothesis test.

Point-biserial correlation is for continuous and binary. Cramér's V is a measure of association after chi-square.

1240
MCQhard

A company deploys a SageMaker endpoint for real-time inference. After a week, the response latency increases from 50 ms to 500 ms. CPU utilization is at 30%. What is the most likely cause?

A.The model has a memory leak
B.The instance type is underpowered for the inference load
C.The inference code makes a call to a downstream service that is throttling requests
D.The SageMaker endpoint is experiencing a network outage
AnswerC

Downstream throttling can increase latency without high CPU on the endpoint.

Why this answer

Increased latency with low CPU utilization indicates that the model itself is not compute-bound. Instead, the bottleneck is likely external, such as a downstream service (e.g., database, API) that the inference code calls. Throttling by that service causes requests to queue up, increasing latency without raising CPU usage on the SageMaker instance.

Option A would typically cause memory pressure rather than low CPU. Option B would show high CPU if underpowered. Option D would cause connection errors, not just latency increase.

1241
MCQhard

Refer to the exhibit. A data scientist is reviewing CloudWatch logs for a SageMaker real-time endpoint. The log shows that a prediction took 15 ms. The endpoint is configured with an ml.c5.large instance and the model is a small scikit-learn model. The latency requirement is under 10 ms. Which action would most likely reduce the latency?

A.Use a larger instance type
B.Add more instances to the endpoint
C.Change the model to a TensorFlow model
D.Enable SageMaker Batch Transform
E.Increase the batch size for inference
AnswerA

More CPU power reduces latency.

Why this answer

The latency of 15 ms exceeds the 10 ms requirement, indicating that the current ml.c5.large instance lacks sufficient compute resources (CPU) to process predictions quickly enough. Upgrading to a larger instance type (e.g., ml.c5.xlarge or ml.c5.2xlarge) provides more CPU capacity, reducing inference time by allowing the model to compute predictions faster. This directly addresses the bottleneck for a small scikit-learn model, which is CPU-bound and benefits from increased compute power.

Exam trap

The trap here is that candidates confuse horizontal scaling (adding instances) with reducing latency, but horizontal scaling only improves throughput, not the per-request response time, which is the key metric in this question.

How to eliminate wrong answers

Option B is wrong because adding more instances to the endpoint (horizontal scaling) improves throughput and availability but does not reduce per-request latency; it distributes load across instances but each request still runs on a single instance with the same compute capacity. Option C is wrong because changing the model to TensorFlow does not inherently reduce latency; TensorFlow models can be more computationally intensive than scikit-learn models, potentially increasing latency, and the framework change does not address the underlying compute limitation. Option D is wrong because SageMaker Batch Transform is designed for asynchronous, offline batch predictions on large datasets, not for real-time endpoints; it does not reduce latency for individual requests and introduces queuing delays.

Option E is wrong because increasing the batch size for inference would process multiple requests together, which increases the time to complete a batch and raises latency per individual request, worsening the problem.

1242
MCQmedium

Refer to the exhibit. A data scientist is trying to run a SageMaker training job using a script that reads data from the S3 bucket 'my-bucket' and writes the model artifact to the same bucket. The training job fails with an access denied error. What is the likely cause?

A.The IAM role does not have permission to write to the S3 bucket for the model artifact
B.The IAM role does not have sagemaker:CreateModel permission
C.The IAM role does not have s3:ListBucket permission
D.The IAM role does not have ec2:DescribeInstances permission
AnswerA

The policy only allows PutObject on training-data/*, but the model artifact might be saved to a different prefix (e.g., output/).

Why this answer

The training job fails with an access denied error because the IAM role used by SageMaker lacks the s3:PutObject permission (or equivalent write access) for the S3 bucket 'my-bucket'. While the script reads data from the bucket, writing the model artifact requires explicit write permissions on the same bucket. Without this, SageMaker cannot upload the model artifact, causing the job to fail.

Exam trap

The trap here is that candidates may focus on the read operation (data input) and overlook the write operation (model artifact output), or confuse S3 permissions with SageMaker-specific API actions like CreateModel.

How to eliminate wrong answers

Option B is wrong because sagemaker:CreateModel is a permission for creating a SageMaker model resource after training, not for writing to S3 during the training job; the error occurs during training, not model creation. Option C is wrong because s3:ListBucket is a read permission for listing objects, and the job already reads data successfully (the error is on write), so lack of ListBucket would cause a different error (e.g., 403 on list). Option D is wrong because ec2:DescribeInstances is unrelated to S3 access; it is used for managing EC2 instances, not for SageMaker training jobs writing to S3.

1243
MCQhard

A machine learning engineer is using Amazon SageMaker to train a deep learning model. The training job is failing with a 'ResourceLimitExceeded' error. The engineer checks the account limits and sees that the current limit for the instance type is 2, and they are already using 2 instances for other jobs. Which approach would resolve the issue MOST cost-effectively?

A.Request a service limit increase for the current instance type
B.Use a different instance type that is available and has sufficient capacity
C.Use a managed spot training instead of on-demand
D.Stop the other training jobs to free up resources
AnswerB

Different instance types have separate limits and may be available immediately.

Why this answer

Using a different instance type within the same family often has separate limits. Option A increases cost. Option C may not resolve if the limit is account-wide.

Option D changes the request, not the limit.

1244
MCQeasy

A company wants to store semi-structured data from IoT sensors in a cost-effective manner for occasional querying. The data is not updated once written. Which Amazon S3 storage class is the most cost-effective for this use case?

A.S3 Standard
B.S3 One Zone-Infrequent Access
C.S3 Intelligent-Tiering
D.S3 Glacier Deep Archive
AnswerD

Correct: Deep Archive is the lowest cost for rarely accessed data with long retrieval times.

Why this answer

S3 Glacier Deep Archive is the most cost-effective storage class for semi-structured IoT sensor data that is written once and only occasionally queried. It offers the lowest storage cost among S3 classes (approximately $0.00099/GB/month), making it ideal for long-term archival of immutable data where retrieval times of 12–48 hours are acceptable.

Exam trap

The trap here is that candidates often choose S3 One Zone-Infrequent Access (Option B) because they focus on 'cost-effective' and 'infrequent access' without considering the requirement for durability and the even lower cost of Glacier Deep Archive for immutable archival data.

How to eliminate wrong answers

Option A is wrong because S3 Standard is designed for frequently accessed data with millisecond retrieval, incurring higher storage costs (~$0.023/GB/month) that are unnecessary for rarely queried IoT data. Option B is wrong because S3 One Zone-Infrequent Access, while cheaper than Standard, still costs more than Glacier Deep Archive and stores data in a single Availability Zone, risking data loss if that AZ fails—unacceptable for archival data. Option C is wrong because S3 Intelligent-Tiering automatically moves data between tiers based on access patterns but incurs a monthly monitoring fee ($0.0025 per 1,000 objects) and does not include the Deep Archive tier, so it cannot achieve the lowest cost for data that is almost never accessed.

1245
MCQhard

A company runs a real-time fraud detection system using Amazon Kinesis Data Streams with 100 shards. Data is consumed by a custom Java application running on Amazon EC2 instances in an Auto Scaling group. The application processes records and writes results to a DynamoDB table. Over the past month, the application has experienced intermittent slowdowns and the DynamoDB write capacity has been fully utilized during peak hours. The team wants to improve throughput without losing the ability to reprocess failed records. The application currently uses the Kinesis Client Library (KCL) with DynamoDB as the lease table. The team is considering the following changes: A. Increase the number of EC2 instances to match the number of shards. B. Switch to using AWS Lambda as the consumer to handle scaling automatically. C. Increase the write capacity of the DynamoDB lease table to handle more workers. D. Use enhanced fan-out to have each consumer receive its own 2 MB/second shard throughput. Which change should the team implement first to address the issue?

A.Increase the write capacity of the DynamoDB lease table to handle more workers.
B.Use enhanced fan-out to have each consumer receive its own 2 MB/second shard throughput.
C.Switch to using AWS Lambda as the consumer to handle scaling automatically.
D.Increase the number of EC2 instances to match the number of shards.
AnswerB

Enhanced fan-out gives dedicated throughput per consumer.

Why this answer

The primary bottleneck is DynamoDB write capacity being fully utilized during peak hours. Enhanced fan-out (option B) provides each consumer with a dedicated 2 MB/second read throughput per shard, eliminating the need for consumers to contend for the shared 2 MB/second per shard. This reduces the load on the DynamoDB lease table because workers no longer need to poll for records, which in turn lowers the write operations to the lease table and alleviates the DynamoDB write capacity issue.

Exam trap

The trap here is that candidates assume increasing DynamoDB write capacity (option A) is the direct fix for write capacity exhaustion, but they miss that enhanced fan-out reduces the underlying cause of those writes by eliminating polling-based contention.

How to eliminate wrong answers

Option A is wrong because increasing EC2 instances to match shards does not address the DynamoDB write capacity bottleneck; it may even increase lease table writes due to more workers contending for leases. Option C is wrong because increasing the write capacity of the DynamoDB lease table treats a symptom (high write load from KCL workers) rather than the root cause (contention for shard throughput); enhanced fan-out reduces the need for frequent lease updates. Option D is wrong because switching to AWS Lambda does not inherently solve the DynamoDB write capacity issue; Lambda still uses KCL under the hood with DynamoDB as the lease table, and the same write contention would persist unless enhanced fan-out is also used.

1246
Multi-Selectmedium

A data scientist is building a binary classifier to predict customer churn. The dataset is highly imbalanced (5% churn). Which TWO techniques can help improve the model's ability to detect churn?

Select 2 answers
A.Downsample the majority class to balance the dataset
B.Use Synthetic Minority Over-sampling Technique (SMOTE)
C.Use class weights in the loss function to penalize misclassifications of the minority class
D.Use accuracy as the evaluation metric
E.Increase the model complexity by adding more layers
AnswersB, C

SMOTE generates synthetic samples for the minority class.

Why this answer

SMOTE generates synthetic samples for the minority class by interpolating between existing minority instances, effectively balancing the dataset and providing the model with more diverse churn examples to learn from. This directly addresses the class imbalance problem without losing information from the majority class.

Exam trap

The trap here is that candidates often assume downsampling (Option A) is always beneficial for imbalance, but it can discard critical majority class patterns, whereas SMOTE and class weights (Options B and C) preserve data while directly targeting the minority class.

1247
MCQeasy

A company is using Amazon SageMaker to train a model. The training data is stored in an S3 bucket. The data scientist wants to use the Pipe mode for training to stream data directly from S3 instead of downloading it first. Which of the following is a prerequisite for using Pipe mode?

A.The training data must be compressed using Gzip.
B.The S3 bucket must have public read access.
C.The training data must be stored as a single large file.
D.The training data must be in RecordIO-protobuf or TFRecord format.
AnswerD

Pipe mode streams data line by line; RecordIO and TFRecord are supported.

Why this answer

Pipe mode in Amazon SageMaker streams data directly from S3 to the training algorithm without downloading it first. This mode requires the data to be in a format that supports random access and chunked reading, such as RecordIO-protobuf or TFRecord. Option D is correct because these formats enable efficient streaming.

Option A is incorrect: SageMaker can uncompress data on the fly if needed, and compression is not a prerequisite. Option B is incorrect: the S3 bucket does not need public read access; SageMaker uses IAM roles to access the data. Option C is incorrect: Pipe mode works best with multiple sharded files, not a single large file, to allow parallel streaming.

1248
MCQhard

A machine learning team is building a model to predict customer churn. The dataset has 20 features and 50,000 rows. After initial EDA, they notice that the target variable 'churn' is highly imbalanced (5% churn, 95% non-churn). Which EDA step should the team prioritize to address this imbalance before model training?

A.Remove outliers in the majority class to balance the dataset.
B.Analyze the distribution of each feature separately for churn and non-churn groups.
C.Perform stratified cross-validation to ensure balanced folds.
D.Apply Principal Component Analysis (PCA) to reduce noise.
AnswerB

This helps identify which features differentiate the classes and informs whether resampling or cost-sensitive methods are needed.

Why this answer

During EDA for an imbalanced dataset, it is crucial to compare feature distributions between churn and non-churn groups to identify which features separate the classes. Option A is wrong because removing outliers from the majority class is not a standard EDA step and can introduce bias. Option C is wrong because stratified cross-validation is a model evaluation technique applied during training, not an EDA step.

Option D is wrong because PCA is a dimensionality reduction technique that does not address class imbalance.

1249
MCQeasy

A machine learning engineer is deploying a model using Amazon SageMaker and wants to automatically scale the endpoint based on the number of incoming requests. Which scaling policy should be used?

A.Step scaling
B.Scheduled scaling
C.Target tracking scaling
D.Simple scaling
AnswerC

Target tracking automatically adjusts capacity based on a target metric.

Why this answer

Amazon SageMaker endpoints support Application Auto Scaling. A target tracking scaling policy (Option C) is the recommended approach when you want to automatically scale based on a metric like InvocationsPerInstance. It adjusts capacity to maintain the target value of the metric.

Step scaling (Option A) requires defining step adjustments and thresholds. Simple scaling is no longer recommended by AWS. Scheduled scaling (Option B) is for predictable traffic patterns.

Therefore, Option C is correct.

1250
Multi-Selecteasy

Which TWO of the following are benefits of using SageMaker Managed Spot Training? (Select TWO.)

Select 2 answers
A.No need to checkpoint the model
B.Potential for significant cost savings
C.Faster training times
D.Guaranteed instance availability
E.Lower training cost compared to on-demand instances
AnswersB, E

Savings can be up to 90%.

Why this answer

SageMaker Managed Spot Training leverages spare AWS EC2 compute capacity at a significantly reduced price compared to on-demand instances, often achieving cost savings of 60-90%. This makes it a highly cost-effective option for training machine learning models, especially when the training job is fault-tolerant and can handle interruptions.

Exam trap

The trap here is that candidates often confuse 'lower cost' with 'faster training' or assume Spot instances are always available, but the key distinction is that Spot training is interruptible and requires checkpointing, while on-demand instances are reliable but more expensive.

1251
MCQeasy

A machine learning engineer needs to deploy a model that requires custom inference code with dependencies. Which SageMaker deployment option should be used?

A.Use a SageMaker notebook instance as an endpoint.
B.Create a custom Docker container and deploy to SageMaker endpoint.
C.Use a built-in SageMaker algorithm.
D.Use a SageMaker batch transform job.
AnswerB

Custom container provides flexibility for custom code and dependencies.

Why this answer

When a model requires custom inference code with dependencies, the only way to fully control the runtime environment, libraries, and inference logic is to package everything into a custom Docker container. SageMaker endpoints can then deploy this container, allowing the engineer to specify the exact inference script and dependencies (e.g., via a Dockerfile and a requirements.txt). This approach supports any framework or custom logic that built-in algorithms cannot provide.

Exam trap

A common mistake is assuming a SageMaker notebook instance can be used as an inference endpoint, but notebook instances are for development and experimentation only. To serve custom inference code, you must package it in a Docker container and deploy it to a SageMaker endpoint.

How to eliminate wrong answers

Option A is wrong because a SageMaker notebook instance is an interactive development environment, not a persistent inference endpoint; it cannot serve production traffic and lacks the necessary scaling, load balancing, and health-check mechanisms. Option C is wrong because built-in SageMaker algorithms are pre-packaged with fixed inference code and dependencies; they cannot be modified to run custom inference logic or include additional libraries. Option D is wrong because a SageMaker batch transform job is designed for offline, asynchronous predictions on a dataset, not for real-time, low-latency inference with a persistent endpoint; it does not support custom inference code in the same way as a deployed container.

1252
MCQeasy

During EDA, a data scientist finds that a feature has a skewness value of 2.5. What does this indicate about the data distribution?

A.The distribution is right-skewed
B.The distribution is symmetric
C.The distribution is left-skewed
D.The distribution has no outliers
AnswerA

Positive skewness indicates a long right tail.

Why this answer

A skewness value of 2.5 is positive and greater than 1, indicating a highly right-skewed (positively skewed) distribution, where the tail extends to the right. Option A correctly identifies this. Option B is wrong because symmetric distributions have skewness near 0.

Option C is wrong because left-skewed distributions have negative skewness. Option D is wrong because skewness measures asymmetry, not necessarily the presence of outliers.

1253
Multi-Selecthard

A company uses AWS Glue to run ETL jobs on a daily basis. The jobs read from Amazon RDS and write to Amazon S3. The data volume has grown, and the jobs are taking longer to complete. The team wants to optimize the jobs for cost and performance. Which combination of techniques should the team implement? (Choose THREE.)

Select 3 answers
A.Use a larger Glue worker type, such as G.2X, for more memory per worker.
B.Enable job bookmarks to process only new data since the last run.
C.Increase the number of partitions in the output S3 data to improve parallelism.
D.Increase the maximum number of DPUs for the job to 100.
E.Use pushdown predicates in the JDBC connection to filter data at the source.
AnswersA, B, E

Larger workers provide more resources per task, improving performance.

Why this answer

(larger worker type) provides more memory and CPU per worker, improving performance for heavy workloads. Option B (job bookmarks) enables incremental processing, reducing the amount of data read on subsequent runs. Option E (pushdown predicates) filters data at the source in the JDBC connection, reducing data transferred across the network.

Option C is incorrect because increasing partitions in the output S3 data does not affect the processing speed of the current job. Option D is incorrect because increasing the maximum number of DPUs increases cost linearly and may not be as effective as using larger workers or other optimizations.

1254
MCQhard

Refer to the exhibit. A data engineer examines the output of 'aws glue get-job-run' for a failed job. The job run state is FAILED, but ErrorMessage is empty. The job ran for 3600 seconds (1 hour) before failing. What is the MOST likely cause of the failure?

A.The JDBC connection to the source database timed out.
B.The IAM role does not have sufficient permissions to access S3.
C.The job ran out of memory due to insufficient DPU allocation.
D.The Python script has a syntax error.
AnswerC

Out-of-memory errors may not always produce a detailed error message in the job run output.

Why this answer

The job ran for 3600 seconds (the default Glue job timeout) before failing with a FAILED state and an empty ErrorMessage. This pattern is characteristic of an out-of-memory (OOM) error in AWS Glue, which occurs when the allocated DPUs (Data Processing Units) are insufficient for the data volume or transformation complexity. Glue kills the job at the timeout boundary without a detailed error message because the JVM or Python process is killed by the OS (OOM killer), not by a Glue service exception.

Exam trap

AWS Glue jobs failing due to resource exhaustion (memory/DPU) will show a FAILED state with an empty ErrorMessage and run until the timeout, unlike permission or syntax errors which produce immediate, descriptive failures.

How to eliminate wrong answers

Option A is wrong because a JDBC connection timeout would produce a specific error message (e.g., 'Connection timed out' or 'Communications link failure') in the ErrorMessage field, not an empty one. Option B is wrong because an IAM permissions issue for S3 would result in an AccessDenied error with a clear message in the job logs or ErrorMessage, and the job would fail almost immediately, not after 3600 seconds. Option D is wrong because a Python syntax error would be caught at script compilation time, causing the job to fail within seconds with a detailed SyntaxError traceback in the ErrorMessage or logs, not after a full hour of execution.

1255
MCQmedium

A data scientist is training a model using Amazon SageMaker and wants to automatically stop training when the model stops improving. Which feature should be used?

A.Use SageMaker Debugger to monitor the loss metric.
B.Configure a CloudWatch alarm on the training job's CPU utilization.
C.Use SageMaker Hyperparameter Tuning with random search.
D.Enable early stopping in the training job configuration.
AnswerD

Stops training if improvement plateaus.

Why this answer

SageMaker's built-in early stopping feature automatically halts a training job when the model's objective metric (e.g., loss or accuracy) ceases to improve over a specified number of steps or epochs. This is configured directly in the training job's `StoppingCondition` parameter, which monitors the metric defined in the `MetricDefinitions` and stops training if no improvement is detected, saving compute time and avoiding overfitting.

Exam trap

The trap here is that candidates confuse SageMaker Debugger's monitoring capabilities with automatic stopping, but Debugger only provides hooks for custom actions (e.g., via rules like `LossNotDecreasing`) and does not natively halt training without additional configuration, whereas early stopping is a direct, built-in feature of the training job configuration.

How to eliminate wrong answers

Option A is wrong because SageMaker Debugger is designed for debugging and profiling training jobs (e.g., capturing tensors, monitoring system bottlenecks), not for automatically stopping training based on metric stagnation; it can emit alerts but does not natively trigger a stop. Option B is wrong because a CloudWatch alarm on CPU utilization monitors infrastructure health (e.g., resource exhaustion), not model performance metrics like loss or accuracy, so it cannot determine when the model stops improving. Option C is wrong because SageMaker Hyperparameter Tuning with random search is a strategy for exploring hyperparameter combinations to find optimal values, not a mechanism to stop an individual training job early; early stopping can be used within a tuning job, but the feature itself is separate and configured via the training job's `StoppingCondition`.

1256
MCQhard

A machine learning team is deploying a real-time inference endpoint on Amazon SageMaker for a model that requires low latency (<100 ms). The model is a PyTorch model with custom pre- and post-processing logic. The team uses a SageMaker Model with a custom inference container. After deployment, they observe that the endpoint takes over 500 ms for the first request, but subsequent requests are fast (~50 ms). What is the MOST likely cause?

A.The instance type is too small to handle the model size.
B.The model is too large and exceeds the instance memory.
C.The container has a cold start delay because the model needs to be loaded into memory from Amazon S3 on the first request.
D.The endpoint is not configured with auto-scaling.
AnswerC

Cold start occurs when no idle instances are available; model loading from S3 adds latency.

Why this answer

The first request triggers a cold start where the custom inference container initializes and loads the model from Amazon S3 into memory, causing high latency. Subsequent requests are fast because the model remains cached. Option A is wrong because the instance type primarily affects throughput and steady-state latency, not transient cold starts.

Option B is wrong because the issue is not about memory exhaustion—the endpoint handles subsequent requests well. Option D is wrong because auto-scaling adds instances but does not eliminate the cold start for the initial request on a new instance.

1257
MCQeasy

A machine learning team needs to deploy a model that makes real-time predictions with latency under 100 ms. The model is a deep neural network with 500 MB of parameters. Which AWS service should they use?

A.AWS Glue
B.AWS Lambda with a container image
C.Amazon SageMaker real-time endpoint
D.Amazon EMR
AnswerC

SageMaker real-time endpoints provide low-latency inference for large models.

Why this answer

Amazon SageMaker real-time endpoints are purpose-built for low-latency inference and can host large models like this 500 MB deep neural network by using appropriate instance types or multi-model endpoints. Option A (AWS Glue) is an ETL service, not for real-time inference. Option B (AWS Lambda) has a 250 MB deployment package limit and cold start latency that would exceed the 100 ms requirement for a 500 MB model.

Option D (Amazon EMR) is designed for big data processing with Hadoop/Spark, not for real-time predictions. Therefore, the correct choice is Amazon SageMaker real-time endpoint.

1258
MCQhard

A machine learning team is deploying a real-time inference endpoint for a recommendation model using Amazon SageMaker. The model takes a long time to load (several minutes) due to its size (5 GB). Which deployment strategy minimizes the cold start latency?

A.Use a single instance with a large memory size
B.Use Multi-Model Endpoints to keep the model loaded between invocations
C.Use SageMaker Serverless Inference
D.Use a larger instance type with more vCPUs
AnswerB

Multi-Model Endpoints allow models to stay loaded in memory, reducing cold start.

Why this answer

Multi-Model Endpoints (MME) allow multiple models to be loaded on the same endpoint and keep them cached in memory between invocations, reducing cold start latency for subsequent calls. This is ideal for large models like the 5 GB recommendation model. Option A (single instance with large memory) does not address load time.

Option C (Serverless Inference) incurs cold starts on each invocation. Option D (larger instance type with more vCPUs) may speed up loading but does not prevent cold starts after idle periods. Thus, MMEs minimize cold start by maintaining model persistence.

1259
Multi-Selectmedium

A data scientist is training a deep learning model for object detection using Amazon SageMaker. The training job is using a single GPU instance and is taking too long. Which THREE actions can reduce training time? (Choose THREE.)

Select 3 answers
A.Use a CPU instance instead of GPU
B.Enable mixed precision training with FP16
C.Use a GPU instance with more GPUs, such as p3.16xlarge
D.Reduce the batch size
E.Use distributed training across multiple instances
AnswersB, C, E

Mixed precision uses half-precision floats, speeding up computation and reducing memory usage.

Why this answer

Enabling mixed precision training with FP16 reduces memory usage and accelerates computation by using half-precision floating-point numbers where possible, which is particularly effective on NVIDIA GPUs with Tensor Cores (e.g., V100, A100). This can nearly double throughput for deep learning models without sacrificing model accuracy, as critical operations still use FP32 precision.

Exam trap

The trap here is that candidates often confuse reducing batch size with speeding up training, but in practice, smaller batches increase the number of gradient updates and can lead to longer wall-clock time, especially on GPU instances where larger batches better utilize parallel hardware.

1260
Multi-Selectmedium

Which TWO options are valid ways to reduce inference latency for a model deployed on a SageMaker real-time endpoint? (Select TWO.)

Select 2 answers
A.Use SageMaker batch transform instead of real-time endpoint
B.Deploy the model to multiple instances behind a load balancer
C.Enable SageMaker Neo to compile the model for the target instance
D.Use a GPU instance type for the endpoint
E.Increase the endpoint's invocation timeout
AnswersC, D

Neo optimizes model for faster inference.

Why this answer

SageMaker Neo compiles the trained model into an optimized binary for the specific target instance type, using hardware-specific instructions (e.g., Intel MKL-DNN, NVIDIA TensorRT) to reduce inference latency without sacrificing accuracy. This compilation optimizes the model graph and fuses operations, leading to faster execution on the deployed endpoint.

Exam trap

The trap here is that candidates often confuse improving throughput (e.g., load balancing) with reducing per-request latency, or they mistakenly think increasing timeout values can speed up inference, when in fact it only extends the allowed wait time.

1261
MCQhard

A data scientist is working on a predictive maintenance project for a manufacturing company. Sensor data is collected every second from 100 machines and stored in an Amazon S3 bucket as Parquet files, partitioned by machine_id and date. The dataset is massive (10 TB) and contains over 2000 features per machine. The data scientist needs to perform exploratory data analysis to identify which features are most predictive of machine failure. They have access to Amazon SageMaker Studio with a SageMaker Data Wrangler flow. The initial data exploration is taking too long due to the volume of data. The data scientist wants to speed up the analysis without losing accuracy in feature selection. Which course of action is most appropriate?

A.Switch to using Amazon EMR with Spark to perform distributed feature selection on the full dataset
B.Reduce the data to a single partition by concatenating all files and use only one machine's data
C.Use SageMaker Data Wrangler to create a stratified sample by machine_id and date, then analyze the sample
D.Use Amazon Athena to query a random sample of rows from the dataset
AnswerC

Correct: Stratified sampling preserves distribution of key variables and reduces data size.

Why this answer

SageMaker Data Wrangler supports stratified sampling, which preserves the distribution of machine failure across machine_id and date, allowing for faster exploratory data analysis while maintaining representativeness for feature selection. Option A is incorrect because distributed processing with EMR on the full dataset may still be slow and is unnecessary when sampling can capture the signal. Option B is incorrect because using only one machine's data loses cross-machine variability and may bias feature selection.

Option D is incorrect because random sampling does not guarantee preservation of time series order or failure distribution, potentially compromising analysis accuracy.

1262
MCQmedium

A data engineer runs a SQL query on Amazon Athena to explore a dataset stored in S3 as CSV. The query returns zero rows for a column that should have numeric values. Which step should the engineer take to diagnose the issue?

A.Verify that the S3 bucket has encryption enabled.
B.Run an AWS Glue crawler to update the table schema.
C.Add a partition to the table for the date column.
D.Check the table schema in AWS Glue Data Catalog to ensure the column data type is correct.
AnswerD

Incorrect data type can cause Athena to return null values.

Why this answer

Checking the table schema in the AWS Glue Data Catalog helps identify data type mismatches. If Athena returns zero rows for a numeric column, it may be because the column's data type in the catalog is incorrect (e.g., string instead of int). Fixing the schema to match the actual data allows Athena to parse the values correctly.

Option A is incorrect because encryption does not affect query results. Option B is incorrect because running a crawler will only re-infer the schema, which may not solve the issue if the underlying data format is inconsistent. Option C is incorrect because partitioning is unrelated to data type issues.

1263
MCQmedium

A data scientist is deploying a regression model in Amazon SageMaker that predicts housing prices. The model shows high bias (underfitting). Which action is most likely to reduce bias?

A.Reduce the amount of training data
B.Increase regularization strength
C.Use a simpler model
D.Add more features or increase model complexity
AnswerD

More complex models can capture patterns better.

Why this answer

High bias (underfitting) means the model is too simple to capture the underlying patterns in the data. Adding more features or increasing model complexity (e.g., using polynomial features, deeper trees, or a more flexible algorithm) directly addresses underfitting by giving the model greater capacity to learn from the data. In Amazon SageMaker, this could involve using a more complex built-in algorithm like XGBoost with deeper trees or adding feature engineering transformations in a processing job.

Exam trap

The trap here is that candidates often confuse bias with variance and incorrectly choose regularization or simpler models, which are solutions for overfitting (high variance), not underfitting (high bias).

How to eliminate wrong answers

Option A is wrong because reducing the amount of training data would exacerbate underfitting by providing even less information for the model to learn from. Option B is wrong because increasing regularization strength penalizes model complexity further, which would increase bias and worsen underfitting. Option C is wrong because using a simpler model would reduce capacity even more, directly increasing bias rather than reducing it.

1264
Multi-Selecteasy

A data scientist is evaluating a regression model. Which TWO metrics are appropriate for evaluating regression performance?

Select 2 answers
A.Root Mean Squared Error (RMSE)
B.F1 score
C.Area Under the ROC Curve (AUC)
D.R-squared
E.Precision
AnswersA, D

RMSE measures average prediction error.

Why this answer

Root Mean Squared Error (RMSE) is a standard metric for regression models because it measures the average magnitude of prediction errors in the same units as the target variable. It penalizes larger errors more heavily due to squaring, making it sensitive to outliers, which is useful for evaluating model accuracy in continuous value prediction.

Exam trap

The MLS-C01 exam often tests the distinction between classification and regression metrics, and the trap here is that candidates mistakenly apply classification metrics like F1, AUC, or Precision to regression problems because they confuse evaluation domains.

1265
MCQhard

A machine learning team is using SageMaker to train a model with a custom Docker container. The training script runs locally but fails on SageMaker with a 'Permission denied' error when writing to /opt/ml/model. What is the likely cause?

A.The container's user does not have write permission to /opt/ml/model
B.The Docker image is too large
C.The training script is trying to read from /opt/ml/input/data instead of /opt/ml/input/data/training
D.The training data is not in the correct S3 bucket
AnswerA

Correct. The container user lacks write permission to /opt/ml/model, which is required for saving the model artifact.

Why this answer

In SageMaker, the training container is expected to store the trained model artifacts in the /opt/ml/model directory. If the user running the training script inside the container does not have write permissions to that directory, the training will fail with a 'Permission denied' error. Option A is correct.

Option B (image too large) would cause different errors, such as EBS volume limits. Option C refers to input data paths; the error is about writing the model, not reading inputs. Option D (S3 bucket) would cause read errors, not a write permission issue.

1266
MCQeasy

Refer to the exhibit. A data engineer has deployed this CloudFormation template. The Glue job 'my-etl-job' reads from the S3 bucket 'my-data-lake-bucket' and writes transformed data to another bucket. After 30 days, the data engineer notices that the Glue job fails with 'Input data not found' errors. What is the most likely cause?

A.The temporary directory 'my-temp-dir' is being cleaned up by the lifecycle configuration.
B.The script location 's3://my-scripts/etl.py' is being deleted by the lifecycle rule.
C.The job bookmark option 'job-bookmark-enable' is causing the job to skip newly arriving data.
D.The lifecycle configuration deletes objects from the bucket after 30 days, removing the input data.
AnswerD

The ExpirationInDays: 30 rule deletes objects older than 30 days, which may include input data.

Why this answer

The lifecycle configuration on the S3 bucket 'my-data-lake-bucket' is set to delete objects after 30 days. Since the Glue job 'my-etl-job' reads input data from this bucket, once the 30-day period elapses, the input data is removed, causing the 'Input data not found' error. This matches the symptom of the job failing after exactly 30 days.

Exam trap

A common trap on the AWS Machine Learning Specialty exam is that candidates mistakenly attribute failures to job bookmarks or temporary directories instead of recognizing that the lifecycle rule is deleting the source data after the specified retention period.

How to eliminate wrong answers

Option A is wrong because the temporary directory 'my-temp-dir' is used for intermediate job artifacts (e.g., shuffle data or staging), not for input data; its cleanup would cause job runtime errors, not 'Input data not found' errors. Option B is wrong because the script location 's3://my-scripts/etl.py' is the ETL script itself, which is read at job start and cached; if deleted, the job would fail immediately at launch, not after 30 days of successful runs. Option C is wrong because 'job-bookmark-enable' controls state tracking for incremental processing; if it caused skipping, the error would be about missing new data, not 'Input data not found' for existing data.

1267
MCQeasy

A company uses Amazon Redshift for data warehousing. The data engineering team needs to load data from multiple S3 buckets into Redshift daily. Each bucket contains files in different formats (CSV, JSON, Parquet). Which AWS service is BEST suited to automate this ingestion process?

A.Amazon EMR with Apache Spark
B.AWS Data Pipeline
C.AWS Database Migration Service (DMS)
D.AWS Glue
AnswerD

Glue provides crawlers for schema discovery and ETL jobs for loading into Redshift.

Why this answer

AWS Glue is a fully managed ETL service that can crawl S3 buckets to discover schema, handle various formats (CSV, JSON, Parquet), and load data into Redshift. It automates the ingestion process without the need for manual infrastructure management. Amazon EMR with Spark requires more setup and management, AWS Data Pipeline is less flexible and older, and AWS Database Migration Service is designed for migrating entire databases, not for loading from S3.

1268
MCQmedium

A company is using Amazon SageMaker to deploy a model for real-time inference. The endpoint uses an ml.c5.xlarge instance. The company wants to reduce costs without affecting performance. The current traffic pattern shows a daily peak of 500 requests per second for 2 hours, and the rest of the day sees fewer than 50 requests per second. The model has a cold start time of about 30 seconds. What should the company do?

A.Switch to a serverless inference endpoint.
B.Configure an auto scaling policy that scales down during low traffic and keep a minimum of 1 instance.
C.Use a single ml.c5.xlarge instance and rely on it.
D.Use SageMaker Batch Transform for all predictions.
AnswerB

Auto scaling reduces instances during low traffic, and minimum instance prevents cold starts.

Why this answer

Configuring an auto scaling policy that scales down during low traffic reduces costs, and keeping a minimum of 1 instance avoids cold starts during low traffic, ensuring low latency. Option A is incorrect because serverless endpoints have cold starts and may not handle the peak of 500 TPS. Option C is wrong because a single instance may not handle the peak traffic, causing latency.

Option D is wrong because Batch Transform is for batch predictions, not real-time inference.

1269
Multi-Selecthard

Which THREE factors should be considered when choosing between Amazon Kinesis Data Streams and Amazon Kinesis Data Firehose for a real-time data ingestion pipeline? (Choose 3.)

Select 3 answers
A.Ability to compress data before delivery
B.Ability to encrypt data at rest
C.Need for custom data processing using AWS Lambda
D.Data retention requirements
E.Latency requirements for data delivery to S3
AnswersC, D, E

Kinesis Data Streams supports custom processing with Lambda, Firehose has limited transformation.

Why this answer

Kinesis Data Streams supports custom processing via AWS Lambda consumers (using the Kinesis Client Library or direct integration), enabling real-time transformations, filtering, or enrichment. Kinesis Data Firehose does not natively support custom Lambda processing for transformation; it only allows optional Lambda functions for data format conversion or transformation before delivery, but not for arbitrary real-time processing logic.

Exam trap

A common misconception is that Kinesis Data Firehose supports custom real-time processing like Streams, but Firehose only allows optional Lambda transformations with limited control and no data replay capability.

1270
MCQmedium

A machine learning team is deploying a model using Amazon SageMaker. They need to automatically retrain the model every week with new data and update the endpoint without downtime. Which approach should they use?

A.Use SageMaker Ground Truth to label new data and trigger retraining
B.Use SageMaker batch transform to periodically generate predictions and replace the model
C.Use AWS Lambda to trigger retraining on a schedule and deploy a new endpoint
D.Use SageMaker automatic model tuning with a schedule and update the endpoint using CreateEndpointConfig and UpdateEndpoint
E.Use SageMaker Pipelines to automate retraining and deploy a new endpoint with blue/green deployment
AnswerE

SageMaker Pipelines provides a fully managed way to automate the entire ML workflow, including scheduled retraining. It supports blue/green deployment by using CreateEndpointConfig and UpdateEndpoint to update the endpoint without downtime. This directly meets the requirement.

Why this answer

The correct approach is to use SageMaker Pipelines, which provides a fully managed service to automate the machine learning workflow, including retraining on a schedule. SageMaker Pipelines supports blue/green deployment patterns using `CreateEndpointConfig` and `UpdateEndpoint` to update the endpoint without downtime. Option E correctly describes this.

Option D is incorrect because automatic model tuning is for hyperparameter optimization, not scheduled retraining. Option C (AWS Lambda) could be used, but it requires more manual orchestration and is not the best practice recommended by AWS.

Exam trap

The trap is that candidates may confuse automatic model tuning (hyperparameter optimization) with scheduling retraining. The key is that the tool should both automate the retraining and support zero-downtime endpoint updates, which is best achieved with SageMaker Pipelines using blue/green deployment.

How to eliminate wrong answers

Option A is wrong because SageMaker Ground Truth is a data labeling service, not a mechanism for automated retraining or endpoint updates; it does not trigger retraining or manage endpoint deployment. Option B is wrong because SageMaker batch transform is used for offline, asynchronous predictions on a batch of data, not for real-time endpoint updates or zero-downtime deployment. Option C is wrong because while AWS Lambda can trigger retraining on a schedule, deploying a new endpoint via Lambda alone does not inherently guarantee zero-downtime updates; it would require additional logic to manage endpoint configuration swaps.

Option E is wrong because SageMaker Pipelines can automate retraining and deploy a new endpoint, but blue/green deployment is not a native SageMaker feature; the question specifically asks for zero-downtime updates, which is achieved via `UpdateEndpoint` with a new endpoint configuration, not via a separate blue/green deployment mechanism.

1271
MCQmedium

A company is using Amazon SageMaker to train a model on a dataset that is updated daily. The data is stored in an S3 bucket. The training pipeline uses AWS Step Functions to orchestrate data preprocessing and model training. The preprocessing step uses a SageMaker Processing job that reads data from S3, cleans it, and writes the output back to S3. The team notices that the training step often fails due to insufficient disk space on the processing instance. Which change should the team make to resolve this issue without increasing cost?

A.Enable automatic scaling for the processing job.
B.Use AWS Batch instead of SageMaker Processing.
C.Use a larger instance type with more memory.
D.Configure the processing job to use local instance store (SSD) for scratch space.
AnswerD

Local instance store provides additional disk space without additional cost.

Why this answer

The issue is insufficient disk space on the processing instance. Option D resolves this by configuring the processing job to use the local instance store (SSD) for scratch space, which provides high-throughput temporary storage without incurring additional cost, as the instance store is included with the instance. This allows the preprocessing step to handle larger intermediate data without requiring a larger or more expensive instance.

Exam trap

The trap here is that candidates may assume increasing instance size (Option C) is the only way to get more disk space, overlooking that local instance store provides additional scratch space at no extra cost, and that automatic scaling (Option A) is not applicable to SageMaker Processing jobs.

How to eliminate wrong answers

Option A is wrong because automatic scaling for a processing job is not supported; SageMaker Processing jobs run on a fixed instance count and cannot scale dynamically. Option B is wrong because using AWS Batch would not inherently resolve disk space issues and could increase complexity and cost due to different pricing models and data transfer overhead. Option C is wrong because using a larger instance type with more memory would increase cost, which contradicts the requirement to not increase cost, and memory is not the bottleneck—disk space is.

1272
MCQhard

A team is building a data lake on Amazon S3 and using AWS Glue to catalog data. They notice that Glue crawlers are taking too long to update the catalog for a large dataset with millions of small files. Which approach will MOST improve crawler performance?

A.Increase the frequency of the crawler runs.
B.Consolidate the small files into larger files (e.g., 100 MB each).
C.Partition the data by date in S3.
D.Use a custom classifier to parse the data.
AnswerB

Fewer, larger files reduce overhead and crawler scan time.

Why this answer

AWS Glue crawlers incur significant overhead when processing millions of small files because each file requires a separate read, schema inference, and metadata write operation. Consolidating small files into larger files (e.g., 100 MB each) reduces the total number of objects that the crawler must scan, dramatically decreasing the time spent on file-level operations and improving overall throughput.

Exam trap

The trap here is that candidates confuse partitioning (which improves query pruning) with file consolidation (which reduces metadata and I/O overhead), leading them to select partitioning as a performance fix for crawlers when it does not address the root cause of high file count.

How to eliminate wrong answers

Option A is wrong because increasing crawler frequency does not reduce the per-run overhead; it only makes the problem occur more often, potentially leading to throttling and higher costs. Option C is wrong because partitioning by date in S3 improves query performance and reduces data scanned by Athena or Spark, but it does not reduce the number of files the crawler must process—each partition still contains many small files. Option D is wrong because custom classifiers are used to interpret non-standard data formats (e.g., custom log formats), not to address performance issues caused by file count or size.

1273
MCQhard

A data scientist is analyzing clickstream data from a website. The data is stored in Amazon S3 as JSON files, each containing nested arrays. The scientist needs to flatten the nested structures and compute user session durations. Which approach is most efficient for this EDA task?

A.Use Amazon EMR with Apache Spark to process the data.
B.Use Amazon Athena with JSON SerDe to query the data and compute session duration with SQL.
C.Use AWS Glue DataBrew to flatten the JSON and create new columns for session duration.
D.Use Amazon QuickSight to visualize the raw data without flattening.
AnswerC

DataBrew is built for data preparation and can handle nested JSON visually.

Why this answer

AWS Glue DataBrew provides a visual interface to flatten nested JSON and compute derived metrics like session duration without writing code. Option A (EMR with Apache Spark) is more complex and requires writing code. Option B (Athena with JSON SerDe) can query but requires SQL that handles arrays.

Option D (QuickSight) is visualization only and cannot flatten or compute session duration.

1274
MCQeasy

A company is using Amazon SageMaker to train a XGBoost model for predicting customer churn. The training data is stored in an S3 bucket as CSV files. The data scientist runs a hyperparameter tuning job with 50 training jobs. The tuning job completes, but the best model's accuracy on the holdout set is lower than expected. The data scientist suspects that the hyperparameter ranges are too narrow. Which corrective action is most appropriate?

A.Increase the number of training jobs in the tuning job
B.Switch to a different algorithm like Random Forest
C.Expand the hyperparameter ranges for key parameters such as 'max_depth', 'learning_rate', and 'subsample'
D.Change the tuning strategy from random search to Bayesian optimization
AnswerC

Wider ranges allow the tuning job to explore more of the hyperparameter space, potentially finding better configurations.

Why this answer

The data scientist suspects the hyperparameter ranges are too narrow, which directly limits the model's ability to find an optimal configuration. Expanding ranges for key XGBoost parameters like 'max_depth', 'learning_rate', and 'subsample' allows the tuning job to explore a broader space of model complexities and regularization levels, potentially improving accuracy on the holdout set. This is the most direct fix for the stated problem, as it addresses the root cause rather than increasing job count or changing the search strategy.

Exam trap

The trap here is that candidates often confuse 'more training jobs' (Option A) with 'broader search space', failing to recognize that increasing jobs only refines sampling within existing bounds, not expands them.

How to eliminate wrong answers

Option A is wrong because increasing the number of training jobs does not address the core issue of narrow hyperparameter ranges; it only samples the same limited space more densely, which may not yield a better model if the true optimum lies outside the current bounds. Option B is wrong because switching to a different algorithm like Random Forest is an unnecessary and drastic change; the problem is explicitly about hyperparameter ranges, not algorithm suitability, and XGBoost is a strong choice for tabular churn data. Option D is wrong because changing from random search to Bayesian optimization improves sampling efficiency but does not expand the search space; if the ranges are too narrow, even a more intelligent search cannot find a better configuration outside those bounds.

1275
MCQeasy

A company is streaming clickstream data from a website to Amazon Kinesis Data Streams. The data is consumed by a Lambda function that enriches each record with geolocation information before writing to an S3 bucket. Recently, the Lambda function has been failing with throttling errors. What is the MOST likely cause?

A.The Lambda function's payload size exceeds the 6 MB limit
B.The Lambda function's concurrent execution limit has been reached
C.The Lambda function's reserved concurrency is set too high
D.The Kinesis stream has exceeded the default shard limit of 500
AnswerB

Lambda throttles when the number of concurrent executions exceeds the account limit.

Why this answer

The most likely cause is that the Lambda function's concurrent execution limit has been reached. Kinesis Data Streams invokes Lambda functions per shard, and with high throughput or many shards, concurrent invocations can exceed the default Lambda concurrency limit (1000 per region). This results in throttling errors.

Option A is incorrect because the Lambda payload limit for asynchronous invocation (used by Kinesis) is 256 KB, not 6 MB. Option C is incorrect; setting reserved concurrency too high would not cause throttling—it could actually help avoid throttling. Option D is incorrect because the default shard limit is 500, but shard limits are a Kinesis concern, not directly causing Lambda throttling.

Page 16

Page 17 of 23

Page 18