Courseiva

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

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

Page 17

Page 18 of 23

Page 19
1276
MCQhard

A company is using SageMaker to host a model for real-time inference. They notice that the endpoint's latency increases over time. The model is stateless and the inference code does not log any errors. What is the MOST likely cause?

A.Memory leak in the inference container
B.Gradual increase in request payload size
C.Endpoint auto scaling is adding new instances
D.Model is accumulating state from previous requests
AnswerA

Memory leaks cause slowdown over time.

Why this answer

A memory leak in the inference container causes the process's resident memory to grow over time as allocated memory is not freed. Since the model is stateless and no errors are logged, the leak is likely in the inference code or a dependency (e.g., a TensorFlow session or a Python list that grows unbounded). As memory pressure increases, the operating system may swap or the container may be OOM-killed, leading to increased garbage collection pauses and higher latency for each request.

Exam trap

The trap here is that candidates confuse a 'stateless model' with 'no memory issues' — but a stateless model means no state between requests, not that the container's memory usage is stable; a memory leak in the inference code or framework can still cause latency degradation over time.

How to eliminate wrong answers

Option B is wrong because a gradual increase in request payload size would cause a sudden or stepwise latency increase when the payload crosses a threshold, not a steady increase over time, and it would be observable in request logs. Option C is wrong because endpoint auto scaling adding new instances would reduce latency by distributing load, not increase it; new instances are warm and ready to serve. Option D is wrong because the model is explicitly stated as stateless, meaning it does not accumulate state from previous requests; if it did, that would contradict the given information and would likely cause errors or state corruption.

1277
MCQhard

A company is using Amazon SageMaker to host a model for real-time inference. The model is a large ensemble of 10 XGBoost models, each 2 GB. The endpoint uses a single ml.c5.18xlarge instance. The inference latency is high (average 2 seconds). Which change would most effectively reduce latency?

A.Use SageMaker Multi-Model Endpoints to serve each model independently
B.Switch to a GPU instance type
C.Add more instances behind a load balancer
D.Use SageMaker Batch Transform instead of real-time endpoint
AnswerA

Multi-Model Endpoints reduce serialization overhead by loading models on demand.

Why this answer

Serialization/deserialization of large models is a bottleneck; SageMaker Multi-Model Endpoints can reduce overhead by loading only the requested model. Option B (GPU) may not help if the bottleneck is CPU. Option C (Add more instances) helps throughput but not per-request latency.

Option D (Batch Transform) is for offline inference.

1278
MCQeasy

A data scientist is using Amazon SageMaker to train a linear regression model. The training data has 10 features, and the scientist wants to interpret the model's coefficients. Which algorithm should they use?

A.Amazon SageMaker XGBoost
B.Amazon SageMaker K-Means
C.Amazon SageMaker Factorization Machines
D.Amazon SageMaker Linear Learner
AnswerD

Produces linear coefficients for interpretation.

Why this answer

Amazon SageMaker Linear Learner provides interpretable coefficients, which is essential for understanding the impact of each feature in a linear regression model. Option A is wrong because XGBoost is a tree-based ensemble method that is less interpretable and does not provide linear coefficients. Option B is wrong because K-Means is an unsupervised clustering algorithm, not suited for regression.

Option C is wrong because Factorization Machines are designed for high-dimensional sparse data and are not the standard choice for linear regression with 10 features.

1279
MCQhard

A company stores customer transaction data in Amazon S3. A data scientist needs to perform exploratory data analysis using Amazon SageMaker. The dataset is 500 GB in CSV format. Which approach is most cost-effective and time-efficient for initial data profiling?

A.Use Amazon S3 Select to sample rows directly from S3
B.Load the entire dataset into a SageMaker notebook instance and use pandas
C.Convert the data to Parquet format and then use Athena to query
D.Use AWS Glue ETL to transform the data and then analyze in Athena
AnswerA

S3 Select allows efficient querying of a subset without full data movement.

Why this answer

Amazon S3 Select can query a subset of rows directly from S3 without loading the entire dataset, enabling quick and cost-effective profiling. Option B is incorrect because loading the full 500 GB into a SageMaker notebook instance is expensive and time-consuming. Option C is incorrect because converting to Parquet format adds overhead that is unnecessary for initial profiling.

Option D is incorrect because using AWS Glue ETL to transform the entire dataset before analysis is not cost-effective for initial data exploration.

1280
MCQmedium

A data scientist is performing EDA on a dataset containing customer transaction records. The dataset includes columns: 'transaction_id', 'customer_id', 'transaction_amount', 'transaction_date', and 'product_category'. The data scientist wants to check for duplicate transactions and identify any suspicious patterns, such as multiple transactions from the same customer on the same day with the same amount. The dataset has 5 million rows. The data scientist is using a SageMaker Studio notebook with a ml.t3.medium instance. The data is stored in S3. What is the most efficient way to perform this analysis?

A.Use a SageMaker Spark processing job with PySpark to aggregate and detect duplicates.
B.Use Amazon Athena to run SQL queries to find duplicates.
C.Load the entire dataset into a pandas DataFrame and use groupby operations.
D.Use AWS Glue DataBrew to create a profile and manually inspect.
AnswerA

Spark can handle large data efficiently.

Why this answer

SageMaker Spark processing jobs distribute the workload across multiple nodes, allowing efficient handling of the 5-million-row dataset within the memory limits of the ml.t3.medium instance. Option B (Athena) is less efficient due to query costs and the need for external setup, and it may not be as flexible for custom duplicate detection logic. Option C (pandas) would likely cause out-of-memory errors on the small instance.

Option D (DataBrew) is designed for profiling and basic transformations, not for custom duplicate analysis.

1281
MCQmedium

A company uses an XGBoost model to predict equipment failures. The model has high precision but low recall. The business impact of a false negative is very high (missing a failure). Which action would MOST effectively increase recall while keeping precision reasonably high?

A.Increase the regularization parameter lambda
B.Set the objective to 'reg:squarederror'
C.Decrease the probability threshold for the positive class
D.Increase the number of boosting rounds
AnswerC

Lower threshold increases recall but may reduce precision.

Why this answer

Decreasing the probability threshold for the positive class means the model will classify a case as a failure at a lower predicted probability, which captures more true positives (increases recall). However, this also allows more false positives, so precision may drop, but the trade-off is acceptable given the high cost of false negatives. This is a standard post-training calibration technique for imbalanced classification problems.

Exam trap

The MLS-C01 exam often tests the misconception that increasing boosting rounds or regularization directly improves recall, when in fact the probability threshold is the primary lever for trading off precision and recall after training.

How to eliminate wrong answers

Option A is wrong because increasing the regularization parameter lambda (L2 regularization) reduces model complexity and can lead to underfitting, which typically decreases both precision and recall, not selectively increase recall. Option B is wrong because setting the objective to 'reg:squarederror' treats the problem as regression, not classification, so the model outputs continuous values without a probability threshold, making it unsuitable for recall-focused binary classification. Option D is wrong because increasing the number of boosting rounds can lead to overfitting, which may increase variance and actually degrade recall on unseen data, and does not directly control the trade-off between precision and recall.

1282
MCQmedium

A machine learning engineer is deploying a real-time inference endpoint using Amazon SageMaker. The model is a large deep learning model that requires low latency (under 100 ms) and high throughput (1000 requests per second). Which SageMaker deployment option is MOST suitable?

A.Deploy the model on a single endpoint with automatic scaling based on CPU utilization.
B.Use SageMaker Serverless Inference with provisioned concurrency.
C.Use SageMaker Inference Recommender to find the optimal instance type and endpoint configuration.
D.Use a multi-model endpoint to load multiple copies of the model on the same instance.
AnswerC

Inference Recommender runs load tests and suggests the best instance and configuration to meet latency and throughput targets.

Why this answer

SageMaker Inference Recommender runs load tests against the model to identify the optimal instance type, instance count, and endpoint configuration (e.g., container parameters, model server settings) that meet the specific latency and throughput requirements. For a large deep learning model demanding under 100 ms latency and 1000 requests per second, this automated benchmarking is essential to avoid over-provisioning or under-provisioning resources.

Exam trap

The trap here is that candidates assume serverless or multi-model endpoints are always cost-effective for high throughput, but they fail to account for the strict latency and concurrency ceilings that make those options unsuitable for demanding real-time inference workloads.

How to eliminate wrong answers

Option A is wrong because automatic scaling based on CPU utilization is reactive and may not achieve the sub-100 ms latency target; CPU utilization is a poor proxy for inference latency, and scaling lag can cause timeouts during traffic spikes. Option B is wrong because SageMaker Serverless Inference has a maximum concurrency limit (typically 200 requests per second per endpoint) and cold-start latency that can exceed 100 ms, making it unsuitable for high-throughput, low-latency real-time inference. Option D is wrong because a multi-model endpoint loads multiple model copies on the same instance, which can cause memory contention and unpredictable latency due to model loading/unloading overhead, and it does not guarantee the throughput or latency required for a single large deep learning model.

1283
MCQhard

A machine learning engineer is using AWS Step Functions to orchestrate a SageMaker training job followed by a Lambda function for post-processing. The training job completes successfully, but the Lambda function fails with a timeout error. What is the MOST likely cause?

A.The Lambda function's IAM role lacks permissions to access the training output
B.The Lambda function execution time exceeds the maximum timeout limit
C.The Step Functions state machine has a misconfigured retry policy
D.The SageMaker training job output data is too large for Lambda to process
AnswerB

Lambda timeout is 15 minutes max.

Why this answer

The Lambda function failed with a timeout error, which directly indicates that its execution duration exceeded the configured maximum timeout limit (default 3 seconds, max 15 minutes). This is the most likely cause because the error message explicitly states 'timeout', and Lambda enforces a hard timeout that terminates the function if it runs longer than the configured limit.

Exam trap

The trap here is that candidates confuse a timeout error with a permissions or data size issue, but the error message explicitly names 'timeout', making it a direct indicator of execution duration exceeding the configured limit.

How to eliminate wrong answers

Option A is wrong because a permissions issue would result in an 'AccessDenied' or authorization error, not a timeout error. Option C is wrong because a misconfigured retry policy in Step Functions would affect how the state machine handles failures, but it would not cause the Lambda function itself to timeout; the timeout occurs at the Lambda service level before Step Functions retry logic even applies. Option D is wrong because while large output data could cause processing delays, the error is specifically a timeout, not a memory or data size error; Lambda has a 6 MB invocation payload limit, but the error message would be different (e.g., 'Request too large') if that were the issue.

1284
MCQeasy

A company wants to deploy a machine learning model that provides real-time inference with low latency. The model is a small ensemble of three tree-based models. Which Amazon SageMaker approach is most appropriate?

A.Use a SageMaker real-time endpoint with a single inference container.
B.Use a SageMaker batch transform job.
C.Use AWS Lambda with the model packaged in a layer.
D.Use a SageMaker Serverless Inference endpoint.
AnswerA

Real-time endpoints provide low-latency inference.

Why this answer

A SageMaker real-time endpoint with a single inference container is the most appropriate approach because it provides persistent, low-latency inference by keeping the model loaded in memory and handling requests synchronously. For a small ensemble of three tree-based models, a single container can host all models (e.g., using a custom inference script or a multi-model endpoint) and deliver sub-second response times, meeting the real-time requirement.

Exam trap

The trap here is that candidates often confuse 'real-time inference' with 'serverless' or 'batch processing,' assuming that serverless or Lambda are always cheaper or simpler, but they fail to account for cold-start latency and execution limits that break low-latency requirements.

How to eliminate wrong answers

Option B is wrong because SageMaker batch transform jobs are designed for asynchronous, offline inference on large datasets and do not provide real-time, low-latency responses. Option C is wrong because AWS Lambda has a maximum execution timeout of 15 minutes and limited memory (up to 10 GB), making it unsuitable for hosting even a small ensemble of models that require persistent, low-latency inference; additionally, packaging models in Lambda layers adds cold-start latency and complexity. Option D is wrong because SageMaker Serverless Inference endpoints automatically scale to zero when not in use, incurring cold-start latency that can exceed acceptable thresholds for real-time inference, and they are optimized for intermittent or bursty traffic, not sustained low-latency workloads.

1285
MCQeasy

A data scientist is training a linear regression model to predict house prices. The dataset contains 10 features. After training, the data scientist notices that the model has high bias (underfitting). Which action should the data scientist take to reduce bias?

A.Reduce the amount of training data
B.Add more features, such as polynomial features
C.Increase the regularization strength
D.Use a simpler model, such as ridge regression
AnswerB

Adding features increases model complexity, reducing bias.

Why this answer

High bias (underfitting) means the model is too simple to capture the underlying patterns in the data. Adding more features, such as polynomial features, increases model complexity, allowing the linear regression model to fit non-linear relationships and reduce bias. This directly addresses the underfitting issue by giving the model more expressive power.

Exam trap

The MLS-C01 exam often tests the bias-variance tradeoff by making candidates confuse regularization (which reduces variance) with the need to increase model complexity to fix underfitting; the trap here is that increasing regularization or using a simpler model seems like a 'safe' choice, but it actually worsens bias.

How to eliminate wrong answers

Option A is wrong because reducing the amount of training data would increase variance and potentially worsen bias, as the model would have even less information to learn from. Option C is wrong because increasing regularization strength penalizes model complexity, which would further increase bias by forcing the model to be simpler. Option D is wrong because using a simpler model, such as ridge regression (which is a regularized linear model), would also increase bias by constraining the coefficients, making underfitting worse.

1286
MCQmedium

A company is deploying a machine learning model to production on Amazon SageMaker. The model requires low-latency inference (under 10 ms) for real-time predictions. The data scientist has trained a model using XGBoost and wants to minimize cost while meeting latency requirements. Which SageMaker hosting option should be used?

A.Use a real-time endpoint with a single model
B.Use a serverless inference endpoint
C.Use a real-time endpoint with multi-model hosting
D.Use a batch transform job
E.Use an asynchronous inference endpoint
AnswerA

Real-time endpoints provide low-latency inference.

Why this answer

A real-time endpoint with a single model is the correct choice because it provides dedicated, always-on compute resources that can consistently achieve sub-10 ms inference latency for XGBoost models. SageMaker real-time endpoints keep instances warm and route requests directly to the model container, minimizing cold-start delays and network overhead, which is essential for low-latency requirements.

Exam trap

The trap here is that candidates confuse 'serverless' with 'low-latency' because serverless is cost-effective, but they overlook the cold-start penalty that makes it unsuitable for sub-10 ms inference; AWS often tests this by pairing a latency requirement with a cost-saving option to see if you prioritize performance constraints over cost optimization.

How to eliminate wrong answers

Option B is wrong because serverless inference endpoints have cold-start latency that can exceed 10 ms, especially for infrequent or bursty traffic, making them unsuitable for strict low-latency requirements. Option C is wrong because multi-model hosting shares a single instance across multiple models, which can introduce contention and unpredictable latency spikes due to model loading/unloading, violating the under-10 ms target. Option D is wrong because batch transform jobs are designed for offline, asynchronous processing of large datasets and do not provide real-time endpoints or sub-second latency.

Option E is wrong because asynchronous inference endpoints are intended for requests with larger payloads or longer processing times (typically seconds to minutes), not for real-time predictions under 10 ms.

1287
MCQeasy

A data scientist is performing exploratory data analysis on a dataset with missing values. They want to understand the distribution of each feature and identify outliers. Which AWS service can be used to create visualizations such as histograms and box plots without writing any code?

A.Amazon EMR
B.AWS Glue
C.Amazon QuickSight
D.Amazon SageMaker Studio
E.Amazon Athena
AnswerC

QuickSight provides code-free visualizations like histograms and box plots.

Why this answer

Amazon QuickSight is a serverless, machine learning-powered business intelligence service that allows users to create interactive dashboards and visualizations without writing code. Option A is wrong because Amazon EMR is a big data platform, not primarily for visualization. Option B is wrong because AWS Glue is used for ETL, not visualization.

Option C is correct. Option D is wrong because Amazon SageMaker Studio requires coding for custom visualizations. Option E is wrong because Amazon Athena is a query service, not a visualization tool.

1288
MCQhard

A data scientist is training a deep learning model on a GPU instance. The training data is stored in S3 and is 50 GB. To reduce I/O bottlenecks, which storage option should be used to cache the data locally on the instance?

A.Attach an Amazon EFS file system to the instance and copy data from S3
B.Mount an Amazon FSx for Lustre file system linked to the S3 bucket
C.Provision an Amazon EBS io2 volume and copy data from S3 using AWS DataSync
D.Use instance store volumes to cache the data from S3
AnswerB

FSx for Lustre provides high throughput and can cache S3 data locally.

Why this answer

Amazon FSx for Lustre is a high-performance file system designed for HPC and machine learning workloads. By linking it to the S3 bucket, it automatically caches data locally on the Lustre file system attached to the GPU instance, providing low-latency access and reducing I/O bottlenecks. Option A is incorrect because Amazon EFS is a shared file system with lower throughput compared to Lustre, and it is not optimized for the high throughput needed for deep learning training.

Option C is incorrect because while EBS io2 volumes provide high IOPS, copying data using AWS DataSync introduces an extra step and does not provide the seamless caching and high aggregate throughput that FSx for Lustre offers. Option D is incorrect because instance store volumes are ephemeral and not persistent; they would require re-copying the data each time the instance is stopped, and they lack the integration with S3 that FSx for Lustre provides.

1289
MCQhard

A machine learning engineer is performing exploratory data analysis on a large dataset stored in Amazon S3 using AWS Glue. The dataset contains a mix of numeric and categorical features. The engineer wants to efficiently compute summary statistics (e.g., mean, median, standard deviation) for the numeric columns. Which AWS service or feature should the engineer use to achieve this with minimal setup?

A.Launch an Amazon EMR cluster and use Spark.
B.Use AWS Glue DataBrew to profile the dataset.
C.Use Amazon Athena to run SQL queries on the data.
D.Use Amazon SageMaker Data Wrangler.
AnswerB

DataBrew provides an easy interface for profiling and statistics.

Why this answer

AWS Glue DataBrew provides a visual interface to profile data and compute summary statistics without writing code. Option A is wrong because launching an Amazon EMR cluster requires setup and management, which is not minimal. Option C is wrong because Amazon Athena requires writing SQL queries and does not automatically compute summary statistics.

Option D is wrong because Amazon SageMaker Data Wrangler is a good tool but requires more configuration than DataBrew for simple summary statistics.

1290
MCQmedium

A data scientist is using Amazon SageMaker to train a deep learning model using a built-in algorithm. The training job uses an ml.p3.2xlarge instance and takes 10 hours to complete. The scientist wants to reduce training time without changing the algorithm or model architecture. The instance's GPU utilization is consistently at 95%, but CPU utilization is only 20%. The data input pipeline uses SageMaker Pipe mode with the 'TrainingInputMode' set to 'Pipe'. The training dataset is 200 GB in CSV format stored in S3. Which approach is most likely to reduce training time?

A.Switch from Pipe mode to File mode to reduce I/O overhead
B.Use Pipe mode with 'S3DataType' as 'AugmentedManifestFile'
C.Use a larger instance type with more GPUs, such as ml.p3.8xlarge
D.Reduce the batch size to improve GPU utilization
AnswerC

More GPUs can parallelize computation and reduce training time.

Why this answer

GPU utilization is already at 95%, indicating the GPU is the bottleneck. Switching to a larger instance type like ml.p3.8xlarge provides four times the number of GPUs (4 vs. 1), allowing parallel processing of more data and directly reducing wall-clock training time without altering the algorithm or model architecture. The low CPU utilization (20%) confirms that the data pipeline is not a bottleneck, so I/O optimizations are unlikely to help.

Exam trap

The trap here is that candidates often assume low CPU utilization indicates an I/O bottleneck and choose to optimize the data pipeline (e.g., Pipe mode changes), when in fact the high GPU utilization reveals the true bottleneck is compute capacity, making a larger instance with more GPUs the correct solution.

How to eliminate wrong answers

Option A is wrong because switching from Pipe mode to File mode would increase I/O overhead by downloading the entire 200 GB dataset to the instance's local storage, which would not reduce training time given that GPU utilization is already high and CPU is underutilized. Option B is wrong because using 'AugmentedManifestFile' with Pipe mode is designed for metadata and label handling, not for improving data throughput; it would not address the GPU bottleneck. Option D is wrong because reducing the batch size would decrease GPU utilization (currently at 95%), potentially increasing training time as the GPU would spend more time on overhead and less on computation.

1291
MCQmedium

A data analyst is working with a time series dataset that shows increasing variance over time. To stabilize the variance before modeling, which transformation is most appropriate?

A.First-order differencing
B.Box-Cox transformation
C.Log transformation
D.Min-max scaling
AnswerC

Log transformation is specifically used when variance increases with the mean; it compresses the scale and stabilizes variance, making it the most appropriate choice.

Why this answer

The log transformation (option C) is appropriate when variance increases with the mean, which is common in time series data. It compresses the scale and stabilizes variance. First-order differencing (A) is used to remove trend or seasonality, not to stabilize variance.

The Box-Cox transformation (B) can also stabilize variance, but it is a more general family that includes log as a special case; however, log is simpler and often preferred when the data are positive. Min-max scaling (D) rescales to a fixed range but does not address changing variance.

1292
MCQeasy

A data scientist wants to build a binary classifier to predict customer churn. The dataset has 10,000 records with 500 churners (5%). Which technique should the data scientist use to address class imbalance?

A.Randomly undersample the majority class.
B.Use SMOTE (Synthetic Minority Over-sampling Technique) to create synthetic samples.
C.Assign higher class weights to the minority class.
D.Downsample the majority class to match the minority class size.
AnswerB

SMOTE generates synthetic samples for the minority class, addressing imbalance without losing data.

Why this answer

SMOTE (Synthetic Minority Over-sampling Technique) creates synthetic samples for the minority class, effectively balancing the dataset without losing information. Option A (Randomly undersampling the majority class) discards potentially useful data. Option C (Assigning higher class weights to the minority class) is a valid approach but not a data-level technique; it adjusts the loss function.

Option D (Downsampling the majority class) also loses data and is similar to undersampling.

1293
Multi-Selectmedium

A data scientist is exploring a dataset containing customer transaction records. The target variable is 'churn' (1 = churned, 0 = not churned). Which TWO actions should the scientist take to understand the data distribution and prepare for modeling?

Select 2 answers
A.Apply Principal Component Analysis (PCA) to reduce dimensionality.
B.Train a gradient boosting model to identify important features.
C.Plot the frequency of the target variable to check for class imbalance.
D.Check for missing values in each column and decide on an imputation strategy.
E.Convert categorical variables into one-hot encoded vectors.
AnswersC, D

Essential to detect imbalance.

Why this answer

Visualizing class imbalance and identifying missing values are fundamental EDA steps. Option A (PCA) is for dimensionality reduction, not initial EDA. Option B (gradient boosting) is modeling, not EDA.

Option E (one-hot encoding) is for categorical variables, but not an EDA action. The correct actions are C and D.

1294
MCQmedium

A team is training a large NLP model using SageMaker. The training job fails with an OutOfMemory error. The instance type is ml.p3.2xlarge with 61 GB GPU memory. Which action should the team take to resolve the issue without changing the model architecture?

A.Switch to a regression model
B.Increase the number of epochs
C.Enable SageMaker Managed Warm Pools
D.Reduce the batch size in the training script
AnswerD

Smaller batch size reduces GPU memory consumption per step.

Why this answer

Reducing the batch size in the training script decreases GPU memory usage per iteration, which can resolve the OutOfMemory error without changing the model architecture. Option A is incorrect because switching to a regression model changes the problem type. Option B is incorrect because increasing the number of epochs does not affect memory per step.

Option C is incorrect because Managed Warm Pools are for reducing cold start times, not for memory issues.

1295
MCQeasy

A data scientist needs to transform raw JSON data from an S3 bucket into Parquet format using AWS Glue. The job must be cost-effective and run only when new data arrives. Which solution should be used?

A.Create a Glue crawler that runs continuously.
B.Schedule a Glue ETL job to run every hour.
C.Use Glue DataBrew to transform data and schedule it daily.
D.Create a Glue ETL job triggered by an S3 event notification via Lambda.
AnswerD

Event-driven trigger ensures cost-effectiveness.

Why this answer

It uses an S3 event notification to invoke a Lambda function, which then triggers an AWS Glue ETL job only when new data arrives. This event-driven architecture ensures cost-effectiveness by avoiding continuous or scheduled runs, and it directly transforms raw JSON into Parquet format as required.

Exam trap

The trap here is that candidates may confuse Glue crawlers (which only catalog metadata) with Glue ETL jobs (which transform data), or assume scheduled jobs are always cost-effective without considering event-driven triggers.

How to eliminate wrong answers

Option A is wrong because a Glue crawler runs continuously to update the Data Catalog, not to transform data into Parquet; it would incur unnecessary costs and does not perform ETL transformations. Option B is wrong because scheduling a Glue ETL job every hour runs regardless of whether new data has arrived, leading to wasted compute resources and higher costs. Option C is wrong because Glue DataBrew is a visual data preparation tool, not designed for automated, event-driven ETL transformations; scheduling it daily would also run even without new data and is less cost-effective than an event-triggered approach.

1296
MCQmedium

A company uses Amazon Kinesis Data Firehose to deliver data to Amazon S3. The data must be transformed before delivery using AWS Lambda. The Lambda function adds a timestamp field. The Firehose stream receives up to 10,000 records per second. The transformation currently takes 500 ms per record. What should the team do to ensure the transformation can keep up with the incoming data without data loss?

A.Increase the number of shards in the Kinesis stream.
B.Place the Lambda function in a VPC to improve network performance.
C.Increase the Lambda concurrency limit for the function to handle parallel invocations.
D.Increase the S3 buffer size and buffer interval in the Firehose delivery stream.
AnswerC

Correct. Increasing the Lambda concurrency limit allows multiple instances of the function to run in parallel, enabling it to keep up with the high record rate and preventing data loss.

Why this answer

Increasing the Lambda concurrency limit allows more parallel invocations, enabling the function to process the high throughput of 10,000 records per second (each taking 500 ms) without falling behind. Option A is incorrect because shards are a concept for Kinesis Data Streams, not Firehose. Option B is incorrect: placing the Lambda function in a VPC typically adds network latency and does not improve performance for this simple transformation.

Option D is incorrect: increasing S3 buffer size/interval may delay data delivery but does not increase transformation capacity.

1297
Multi-Selecthard

Which THREE of the following are best practices for feature engineering during EDA? (Select THREE.)

Select 3 answers
A.Remove all outliers from the dataset
B.Standardize all features to have zero mean and unit variance
C.Apply log transformation to highly skewed features
D.Create interaction features between numeric variables
E.Encode categorical variables using one-hot encoding
AnswersC, D, E

Log transformation reduces skewness.

Why this answer

Applying a log transformation to highly skewed features helps normalize their distribution, reducing the impact of extreme values and making the data more suitable for many machine learning algorithms that assume normally distributed features. This is a common technique during exploratory data analysis (EDA) to stabilize variance and improve model performance, especially for linear models and neural networks.

Exam trap

The MLS-C01 exam often tests the misconception that all preprocessing steps, like outlier removal and standardization, should be performed during EDA, when in fact EDA is for understanding data distributions and relationships, while transformations and scaling are part of data preprocessing that may follow EDA based on insights gained.

1298
MCQeasy

A data scientist is performing EDA on a dataset with 1,000 features. The goal is to select the most important features for a regression model. Which technique can be used to rank feature importance quickly?

A.Calculate the correlation coefficient of each feature with the target
B.Use t-SNE to visualize feature relationships
C.Run k-means clustering and use cluster centroids
D.Apply Principal Component Analysis (PCA) and examine component loadings
AnswerA

Quick and provides a ranking.

Why this answer

Correlation analysis with the target variable is a quick way to rank features. Option B (t-SNE) is used for visualization, not feature ranking. Option C (k-means clustering) is an unsupervised clustering method and does not provide feature importance.

Option D (PCA) component loadings show variance contribution but are not a direct ranking of feature importance to the target.

1299
MCQmedium

A data engineer needs to ingest data from an on-premises Apache Kafka cluster into Amazon S3 with minimal latency (under 5 minutes) for real-time analytics. The data volume is approximately 10 MB per second. Which solution is MOST cost-effective and meets the latency requirement?

A.Use Amazon MSK to mirror the on-premises Kafka cluster, then use Kinesis Firehose to write to S3
B.Use Amazon S3 Transfer Acceleration for direct uploads from on-premises
C.Use Amazon Kinesis Data Streams with a Direct Connect connection from on-premises
D.Set up a VPN connection and use AWS Lambda to consume from Kafka and write to S3
AnswerA

MSK provides managed Kafka with low latency, and Firehose can buffer and write to S3 every 60 seconds.

Why this answer

Amazon MSK (Managed Streaming for Apache Kafka) can mirror the on-premises Kafka topics to the cloud with near-real-time replication (typically under 1 minute), and then Kinesis Firehose can be configured with a 60-second buffer interval to deliver data to Amazon S3, meeting the under-5-minute latency requirement. This solution is cost-effective because MSK eliminates the need to manage Kafka infrastructure, and Firehose provides serverless, pay-per-use data delivery without provisioning servers.

Option B (S3 Transfer Acceleration) is designed for accelerating file uploads over long distances, not for continuous streaming of data from Kafka; it would require additional application changes and is not suitable for real-time streaming.

Option C (Kinesis Data Streams with Direct Connect) would require re-architecting the data pipeline to send data directly to Kinesis, adding complexity and cost (Direct Connect bandwidth). Kinesis Data Streams also requires managing shards and does not natively integrate with Kafka replication.

Option D (VPN + Lambda) introduces additional latency due to VPN overhead and Lambda cold starts, and Lambda is not optimized for high-throughput streaming of 10 MB/s; it would likely cause throttling or increased costs. Therefore, option A is the most cost-effective and meets the latency requirement.

1300
MCQeasy

A data scientist is using SageMaker to train a linear regression model. The target variable has a long-tail distribution. Which data transformation is LEAST likely to improve model performance?

A.Add interaction terms between features
B.Apply log transformation to the target variable
C.Normalize all feature values to [0,1]
D.Remove outliers from the target variable
AnswerC

Normalization does not affect linear regression's coefficients; it's not needed.

Why this answer

Normalizing feature values to [0,1] is a scaling technique that does not address the long-tail distribution of the target variable. Long-tail distributions typically require transformations that compress the tail (e.g., log or Box-Cox) to make the relationship more linear and reduce the influence of extreme values. Feature normalization helps with gradient descent convergence but does not fix skewness in the target, so it is least likely to improve model performance for this specific issue.

Exam trap

The trap here is that candidates often confuse feature scaling (normalization) with target transformation, assuming that normalizing features will also fix target skewness, but the question specifically asks about the transformation least likely to improve performance for a long-tail target distribution.

How to eliminate wrong answers

Option A is wrong because adding interaction terms can capture non-linear relationships between features, which may help the linear regression model better fit the long-tail distribution by modeling complex dependencies. Option B is wrong because applying a log transformation to the target variable is a standard technique to reduce skewness and compress the long tail, making the distribution more Gaussian and improving linear regression assumptions. Option D is wrong because removing outliers from the target variable can reduce the influence of extreme values in the long tail, potentially improving model fit and prediction accuracy.

1301
MCQmedium

A data engineering team needs to process streaming data from thousands of IoT devices. They want to aggregate data in 1-minute windows and store results in an S3 data lake for downstream analytics. Which architecture should they use?

A.Use AWS Glue ETL jobs running in streaming mode to read from Kinesis Data Streams, apply window aggregations, and write to S3.
B.Use Kinesis Data Streams with enhanced fan-out and multiple consumers to aggregate windows, then write to S3 via Firehose.
C.Use Kinesis Data Streams, trigger a Lambda function for 1-minute window aggregation using Python, and write results to S3.
D.Use Kinesis Data Analytics for SQL-based windowed aggregations and send results to Kinesis Data Firehose for delivery to S3.
AnswerD

Kinesis Data Analytics supports tumbling windows and continuous queries; Firehose is the natural sink for S3.

Why this answer

Kinesis Data Analytics for SQL Applications is purpose-built for real-time windowed aggregations on streaming data, such as 1-minute tumbling windows. It can directly consume from Kinesis Data Streams, perform the aggregation using standard SQL, and output the results to Kinesis Data Firehose, which reliably delivers the aggregated data to an S3 data lake with built-in buffering and compression.

Exam trap

The trap here is that candidates often assume Lambda is suitable for real-time windowed aggregation, overlooking its stateless nature and execution limits, while Kinesis Data Analytics is the native AWS service for this exact use case.

How to eliminate wrong answers

Option A is wrong because AWS Glue ETL jobs in streaming mode are designed for batch-oriented processing and do not natively support real-time windowed aggregations with sub-minute latency; they are better suited for near-real-time or micro-batch scenarios with higher overhead. Option B is wrong because Kinesis Data Streams with enhanced fan-out and multiple consumers only improves throughput for parallel consumption but does not provide built-in window aggregation logic; writing directly to S3 via Firehose from consumers would require custom aggregation code, defeating the purpose. Option C is wrong because triggering a Lambda function for 1-minute window aggregation is impractical due to Lambda's maximum execution timeout of 15 minutes and lack of state management across invocations; it would require external state stores like DynamoDB or ElastiCache, adding complexity and latency.

1302
MCQeasy

A company wants to build a model to detect fraudulent transactions. The dataset has a highly imbalanced class distribution. Which technique should be used during training to handle class imbalance?

A.Add more features to the dataset
B.Use SageMaker's built-in fraud detection algorithm that applies random under-sampling
C.Reduce the learning rate
D.Increase the tree depth in XGBoost
AnswerB

Correct. SageMaker's built-in fraud detection algorithm uses random under-sampling, an effective technique for handling class imbalance.

Why this answer

Using a fraud detection algorithm that applies random under-sampling is a standard resampling technique to handle class imbalance. AWS SageMaker provides a built-in fraud detection algorithm that incorporates random under-sampling to balance the dataset. Option A is incorrect because adding features does not directly address imbalance.

Option C is incorrect as learning rate affects convergence, not imbalance. Option D is incorrect because increasing tree depth alone can lead to overfitting and does not specifically handle class imbalance.

1303
MCQmedium

A data scientist is working with a dataset that contains a feature with many outliers. Which transformation should the scientist apply to reduce the impact of outliers?

A.Min-max scaling
B.Log transformation
C.Standardization (z-score)
D.Binning
AnswerB

Log transformation reduces skewness and dampens outlier effects.

Why this answer

Log transformation compresses the range of values and reduces the impact of outliers. Standardization (z-score) does not reduce outlier impact. Min-max scaling is sensitive to outliers.

Square root transformation is less effective than log for large outliers. Binning loses information.

1304
MCQmedium

A data scientist is using an IAM role with the policy shown in the exhibit to train a model in SageMaker. The training job fails with a permissions error. What is the missing permission?

A.sagemaker:InvokeEndpoint
B.sagemaker:DescribeTrainingJob
C.s3:ListBucket
D.iam:PassRole
AnswerD

SageMaker requires iam:PassRole to use the execution role.

Why this answer

The training job fails because SageMaker needs to assume the IAM role specified in the training job configuration to access resources like S3 buckets. The `iam:PassRole` permission is required to allow the SageMaker service to pass that role to the training job. Without it, SageMaker cannot assume the role and thus cannot perform actions such as reading training data from S3.

Exam trap

The trap here is that candidates often focus on S3 or SageMaker-specific actions (like `s3:GetObject` or `sagemaker:CreateTrainingJob`) and overlook the prerequisite `iam:PassRole` permission, which is required for SageMaker to assume the role on behalf of the user.

How to eliminate wrong answers

Option A is wrong because `sagemaker:InvokeEndpoint` is used for invoking a deployed endpoint for inference, not for training jobs. Option B is wrong because `sagemaker:DescribeTrainingJob` is a read-only action that allows viewing training job metadata, not a permission required to launch or execute a training job. Option C is wrong because `s3:ListBucket` is an S3 action that might be needed for listing objects in a bucket, but the core issue is that SageMaker cannot assume the IAM role at all, so S3 permissions are irrelevant until the role is passed.

1305
MCQeasy

A data analyst wants to check for duplicate rows in a dataset stored in S3. Which AWS service can be used to run a SQL query to count duplicates without moving the data?

A.Amazon Athena
B.Amazon Redshift Spectrum
C.Amazon SageMaker Studio
D.AWS Glue
AnswerA

Athena can run SQL queries on S3 data to count duplicates.

Why this answer

Amazon Athena is a serverless interactive query service that allows running standard SQL queries directly on data stored in Amazon S3, without needing to move the data. It can easily count duplicate rows using SQL GROUP BY and HAVING clauses. Option B (Amazon Redshift Spectrum) is wrong because although it can query data in S3, it requires an active Redshift cluster, which is unnecessary for this simple ad-hoc query.

Option C (AWS Glue) is wrong because Glue is an ETL service for data preparation and cataloging, not a query engine. Option D (Amazon SageMaker Studio) is wrong because it is an integrated development environment for machine learning, not a SQL query service.

1306
MCQhard

A data scientist is training a binary classifier using logistic regression. The dataset has 100,000 samples and 500 features. After training, the model achieves 95% accuracy on the training set but only 70% on the test set. The data scientist suspects overfitting. Which technique would best reduce overfitting while preserving interpretability?

A.Apply L1 regularization (Lasso)
B.Increase the maximum number of iterations
C.Add polynomial features
D.Use a random forest model instead
AnswerA

L1 regularization performs feature selection, reducing overfitting and keeping the model interpretable.

Why this answer

L1 regularization (Lasso) adds a penalty equal to the absolute value of the magnitude of coefficients, which drives many feature weights to exactly zero. This performs automatic feature selection, reducing model complexity and overfitting while keeping the model as a simple linear logistic regression, thus preserving interpretability.

Exam trap

AWS often tests the distinction between regularization techniques that shrink coefficients (L2/Ridge) versus those that zero them out (L1/Lasso), and candidates may mistakenly choose L2 or fail to recognize that L1 directly improves interpretability by removing irrelevant features.

How to eliminate wrong answers

Option B is wrong because increasing the maximum number of iterations only ensures the optimization algorithm converges; it does not address overfitting and may even lead to further overfitting if the model is already fitting noise. Option C is wrong because adding polynomial features increases model complexity and the number of parameters, which would worsen overfitting rather than reduce it. Option D is wrong because while a random forest can reduce overfitting through ensemble averaging, it is a non-linear black-box model that sacrifices the interpretability of logistic regression's coefficient-based explanations.

1307
MCQhard

A company is using Amazon SageMaker to train a time series forecasting model using the DeepAR algorithm. The training data contains multiple time series. The model is overfitting. Which action is LEAST likely to reduce overfitting?

A.Decrease the number of layers in the neural network.
B.Increase the dropout rate.
C.Decrease the context length.
D.Reduce the number of time series in the training set.
AnswerD

Less data may worsen overfitting.

Why this answer

Reducing the number of time series in the training set reduces the diversity of training data, which typically increases overfitting rather than reducing it. DeepAR relies on learning patterns across multiple related time series to generalize well; fewer time series mean less shared statistical strength, making the model more likely to memorize noise in the remaining series.

Exam trap

The trap here is that candidates mistakenly think reducing training data always reduces overfitting, but in time series forecasting with DeepAR, fewer time series actually weaken the cross-series learning that regularizes the model, making overfitting worse.

How to eliminate wrong answers

Option A is wrong because decreasing the number of layers reduces the model's capacity, which directly combats overfitting by limiting the complexity of learned representations. Option B is wrong because increasing the dropout rate randomly drops neurons during training, which acts as a regularization technique to prevent co-adaptation and reduce overfitting. Option C is wrong because decreasing the context length shortens the look-back window, forcing the model to rely on fewer historical points and reducing its ability to memorize long-term patterns, which helps mitigate overfitting.

1308
MCQhard

A company uses Amazon SageMaker to host a model for real-time inference. The model is a large ensemble of 10 deep learning models, each 500 MB. The total model size is 5 GB, which exceeds the 5 GB limit for SageMaker real-time endpoints. The data scientist wants to reduce the model size without significantly impacting accuracy. The ensemble uses averaging of predictions from all models. The scientist has access to a validation set with 10,000 samples. Which technique should the scientist use to reduce the model size?

A.Use model distillation to train a smaller model that approximates the ensemble
B.Use a more expensive instance type to host the model
C.Use SageMaker Neo to compile and optimize the model
D.Apply weight pruning to each model in the ensemble
AnswerA

Distillation produces a compact model with similar performance.

Why this answer

Model distillation trains a smaller student model to mimic the ensemble, reducing size while preserving accuracy. Option B is wrong because price-aware instance selection does not reduce model size. Option C is wrong because SageMaker Neo is for optimization, not size reduction below 5 GB.

Option D is wrong because pruning alone may not reduce size enough.

1309
Multi-Selecteasy

During EDA, a data scientist generates a pairplot of the dataset and observes that two features have a Pearson correlation coefficient of 0.95. Which TWO conclusions can the scientist draw from this observation? (Choose 2)

Select 2 answers
A.The two features may be multicollinear
B.The two features have a strong linear relationship
C.The two features move in opposite directions
D.The two features are statistically independent
E.One feature causes the other
AnswersA, B

High correlation between features can cause multicollinearity in regression models.

Why this answer

Options A and B are correct because a Pearson correlation coefficient of 0.95 indicates a very strong positive linear relationship between the two features. This strong linear relationship suggests potential multicollinearity if both features are used as predictors in a linear model. Option C is incorrect because a positive correlation means the features move in the same direction, not opposite.

Option D is wrong because a high correlation implies dependence, not statistical independence. Option E is incorrect because correlation does not imply causation; it only measures the strength and direction of a linear relationship.

1310
MCQmedium

A company uses Amazon SageMaker to train a deep learning model for image classification. The training job is taking longer than expected. The data scientist observes that GPU utilization is low (around 30%) and CPU utilization is high. Which action is most likely to reduce training time?

A.Reduce the batch size
B.Increase the batch size
C.Increase the learning rate
D.Increase the number of data loading workers
AnswerD

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

Why this answer

Low GPU utilization with high CPU utilization indicates a data loading bottleneck where the CPU cannot prepare batches fast enough to keep the GPU busy. Increasing the number of data loading workers (e.g., SageMaker's `sagemaker.session.Session` or PyTorch `DataLoader` `num_workers`) allows parallel data preprocessing and I/O, reducing idle GPU time and overall training duration.

Exam trap

The trap here is that candidates often confuse low GPU utilization with a learning rate or batch size issue, when in fact the root cause is a data pipeline bottleneck that requires parallel data loading workers.

How to eliminate wrong answers

Option A is wrong because reducing the batch size decreases the amount of work per GPU step, which can further lower GPU utilization and increase overhead from more frequent weight updates. Option B is wrong because increasing the batch size without addressing the data loading bottleneck would worsen the CPU starvation, as larger batches require more data to be loaded per step, potentially increasing CPU wait time. Option C is wrong because increasing the learning rate does not resolve the CPU/GPU utilization imbalance; it affects convergence behavior, not data throughput or hardware utilization.

1311
MCQmedium

A data scientist is building a fraud detection model using a highly imbalanced dataset. The model uses a random forest classifier. The recall for the minority class is 0.6, and precision is 0.9. The business requires recall above 0.8. Which action should the data scientist take to improve recall?

A.Perform feature selection to remove noisy features.
B.Increase the maximum depth of the trees.
C.Increase the class weight for the minority class in the algorithm.
D.Decrease the probability threshold for classifying a transaction as fraudulent.
E.Increase the number of trees in the random forest.
AnswerD

Decreasing the classification threshold for the positive class increases recall (more positives predicted) at the cost of precision.

Why this answer

Decreasing the probability threshold for classifying a transaction as fraudulent increases recall because more transactions are predicted as positive, capturing more true positives at the cost of precision. Option A (feature selection) might remove noisy features but could inadvertently eliminate informative ones, potentially reducing recall. Option B (increasing maximum depth of trees) increases model complexity and risk of overfitting without directly improving recall.

Option C (increasing class weight for the minority class) can help the model focus on the minority class, but if recall is still insufficient, threshold adjustment is a more direct approach. Option E (increasing number of trees) reduces variance and improves generalization but does not directly increase recall.

1312
Multi-Selecthard

Which TWO approaches can reduce inference latency on a SageMaker real-time endpoint? (Choose 2.)

Select 2 answers
A.Attach an Elastic Inference accelerator
B.Increase the batch size
C.Enable SageMaker Model Monitor
D.Use a GPU instance type
E.Compile the model using SageMaker Neo
AnswersA, E

Provides GPU acceleration at lower cost.

Why this answer

Elastic Inference (EI) accelerators attach a dedicated, low-cost FPGA-based inference accelerator to a SageMaker endpoint, offloading matrix operations from the CPU. This reduces inference latency by accelerating the compute-intensive forward pass of deep learning models without requiring a full GPU instance, making it ideal for real-time, low-latency predictions.

Exam trap

The trap here is that candidates often confuse 'reducing latency' with 'increasing throughput' — choosing larger batch sizes or GPU instances, which improve throughput but can increase per-request latency due to batching delays and GPU context switching.

1313
MCQmedium

A company's ML model is deployed on a SageMaker endpoint. The model's predictions are used in a customer-facing application that requires low latency. Over time, the model's performance degrades due to data drift. What is the most suitable approach to detect this drift automatically?

A.Set up a CloudWatch alarm on the endpoint's invocation latency
B.Periodically retrain the model using all historical data
C.Use Amazon S3 events to trigger a Lambda function that compares distributions
D.Enable Amazon SageMaker Model Monitor to continuously check for data drift
AnswerD

Built-in drift detection.

Why this answer

Amazon SageMaker Model Monitor is purpose-built to automatically detect data drift by continuously comparing incoming inference data against a baseline dataset. It computes statistical metrics (e.g., distribution distances like Kolmogorov-Smirnov or Chi-squared) and raises alerts when drift exceeds configurable thresholds, enabling proactive retraining without manual intervention. This directly addresses the need for automated drift detection in a low-latency customer-facing application.

Exam trap

The trap here is confusing operational metrics (latency, errors) with data quality metrics (drift), leading candidates to choose CloudWatch alarms (Option A) instead of the dedicated monitoring service.

How to eliminate wrong answers

Option A is wrong because CloudWatch alarms on invocation latency measure endpoint performance (e.g., response times), not data drift; latency degradation is unrelated to changes in input data distribution. Option B is wrong because periodically retraining on all historical data is a reactive, resource-intensive approach that does not detect drift—it assumes drift has occurred without confirmation, wasting compute and potentially overfitting to stale patterns. Option C is wrong because S3 events trigger Lambda on object creation, not on inference data; comparing distributions would require custom code to sample and compare against a baseline, which is less reliable and more complex than SageMaker Model Monitor's built-in statistical tests and integration.

1314
MCQhard

A data scientist runs a SageMaker training job and receives the above error. The S3 bucket 'my-bucket' contains a folder 'data' with a file 'data.csv'. What is the MOST likely cause of the error?

A.The instance type ml.m5.large does not have enough memory
B.The VolumeSizeInGB is too small to download the data
C.The S3 URI should be s3://my-bucket/data/data.csv instead of s3://my-bucket/data
D.The S3 bucket and the training job are in different regions
AnswerC

If the training script expects a single file, the S3 URI must point to the file directly.

Why this answer

The error occurs because the SageMaker training job expects a specific S3 object URI (pointing to a file), not a prefix (pointing to a folder). When you specify `s3://my-bucket/data`, SageMaker interprets it as a prefix and attempts to list objects under that prefix, but the training channel requires a direct file reference. Using `s3://my-bucket/data/data.csv` provides the exact object path, allowing SageMaker to download the file correctly.

Exam trap

The trap here is that candidates confuse S3 prefixes (folders) with S3 objects (files), assuming SageMaker can automatically resolve a folder to its contents, when in fact it requires an explicit file path for training data channels.

How to eliminate wrong answers

Option A is wrong because the error is about S3 URI format, not instance memory; ml.m5.large has sufficient memory for typical CSV processing. Option B is wrong because VolumeSizeInGB controls the local storage volume for the training instance, not the download of data from S3; SageMaker downloads data to the volume regardless of its size. Option D is wrong because cross-region S3 access would cause a different error (e.g., 'Access Denied' or 'BucketRegionError'), not a URI parsing error, and SageMaker training jobs can access buckets in different regions if the IAM role allows it.

1315
Multi-Selecthard

Which THREE factors should be considered when selecting the appropriate algorithm for a regression problem? (Choose 3.)

Select 3 answers
A.The number of features relative to the number of samples
B.The interpretability requirements of the business stakeholders
C.The presence of non-linear relationships in the data
D.The time of day the training will occur
E.The color of the data scientist's laptop
AnswersA, B, C

High-dimensional data may require regularization.

Why this answer

The ratio of features to samples directly impacts model complexity and overfitting risk. In high-dimensional settings (e.g., p >> n), algorithms like linear regression may fail due to singular covariance matrices, while regularized methods (Ridge, Lasso) or tree-based models become necessary. This is a core consideration in the bias-variance tradeoff for regression problems.

Exam trap

AWS often tests the distinction between operational concerns (like training time or hardware) and core modeling factors, expecting candidates to recognize that irrelevant options (time of day, laptop color) are clear distractors while the three correct factors directly influence algorithm performance and business suitability.

1316
MCQmedium

A company is using SageMaker built-in object detection algorithm to detect defects in manufacturing images. The model is trained on 10,000 labeled images and achieves 95% accuracy. However, in production, the model misclassifies many defective items as non-defective (false negatives). The business requires recall > 90% for the defect class. Which action should they take?

A.Use a different algorithm such as semantic segmentation
B.Adjust the decision threshold of the model to increase recall at the expense of precision
C.Use SageMaker's Automatic Model Tuning to find better hyperparameters
D.Retrain the model with more images of non-defective items
AnswerB

Lowering the threshold increases recall for the positive class.

Why this answer

Threshold tuning directly optimizes recall for a given class.

1317
Multi-Selecthard

A company is deploying a machine learning model for fraud detection. The model outputs a probability score. The cost of false negatives is very high. Which TWO metrics should the company focus on optimizing?

Select 2 answers
A.Precision
B.False positive rate (FPR)
C.F1 score
D.Area under the ROC curve (AUC-ROC)
E.Recall
AnswersC, E

F1 = harmonic mean of precision and recall; optimizing F1 also improves recall.

Why this answer

Recall (true positive rate) measures ability to find positives; minimizing false negatives is optimizing recall. AUC-ROC summarizes overall performance but not specific to false negatives. Precision focuses on false positives.

FPR is about false positives. F1 balances precision and recall, but recall directly addresses false negatives.

1318
MCQmedium

A team is deploying a real-time inference endpoint using Amazon SageMaker. The model is a large deep learning model that requires GPU for inference. The endpoint must handle variable traffic patterns with minimal latency. Which deployment strategy should the team use?

A.Deploy a single model endpoint with an auto-scaling policy.
B.Use a SageMaker multi-model endpoint with GPU instance type.
C.Deploy a serverless endpoint using SageMaker Serverless Inference.
D.Use SageMaker Batch Transform to process requests in batches.
AnswerB

Multi-model endpoints allow hosting multiple models on GPU instances, handling variable traffic efficiently.

Why this answer

B is correct because SageMaker multi-model endpoints (MMEs) allow multiple models to be hosted on a single GPU-backed endpoint, dynamically loading and unloading models from disk to GPU memory as needed. This reduces cost and cold-start latency compared to single-model endpoints, while still providing GPU acceleration for deep learning inference. MMEs are ideal for variable traffic patterns because they can scale horizontally and share GPU resources efficiently.

Exam trap

The trap here is that candidates often assume serverless inference (Option C) is suitable for GPU workloads, but AWS SageMaker Serverless Inference only supports CPU instances, making it incompatible with large deep learning models that require GPU acceleration.

How to eliminate wrong answers

Option A is wrong because a single model endpoint with auto-scaling can handle variable traffic but does not optimize GPU utilization for multiple models; it would require separate endpoints for each model, increasing cost and management overhead. Option C is wrong because SageMaker Serverless Inference does not support GPU instances; it uses CPU-based compute, which is unsuitable for large deep learning models requiring GPU acceleration. Option D is wrong because SageMaker Batch Transform is designed for offline, asynchronous batch processing, not real-time inference with minimal latency; it cannot handle variable traffic patterns dynamically.

1319
MCQmedium

A data scientist is training a deep learning model on Amazon SageMaker using a custom Docker container. The training job fails with an error 'OutOfMemoryError: CUDA out of memory'. The instance type is ml.p3.2xlarge (8 GB GPU memory). The model has 50 million parameters. What is the most likely cause and solution?

A.The instance type is insufficient; switch to ml.p3.8xlarge
B.The batch size is too large; reduce batch size
C.Enable gradient checkpointing to reduce memory
D.The model uses FP32 precision; enable mixed precision training
AnswerD

Mixed precision (FP16) halves memory usage, fitting the model into 8 GB.

Why this answer

A model with 50 million parameters in FP32 precision requires approximately 200 MB per parameter (4 bytes each = 200 MB for 50M), plus additional memory for activations, gradients, and optimizer states, which can easily exceed the 8 GB GPU memory of ml.p3.2xlarge. Mixed precision training (FP16) halves the memory usage for tensors, reducing the overall footprint and often fitting the model within GPU limits. Option A (instance type) may solve the problem but is more expensive and unnecessary if mixed precision works.

Option B (batch size) is a contributing factor but not the most likely root cause, as even a batch size of 1 may still cause OOM due to parameter storage. Option C (gradient checkpointing) trades compute for memory by recomputing activations, but does not address the primary issue of parameter storage in FP32. Therefore, enabling mixed precision is the most direct and cost-effective solution.

1320
MCQeasy

A data scientist is training a binary classification model using Amazon SageMaker. The dataset is highly imbalanced (99% negative class, 1% positive class). The model currently achieves 99% accuracy but fails to detect most positive cases. Which metric should the data scientist primarily use to evaluate model performance?

A.ROC AUC
B.F1 score
C.Recall
D.Accuracy
AnswerB

F1 score balances precision and recall, suitable for imbalanced data.

Why this answer

In highly imbalanced datasets (99% negative, 1% positive), accuracy is misleading because a model can achieve 99% accuracy by simply predicting the majority class for all instances, failing to detect any positive cases. The F1 score (option B) is the harmonic mean of precision and recall, providing a balanced measure that penalizes models that trade off recall for precision or vice versa. This makes it the primary metric for evaluating binary classification performance on imbalanced data, as it directly reflects the model's ability to correctly identify positive cases while minimizing false positives.

Exam trap

The trap here is that candidates see 99% accuracy and assume the model is performing well, failing to recognize that accuracy is meaningless on imbalanced datasets, and they may incorrectly choose ROC AUC because it is commonly used for binary classification without understanding its limitations with extreme class imbalance.

How to eliminate wrong answers

Option A (ROC AUC) is wrong because it measures the model's ability to rank positive instances higher than negative ones across all thresholds, which can be overly optimistic on highly imbalanced datasets and does not directly reflect precision or recall for the minority class. Option C (Recall) is wrong because while it captures the proportion of actual positives correctly identified, it ignores false positives, so a model could achieve high recall by predicting all instances as positive, which is not useful. Option D (Accuracy) is wrong because it is dominated by the majority class; a model that always predicts the negative class achieves 99% accuracy but fails entirely to detect positive cases, making it a poor metric for imbalanced classification.

1321
MCQmedium

A company is building a fraud detection model. The dataset is highly imbalanced (99% legitimate, 1% fraud). The data scientist trains a model using Amazon SageMaker's built-in XGBoost algorithm. The model achieves 99% accuracy but only catches 10% of fraud cases. Which technique should the data scientist apply to improve recall for the minority class?

A.Use random under-sampling of the majority class.
B.Set the scale_pos_weight hyperparameter in XGBoost.
C.Use mean squared error as the objective function.
D.Use SMOTE to oversample the minority class.
AnswerB

This adjusts the weight of positive class to handle imbalance.

Why this answer

Setting the scale_pos_weight hyperparameter in XGBoost adjusts the weight of the positive (minority) class during training, effectively penalizing misclassifications of fraud cases more heavily. This directly addresses the class imbalance by forcing the model to focus on the minority class, which improves recall without altering the dataset distribution. The current 99% accuracy with only 10% fraud recall indicates the model is biased toward the majority class, and scale_pos_weight is the most direct and efficient fix within XGBoost.

Exam trap

The trap here is that candidates often choose SMOTE (Option D) as a default oversampling technique for imbalanced data, but the question specifically asks for a technique to apply to XGBoost, where the built-in scale_pos_weight hyperparameter is the most direct and efficient solution, avoiding the overhead and potential noise of synthetic data generation.

How to eliminate wrong answers

Option A is wrong because random under-sampling of the majority class discards large amounts of legitimate transaction data, which can lead to loss of valuable patterns and reduce model robustness, especially when the majority class is 99% of the data. Option C is wrong because mean squared error (MSE) is a regression loss function, not suitable for binary classification tasks like fraud detection; XGBoost uses log loss (binary:logistic) for classification, and MSE would produce poor probability estimates and gradient updates. Option D is wrong because SMOTE (Synthetic Minority Oversampling Technique) generates synthetic fraud samples, which can introduce noise and overfitting, and is less efficient than directly adjusting class weights via scale_pos_weight in XGBoost, which is a built-in, parameter-based solution.

1322
Multi-Selecthard

Which THREE AWS services can be used together to build a serverless data pipeline that ingests streaming data, transforms it, and loads it into Amazon Redshift for analysis?

Select 3 answers
A.Amazon EMR
B.Amazon SQS
C.Amazon Kinesis Data Firehose
D.Amazon Kinesis Data Streams
E.AWS Lambda
AnswersC, D, E

Delivers transformed data directly to Redshift.

Why this answer

Amazon Kinesis Data Firehose (C) is the correct service because it is designed to reliably capture, transform, and load streaming data into Amazon Redshift with near-real-time latency. It can invoke AWS Lambda for on-the-fly data transformation (e.g., converting JSON to Parquet) and directly stream the processed records into Redshift via the Redshift COPY command, making it the central orchestration component for a serverless pipeline.

Exam trap

The trap here is that candidates often confuse Amazon EMR as a serverless option, but EMR requires cluster management and is not serverless, whereas Kinesis Data Firehose and Lambda provide a fully managed, serverless ingestion and transformation layer.

1323
MCQeasy

During EDA, a data scientist creates a scatter matrix of numerical features and notices that some features have a funnel-shaped pattern (variance increases with the mean). What is the appropriate transformation to stabilize variance?

A.Apply log transformation.
B.Standardize the features using Z-scores.
C.Apply a sine transformation.
D.Apply Box-Cox transformation with lambda=0.
AnswerA

Log transformation stabilizes variance when variance increases with mean.

Why this answer

A funnel-shaped pattern in a scatter matrix indicates heteroscedasticity, where variance increases with the mean. The log transformation is appropriate because it compresses the scale of the data, making the variance more constant across the range of values, which stabilizes variance for right-skewed or multiplicative data.

Exam trap

The MLS-C01 exam often tests the distinction between transformations that stabilize variance (log, Box-Cox) versus those that only standardize (Z-scores) or are domain-specific (sine), and candidates may incorrectly choose Box-Cox with lambda=0 thinking it is a separate technique, missing that the log transformation is the canonical answer for funnel-shaped heteroscedasticity.

How to eliminate wrong answers

Option B is wrong because standardizing using Z-scores centers and scales the data to unit variance but does not address the relationship between variance and mean; it assumes homoscedasticity and can amplify heteroscedasticity. Option C is wrong because a sine transformation is periodic and used for cyclical or angular data, not for stabilizing variance in funnel-shaped patterns. Option D is wrong because Box-Cox with lambda=0 is equivalent to the log transformation only when the data is positive, but the Box-Cox transformation is a family of power transformations; specifying lambda=0 directly is redundant and the question asks for the appropriate transformation, not a specific parameterization.

1324
MCQeasy

A machine learning team is using AWS Glue to prepare data for training. They notice that the ETL job takes a long time to process large datasets. Which change is most likely to improve performance?

A.Increase the number of DPUs for the Glue job.
B.Decrease the number of workers in the Glue job.
C.Disable Spark shuffle operations.
D.Reduce the dataset size by sampling.
AnswerA

More DPUs increase parallelism and speed up processing.

Why this answer

Increasing the number of DPUs (Data Processing Units) for the AWS Glue job allocates more distributed computing resources, which allows the job to process data in parallel across more executors. This directly reduces the runtime for large datasets by improving the parallelism of Spark transformations and actions.

Exam trap

The trap here is that candidates may think reducing workers or disabling shuffle will speed up the job, but they fail to recognize that AWS Glue's performance is primarily limited by parallelism, and reducing resources or core Spark operations will degrade or break the job.

How to eliminate wrong answers

Option B is wrong because decreasing the number of workers reduces the parallelism and available compute capacity, which would likely increase job duration, not improve performance. Option C is wrong because disabling Spark shuffle operations would break most distributed data processing workflows that require repartitioning, joins, or aggregations, leading to incorrect results or job failure. Option D is wrong because reducing dataset size by sampling would compromise data completeness and model accuracy, and is not a valid performance optimization for production ETL jobs.

1325
MCQeasy

A machine learning team is using SageMaker to train a model with the built-in Linear Learner algorithm. The dataset has 1 million rows and 20 features. The training completes, but the model's mean squared error (MSE) is high. Which parameter adjustment is most likely to reduce MSE?

A.Increase the mini-batch size
B.Change the loss function to cross-entropy
C.Increase the number of epochs
D.Increase the learning rate
AnswerC

Increasing the number of epochs allows the model to see the data more times, helping it converge to a lower training error, thus reducing MSE.

Why this answer

Increasing the number of epochs allows the model to see the data more times, helping it converge to a lower training error, thus reducing MSE. Option A is incorrect: increasing mini-batch size typically improves computational efficiency but can make convergence slower per epoch, potentially requiring even more epochs to converge; it may not directly reduce MSE. Option B is incorrect: cross-entropy is a loss function for classification problems, not regression; Linear Learner with MSE is appropriate for regression.

Option D is incorrect: increasing the learning rate can cause the optimizer to overshoot the minimum or diverge, often increasing rather than decreasing MSE.

1326
MCQhard

A machine learning team is using SageMaker to train a custom TensorFlow model on a dataset that fits in memory. The training job is taking too long. The team wants to reduce training time without changing the model architecture. Which approach is most effective?

A.Switch the input mode from File to Pipe
B.Use SageMaker managed spot training
C.Use Amazon EFS as the input data source instead of S3
D.Use a larger instance type with more vCPUs
AnswerA

Pipe mode streams data directly, reducing I/O wait time and speeding up training.

Why this answer

Switching the input mode from File to Pipe is the most effective approach because it streams data directly from Amazon S3 to the training container, eliminating the need to download the entire dataset to the local storage before training begins. This reduces the I/O bottleneck and significantly cuts down the time spent on data loading, especially for datasets that fit in memory, as the model can start training almost immediately while data is being streamed.

Exam trap

AWS often tests the misconception that larger instances always reduce training time, but the trap here is that the dataset fits in memory, so the bottleneck is typically I/O, not compute, making data streaming optimizations like Pipe mode more effective than scaling up hardware.

How to eliminate wrong answers

Option B is wrong because SageMaker managed spot training reduces cost by using spare EC2 capacity, but it does not inherently reduce training time; in fact, it can increase total time due to potential interruptions and checkpoint restarts. Option C is wrong because Amazon EFS as an input data source typically introduces higher latency and slower throughput compared to S3, and it does not support the Pipe input mode, so it would likely increase training time. Option D is wrong because using a larger instance type with more vCPUs may improve compute parallelism but does not address the data loading bottleneck that is the primary cause of slow training; the dataset fits in memory, so the issue is likely I/O-bound, not compute-bound.

1327
MCQmedium

A data engineer is exploring a dataset with 1 million rows and 50 features. They notice that some features have missing values. The 'Age' column has 5% missingness, and 'Income' has 20% missingness. The target variable is 'LoanDefault' (binary). The engineer wants to impute missing values. Which of the following strategies is most appropriate?

A.Impute missing 'Age' with median and 'Income' with median.
B.Impute missing 'Age' with mode and 'Income' with mode.
C.Use a k-NN model to predict missing values.
D.Drop all rows with missing values.
AnswerA

Median is robust to outliers and suitable for skewed distributions.

Why this answer

Median imputation is robust to outliers and appropriate for numerical features like Age and Income. Using median preserves the central tendency without being affected by extreme values. Option B is incorrect because mode is suitable for categorical features, not continuous numerical ones.

Option C is incorrect because k-NN imputation, while possible, is more complex and typically used after simpler methods in EDA. Option D is incorrect because dropping rows with missing values would discard a significant portion of the dataset (up to 25% if missingness is independent), which is not ideal for initial analysis.

1328
Multi-Selectmedium

A company is deploying a SageMaker model for real-time inference. The endpoint must be highly available and cost-effective. Which TWO actions should the company take? (Select TWO.)

Select 2 answers
A.Use managed spot training for inference
B.Deploy the endpoint with at least two instances in different Availability Zones
C.Use GPU instances for all models even if not required
D.Configure automatic scaling based on latency or request count
E.Use a single large instance to handle peak load
AnswersB, D

Multi-AZ deployment provides high availability.

Why this answer

Deploying a SageMaker endpoint with at least two instances in different Availability Zones (AZs) ensures high availability by eliminating a single point of failure. If one AZ goes down, traffic is automatically routed to the healthy instance in the other AZ, meeting the requirement for a highly available real-time inference endpoint.

Exam trap

The trap here is that candidates often confuse managed spot training with inference, or think a single large instance is more cost-effective than multiple smaller instances with auto scaling, ignoring the high availability requirement.

1329
MCQhard

Refer to the exhibit. An IAM policy is attached to a SageMaker notebook instance role. A data scientist is trying to train a model using the SageMaker built-in XGBoost algorithm with training data in 'my-bucket/training-data/' and expects output in 'my-bucket/output/'. The training job fails with an access denied error. What is the most likely missing permission?

A.iam:PassRole on the SageMaker execution role.
B.ecr:GetAuthorizationToken on the ECR repository.
C.s3:ListBucket on the S3 bucket.
D.sagemaker:DescribeTrainingJob on the training job.
AnswerA

The policy is missing iam:PassRole, which is required to allow SageMaker to assume the execution role for the training job.

Why this answer

The training job fails with 'access denied' because the IAM policy attached to the SageMaker notebook instance role does not include the `iam:PassRole` permission. SageMaker requires this permission to pass the execution role specified in the `CreateTrainingJob` API call. Without it, the API call is denied.

The other permissions (ECR, S3 list, DescribeTrainingJob) are either not needed at this stage or are already granted via the SageMaker service role, not the notebook role.

1330
MCQmedium

A data engineering team needs to build a data lake on Amazon S3 that will be queried by Amazon Athena and Amazon Redshift Spectrum. The data will be ingested from multiple sources in various formats (CSV, JSON, Parquet). Which partitioning strategy will provide the best query performance for date-range queries?

A.Partition by date with one partition per day in a flat structure.
B.Do not partition; let Athena scan the entire dataset.
C.Partition by year, month, and day in a hierarchical structure.
D.Partition by source system first, then by date.
AnswerC

Hierarchical date partitioning enables partition pruning for date-range queries.

Why this answer

Partitioning by year, month, and day in a hierarchical structure minimizes the amount of data scanned by Amazon Athena and Redshift Spectrum for date-range queries. Athena and Redshift Spectrum both charge per byte scanned, so reducing the scan size directly improves performance and reduces cost. A hierarchical partition structure (e.g., s3://bucket/year=2023/month=11/day=01/) allows the query engine to prune partitions at each level, efficiently skipping irrelevant directories for queries like WHERE date BETWEEN '2023-11-01' AND '2023-11-30'.

Exam trap

The trap here is that candidates may think a flat daily partition is simpler and sufficient, but they overlook that hierarchical partitioning (year/month/day) provides better partition pruning for range queries spanning months or years, which is a key optimization for Athena and Redshift Spectrum's cost and performance model.

How to eliminate wrong answers

Option A is wrong because a flat partition per day structure (e.g., s3://bucket/date=2023-11-01/) does not allow partition pruning at year or month granularity; for a multi-month query, Athena must list and evaluate all day-level partitions, increasing metadata overhead and potentially slowing performance. Option B is wrong because not partitioning forces Athena and Redshift Spectrum to perform a full table scan of all data, which is extremely inefficient for date-range queries, leading to high costs and slow query times due to scanning terabytes of irrelevant data. Option D is wrong because partitioning by source system first then by date is suboptimal for date-range queries; if a query spans multiple source systems, Athena must scan all source system partitions even if the date range is narrow, negating the benefit of date-based pruning and increasing scan size.

1331
MCQmedium

A company uses Amazon Kinesis Data Analytics for Apache Flink to process real-time clickstream data. The application uses event time and watermarks for windowed aggregations. The team notices that the output from tumbling windows is delayed, and many late records are being dropped. What is the MOST likely cause?

A.The checkpointing interval is too long, causing state to be lost
B.The parallelism is too low, causing backpressure
C.The source is marking itself as idle, causing watermarks to stall
D.The allowed lateness is set too low, causing late records to be discarded
AnswerD

Low allowed lateness means records arriving after the watermark are dropped.

Why this answer

The described symptoms—delayed output and dropped late records—are classic indicators that the `allowedLateness` parameter is set too low. In Apache Flink, event-time processing relies on watermarks to determine when a window is complete; if `allowedLateness` is too short, any record arriving after the watermark passes the window's end time is discarded as late. The team's observation that many late records are being dropped directly points to this configuration issue.

Exam trap

The trap here is that candidates confuse watermark stall (which delays output) with late record dropping—both involve watermarks, but stalled watermarks prevent window closure (no output), whereas low `allowedLateness` closes windows on time but discards subsequent late arrivals.

How to eliminate wrong answers

Option A is wrong because checkpointing interval affects fault tolerance and state recovery, not the handling of late-arriving data within a running window; a long checkpoint interval would cause longer recovery time after a failure, not delayed output or dropped records. Option B is wrong because low parallelism can cause backpressure and throughput issues, but it does not cause late records to be dropped—backpressure slows processing but does not discard data based on event time. Option C is wrong because a source marking itself as idle would cause watermarks to stall (stop advancing), which would delay window firing indefinitely, not drop late records; in fact, stalled watermarks would cause windows to never close, so records would accumulate rather than be dropped.

1332
MCQhard

An e-commerce company uses Amazon Redshift for analytics. The data engineering team needs to load daily sales data from an S3 bucket that receives new files every hour. The data must be loaded into Redshift with minimal impact on query performance during the day, and they need to handle late-arriving data (files that appear after the daily load). Which approach should they use?

A.Use AWS Glue ETL to copy the data from S3 to Redshift, overwriting the existing data each day.
B.Use a staging table to load data incrementally with a MERGE operation, and schedule a late-arriving data job to merge files that arrive after the daily load.
C.Stream the data from S3 using Amazon Kinesis Firehose to load into Redshift continuously.
D.Use Amazon Redshift Spectrum to query data directly from S3 and create external tables.
AnswerB

Staging tables allow incremental upserts and handling of late data without blocking queries.

Why this answer

It uses a staging table to incrementally load data with a MERGE operation, which minimizes impact on query performance by avoiding full table overwrites. The separate late-arriving data job handles files that appear after the daily load, ensuring completeness without blocking ongoing queries. This approach aligns with Redshift's best practices for incremental loads and late-arriving data handling.

Exam trap

The trap here is that candidates often confuse continuous streaming (Option C) with batch incremental loading, not realizing that Kinesis Firehose is optimized for real-time streams, not for handling sporadic late-arriving files in a batch context.

How to eliminate wrong answers

Option A is wrong because overwriting existing data each day with AWS Glue ETL would cause significant performance impact during the day, as it requires a full table reload and can block concurrent queries. Option C is wrong because streaming data from S3 using Amazon Kinesis Firehose into Redshift continuously is not designed for batch-oriented late-arriving data scenarios and can lead to high costs and performance degradation due to frequent micro-batches. Option D is wrong because using Redshift Spectrum to query data directly from S3 does not load data into Redshift, so it cannot support the requirement of loading data into Redshift for analytics, and it would not handle late-arriving data efficiently for ongoing queries.

1333
MCQmedium

An ML engineer runs the AWS CLI command above to list files in a training data bucket. The engineer notices that the three CSV files have different sizes but the same number of columns. What is the MOST likely cause of the size variation?

A.The files are compressed with different algorithms.
B.Some files have duplicate headers.
C.The files contain a different number of rows.
D.The files have different column data types.
AnswerC

Row count directly affects file size.

Why this answer

Different numbers of rows directly affect file size. Options A and B are incorrect: compression algorithms would cause size differences but the files are CSV and likely uncompressed; duplicate headers would cause schema inconsistency, but the question states same number of columns. Option D is incorrect because different column data types do not necessarily cause size variation; they could still have same number of rows.

1334
Multi-Selecteasy

Which TWO AWS services are suitable for real-time stream processing?

Select 2 answers
A.Amazon Athena
B.AWS Glue
C.Amazon EMR
D.Amazon Kinesis Data Analytics
E.AWS Lambda
AnswersD, E

Kinesis Data Analytics processes streaming data in real-time.

Why this answer

Amazon Kinesis Data Analytics and AWS Lambda can process streams in real-time. AWS Glue is batch-oriented, Amazon EMR can process streams but is more batch, and Amazon Athena is for ad-hoc SQL queries on S3.

1335
MCQmedium

A data scientist is training a gradient boosting model using SageMaker's built-in XGBoost algorithm. The model is overfitting on the training data. Which hyperparameter adjustment is most likely to reduce overfitting?

A.Increase learning rate (eta)
B.Increase max_depth
C.Increase num_round
D.Increase lambda (L2 regularization)
AnswerD

Higher lambda penalizes large weights, reducing overfitting.

Why this answer

Increasing the L2 regularization term (lambda) penalizes large weights, which helps reduce overfitting. Option A is incorrect because increasing the learning rate (eta) can cause the model to converge too quickly and may lead to overfitting if not paired with proper regularization. Option B is incorrect because increasing max_depth increases model complexity, which typically worsens overfitting.

Option C is incorrect because increasing num_round (number of boosting rounds) allows the model to fit the training data more closely, increasing the risk of overfitting.

1336
MCQmedium

A machine learning engineer needs to deploy a model that performs real-time inference with strict latency requirements of under 100 milliseconds. The model is a large ensemble of 10 deep learning models. Which SageMaker deployment strategy is MOST appropriate?

A.Use batch transform and cache predictions.
B.Deploy each model as a separate endpoint and route traffic using Application Load Balancer.
C.Use a SageMaker Inference Pipeline with serial inference within a single endpoint.
D.Use a multi-model endpoint to host all models.
AnswerC

Inference Pipelines allow chaining containers in a single endpoint, reducing latency.

Why this answer

A SageMaker Inference Pipeline allows you to chain multiple containers (e.g., the 10 deep learning models) within a single endpoint, enabling serial inference with low latency. This approach avoids the network overhead of routing between separate endpoints and keeps the entire ensemble under the 100 ms threshold by processing sequentially in one HTTPS request.

Exam trap

The MLS-C01 exam often tests the misconception that multi-model endpoints are suitable for ensemble models, but they are designed for independent model hosting with dynamic loading, not for sequential inference pipelines.

How to eliminate wrong answers

Option A is wrong because batch transform is designed for offline, asynchronous inference on large datasets, not real-time inference with sub-100 ms latency. Option B is wrong because deploying each model as a separate endpoint with an ALB introduces additional network hops and load-balancing overhead, increasing latency beyond the strict requirement. Option D is wrong because a multi-model endpoint is optimized for hosting many independent models that are loaded on demand from Amazon S3, not for a tightly coupled ensemble where all models must run in sequence for a single prediction.

1337
MCQmedium

A data engineer needs to transfer 50 TB of historical data from an on-premises Hadoop cluster to Amazon S3. The company has a 1 Gbps internet connection and wants to complete the transfer within 5 days. What is the MOST cost-effective and reliable solution?

A.Use AWS Snowball Edge device to physically ship the data
B.Use S3 multipart upload over the internet
C.Set up AWS Direct Connect and transfer over the dedicated line
D.Use S3 Transfer Acceleration to speed up the transfer
AnswerA

Snowball can transfer 50 TB in a few days, cost-effective for large data.

Why this answer

AWS Snowball Edge is the most cost-effective and reliable solution because transferring 50 TB over a 1 Gbps internet connection would take approximately 5.5 days under ideal conditions (50 TB * 1024 GB/TB * 8 bits/byte / (1 Gbps * 86400 seconds/day) ≈ 4.74 days, but real-world overhead, congestion, and retransmissions push it beyond 5 days). Snowball Edge provides a physical appliance that can be shipped, avoiding network bandwidth limitations entirely, and is designed for large-scale data transfers where internet speeds are insufficient.

Exam trap

The trap here is that candidates underestimate the real-world throughput of a 1 Gbps link (which rarely exceeds 800 Mbps due to TCP overhead and congestion) and overestimate the speed of S3 Transfer Acceleration, assuming it can magically bypass bandwidth limits.

How to eliminate wrong answers

Option B is wrong because S3 multipart upload over the internet still relies on the 1 Gbps connection, which cannot reliably transfer 50 TB within 5 days due to bandwidth constraints, latency, and potential packet loss. Option C is wrong because AWS Direct Connect requires weeks to provision and incurs ongoing monthly costs, making it neither cost-effective nor timely for a one-time transfer. Option D is wrong because S3 Transfer Acceleration optimizes network path but does not increase bandwidth beyond the 1 Gbps internet connection, so it cannot meet the 5-day deadline for 50 TB.

1338
MCQhard

A company uses Amazon Kinesis Data Streams to ingest clickstream data. The stream has 8 shards. A Lambda function processes each record and writes to Amazon DynamoDB. The Lambda function sometimes fails due to DynamoDB write throttling, causing duplicate processing of records after retries. The data engineering team needs to ensure exactly-once processing semantics for the DynamoDB writes. What should the team do?

A.Use an Amazon SQS FIFO queue between Kinesis and Lambda to deduplicate records.
B.Configure the Lambda event source mapping with a maximum retry count of 0 and a DLQ.
C.Increase the DynamoDB write capacity units to avoid throttling.
D.Use DynamoDB conditional writes with the Kinesis sequence number as a unique attribute to make writes idempotent.
AnswerD

Conditional writes based on the sequence number ensure each record is written only once.

Why this answer

Using DynamoDB conditional writes with the Kinesis sequence number as a unique attribute ensures idempotency. When processing a record, the Lambda function can attempt a conditional write that only succeeds if an item with that sequence number does not already exist. If the write fails due to a condition check, it means the record was already processed, so the function can skip it.

This achieves exactly-once semantics even if the same record is delivered multiple times due to retries. Option A is incorrect because an SQS FIFO queue between Kinesis and Lambda would add latency and complexity; Kinesis already provides ordering and at-least-once delivery, and using a FIFO queue does not guarantee that the Lambda function will not process the same record multiple times within its retry logic. Option B is incorrect because setting maximum retry count to 0 with a DLQ simply discards failed records after the first failure, which does not provide exactly-once processing; it results in at-most-once semantics and potential data loss.

Option C is incorrect because increasing DynamoDB write capacity may reduce throttling but does not eliminate duplicate processing; the same record can still be retried and written multiple times if the function retries, leading to duplicate writes.

1339
MCQeasy

A machine learning engineer needs to deploy a model that performs real-time fraud detection. The model must be highly available and scalable. Which AWS service should be used to host the model?

A.AWS Lambda
B.Amazon ECS with a custom container
C.Amazon SageMaker batch transform
D.Amazon SageMaker real-time endpoint
AnswerD

Purpose-built for real-time inference with auto-scaling.

Why this answer

Amazon SageMaker real-time endpoints are designed for low-latency, synchronous inference, making them ideal for real-time fraud detection. They automatically scale across multiple instances and Availability Zones, providing high availability and elasticity to handle variable traffic loads without manual intervention.

Exam trap

The trap here is that candidates confuse batch transform with real-time inference, or assume Lambda can handle persistent, low-latency model serving without considering its timeout and payload size limits.

How to eliminate wrong answers

Option A is wrong because AWS Lambda has a maximum execution timeout of 15 minutes and is better suited for short-lived, event-driven tasks rather than persistent, real-time inference with large models. Option B is wrong because Amazon ECS with a custom container requires manual setup of auto-scaling, load balancing, and health checks, adding operational overhead compared to SageMaker's managed endpoint infrastructure. Option C is wrong because Amazon SageMaker batch transform is designed for asynchronous, offline inference on large datasets, not for real-time, low-latency predictions required in fraud detection.

1340
MCQmedium

An ML engineer is deploying a model to a SageMaker endpoint for real-time inference. The model requires a custom inference script that preprocesses input data and postprocesses predictions. Which SageMaker feature should be used to implement this custom logic?

A.Use SageMaker Ground Truth to transform inference requests
B.Use SageMaker Processing jobs to preprocess data before inference
C.Use a built-in SageMaker algorithm with the default inference code
D.Create a SageMaker model with a custom inference script that includes pre- and post-processing functions
AnswerD

Custom inference scripts allow full control over request handling.

Why this answer

SageMaker allows you to bring your own container or use a pre-built container with a custom inference script that defines `input_fn`, `predict_fn`, `output_fn`, and `model_fn` functions. These functions handle preprocessing of input data, model prediction, and postprocessing of predictions, enabling custom logic for real-time inference endpoints without requiring separate infrastructure.

Exam trap

The trap here is that candidates confuse SageMaker Processing jobs (batch) with real-time inference preprocessing, or assume built-in algorithms can be customized via inference scripts, when in fact only custom containers or scripts provide that flexibility.

How to eliminate wrong answers

Option A is wrong because SageMaker Ground Truth is a data labeling service for creating training datasets, not for transforming inference requests at an endpoint. Option B is wrong because SageMaker Processing jobs are batch-oriented and run asynchronously, not suitable for real-time inference preprocessing at an endpoint. Option C is wrong because built-in SageMaker algorithms come with fixed inference code that cannot be customized; they do not support user-defined pre- or post-processing logic.

1341
MCQeasy

A machine learning engineer is analyzing feature distributions in a dataset and notices that one feature has a long tail. Which transformation is most appropriate to reduce skewness and make the distribution more normal?

A.Apply one-hot encoding
B.Apply a log transformation
C.Apply min-max normalization
D.Apply standardization (Z-score)
AnswerB

Log transformation compresses the long tail and reduces skewness.

Why this answer

Log transformation is the most appropriate technique to reduce right skewness (long tail) and make the distribution closer to normal. One-hot encoding is used for categorical variables, not for transforming skewed numerical features. Min-max normalization scales features to a range but does not change the shape of the distribution.

Standardization (Z-score) centers the data and scales by standard deviation, but also does not reduce skewness.

1342
MCQhard

A machine learning engineer is building a binary classification model to predict customer churn. The dataset is highly imbalanced (5% churn). The engineer wants to use Amazon SageMaker's built-in XGBoost algorithm. Which combination of hyperparameters is most appropriate for this scenario?

A.scale_pos_weight=19, subsample=0.8
B.scale_pos_weight=0.05, subsample=0.8
C.scale_pos_weight=19, subsample=1.0
D.scale_pos_weight=1, subsample=1.0
AnswerA

Correct ratio and subsample for regularization.

Why this answer

In a highly imbalanced dataset with only 5% churn, the ratio of negative to positive classes is 95:5, or 19:1. The `scale_pos_weight` hyperparameter in XGBoost should be set to this ratio (19) to penalize misclassifications of the minority class more heavily. A `subsample` of 0.8 introduces stochasticity and helps prevent overfitting, which is especially important when the minority class is small.

Exam trap

The trap here is that candidates often confuse `scale_pos_weight` with a simple class weight or mistakenly think a value less than 1 is needed for the minority class, when in fact it should be the ratio of majority to minority class counts.

How to eliminate wrong answers

Option B is wrong because `scale_pos_weight=0.05` would actually down-weight the minority class, making the model ignore churn cases entirely. Option C is wrong because `subsample=1.0` uses the full dataset for every tree, which increases the risk of overfitting on the minority class without any regularization from row sampling. Option D is wrong because `scale_pos_weight=1` treats both classes equally, failing to address the 19:1 class imbalance, and `subsample=1.0` again provides no overfitting protection.

1343
MCQmedium

A company uses SageMaker to deploy a real-time inference endpoint for a fraud detection model. The model is an XGBoost model trained on 50 features. The endpoint receives 100 requests per second, but latency is higher than the required 200 ms. The team wants to reduce latency without retraining. What should they do?

A.Increase the number of instances behind the endpoint
B.Use SageMaker's batch transform instead of real-time endpoint
C.Reduce the number of features by selecting the most important ones
D.Use SageMaker's Elastic Inference to attach an acceleration to the endpoint
AnswerC

Reducing to the most important features directly reduces model complexity and inference time without retraining. Correct.

Why this answer

To reduce inference latency without retraining the XGBoost model, reducing the number of features to the most important ones directly decreases the computational complexity of the model, as fewer tree splits are evaluated per request. This is a model-level optimization that does not require retraining if the feature importance is already known. SageMaker Elastic Inference, however, is designed to accelerate deep learning models by attaching a GPU accelerator; it does not speed up XGBoost or other tree-based models because they do not utilize GPUs effectively.

Therefore, only option C is correct.

Exam trap

The trap is that candidates may assume Elastic Inference works for any model type, but it is specifically for deep learning. They might also overlook that retraining is not required for feature selection if importance is already established.

How to eliminate wrong answers

Option A is wrong because increasing the number of instances behind the endpoint distributes the request load but does not reduce per-request latency; it primarily improves throughput and can even add network overhead. Option B is wrong because SageMaker's batch transform is designed for offline, asynchronous processing of large datasets, not for real-time inference with a 200 ms latency requirement; switching to batch transform would break the real-time use case entirely.

1344
MCQeasy

A company is using Amazon SageMaker to train a model. The training data is stored in an S3 bucket in a different AWS account. Which IAM policy configuration is required to allow SageMaker to access the data?

A.Add a bucket policy that allows s3:GetObject for the SageMaker execution role's ARN.
B.Add a bucket policy allowing access from the SageMaker execution role ARN, and ensure the SageMaker execution role has an IAM policy allowing s3:GetObject on the bucket.
C.Create an IAM user in the data owner's account and use its credentials in SageMaker.
D.Use the data owner's IAM role as the SageMaker execution role.
AnswerB

Both policies are needed for cross-account access.

Why this answer

Cross-account access requires the SageMaker execution role to have an IAM policy allowing access to the S3 bucket, and the S3 bucket policy must grant access to that role. Option A is wrong because SageMaker cannot assume a role in another account without proper trust policy. Option C is wrong because the data owner's role cannot be used directly.

Option D is wrong because SageMaker does not use the data owner's IAM user credentials.

1345
MCQhard

A machine learning engineer is deploying a PyTorch model to SageMaker. The model requires custom inference logic. Which approach should the engineer use?

A.Use a SageMaker built-in PyTorch container as-is
B.Use SageMaker Ground Truth to deploy the model
C.Use SageMaker Processing to run inference
D.Create a custom inference script and use the SageMaker PyTorch container
AnswerD

Creating a custom inference script and using the SageMaker PyTorch container allows you to define custom processing logic for inference.

Why this answer

SageMaker allows you to provide a custom inference script (entry point) when using the PyTorch container, enabling custom inference logic. Option A is wrong because the built-in container as-is would not incorporate custom logic. Option B is wrong because SageMaker Ground Truth is for labeling, not model deployment.

Option C is wrong because SageMaker Processing is for data processing, not inference.

1346
MCQmedium

Refer to the exhibit. A data scientist runs the above CLI command to create a SageMaker training job. The job fails with an error 'Unable to read data from s3://bucket/train/'. What is the MOST likely cause?

A.The training image is not accessible
B.The instance type does not support the required memory
C.The IAM role does not have permissions to read from the S3 bucket
D.The training job is in a different region than the S3 bucket
AnswerC

The role must have s3:GetObject permission for the training data.

Why this answer

The error 'Unable to read data from s3://bucket/train/' indicates that the SageMaker training job cannot access the S3 input data. The most common cause is that the IAM role specified in the command does not have the necessary s3:GetObject permission on the S3 bucket or objects. SageMaker uses the IAM role to assume permissions for reading training data, and without proper S3 read access, the job fails at the data loading stage.

Exam trap

The trap here is that candidates may confuse the error message with a network or region issue, but the 'Unable to read data' error is almost always an IAM permissions problem, not a connectivity or resource constraint issue.

How to eliminate wrong answers

Option A is wrong because if the training image were not accessible, the error would typically be 'Unable to pull image' or 'Image not found', not a data read error from S3. Option B is wrong because insufficient memory would cause an out-of-memory or resource-exhausted error, not a failure to read data from S3. Option D is wrong because SageMaker automatically handles cross-region S3 access by copying data to the training job's region; a region mismatch would not produce an 'Unable to read data' error unless the bucket policy explicitly denies cross-region access, which is not the default behavior.

1347
Multi-Selectmedium

A company uses Amazon Kinesis Data Streams to ingest clickstream data. They need to archive raw data to S3 every hour and also enable real-time processing with sub-second latency. Which TWO actions should they take? (Choose two.)

Select 2 answers
A.Use Kinesis Data Analytics to write output to S3.
B.Configure a Lambda function as a consumer of the stream for real-time processing.
C.Use S3 events to trigger a Lambda function that reads from the stream.
D.Create a Kinesis Data Firehose delivery stream with S3 as destination and set a buffer interval of 3600 seconds.
E.Install the Kinesis Agent on an EC2 instance to write data to S3.
AnswersA, B

Correct. Kinesis Data Analytics (Flink) can read raw data from the stream and write it to S3 with a customizable window, such as every hour, serving as an archival mechanism.

Why this answer

AWS Lambda can be configured as a consumer of a Kinesis Data Stream using event source mapping, enabling real-time processing with sub-second latency. Option A is correct because Kinesis Data Analytics (now Amazon Managed Service for Apache Flink) can read from a Kinesis stream and write output to S3, making it suitable for archiving raw data every hour—e.g., using a Flink sink with a tumbling window of 1 hour. Option D is incorrect because Kinesis Data Firehose has a maximum buffer interval of 900 seconds (15 minutes), not 3600 seconds; thus it cannot archive data exactly every hour as specified.

Option C is incorrect because S3 events trigger Lambda on object creation in S3, not on real-time stream data. Option E is incorrect because the Kinesis Agent is used to send data from EC2 to Kinesis, not to S3 directly.

Exam trap

Candidates often overlook that Kinesis Data Firehose has a maximum buffer interval of 900 seconds, making it unsuitable for hourly archives, and they may also underestimate Kinesis Data Analytics (Flink) as an archiving solution, assuming it only processes data rather than writing raw data to S3.

1348
MCQhard

A data scientist is using SageMaker to train a model with a custom algorithm. The training script uses TensorFlow and runs on GPU instances. The training job fails with 'CUDA_ERROR_OUT_OF_MEMORY'. What is the most likely cause?

A.The S3 bucket is in a different region
B.The batch size is too large for the GPU memory
C.The GPU driver is outdated
D.The training script has a memory leak on CPU
E.The instance type does not have enough CPU cores
AnswerB

Large batch sizes can exceed GPU memory, causing out-of-memory errors.

Why this answer

The error 'CUDA_ERROR_OUT_OF_MEMORY' indicates that the GPU memory has been exhausted during training. In TensorFlow, the batch size directly determines how many samples are processed simultaneously on the GPU; a batch size that is too large will exceed the available GPU memory, causing this specific CUDA error. Reducing the batch size is the standard fix for this issue.

Exam trap

AWS often tests the misconception that GPU errors are always driver-related, leading candidates to choose 'outdated GPU driver' instead of recognizing that the error message explicitly points to memory exhaustion, not driver version issues.

How to eliminate wrong answers

Option A is wrong because an S3 bucket in a different region would cause a network or permission error (e.g., 'AccessDenied' or 'BucketRegionError'), not a CUDA out-of-memory error. Option C is wrong because an outdated GPU driver would typically cause a driver initialization failure or a 'CUDA_ERROR_NO_DEVICE' error, not an out-of-memory error during training. Option D is wrong because a CPU memory leak would manifest as an out-of-memory error on the CPU (e.g., 'MemoryError' in Python), not a GPU-specific CUDA error.

Option E is wrong because insufficient CPU cores would lead to slow data preprocessing or CPU bottlenecks, but would not trigger a GPU memory exhaustion error.

1349
MCQhard

A data scientist is working with a dataset containing geospatial coordinates (latitude and longitude) of customer locations. The scientist wants to engineer features such as distance to the nearest store, and cluster customers into regions. Which AWS service is best suited for performing geospatial analysis and clustering during exploratory data analysis?

A.Amazon SageMaker with custom Python scripts using scikit-learn and Geopy
B.Amazon Athena with PostGIS extensions
C.AWS Glue with geospatial transforms
D.Amazon Location Service
AnswerA

SageMaker allows custom code for distance calculations and clustering using libraries like scikit-learn.

Why this answer

Amazon SageMaker notebooks allow custom Python scripts using libraries like scikit-learn for clustering (e.g., K-Means) and Geopy for distance calculations, making it ideal for geospatial feature engineering and clustering during EDA. Option B is incorrect: Amazon Athena with PostGIS is for querying geospatial data, not for iterative analysis or clustering. Option C is incorrect: AWS Glue is an ETL service, not suited for interactive exploration and clustering.

Option D is incorrect: Amazon Location Service provides maps and location tracking APIs, not a platform for analytical clustering.

1350
MCQeasy

A data scientist is training a TensorFlow model on a single GPU instance. The training is taking too long. Which AWS service should be used to reduce training time by distributing the workload across multiple GPUs?

A.Amazon SageMaker
B.AWS Glue
C.Amazon EMR
D.AWS Batch
AnswerA

SageMaker provides built-in distributed training libraries for multi-GPU training.

Why this answer

Amazon SageMaker provides built-in support for distributed training across multiple GPUs using its managed training infrastructure. By configuring a SageMaker training job with a 'distributed training' strategy (e.g., SageMaker's distributed data parallelism library), the TensorFlow model can automatically split the workload across multiple GPU instances, significantly reducing training time. SageMaker handles the underlying cluster orchestration, network setup, and fault tolerance, making it the correct choice for this scenario.

Exam trap

The exam often tests the distinction between services that handle generic batch computing (AWS Batch) versus those specifically optimized for distributed machine learning training (Amazon SageMaker), leading candidates to mistakenly choose AWS Batch because they think 'batch' implies distributed processing.

How to eliminate wrong answers

Option B (AWS Glue) is wrong because it is a serverless data integration and ETL service, not designed for distributed model training with TensorFlow or GPU workloads. Option C (Amazon EMR) is wrong because it is optimized for big data processing using frameworks like Apache Spark and Hadoop, not for deep learning training with TensorFlow across multiple GPUs. Option D (AWS Batch) is wrong because it is a batch computing service for running containerized jobs at scale, but it lacks native support for distributed training orchestration, GPU-aware scheduling, and the specific TensorFlow distributed strategies needed to reduce training time across multiple GPUs.

Page 17

Page 18 of 23

Page 19