Courseiva

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

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

Page 7

Page 8 of 23

Page 9
526
MCQmedium

A company is using Amazon SageMaker to deploy a model for real-time inference. The model requires 500 MB of memory and has a latency requirement of 100 ms. The endpoint is receiving 10 requests per second. Which instance type should be chosen for cost-effectiveness?

A.ml.c5.xlarge
B.ml.t2.medium
C.ml.m5.large
D.ml.p3.2xlarge
AnswerC

Adequate memory and cost-effective.

Why this answer

Ml.m5.large (Option C). This instance type provides 2 vCPU and 8 GB memory, which is more than sufficient for the 500 MB memory requirement. It also offers consistent performance suitable for real-time inference with 10 requests per second and 100 ms latency.

Option A (ml.c5.xlarge) has 4 vCPU and 8 GB, which is over-provisioned and more expensive. Option B (ml.t2.medium) has only 4 GB memory but uses burstable CPU, which may cause latency spikes. Option D (ml.p3.2xlarge) is GPU-optimized and significantly more expensive, making it unsuitable for a CPU-bound workload.

Therefore, ml.m5.large is the most cost-effective choice.

527
MCQeasy

A data science team is deploying a machine learning model to production using Amazon SageMaker. The model requires real-time inference with low latency. Which SageMaker feature should they use to deploy the model?

A.SageMaker Notebook Instance
B.SageMaker Batch Transform
C.SageMaker Autopilot
D.SageMaker Realtime Endpoint
AnswerD

Provides low-latency, real-time inference.

Why this answer

SageMaker Realtime Endpoints are designed for low-latency, synchronous inference, making them the correct choice for serving predictions in real time. They keep the model loaded and ready to respond to individual requests, which is essential for applications requiring immediate responses.

Exam trap

The trap here is that candidates often confuse SageMaker Batch Transform (designed for batch processing) with real-time inference, or they mistakenly think SageMaker Notebook Instances can serve as production endpoints because they can run code interactively.

How to eliminate wrong answers

Option A is wrong because SageMaker Notebook Instances are interactive development environments for building and testing models, not for serving production inference. Option B is wrong because SageMaker Batch Transform is designed for asynchronous, offline inference on large datasets, not for real-time, low-latency requests. Option C is wrong because SageMaker Autopilot automates the process of building, training, and tuning machine learning models, but it does not provide a mechanism for deploying models to real-time endpoints.

528
MCQeasy

A data scientist is using Amazon SageMaker to train a linear regression model. The target variable is right-skewed. Which transformation should the data scientist apply to the target variable to improve model performance?

A.Min-max scaling
B.One-hot encoding
C.Log transformation
D.Principal Component Analysis (PCA)
AnswerC

Log transformation reduces right skewness.

Why this answer

(Log transformation) is correct because applying a logarithmic transformation to a right-skewed target variable can reduce skewness and make the distribution more normal, which improves the performance of linear regression models. Option A (Min-max scaling) scales the data to a fixed range but does not address skewness. Option B (One-hot encoding) is used for categorical variables, not for transforming continuous targets.

Option D (PCA) is for dimensionality reduction, not for correcting skewness.

529
MCQmedium

A data scientist runs a logistic regression and obtains a model with 95% accuracy on the training set. However, the model performs poorly on the test set. Which exploratory data analysis step should have been performed to identify this issue?

A.Generating a correlation matrix of features
B.Log transformation of skewed features
C.Checking for class imbalance in the target variable
D.Creating a heatmap of missing values
AnswerC

Checking for class imbalance is the correct step because a model can achieve high training accuracy by simply predicting the majority class, but fails on the minority class in the test set.

Why this answer

Checking for class imbalance is critical because it can cause a model to predict the majority class and still achieve high accuracy, but fail on the minority class in unseen data. Option A (correlation matrix) is wrong because it helps with multicollinearity, not class imbalance. Option B (log transformation) is wrong because it addresses skewness in features, not class imbalance.

Option D (heatmap of missing values) is wrong because it shows missing data patterns, not class imbalance.

530
MCQeasy

A data scientist uses Amazon SageMaker to train a model. The training dataset is 10 GB and stored in S3. The training job uses a ml.m5.large instance. The data must be available on the local file system during training. Which input mode should be used?

A.Local input mode
B.Batch input mode
C.File input mode
D.Pipe input mode
AnswerC

File mode downloads data to the local file system, making it available for training.

Why this answer

File input mode is correct because it downloads the entire training dataset from S3 to the local file system of the ml.m5.large instance before training begins, ensuring the data is available locally as required. This mode is suitable for datasets up to 10 GB, as the instance's local storage (typically 8 GB for ml.m5.large) may be insufficient, but SageMaker uses the instance's Amazon EBS volume (up to 512 GB) for file input mode, making it viable.

Exam trap

The trap here is that candidates may confuse 'File input mode' with 'Pipe input mode' and incorrectly choose Pipe mode for local file availability, or invent 'Local input mode' as a plausible-sounding option.

How to eliminate wrong answers

Option A is wrong because 'Local input mode' is not a valid SageMaker input mode; the correct term is 'File input mode' for local file system access. Option B is wrong because 'Batch input mode' is not a SageMaker input mode; SageMaker uses 'File' or 'Pipe' modes, and batch processing refers to Batch Transform jobs, not training input. Option D is wrong because 'Pipe input mode' streams data directly from S3 to the training algorithm without writing to the local file system, which does not satisfy the requirement that data must be available on the local file system during training.

531
MCQhard

A data scientist is training a time series forecasting model using Amazon SageMaker's DeepAR algorithm. The dataset contains daily sales data for 10,000 products over 2 years. The scientist splits the data chronologically: training on the first 18 months, validation on the next 3 months, and test on the last 3 months. The model performs well on validation but poorly on test. The data scientist suspects the model is overfitting to the validation period. Which action should the scientist take to improve test performance?

A.Use time series cross-validation with an expanding window
B.Reduce the context length to 30 days
C.Add more exogenous features like holidays and promotions
D.Use the entire dataset for training and ignore validation
AnswerA

Correct. Expanding window cross-validation uses multiple validation periods, reducing overfitting to a single validation window and improving generalization to the test period.

Why this answer

Time series cross-validation with an expanding window evaluates the model on multiple validation periods, ensuring robustness and reducing overfitting to a single validation window. Option B reduces context length and may lose long-term dependencies. Option C may introduce irrelevant features and does not address overfitting to validation.

Option D removes validation entirely, which would not help diagnose or reduce overfitting.

532
MCQeasy

A data engineering team needs to process streaming data from thousands of IoT devices. The data must be ingested with low latency and processed in near real-time to detect anomalies. Which AWS service should they use for ingestion?

A.Amazon Kinesis Data Firehose
B.Amazon Kinesis Data Analytics
C.Amazon S3
D.Amazon Kinesis Data Streams
AnswerD

Kinesis Data Streams is the correct service for real-time streaming ingestion.

Why this answer

Amazon Kinesis Data Streams is the correct choice because it is designed for real-time, low-latency ingestion of streaming data from thousands of sources, such as IoT devices. It provides a durable, scalable data stream that can be consumed by multiple applications in near real-time, making it ideal for anomaly detection use cases.

Exam trap

The trap here is that candidates confuse Kinesis Data Firehose (which delivers data to destinations with some latency) with Kinesis Data Streams (which is designed for real-time ingestion and processing), often overlooking the 'low latency' and 'near real-time' requirements in the question.

How to eliminate wrong answers

Option A is wrong because Amazon Kinesis Data Firehose is a near-real-time delivery service that buffers data before writing it to destinations like S3 or Redshift, introducing latency of up to 60 seconds, which is not suitable for low-latency ingestion. Option B is wrong because Amazon Kinesis Data Analytics is a service for processing and analyzing streaming data using SQL or Apache Flink, not for ingestion itself. Option C is wrong because Amazon S3 is an object storage service with eventual consistency and higher latency for writes, making it unsuitable for real-time streaming ingestion from thousands of IoT devices.

533
MCQhard

A machine learning team is using Amazon SageMaker Experiments to track multiple training runs. They need to compare the performance of different models based on metrics like accuracy and F1 score. However, when they view the experiment list in SageMaker Studio, the metrics are not displayed. What is the MOST likely cause?

A.The training job did not define metric definitions in the algorithm specification.
B.The training script did not use the SageMaker SDK to log the metrics.
C.The training job is running on an instance type that does not support Experiments.
D.The IAM role used by SageMaker does not have permission to write to the Experiments table.
AnswerB

Metrics must be logged using experiment.log_metric() or automatically if using frameworks with SageMaker integration.

Why this answer

SageMaker Experiments automatically tracks parameters and metrics only when the training script explicitly logs them using the SageMaker SDK's `log_metric` function or the `sagemaker.experiments.run.Run` class. Without these SDK calls, the metrics are never recorded in the experiment's trial components, so they will not appear in the Studio experiment list. The team must instrument their training code to emit metrics for Experiments to capture them.

Exam trap

The trap here is that candidates confuse CloudWatch metric definitions (used for hyperparameter tuning or console monitoring) with SageMaker Experiments metric logging, assuming that defining metrics in the algorithm specification is sufficient for Experiments to display them.

How to eliminate wrong answers

Option A is wrong because metric definitions in the algorithm specification are used for CloudWatch metric emission and automatic model tuning, not for SageMaker Experiments; Experiments relies on SDK-based logging, not algorithm specification definitions. Option C is wrong because SageMaker Experiments is supported on all SageMaker training instance types; there is no instance type restriction for Experiments functionality. Option D is wrong because the IAM role's permission to write to the Experiments table is not the issue; the Experiments table is an internal SageMaker resource, and the role typically has sufficient permissions if it can launch training jobs; the core problem is the absence of metric logging in the training script.

534
MCQeasy

A data scientist is analyzing a dataset with missing values in several columns. The dataset is stored in an S3 bucket. What is the most efficient method to identify the percentage of missing values per column using AWS services?

A.Use Amazon SageMaker Notebook with pandas to load the dataset and compute missing percentages.
B.Use Amazon QuickSight to connect to S3 and calculate missing value percentages via calculated fields.
C.Use Amazon Athena to query the data with SQL using COUNT(*) and CASE statements to compute missing percentage per column.
D.Use AWS Glue Crawler to infer schema and view missing values statistics in the AWS Glue Data Catalog.
AnswerC

Amazon Athena allows running SQL queries directly on data in S3, and the COUNT and CASE statements can compute missing value percentages efficiently without moving data.

Why this answer

Amazon Athena allows running SQL queries directly on data in S3, and the COUNT and CASE statements can compute missing value percentages efficiently without moving data. Option A is wrong because Amazon SageMaker Notebook requires manual coding and is less efficient for quick checks. Option B is wrong because Amazon QuickSight is a visualization tool, not for direct SQL-based analysis.

Option D is wrong because AWS Glue Crawler only catalogs metadata, not performing data analysis.

535
MCQeasy

A data scientist wants to automate the selection of optimal hyperparameters for a model. Which SageMaker feature should be used?

A.SageMaker Debugger
B.SageMaker Model Monitor
C.SageMaker Automatic Model Tuning
D.SageMaker Experiments
AnswerC

Automatic Model Tuning optimizes hyperparameters.

Why this answer

SageMaker Automatic Model Tuning (AMT) is the correct feature because it automates hyperparameter optimization by running multiple training jobs with different hyperparameter combinations, using algorithms like Bayesian optimization or random search to find the best set. This directly addresses the requirement to automate selection of optimal hyperparameters.

Exam trap

The trap here is that candidates confuse SageMaker Experiments (which tracks and compares runs) with Automatic Model Tuning (which actively searches for optimal hyperparameters), leading them to pick D instead of C.

How to eliminate wrong answers

Option A is wrong because SageMaker Debugger monitors and debugs training jobs in real-time (e.g., detecting vanishing gradients or overfitting), but it does not perform hyperparameter optimization. Option B is wrong because SageMaker Model Monitor detects data drift and quality issues in deployed endpoints, not hyperparameter tuning during training. Option D is wrong because SageMaker Experiments tracks and organizes training runs, metrics, and parameters for comparison, but it does not automatically select optimal hyperparameters.

536
MCQhard

A data pipeline uses AWS Lambda to process small files (10-50 MB) from an S3 bucket and write results to DynamoDB. The Lambda function times out after 15 seconds for larger files. The team wants to handle files up to 100 MB without changing the Lambda code. Which solution is MOST cost-effective?

A.Use AWS Glue Python shell job to replace Lambda
B.Increase the Lambda function timeout to 5 minutes
C.Use Amazon ECS with AWS Fargate to run the processing task
D.Configure an SQS queue to buffer the S3 events and batch them
AnswerB

Lambda allows up to 15 minutes, and 5 minutes is sufficient for 100 MB. No code changes needed.

Why this answer

Increasing the Lambda function timeout to 5 minutes directly addresses the 15-second timeout issue for larger files (up to 100 MB) without requiring any code changes. This is the most cost-effective solution as it avoids additional infrastructure costs (e.g., Glue, ECS, SQS) and leverages Lambda's existing pay-per-execution pricing model, which remains economical for occasional longer-running invocations.

Exam trap

The trap here is that candidates assume Lambda is unsuitable for larger files or longer processing times, leading them to over-engineer with services like Glue or ECS, when simply increasing the timeout is the most cost-effective and minimal-change solution.

How to eliminate wrong answers

Option A is wrong because replacing Lambda with an AWS Glue Python shell job introduces unnecessary complexity and cost (Glue charges per DPU-hour) for a simple file processing task that Lambda can handle with a timeout adjustment. Option C is wrong because using Amazon ECS with AWS Fargate adds operational overhead and cost (per vCPU and memory) for a task that Lambda can perform more simply and cheaply with a timeout increase. Option D is wrong because configuring an SQS queue to buffer S3 events and batch them does not solve the Lambda timeout issue; batching would still require each Lambda invocation to process a file within the timeout, and it adds latency and complexity without addressing the root cause.

537
MCQmedium

A media company ingests video metadata from multiple sources into an Amazon S3 bucket. Each metadata record is a JSON file about 2 KB. They use AWS Glue ETL jobs to process these files and load them into Amazon Redshift for analytics. The jobs currently run hourly and take about 10 minutes to process all new files. However, the company is growing and expects the number of files to increase 100x. The data engineering team wants to minimize processing time and cost. The Glue job currently reads all files from the S3 bucket using a full scan. What should they do to optimize the pipeline?

A.Consolidate the small JSON files into larger files using a scheduled job
B.Convert the data to Parquet format and partition it
C.Increase the number of Glue DPUs to process files faster
D.Use S3 event notifications to trigger Glue jobs only for new files
AnswerD

S3 event notifications allow the Glue job to be triggered for only new objects, so only new files are processed, eliminating unnecessary full scans.

Why this answer

Using S3 event notifications to trigger Glue jobs only for new files eliminates the need to scan all files in the bucket, reducing processing time and cost. Option A consolidating files would reduce the number of small files but does not address the full scan issue and would still require processing all files. Option B converting to Parquet improves performance and reduces scan size, but the job still scans all files unnecessarily.

Option C increasing DPUs speeds up processing but increases cost without addressing the root cause of scanning all files.

538
MCQhard

A training job log shows this error. The training instance is an ml.m5.large with 8 GB EBS storage. The training data is 500 MB, and the model size is expected to be 200 MB. What is the most likely cause?

A.The training data is not fully downloaded from S3 before processing
B.The S3 bucket does not have write permissions
C.The training instance does not have enough RAM
D.The training process is generating large temporary files that fill the instance's local storage
AnswerD

Correct. The training process is generating large temporary files that fill the instance's local storage, causing a 'No space left on device' error.

Why this answer

The training job runs on an ml.m5.large instance with only 8 GB of EBS storage. Given that the training data is 500 MB and the model size is 200 MB, there is ample space for those, but the error indicates a lack of storage space. This is most likely caused by temporary files (e.g., checkpoints, logs, or intermediate data) generated during training that fill up the remaining storage.

Option A is incorrect because a download issue would show errors like 'Download failed' or 'NoSuchKey', not a storage error. Option B is incorrect because S3 permission issues would result in 'AccessDenied' errors. Option C is incorrect because insufficient RAM would cause a 'MemoryError' or out-of-memory kill, not a storage space error.

539
MCQhard

A company wants to build a machine learning model to predict customer churn. The dataset includes customer demographics, usage patterns, and support interactions. The data is stored in Amazon S3. The data scientist needs to perform feature engineering, including creating aggregate features from support interactions and encoding categorical variables. Which AWS service is most suitable for building the feature engineering pipeline?

A.AWS Glue
B.Amazon EMR
C.AWS Batch
D.Amazon SageMaker Processing
AnswerD

SageMaker Processing is purpose-built for data preprocessing and feature engineering with SageMaker.

Why this answer

Amazon SageMaker Processing is the most suitable service because it is purpose-built for data preprocessing and feature engineering within the SageMaker ecosystem. It allows you to run custom Python scripts (e.g., using pandas or PySpark) on managed infrastructure to create aggregate features from support interactions and encode categorical variables, and it integrates seamlessly with SageMaker for model training and deployment.

Exam trap

The trap here is that candidates often confuse AWS Glue (a general ETL tool) with SageMaker Processing, but the question specifically asks for a service that integrates with the SageMaker model building pipeline, making SageMaker Processing the correct choice.

How to eliminate wrong answers

Option A is wrong because AWS Glue is primarily a serverless ETL service for data cataloging and schema discovery, not optimized for running custom feature engineering scripts with tight integration to SageMaker training jobs. Option B is wrong because Amazon EMR is a big data platform for running distributed frameworks like Spark and Hadoop, which is overkill and less integrated for simple feature engineering tasks that SageMaker Processing can handle more directly. Option C is wrong because AWS Batch is a general-purpose batch computing service for running any containerized workload, but it lacks native integration with SageMaker’s model building pipeline and does not provide the same level of convenience for feature engineering steps.

540
Multi-Selecteasy

A data scientist needs to select a model training infrastructure that supports distributed training across multiple GPUs and provides automatic model parallelism. Which TWO AWS services should the scientist consider?

Select 2 answers
A.AWS Glue
B.AWS Lambda
C.Amazon Redshift
D.Amazon EMR
E.Amazon SageMaker
AnswersD, E

EMR with Spark MLlib can perform distributed training.

Why this answer

Amazon EMR is correct because it supports distributed training across multiple GPUs using frameworks like TensorFlow, PyTorch, and Apache Spark, and it can automatically handle model parallelism through its integration with Horovod or custom distributed training scripts. Amazon SageMaker is correct because it provides built-in distributed training libraries (e.g., SageMaker Distributed Data Parallel and Model Parallel) that automatically partition model layers across multiple GPUs, enabling efficient training of large models.

Exam trap

The trap here is that candidates often confuse data processing services (Glue, Redshift) or serverless compute (Lambda) with GPU-accelerated training infrastructure, overlooking that only services explicitly supporting distributed GPU training and model parallelism (SageMaker and EMR) are correct.

541
Multi-Selecteasy

A data scientist is performing feature selection for a linear regression model. Which TWO methods are appropriate? (Choose TWO.)

Select 2 answers
A.Lasso (L1) regularization
B.Ridge (L2) regularization
C.t-distributed stochastic neighbor embedding (t-SNE)
D.Forward selection
E.Principal component analysis (PCA)
AnswersA, D

Lasso can zero out feature coefficients, effectively selecting features.

Why this answer

Both Lasso (L1) regularization and forward selection are appropriate feature selection methods for linear regression. Lasso adds an L1 penalty that shrinks some coefficients exactly to zero, effectively selecting features. Forward selection iteratively adds features based on improvement to the model.

Option B (Ridge) is incorrect because L2 regularization shrinks coefficients but does not set them to zero. Option C (t-SNE) is a nonlinear dimensionality reduction technique for visualization, not feature selection. Option E (PCA) creates new components, but does not select original features.

542
MCQmedium

A company is building a data pipeline to process sensitive customer data. The pipeline uses AWS Glue for ETL and stores results in Amazon S3. The security team requires that all data be encrypted at rest in S3 using customer-managed AWS KMS keys. Additionally, the Glue job must be able to write encrypted data to S3. What should the data engineer do to meet these requirements?

A.Attach a policy to the Glue job's IAM role that includes kms:GenerateDataKey and kms:Decrypt actions for the KMS key.
B.Use S3 server-side encryption with customer-provided keys (SSE-C).
C.Use S3 server-side encryption with SSE-S3, which is enabled by default.
D.Configure an S3 bucket policy to enforce encryption and attach it to the Glue job's IAM role.
AnswerA

These permissions allow Glue to encrypt and decrypt data using the KMS key.

Why this answer

AWS Glue jobs use an IAM role to interact with AWS services. To write encrypted data to S3 using a customer-managed AWS KMS key, the IAM role must have permissions for `kms:GenerateDataKey` (to request a data key for encryption) and `kms:Decrypt` (to decrypt the data key when reading or writing). This allows the Glue job to encrypt objects at rest in S3 with the specified KMS key, meeting the security team's requirement.

Exam trap

The trap here is that candidates often assume an S3 bucket policy alone can enforce encryption without realizing that the IAM role performing the write must also have explicit KMS permissions for the customer-managed key.

How to eliminate wrong answers

Option B is wrong because SSE-C requires the customer to provide the encryption key in each request, which is not suitable for automated Glue jobs and does not use AWS KMS keys. Option C is wrong because SSE-S3 uses AWS-managed keys, not customer-managed KMS keys, failing the requirement for customer-controlled encryption. Option D is wrong because an S3 bucket policy can enforce encryption (e.g., deny unencrypted writes), but it does not grant the Glue job's IAM role the necessary KMS permissions to encrypt data; the IAM role must still have explicit KMS actions allowed.

543
MCQmedium

A data scientist is using Amazon SageMaker to train a model using the built-in XGBoost algorithm. The training job uses a hyperparameter tuning job to optimize hyperparameters. The tuning job has been running for 3 hours and has completed 20 training jobs. The data scientist wants to stop the tuning job early if it is not making progress. What should the data scientist do to accomplish this?

A.Configure the tuning job with early stopping enabled.
B.Set up a CloudWatch alarm to stop the tuning job if a metric does not improve.
C.Use SageMaker Experiments to monitor and manually stop the tuning job.
D.Use SageMaker Debugger to stop training jobs that are not improving.
AnswerA

Built-in early stopping stops underperforming training jobs.

Why this answer

SageMaker's automatic model tuning supports early stopping. When enabled, the tuning job stops automatically if no significant improvement is observed. Option B is incorrect because CloudWatch alarms can monitor metrics but cannot directly stop a tuning job; they can trigger actions like notifications but not stop the tuning.

Option C is incorrect because SageMaker Experiments is for tracking experiments, not for stopping tuning jobs. Option D is incorrect because SageMaker Debugger stops individual training jobs, not the hyperparameter tuning job itself; early stopping is a built-in feature of the tuning job.

544
MCQhard

A company is building a near-real-time dashboard using data from multiple sources. They need to aggregate millions of events per second with sub-second latency. The architecture must be fully managed and minimize operational overhead. Which service should they use for the aggregation layer?

A.Amazon Kinesis Data Analytics for Apache Flink.
B.AWS Lambda functions triggered by Kinesis Data Streams.
C.Amazon EMR with Spark Streaming.
D.Amazon Redshift with materialized views refreshed frequently.
AnswerA

Kinesis Data Analytics with Flink provides low-latency, stateful stream processing at scale.

Why this answer

Amazon Kinesis Data Analytics for Apache Flink is the correct choice because it provides a fully managed, serverless runtime for Apache Flink, which is designed for stateful stream processing at scale. It can aggregate millions of events per second with sub-second latency using exactly-once semantics and built-in checkpointing, meeting the near-real-time dashboard requirements without any infrastructure management.

Exam trap

The trap here is that candidates often confuse AWS Lambda's event-driven nature with true stream processing, overlooking its concurrency and latency limitations for high-throughput aggregation, or they assume Spark Streaming is always the best choice for real-time without considering Flink's superior sub-second latency and fully managed nature on Kinesis Data Analytics.

How to eliminate wrong answers

Option B is wrong because AWS Lambda functions triggered by Kinesis Data Streams have a maximum concurrency limit and a 15-minute execution timeout, making them unsuitable for aggregating millions of events per second with sub-second latency; Lambda is better for lightweight, stateless transformations. Option C is wrong because Amazon EMR with Spark Streaming requires manual cluster provisioning, scaling, and maintenance, increasing operational overhead, and Spark Streaming typically has higher latency (seconds) compared to Flink's sub-second capabilities. Option D is wrong because Amazon Redshift with materialized views refreshed frequently is designed for batch-oriented, analytical queries on structured data, not for real-time stream aggregation; it cannot handle millions of events per second with sub-second latency and introduces significant refresh overhead.

545
MCQhard

During exploratory data analysis, a data scientist observes a strong correlation (r=0.95) between two numeric features. The model to be trained is a linear regression. What is the most appropriate action?

A.Apply standardization to both features.
B.Remove one of the correlated features.
C.Use L2 regularization (Ridge regression) without removing features.
D.Create an interaction term between the two features.
AnswerB

Removing reduces multicollinearity in linear regression.

Why this answer

High correlation (r=0.95) between two features indicates severe multicollinearity in linear regression, which can cause unstable coefficient estimates and inflated standard errors. The most straightforward solution is to remove one of the correlated features (Option B), as it directly eliminates the redundancy. Option A (standardization) does not affect correlation.

Option C (L2 regularization) can help but is not the first choice because removal is simpler and preserves interpretability; regularization only shrinks coefficients but does not remove the linear dependence. Option D (interaction term) would increase multicollinearity, making the problem worse.

546
MCQhard

An e-commerce company uses Amazon Kinesis Data Firehose to deliver clickstream data to Amazon S3. The data arrives at unpredictable rates, with occasional bursts. The company needs to ensure data is delivered within 60 seconds of ingestion, and the data must be partitioned by year/month/day/hour. Which configuration meets these requirements?

A.Set the buffer size to 1 MB and disable dynamic partitioning
B.Use a Lambda function to process data and write to S3 with partitioning
C.Use AWS Glue streaming ETL to read from Firehose and write to S3
D.Set the buffer interval to 60 seconds and enable dynamic partitioning
AnswerD

Buffer interval controls delivery frequency; dynamic partitioning creates time-based folders.

Why this answer

Setting the buffer interval to 60 seconds ensures data is flushed to Amazon S3 within that time window, meeting the 60-second delivery requirement. Enabling dynamic partitioning allows Firehose to automatically partition data by year/month/day/hour based on the data's timestamp, without needing custom code or additional services.

Exam trap

The trap here is that candidates may think a Lambda function or Glue ETL is required for custom partitioning, when Firehose's native dynamic partitioning can handle time-based partitioning directly with a simple configuration change.

How to eliminate wrong answers

Option A is wrong because setting the buffer size to 1 MB and disabling dynamic partitioning does not guarantee delivery within 60 seconds (buffer interval defaults to 300 seconds) and cannot partition data by year/month/day/hour. Option B is wrong because using a Lambda function to process data and write to S3 with partitioning introduces additional complexity, latency, and potential for data loss or duplication, and is not a native Firehose configuration. Option C is wrong because AWS Glue streaming ETL reads from Kinesis Data Streams, not directly from Firehose, and adds unnecessary overhead and cost for a simple partitioning and delivery requirement.

547
MCQeasy

A data scientist is training a binary classification model on an imbalanced dataset (95% negative class, 5% positive class). The model achieves 95% accuracy but only predicts the negative class for all examples. Which metric should the scientist use to evaluate model performance more appropriately?

A.F1 score
B.Mean squared error
C.Accuracy
D.AUC-ROC
AnswerD

AUC-ROC evaluates the model's ability to distinguish between classes regardless of threshold and is robust to imbalance.

Why this answer

AUC-ROC is robust to class imbalance because it evaluates the model's ability to discriminate between positive and negative classes across all classification thresholds, rather than relying on a single threshold. In this scenario, the model predicts only the negative class, so its true positive rate is 0 and false positive rate is 0, yielding an AUC-ROC of 0.5 (random performance), which correctly reflects the model's lack of predictive power.

Exam trap

The trap here is that candidates often choose F1 score (Option A) thinking it handles imbalance well, but they forget that F1 score requires at least some true positives to be meaningful, and in this extreme case where the model predicts only negatives, F1 score collapses to 0 or undefined, whereas AUC-ROC correctly identifies random performance.

How to eliminate wrong answers

Option A is wrong because F1 score is a harmonic mean of precision and recall, but when the model predicts only the negative class, recall is 0 (no true positives), making the F1 score undefined or 0, which does not provide a meaningful evaluation of the model's overall discriminative ability. Option B is wrong because mean squared error (MSE) is a regression metric that measures average squared differences between predicted and actual values; it is not designed for binary classification and does not account for class imbalance or threshold behavior. Option C is wrong because accuracy is misleading on imbalanced datasets; a model that always predicts the majority class achieves high accuracy (95%) but fails to identify any positive instances, so accuracy does not reflect the model's true performance on the minority class.

548
MCQmedium

A data scientist is working with a dataset containing categorical features with high cardinality. The scientist wants to use a tree-based model. Which encoding method should be used?

A.Ordinal encoding
B.Target encoding
C.Label encoding
D.One-hot encoding
AnswerC

Label encoding assigns arbitrary integers to categories. Tree-based models can use these integers effectively because they split on feature values without assuming order. This avoids expanding the feature space.

Why this answer

For tree-based models, label encoding (option C) is typically recommended for high-cardinality categorical features because tree models can handle integer encoding without assuming any order—they split on values, not on ordinal relationships. Ordinal encoding (option A) implies an artificial order that may not exist, potentially misleading the model. One-hot encoding (option D) creates too many dimensions.

Target encoding (option B) can cause overfitting, especially with high cardinality.

549
MCQmedium

A data scientist is training a binary classification model on an imbalanced dataset where the positive class represents 1% of the data. The model needs to maximize recall while keeping precision above 0.7. Which sampling strategy should the data scientist use?

A.NearMiss from imbalanced-learn to undersample the majority class based on distance to minority samples.
B.SMOTE from imbalanced-learn to generate synthetic samples for the minority class.
C.RandomUnderSampler from imbalanced-learn to undersample the majority class.
D.TomekLinks from imbalanced-learn to remove overlapping samples.
E.RandomOverSampler from imbalanced-learn to oversample the minority class.
AnswerB

SMOTE creates synthetic samples, balancing the dataset and improving recall while preserving precision.

Why this answer

(SMOTE) is correct because it generates synthetic samples for the minority class, which can improve recall without discarding data, and synthetic samples help maintain precision above 0.7 by providing more balanced training. Option A (NearMiss) undersamples majority samples based on distance, potentially discarding important data and reducing recall. Option C (RandomUnderSampler) may lose too many majority samples, harming recall and precision.

Option D (TomekLinks) only removes overlapping samples, which does not sufficiently address imbalance. Option E (RandomOverSampler) duplicates minority samples, which can cause overfitting and reduce precision on unseen data.

550
MCQmedium

A company is using Amazon SageMaker to build a binary classification model for customer churn. The dataset is highly imbalanced (90% no churn, 10% churn). Which technique is MOST effective for handling class imbalance?

A.Use accuracy as the evaluation metric.
B.Undersample the majority class.
C.Use SMOTE to generate synthetic samples for the minority class.
D.Train a random forest model instead of logistic regression.
AnswerC

SMOTE is a standard oversampling technique.

Why this answer

SMOTE (Synthetic Minority Oversampling Technique) is the most effective option because it generates synthetic samples for the minority class by interpolating between existing minority instances, thereby balancing the dataset without discarding valuable majority-class data. This approach directly addresses the class imbalance in a binary classification task on SageMaker, improving model recall for the churn class without the information loss caused by undersampling.

Exam trap

The trap here is that candidates often assume switching to a tree-based model (like random forest) inherently solves class imbalance, but the exam tests that explicit resampling or cost-sensitive techniques are required for effective handling.

How to eliminate wrong answers

Option A is wrong because accuracy is a misleading metric for imbalanced datasets; a model that predicts 'no churn' for all instances would achieve 90% accuracy but fail to identify any churn cases. Option B is wrong because undersampling the majority class discards potentially useful data, which can lead to loss of information and reduced model performance, especially when the dataset is not extremely large. Option D is wrong because simply switching to a random forest model does not inherently address class imbalance; while tree-based models can handle imbalance better than logistic regression, they still require explicit imbalance-handling techniques like SMOTE or class weighting to be effective.

551
MCQeasy

A company is using SageMaker to train a model. The training data includes personally identifiable information (PII). The company must ensure that the data is encrypted at rest and in transit. Which combination of actions meets these requirements?

A.Use S3 server-side encryption with S3 managed keys (SSE-S3)
B.Enable SSL for data in transit and use VPC endpoints
C.Place all resources in a private VPC subnets with no internet access
D.Use S3 server-side encryption and enable SageMaker inter-container traffic encryption
AnswerD

S3 SSE encrypts at rest; SageMaker inter-container encryption uses TLS for in-transit.

Why this answer

It combines S3 server-side encryption (SSE-S3) to protect data at rest in the training dataset with SageMaker inter-container traffic encryption, which encrypts data in transit between training containers using TLS. This dual approach satisfies the requirement for encryption both at rest and in transit within the SageMaker training environment.

Exam trap

The trap here is that candidates often assume VPC isolation or SSL alone satisfies both encryption requirements, but they overlook the need for explicit encryption of inter-container traffic within SageMaker's distributed training environment.

How to eliminate wrong answers

Option A is wrong because SSE-S3 only encrypts data at rest in S3, but does not address encryption of data in transit during model training. Option B is wrong because enabling SSL for data in transit and using VPC endpoints secures network traffic but does not encrypt data at rest in S3 or within SageMaker containers. Option C is wrong because placing resources in private VPC subnets with no internet access prevents network exposure but does not provide encryption of data at rest or in transit between containers.

552
MCQeasy

A data analyst wants to understand the distribution of a continuous variable. Which visualization is most appropriate for this purpose?

A.Box plot
B.Bar chart
C.Histogram
D.Scatter plot
AnswerC

Histogram displays the distribution of a single continuous variable.

Why this answer

(Histogram) is correct because a histogram displays the frequency distribution of a continuous variable by grouping data into bins. Option A (Box plot) is incorrect because it shows summary statistics (median, quartiles, outliers) but not the full distribution. Option B (Bar chart) is incorrect because bar charts are for categorical data, not continuous.

Option D (Scatter plot) is incorrect because it shows the relationship between two continuous variables, not the distribution of a single variable.

553
Multi-Selecteasy

Which TWO actions are best practices for tuning hyperparameters using Amazon SageMaker Automatic Model Tuning?

Select 2 answers
A.Set the number of training jobs to a very large value
B.Use the same hyperparameters as the baseline model
C.Use Bayesian optimization strategy
D.Use grid search strategy
E.Use random search strategy
AnswersC, E

Bayesian optimization is effective and efficient.

Why this answer

Amazon SageMaker Automatic Model Tuning supports Bayesian optimization, random search, and grid search strategies. Bayesian optimization (Option C) is efficient for finding optimal hyperparameters by exploring promising regions. Random search (Option E) is effective for high-dimensional spaces and often outperforms grid search.

Grid search (Option D) is not recommended for many hyperparameters due to combinatorial explosion. Setting a very large number of training jobs (Option A) is costly and unnecessary. Using the same hyperparameters as the baseline model (Option B) does not perform tuning.

Therefore, the best practices are Options C and E.

554
MCQhard

A data engineering team is designing a data lake on Amazon S3. They need to enforce encryption at rest for all data stored in the bucket. The security policy requires that the encryption keys be managed by the organization using AWS Key Management Service (KMS), and that the bucket must deny uploads of unencrypted objects. Which bucket policy should be applied?

A.A bucket policy that denies PutObject unless the request includes the 'x-amz-server-side-encryption' header with value 'AES256'
B.A bucket policy that denies PutObject if the 'x-amz-server-side-encryption' header is not present
C.A bucket policy that denies PutObject unless the request includes the 'x-amz-server-side-encryption-aws-kms-key-id' header matching the desired KMS key ID
D.Enable default encryption on the bucket with AWS-KMS
AnswerC

This enforces the use of a specific KMS key.

Why this answer

The security policy requires that encryption keys be managed by the organization using AWS KMS, and that unencrypted uploads be denied. A bucket policy that denies PutObject unless the request includes the 'x-amz-server-side-encryption-aws-kms-key-id' header matching the desired KMS key ID enforces both conditions: it ensures server-side encryption with a customer-managed KMS key (SSE-KMS) and blocks any upload that does not specify the exact key ID, thereby preventing unencrypted objects or objects encrypted with other keys.

Exam trap

The trap here is that candidates often confuse 'default encryption' (which silently encrypts objects but does not deny unencrypted uploads) with a bucket policy that actively denies requests without the required encryption headers, leading them to choose Option D instead of the policy-based enforcement in Option C.

How to eliminate wrong answers

Option A is wrong because it enforces SSE-S3 (AES256), not SSE-KMS, which violates the requirement that encryption keys be managed by the organization via AWS KMS. Option B is wrong because it only checks for the presence of the 'x-amz-server-side-encryption' header but does not enforce that the encryption uses a KMS key; the header could be set to 'AES256' (SSE-S3) or 'aws:kms' (SSE-KMS), and without specifying the key ID, it does not meet the key management requirement. Option D is wrong because enabling default encryption on the bucket does not deny uploads of unencrypted objects; it only applies encryption to objects that are uploaded without an encryption header, meaning a client could still upload an unencrypted object if they explicitly set the header to 'None' or omit it, and the bucket would still accept it (default encryption is a fallback, not a denial).

555
MCQhard

A data scientist is training a deep learning model for image classification. The model is overfitting on the training data. Which combination of techniques will most effectively reduce overfitting?

A.Add dropout layers and use data augmentation
B.Reduce the batch size
C.Train for more epochs without early stopping
D.Increase the number of layers and neurons
AnswerA

Dropout randomly drops units to prevent co-adaptation; data augmentation increases effective training set size, both reduce overfitting.

Why this answer

Dropout layers randomly deactivate a fraction of neurons during training, which forces the network to learn more robust features and prevents co-adaptation. Data augmentation artificially expands the training dataset by applying transformations (e.g., rotation, flipping, cropping), which reduces the model's ability to memorize spurious patterns and improves generalization. Together, these techniques directly counteract overfitting by increasing regularization and effective training diversity.

Exam trap

The MLS-C01 exam often tests the misconception that increasing model complexity (more layers/neurons) or training longer will fix overfitting, when in reality these actions worsen it, and that simple hyperparameter changes like batch size reduction are not primary regularization techniques.

How to eliminate wrong answers

Option B is wrong because reducing the batch size introduces noisier gradient estimates, which can sometimes act as a mild regularizer but is not a primary or reliable technique to combat overfitting; it may even destabilize training. Option C is wrong because training for more epochs without early stopping will exacerbate overfitting, as the model will continue to memorize noise in the training data. Option D is wrong because increasing the number of layers and neurons increases model capacity, which makes overfitting worse by allowing the network to fit training data more precisely.

556
MCQeasy

A data scientist is analyzing a dataset with missing values. Which technique is most appropriate for imputing missing values in a numerical feature that follows a normal distribution?

A.Mean imputation
B.Standard deviation imputation
C.Mode imputation
D.Median imputation
AnswerA

Mean imputation preserves the mean of the normal distribution.

Why this answer

Mean imputation is suitable for normally distributed data as it preserves the mean. Median is robust to outliers, not normality. Mode is for categorical data.

Standard deviation is not an imputation method. KNN imputation is non-parametric.

557
MCQmedium

A research lab is using SageMaker to train deep learning models on a custom dataset stored in S3. Each training job uses a single ml.p3.2xlarge instance. Recently, training jobs have been failing intermittently with 'NetworkError: Connection reset by peer' during the data download phase. The data scientist notices that the dataset is 50GB and the network throughput is low. The training script uses the default S3 download method (boto3) to copy data from S3 to the local instance storage. Which solution should the data scientist implement to resolve the issue?

A.Mount an EBS volume to the instance and copy data there before training.
B.Use SageMaker Pipe mode to stream data directly from S3.
C.Add retry logic in the training script to handle network errors.
D.Use a larger instance type like p3.8xlarge for better network bandwidth.
AnswerB

Pipe mode avoids large local file downloads and is more resilient.

Why this answer

SageMaker Pipe mode streams training data directly from S3 without writing to local disk, avoiding the large download that causes network timeouts. Option A (mount EBS) does not eliminate the need to download 50GB, so it does not resolve the network reset. Option C (retry logic) may help but does not address the root cause of low throughput and large downloads.

Option D (larger instance) increases bandwidth but does not guarantee connection stability and costs more.

558
MCQhard

A data scientist is training a neural network for image classification. The dataset has 50,000 images across 100 classes. The model uses a ResNet-50 architecture pre-trained on ImageNet. The training loss decreases rapidly, but validation loss starts to increase after 5 epochs. Which of the following is the most effective technique to address this?

A.Increase the learning rate
B.Add more layers to the network
C.Use data augmentation to increase the diversity of the training set
D.Use a smaller batch size
AnswerC

Data augmentation artificially expands the training set, reducing overfitting and improving generalization.

Why this answer

The rapid decrease in training loss followed by an increase in validation loss after only 5 epochs is a classic sign of overfitting. Data augmentation artificially expands the training set by applying random transformations (e.g., rotations, flips, crops) to existing images, which improves the model's generalization and reduces overfitting. This is the most effective technique among the options because it directly addresses the lack of diverse training examples without changing the model architecture or training hyperparameters in a way that could destabilize learning.

Exam trap

The trap here is that candidates often confuse overfitting with underfitting or training instability, and incorrectly choose to increase learning rate or add layers, not recognizing that the validation loss rising while training loss falls is the textbook symptom of overfitting that requires regularization or more data.

How to eliminate wrong answers

Option A is wrong because increasing the learning rate would likely cause the optimizer to overshoot minima, making both training and validation loss unstable or diverge, which does not fix overfitting. Option B is wrong because adding more layers to an already deep ResNet-50 would increase model capacity and exacerbate overfitting, especially with a fixed dataset size. Option D is wrong because using a smaller batch size introduces more noise into gradient estimates, which can sometimes act as a regularizer but is less reliable and effective than data augmentation for addressing overfitting in image classification; it may also slow convergence.

559
MCQhard

A data scientist is working on a multi-class classification problem with 10 classes. The model outputs probabilities and the scientist wants to evaluate the model's ability to rank classes correctly. Which metric is most appropriate?

A.F1 score
B.Accuracy
C.Area Under the ROC Curve (AUC-ROC)
D.Log loss
AnswerC

Area Under the ROC Curve measures ranking ability; one-vs-rest AUC can be used for multi-class.

Why this answer

The most appropriate metric for evaluating a multi-class classifier's ability to rank classes (i.e., order classes by predicted probability) is the Area Under the ROC Curve (AUC-ROC). AUC-ROC measures the model's ability to distinguish between classes across all thresholds, and for multi-class problems it can be extended using one-vs-rest or macro/micro averaging. Log loss (Option D) measures probability calibration, not ranking.

F1 score (Option A) is a threshold-dependent metric suitable for binary or per-class evaluation, not overall ranking. Accuracy (Option B) is also threshold-dependent and does not consider probability ranking. Therefore, Option C (AUC-ROC) is correct.

560
MCQeasy

A machine learning team is using Amazon SageMaker to train models on a large dataset stored in Amazon S3. The dataset is 5 TB in size and is partitioned by date. The team wants to minimize data transfer costs and reduce training time by caching frequently accessed data locally on the training instances. The training instances are EC2 instances with attached Amazon EBS volumes. The team is considering using SageMaker Pipe mode to stream data directly from S3, but they are concerned about network bandwidth. Which approach should the team use to optimize data loading for training?

A.Use Amazon FSx for Lustre as a high-performance file system linked to the S3 bucket, and mount it on the training instances.
B.Use SageMaker File mode with Amazon EFS, which allows multiple training instances to share the same file system and caches data from S3.
C.Increase the size of the EBS volumes attached to the training instances and copy the entire dataset to the volumes before training.
D.Use SageMaker Pipe mode to stream data from S3 directly to the training algorithm, which automatically caches data in memory.
AnswerA

Correct. Amazon FSx for Lustre provides a high-performance file system that integrates with S3 and caches data locally on the training instances, reducing data transfer costs and training time.

Why this answer

Amazon FSx for Lustre is natively integrated with Amazon SageMaker as a data source, providing a high-performance file system that can be linked directly to an S3 bucket. It automatically caches frequently accessed data from S3 on the file system, reducing data transfer costs and training time by avoiding repeated downloads. The caching capability addresses network bandwidth concerns effectively.

Option B is incorrect: SageMaker File mode uses EBS volumes, not Amazon EFS, and is not designed as a shared, cached file system across training jobs. Option C is incorrect: copying the entire 5 TB dataset to EBS volumes before each training job is time-consuming, increases costs, and does not provide efficient caching across jobs. Option D is incorrect: SageMaker Pipe mode streams data directly from S3 without caching, so it does not reduce repeated data transfers and may still face bandwidth issues.

561
MCQhard

A team is building a regression model to predict house prices. The dataset includes a column 'zip_code' with 100 unique values. The data scientist one-hot encodes this column, resulting in 100 new binary columns. The model shows poor performance on a validation set. What is the most likely cause?

A.One-hot encoding introduced multicollinearity among the binary columns.
B.One-hot encoding reduced the number of features, causing underfitting.
C.The one-hot encoding introduced high variance, but the validation set has low variance.
D.The model suffers from the curse of dimensionality due to the large number of features.
AnswerD

With 100 additional sparse features, the model may overfit and not generalize well.

Why this answer

One-hot encoding 'zip_code' with 100 unique values creates 100 binary features. When combined with other features, the total number of features can be large relative to the number of training samples, leading to the curse of dimensionality. This causes the model to overfit the training data and generalize poorly to the validation set.

While multicollinearity among one-hot encoded columns is often low due to their binary nature, the primary issue here is the high dimensionality relative to sample size. Option D correctly identifies this as the most likely cause.

Exam trap

Candidates often underestimate the impact of one-hot encoding high-cardinality categorical variables. While the features are binary and not collinear, the sheer number of new features can cause the curse of dimensionality, leading to overfitting and poor generalization.

How to eliminate wrong answers

Option A is wrong because one-hot encoding does not introduce multicollinearity; in fact, it creates orthogonal binary columns that are linearly independent when the intercept is dropped. Option B is wrong because one-hot encoding increases the number of features, not reduces them, so it cannot cause underfitting due to feature reduction. Option C is wrong because one-hot encoding can increase variance (overfitting) but the validation set having low variance is not a direct consequence; the issue is that the model may overfit the training data, not that the validation set has low variance.

562
MCQmedium

A data scientist is building a regression model to predict house prices. The dataset includes features such as square footage, number of bedrooms, and location. After training a linear regression model, the scientist notices that the residuals have a pattern: they increase as the predicted value increases. Which action is most appropriate?

A.Remove outliers from the dataset
B.Use Ridge regression instead of linear regression
C.Add polynomial features to the model
D.Apply a log transformation to the target variable
AnswerD

Log transformation can stabilize variance and reduce heteroscedasticity.

Why this answer

Patterned residuals (heteroscedasticity) violating linear regression assumptions. Log-transforming the target variable can stabilize variance. Adding polynomial features or interactions may help with non-linearity but not specifically for heteroscedasticity.

Ridge regression is for multicollinearity, not for patterned residuals.

563
MCQhard

A company uses Amazon SageMaker to train a model for fraud detection. The dataset has 1 million transactions, with 0.1% fraud. The data scientist trains a random forest model and achieves 99.9% accuracy but 0% recall on the fraud class. Which technique is most likely to improve recall without significantly reducing precision?

A.Tune the classification threshold
B.Use cost-sensitive learning with a high cost for fraud misclassification
C.Apply SMOTE to generate synthetic fraud samples
D.Undersample the majority class
AnswerC

SMOTE creates synthetic instances of the minority class, balancing the dataset and improving recall while maintaining precision.

Why this answer

SMOTE (Synthetic Minority Oversampling Technique) generates synthetic fraud samples by interpolating between existing minority class instances, which directly addresses the extreme class imbalance (0.1% fraud). This increases the representation of the fraud class in the training data, allowing the random forest model to learn decision boundaries that capture fraud patterns, thereby improving recall without introducing the noise or information loss associated with other methods.

Exam trap

The trap here is that candidates often assume cost-sensitive learning (Option B) is the best approach for imbalanced data, but in extreme imbalance with 0% recall, oversampling techniques like SMOTE are more effective because they directly increase the minority class representation rather than just adjusting penalties.

How to eliminate wrong answers

Option A is wrong because tuning the classification threshold can trade off precision and recall, but with 0% recall, the model is already predicting all instances as non-fraud; lowering the threshold may increase recall but will likely cause a drastic drop in precision due to the overwhelming majority class. Option B is wrong because cost-sensitive learning assigns a higher penalty to fraud misclassification during training, which can improve recall, but it does not directly address the lack of fraud examples in the dataset and may still result in poor precision if the model cannot learn from sparse data. Option D is wrong because undersampling the majority class reduces the dataset size and discards potentially useful information, which can lead to loss of decision boundary details and decreased model performance, often harming precision more than helping recall.

564
MCQeasy

An ML engineer needs to run a hyperparameter tuning job on Amazon SageMaker. The training algorithm supports distributed training across multiple GPUs. The engineer wants to minimize the total time to find the best hyperparameters. Which strategy should be used?

A.Use random search to explore a wide range.
B.Use grid search to cover all combinations.
C.Use Hyperband which is designed for distributed training.
D.Use Bayesian optimization as the tuning strategy.
AnswerD

Bayesian optimization adaptively selects hyperparameters, reducing total tuning time.

Why this answer

Bayesian optimization is the correct choice because it builds a probabilistic model of the objective function and uses an acquisition function to select the most promising hyperparameters to evaluate next. This approach converges to optimal hyperparameters in far fewer trials than random or grid search, minimizing total tuning time. SageMaker's built-in hyperparameter tuning jobs natively support Bayesian optimization and can leverage distributed training across multiple GPUs without any additional configuration.

Exam trap

The trap here is that candidates may assume Hyperband is the best choice because it is explicitly designed for distributed training and early stopping, but the question asks to minimize total time to find the best hyperparameters, and Bayesian optimization is more sample-efficient and converges faster than Hyperband when the objective function is expensive to evaluate.

How to eliminate wrong answers

Option A is wrong because random search, while better than grid search, does not use past evaluation results to guide future trials, so it wastes time exploring unpromising regions and does not minimize total tuning time. Option B is wrong because grid search exhaustively evaluates all combinations of a predefined set of hyperparameter values, which is computationally expensive and scales poorly with the number of hyperparameters, making it the slowest strategy for minimizing total time. Option C is wrong because Hyperband is an early-stopping strategy that allocates resources to promising configurations and terminates poor ones early, but it is not specifically designed for distributed training; it can be used with distributed training but does not inherently minimize total tuning time better than Bayesian optimization when the goal is to find the best hyperparameters with minimal wall-clock time.

565
MCQhard

A data engineer is performing EDA on a dataset with 1 million rows and 200 columns. The dataset is stored in S3 as CSV files. The engineer notices that some columns have a high proportion of zeros. What is the best approach to determine if these zeros represent missing data or actual zero values?

A.Check correlation of zero columns with other features; if low, assume zeros are missing.
B.Calculate the percentage of zeros and compare with other columns; if unusually high, treat as missing.
C.Use AWS Glue Data Catalog to view column statistics and infer missing values.
D.Consult the data source documentation or domain experts to understand the meaning of zero values.
AnswerD

Domain knowledge is crucial for accurate interpretation of data.

Why this answer

Domain knowledge and documentation are the most reliable ways to understand the meaning of zeros. Option A is wrong because statistical methods cannot distinguish missing vs actual zero without context. Option B is wrong because metadata may not have this detail.

Option C is wrong because comparing to other columns might be misleading.

566
MCQhard

A team is using SageMaker to train a deep learning model for image classification. The training job is failing with a 'CUDA out of memory' error. The team is using a p3.2xlarge instance (1 GPU, 16 GB GPU memory). The dataset consists of 256x256 RGB images. Which action is MOST likely to resolve the error without changing the instance type?

A.Increase the batch size to utilize GPU more efficiently
B.Enable automatic model tuning to optimize hyperparameters
C.Use Spot Instances to reduce cost
D.Reduce the batch size
AnswerD

Smaller batch size reduces memory footprint per iteration, resolving OOM errors.

Why this answer

The 'CUDA out of memory' error indicates that the GPU memory is exhausted. Reducing the batch size directly decreases the memory footprint per training step, allowing the model to fit within the 16 GB GPU memory of the p3.2xlarge instance. This is the most direct and effective fix without changing the instance type.

Exam trap

The trap here is that candidates may confuse 'CUDA out of memory' with a performance issue and incorrectly choose to increase batch size for efficiency, when in fact the error is a hard memory limit that requires reducing memory usage.

How to eliminate wrong answers

Option A is wrong because increasing the batch size would increase GPU memory consumption, worsening the out-of-memory error. Option B is wrong because automatic model tuning (hyperparameter optimization) does not directly address GPU memory limits; it may even suggest larger batch sizes that exacerbate the issue. Option C is wrong because Spot Instances reduce cost but do not affect GPU memory capacity; the error would persist regardless of instance pricing model.

567
Multi-Selecthard

Which TWO techniques can be used to detect multicollinearity among numerical features during exploratory data analysis? (Choose two.)

Select 2 answers
A.Apply Principal Component Analysis (PCA) and examine loadings.
B.Compute a correlation matrix and look for pairs with absolute correlation > 0.8.
C.Perform a t-test between each pair of features.
D.Calculate Variance Inflation Factor (VIF) for each feature.
E.Use a chi-square test of independence.
AnswersB, D

High correlation indicates multicollinearity.

Why this answer

Multicollinearity indicates high correlation between predictors. Option B: Compute a correlation matrix and look for pairs with absolute correlation > 0.8 directly reveals linear dependencies. Option D: Variance Inflation Factor (VIF) measures how much the variance of a coefficient is inflated due to collinearity; VIF > 5 or 10 suggests multicollinearity.

Option A (PCA) reduces dimensionality but does not directly detect collinearity. Option C (t-test) tests mean differences, not associations. Option E (chi-square) tests categorical independence, not applicable to numerical features.

568
MCQeasy

A data engineer needs to extract data from an Amazon RDS for MySQL database into Amazon S3 for further processing. The data volume is 2 TB and the job must run daily within a 1-hour window. Which AWS service is most suitable for this task?

A.Amazon Kinesis Data Firehose
B.AWS Database Migration Service (DMS)
C.Amazon Athena
D.AWS Glue
AnswerD

AWS Glue provides managed ETL jobs that can extract from JDBC sources and write to S3 on a schedule.

Why this answer

AWS Glue is the most suitable service because it provides a fully managed ETL (Extract, Transform, Load) capability that can efficiently extract 2 TB of data from Amazon RDS for MySQL and write it to Amazon S3. Glue can leverage JDBC connections to the RDS instance, scale horizontally with its dynamic worker allocation, and complete the job within a 1-hour window by using appropriate worker types (e.g., G.2X or G.8X) and partitioning strategies. Additionally, Glue integrates natively with the AWS Glue Data Catalog and can handle incremental or full-load extraction with minimal overhead.

Exam trap

The trap here is that candidates often confuse AWS Glue (a batch ETL service) with Amazon Kinesis Data Firehose (a streaming service) or AWS DMS (a migration tool), failing to recognize that Glue's Spark-based parallel processing and JDBC connectivity make it the correct choice for scheduled, large-volume batch extraction from a relational database to S3.

How to eliminate wrong answers

Option A is wrong because Amazon Kinesis Data Firehose is designed for streaming data ingestion (e.g., real-time logs, events) and does not support batch extraction from a relational database like RDS for MySQL; it lacks JDBC connectors and cannot perform scheduled bulk reads. Option B is wrong because AWS Database Migration Service (DMS) is primarily intended for one-time or ongoing database migrations (e.g., to another database engine or S3), but it is not optimized for daily, time-boxed ETL jobs with a strict 1-hour window; DMS can incur latency from change data capture and may require additional configuration for partitioning large datasets. Option C is wrong because Amazon Athena is an interactive query service that runs SQL directly on data in S3; it cannot extract data from an external database like RDS for MySQL—it has no built-in JDBC connectivity to pull data from RDS.

569
MCQmedium

A company uses Amazon SageMaker to train an XGBoost model on a large dataset. Training takes a long time. Which action can reduce training time without significantly affecting model accuracy?

A.Use a deep neural network instead
B.Increase the learning rate
C.Use a larger instance type
D.Enable early stopping
AnswerD

Early stopping stops when no improvement.

Why this answer

Early stopping halts training when the model's performance on a validation set stops improving for a specified number of rounds. This prevents overfitting and reduces training time by eliminating unnecessary iterations, while typically preserving accuracy because the optimal model is already found.

Exam trap

AWS often tests the misconception that increasing learning rate or using more powerful hardware always speeds up training without side effects, but the correct answer focuses on algorithmic efficiency rather than resource scaling.

How to eliminate wrong answers

Option A is wrong because replacing XGBoost with a deep neural network generally increases training time and requires more data and tuning, not reducing time. Option B is wrong because increasing the learning rate can cause the model to converge to a suboptimal solution or diverge, significantly reducing accuracy. Option C is wrong because using a larger instance type increases computational resources and may reduce wall-clock time, but it does not reduce the total compute time or algorithmic iterations; it also incurs higher cost and does not address the root cause of long training.

570
Multi-Selecthard

Which THREE statements about data leakage in machine learning are correct? (Select THREE.)

Select 3 answers
A.Using the target variable to filter features before splitting leads to data leakage
B.Applying SMOTE after splitting the dataset prevents data leakage
C.Applying standardization on the entire dataset before splitting into training and test sets can cause data leakage
D.Using cross-validation eliminates all possible data leakage
E.For time series data, using a random train-test split is recommended to avoid data leakage
AnswersA, B, C

Correct. Filtering features based on the target before splitting uses test set information to decide which features to keep, causing data leakage.

Why this answer

Using the target variable to filter features before splitting allows test set information to influence feature selection, causing data leakage. Option B is correct: applying SMOTE after splitting the dataset into training and test sets prevents leakage that would occur if SMOTE were applied before splitting, as synthetic samples would then be generated using information from the entire dataset. While SMOTE after splitting does not prevent all forms of leakage, the statement 'prevents data leakage' is interpreted in the context of the specific leakage that SMOTE can introduce, making it a correct practice.

Option C is correct: standardizing the entire dataset before splitting uses statistics computed from both training and test data, which leaks information about the test set into the training process. Option D is incorrect because cross-validation does not eliminate all leakage; if preprocessing steps like scaling are applied to the entire dataset before cross-validation, leakage still occurs. Option E is incorrect because for time series data, a random train-test split ignores the temporal order and can cause future information to leak into past predictions; a time-based split is recommended.

571
MCQmedium

A company is using Amazon SageMaker to host a model for real-time inference. The model was trained using SageMaker's built-in Linear Learner algorithm. The endpoint has been running for a week, and the operations team notices that the endpoint's latency has increased from 50 ms to 150 ms over the past few days. The number of requests per second has remained steady at about 200. The team suspects a memory leak in the inference container. What should the team do to diagnose the issue?

A.Enable CloudWatch Logs and use Container Insights to view memory utilization.
B.Use Amazon CloudWatch to monitor the endpoint's latency metric.
C.Use SageMaker Debugger to inspect the inference container.
D.Use SageMaker Model Monitor to detect data drift.
AnswerA

Container Insights shows memory usage trends, helping diagnose leaks.

Why this answer

CloudWatch Container Insights provides metrics for containerized applications, including memory utilization. This can help diagnose a memory leak by showing memory usage trends over time. Option B is incorrect because CloudWatch latency metrics only show endpoint response time, not memory usage.

Option C is incorrect because SageMaker Debugger is designed for debugging training jobs, not inference containers. Option D is incorrect because SageMaker Model Monitor detects data and model drift, not memory leaks.

572
MCQmedium

A data scientist is using Amazon SageMaker to train a model on a dataset that contains both numerical and categorical features. The categorical features have high cardinality (e.g., postal codes, product IDs). Which feature engineering approach is most suitable for handling these high-cardinality categorical features in a tree-based model?

A.One-hot encode the categorical features
B.Use label encoding
C.Apply target encoding
D.Apply binary encoding
AnswerB

Tree-based models like XGBoost can effectively use label-encoded features because they make splits based on ordering.

Why this answer

Label encoding is suitable for tree-based models because these models split on feature values and can handle ordinal relationships implicitly. Unlike linear models, tree-based models do not assume any distance metric between categories, so label encoding avoids the dimensionality explosion of one-hot encoding while preserving the ability to capture splits based on high-cardinality features.

Exam trap

The trap here is that candidates often default to one-hot encoding for categorical features without considering the model type, failing to recognize that tree-based models can effectively use label encoding for high-cardinality features without the drawbacks of dimensionality explosion.

How to eliminate wrong answers

Option A is wrong because one-hot encoding high-cardinality features (e.g., thousands of unique postal codes) creates an extremely sparse feature matrix with many columns, leading to increased memory usage, slower training, and potential overfitting in tree-based models. Option C is wrong because target encoding, while effective for high-cardinality features, introduces target leakage and can cause overfitting if not carefully regularized, making it less robust than label encoding for tree-based models in a straightforward SageMaker training pipeline. Option D is wrong because binary encoding, though more compact than one-hot, still creates multiple binary columns per feature and can complicate interpretability; tree-based models can handle label encoding directly without needing this transformation.

573
Drag & Dropmedium

Drag and drop the steps to create an Amazon SageMaker notebook instance in the correct order.

Drag steps to the numbered slots on the right, or tap a step then tap a slot.

Steps
Order
1Step 1
2Step 2
3Step 3
4Step 4

Why this order

Creating a notebook instance requires navigating the SageMaker console, configuring instance settings, IAM role, and VPC, then launching.

574
MCQhard

A data engineer is investigating why an Athena query against the my-data-lake bucket is slow. The query filters on year, month, and day. The exhibit shows the metadata of one Parquet file. What is the MOST likely cause of the slow query?

A.The version ID is null, causing data inconsistency
B.The file is too large, causing Athena to process it in a single task
C.The partition columns are not being used in the query
D.The storage class is STANDARD, which is slower than GLACIER
AnswerB

Large files limit parallelism; Athena works best with files 128-512 MB.

Why this answer

The Parquet file is 1 GB in size, which is too large for efficient processing in Athena. Athena splits data into tasks for parallel execution, but a single large file cannot be split, causing the query to run slowly. Partitioning on year, month, and day is already applied and is not the issue.

The other options are incorrect: version ID null is irrelevant, the query does use partition columns, and standard storage is faster than Glacier.

575
MCQeasy

A team is training a linear regression model to predict house prices. After training, they observe that the model has high bias (underfitting). Which action is most likely to reduce bias?

A.Increase the regularization strength.
B.Reduce the amount of training data.
C.Decrease the number of model parameters.
D.Add more relevant features and increase model complexity.
AnswerD

Adding features reduces bias.

Why this answer

High bias (underfitting) means the model is too simple to capture the underlying patterns in the data. Adding more relevant features and increasing model complexity (e.g., using polynomial features or more interaction terms) gives the linear regression model greater capacity to fit the training data, directly reducing bias. This aligns with the bias-variance tradeoff, where increasing complexity lowers bias at the cost of potentially increasing variance.

Exam trap

The trap here is that candidates often confuse regularization (which controls overfitting) with bias reduction, mistakenly thinking increasing regularization or reducing parameters will fix underfitting, when in fact those actions increase bias.

How to eliminate wrong answers

Option A is wrong because increasing regularization strength (e.g., L1 or L2 penalty) forces the model to shrink coefficients toward zero, which increases bias and worsens underfitting. Option B is wrong because reducing the amount of training data does not address model simplicity; it typically increases variance and can exacerbate bias if the model cannot learn the true distribution. Option C is wrong because decreasing the number of model parameters (e.g., removing features or using a simpler model) reduces complexity, which directly increases bias and makes underfitting worse.

576
MCQmedium

A data scientist is using Amazon SageMaker to train a natural language processing model using a custom Docker container. The training script reads data from an S3 bucket and writes checkpoints to an S3 bucket. The training job is failing with the error 'Unable to write to checkpoint path: s3://my-bucket/checkpoints/'. The IAM role associated with the training job has the following policy: {'Effect': 'Allow', 'Action': 's3:PutObject', 'Resource': 'arn:aws:s3:::my-bucket/checkpoints/*'}. The bucket 'my-bucket' exists and the prefix 'checkpoints/' is empty. What is the most likely cause of the failure?

A.The IAM role is missing the s3:ListBucket permission
B.The IAM role does not have s3:PutObject permission
C.The S3 bucket does not exist
D.The checkpoint prefix already contains objects
AnswerA

SageMaker needs ListBucket to access the bucket.

Why this answer

The error 'Unable to write to checkpoint path' occurs because the SageMaker training job's IAM role lacks the `s3:ListBucket` permission. Even though the role has `s3:PutObject` on the checkpoint prefix, SageMaker's S3 client first performs a `ListObjects` (or `HeadObject`) call to verify the bucket exists and to check the prefix state before writing. Without `s3:ListBucket` on the bucket itself, the API call fails, causing the write operation to abort.

Exam trap

The trap here is that candidates assume `s3:PutObject` alone is sufficient for writing to S3, but AWS requires `s3:ListBucket` on the bucket to verify the path before writing, a nuance frequently tested in MLS-C01 and SAA exams.

How to eliminate wrong answers

Option B is wrong because the policy explicitly includes `s3:PutObject` on the checkpoint path, so the permission is present. Option C is wrong because the question states the bucket 'my-bucket' exists, so the bucket is not missing. Option D is wrong because the prefix is explicitly described as empty, and even if it contained objects, `s3:PutObject` would still succeed; the error is about the inability to write, not about overwriting existing objects.

577
MCQeasy

A data scientist is working on a project to predict customer churn. The dataset contains 50,000 rows and 20 features, including categorical variables like 'Region' (10 categories) and 'SubscriptionType' (5 categories). The target variable is binary (churn or not). During exploratory data analysis, they plot the distribution of each feature and notice that 'Region' has a highly imbalanced distribution: one region accounts for 80% of the data. Which of the following is the most appropriate next step?

A.Apply one-hot encoding to the 'Region' feature.
B.Remove the 'Region' feature from the dataset.
C.Group rare categories into an 'Other' category.
D.Oversample the minority classes in the target variable.
AnswerC

Grouping rare categories into an 'Other' category helps manage highly imbalanced categorical features, preventing the model from overemphasizing the dominant category and allowing rare categories to be represented without causing sparse or noisy signals.

Why this answer

Grouping rare categories into an 'Other' category helps manage highly imbalanced categorical features, preventing the model from overemphasizing the dominant category and allowing rare categories to be represented without causing sparse or noisy signals. Option A is incorrect: one-hot encoding does not address the imbalance; it simply creates dummy variables, and rare categories would still be underrepresented. Option B is incorrect: removing the 'Region' feature could discard potentially useful information; the problem is imbalance, not irrelevance.

Option D is incorrect: oversampling the minority class targets address target imbalance, not feature imbalance.

578
MCQmedium

A company uses SageMaker to host a real-time inference endpoint for a classification model. The endpoint receives traffic spikes that cause high latency. The team wants a solution that automatically scales based on demand while keeping costs low. Which approach is BEST?

A.Use provisioned concurrency for the endpoint
B.Use a multi-model endpoint to serve multiple models
C.Deploy the endpoint on Spot Instances
D.Enable automatic scaling on the endpoint using Application Auto Scaling
AnswerD

Automatic scaling adjusts instance count based on demand, balancing cost and latency.

Why this answer

SageMaker endpoints support automatic scaling with Application Auto Scaling based on custom metrics like 'InvocationsPerInstance' or 'SageMakerVariantInvocationsPerInstance'. Provisioned concurrency is not available for SageMaker endpoints. Spot instances are not recommended for real-time endpoints due to interruptions.

Multi-model endpoints help but scaling is still needed.

579
Multi-Selecthard

A machine learning engineer is tuning a Gradient Boosting model for a regression task. The dataset contains 50 features and 100,000 samples. The engineer wants to speed up training without sacrificing predictive performance significantly. Which THREE hyperparameters should the engineer consider adjusting? (Choose THREE.)

Select 3 answers
A.Reduce the subsample ratio (e.g., from 1.0 to 0.5)
B.Increase learning_rate and decrease n_estimators proportionally
C.Increase the number of estimators
D.Decrease max_depth of trees
E.Reduce max_features (e.g., from 'auto' to 0.5)
AnswersA, D, E

Using fewer samples per tree speeds training.

Why this answer

(subsample) uses a fraction of samples per tree, reducing both overfitting and training time. Option D (max_depth) limits tree depth, which directly reduces computation. Option E (max_features) restricts the number of features considered for each split, lowering tree complexity.

Option B (learning_rate and n_estimators) trades off; although increasing learning rate can reduce training time, it often requires careful adjustment and may hurt performance. Option C (n_estimators) directly increases training time, which is the opposite of the goal.

580
Multi-Selectmedium

A company is using Amazon SageMaker to train and deploy machine learning models. The data science team wants to track and compare model versions, hyperparameters, and metrics across multiple training jobs. Which TWO AWS services should they use together to achieve this? (Choose TWO.)

Select 2 answers
A.Amazon RDS
B.Amazon CloudWatch Logs
C.AWS Glue
D.Amazon S3
E.Amazon SageMaker Experiments
AnswersD, E

S3 stores experiment artifacts and outputs.

Why this answer

Amazon S3 is correct because it serves as the central repository for storing model artifacts, training data, and output files from SageMaker training jobs. By default, SageMaker saves model artifacts and training results to S3, enabling version tracking and reproducibility across experiments.

Exam trap

The trap here is that candidates may confuse CloudWatch Logs (which only stores raw logs) with a proper experiment tracking solution, or assume a database like RDS is needed for metadata storage, when SageMaker Experiments natively handles this with S3 as the artifact store.

581
MCQhard

A research team is training a deep learning model for object detection using SageMaker's built-in SSD algorithm. The dataset contains 50,000 images with bounding box annotations. The team uses a single ml.p3.2xlarge instance. After 24 hours of training, the model's loss has plateaued, but the mean average precision (mAP) on validation is only 0.45. The team wants to improve mAP without increasing training time. Which action should they take?

A.Increase the learning rate by a factor of 2
B.Use a pre-trained model as the backbone (e.g., ResNet-50 pre-trained on ImageNet)
C.Increase the batch size to 64
D.Add more convolutional layers to the backbone
AnswerB

Transfer learning boosts accuracy with no additional training time.

Why this answer

(use a pre-trained backbone) transfers learned features, often improving accuracy. Option A (increase learning rate) may destabilize training. Option C (increase batch size) may not improve mAP and could slow convergence.

Option D (add more layers) increases training time.

582
MCQmedium

A machine learning team is analyzing a dataset with a target variable that is highly imbalanced (99% negative class, 1% positive class). They want to understand the distribution and relationships before modeling. Which exploratory data analysis technique is most appropriate to visualize the imbalance and guide resampling strategy?

A.Confusion matrix on a sample of the data
B.Scatterplot matrix of all features colored by class
C.Box plots of each feature grouped by the target class
D.Bar chart of class frequencies and a correlation heatmap
AnswerD

Bar chart shows imbalance clearly; correlation heatmap helps identify features related to the target.

Why this answer

A bar chart of class frequencies clearly visualizes the imbalance (99% negative vs 1% positive), and a correlation heatmap helps identify which features are correlated with the target, guiding resampling strategy. Option A is wrong because a confusion matrix is used for evaluating model predictions, not for initial exploratory data analysis of class imbalance. Option B is wrong because a scatterplot matrix is designed to visualize relationships between continuous variables and can be overwhelming with many features; it does not directly highlight the class imbalance.

Option C is wrong because box plots grouped by target class show feature distributions across classes but do not explicitly quantify the imbalance ratio itself.

583
MCQhard

A company is streaming data from thousands of devices using Amazon Kinesis Data Streams. The data is consumed by a AWS Lambda function that processes each record. The Lambda function is experiencing high error rates and throttling due to the volume of data. Which action would MOST effectively improve the processing throughput and reduce errors?

A.Send the data to Amazon SQS first and then process with Lambda
B.Use Amazon Kinesis Data Firehose instead of Kinesis Data Streams
C.Increase the Lambda function's batch size and reduce the batch window
D.Increase the number of shards in the Kinesis stream
AnswerD

More shards increase parallelism and throughput, reducing throttling.

Why this answer

Increasing the number of shards in the Kinesis stream directly increases the stream's capacity for data ingestion and processing parallelism. Each shard supports up to 1 MB/s or 1,000 records/s for writes, and Lambda processes records from each shard concurrently. By adding more shards, you distribute the load across more Lambda invocations, reducing throttling and error rates caused by exceeding the per-shard throughput limits.

Exam trap

The trap here is that candidates often confuse Kinesis Data Streams with Kinesis Data Firehose, thinking Firehose can handle high-volume Lambda processing, when in fact Firehose is a delivery service with no per-record Lambda integration.

How to eliminate wrong answers

Option A is wrong because inserting an SQS queue between Kinesis and Lambda adds an unnecessary hop and does not address the root cause of throttling; Lambda still polls SQS at a fixed rate, and the bottleneck remains the downstream processing capacity. Option B is wrong because Kinesis Data Firehose is designed for near-real-time data delivery to destinations like S3 or Redshift, not for real-time processing with Lambda; it does not support per-record Lambda processing and would not reduce errors from high-volume streaming. Option C is wrong because increasing the batch size while reducing the batch window can actually increase the number of records per invocation, potentially worsening throttling and error rates if the Lambda function cannot handle larger batches within the execution timeout or memory limits.

584
MCQmedium

A machine learning team is using SageMaker to train a deep learning model. The training job is failing due to insufficient GPU memory. Which approach should the team take to resolve this issue without changing the model architecture?

A.Increase the batch size.
B.Use gradient accumulation to reduce the effective batch size per step.
C.Add more GPUs to the training instance.
D.Decrease the learning rate.
AnswerB

Gradient accumulation allows training with larger effective batches while keeping per-step memory low.

Why this answer

Gradient accumulation allows the model to simulate a larger batch size without increasing memory usage per step, as gradients are accumulated over several smaller batches before updating weights. Option A is wrong because increasing the batch size would increase memory consumption per step, exacerbating the issue. Option C (adding more GPUs) is wrong because simply adding more GPUs to the instance does not reduce the memory usage per GPU; each GPU would still process the same batch size and run out of memory.

Option D is wrong because decreasing the learning rate does not affect memory usage; it only changes the step size during optimization.

585
Multi-Selectmedium

Which TWO configuration steps are necessary to deploy a custom Docker container for training in Amazon SageMaker? (Choose two.)

Select 2 answers
A.Expose a REST API endpoint for inference
B.Implement the train function in the container that saves model artifacts to /opt/ml/model
C.Define a Docker Compose file to manage multi-container training
D.Include a training script that reads hyperparameters from /opt/ml/input/config/hyperparameters.json
E.Push the container image to Docker Hub
AnswersB, D

SageMaker expects the model to be saved in /opt/ml/model.

Why this answer

Amazon SageMaker expects the training container to save model artifacts to the `/opt/ml/model` directory, which SageMaker automatically copies to Amazon S3 after training completes. This is a required contract for any custom training container used with SageMaker.

Exam trap

The trap here is that candidates confuse the requirements for a training container versus an inference container, thinking that exposing an API endpoint or pushing to Docker Hub is necessary for training, when SageMaker strictly enforces the `/opt/ml` directory contract and uses Amazon ECR for image storage.

586
MCQmedium

A company wants to deploy a machine learning model that predicts customer churn. The model must provide interpretable predictions to explain why a customer is likely to churn. Which algorithm is most appropriate?

A.Gradient boosting machine
B.Support vector machine (SVM)
C.Decision tree
D.Deep neural network
AnswerC

Decision trees are highly interpretable.

Why this answer

Decision trees are inherently interpretable because they produce a clear, rule-based structure that shows exactly which features and thresholds lead to a churn prediction. This white-box nature allows stakeholders to trace the reasoning for each prediction, meeting the requirement for interpretability without needing post-hoc explanation methods.

Exam trap

The MLS-C01 exam often tests the trade-off between model accuracy and interpretability, where candidates mistakenly choose a high-performance black-box model (like gradient boosting or neural networks) without recognizing that the question explicitly prioritizes interpretability over raw predictive power.

How to eliminate wrong answers

Option A is wrong because gradient boosting machines are ensemble models that combine many weak learners, making them highly accurate but difficult to interpret directly; they require techniques like SHAP or LIME for explanation, which adds complexity. Option B is wrong because support vector machines operate in high-dimensional feature spaces using kernel functions, producing decision boundaries that are not easily interpretable without additional tools. Option D is wrong because deep neural networks are black-box models with multiple hidden layers and non-linear transformations, making their predictions opaque and requiring external interpretability methods.

587
Multi-Selecthard

Which THREE considerations are important when designing a data lake on Amazon S3?

Select 3 answers
A.Setting up S3 Lifecycle policies to transition data to colder storage
B.Using Provisioned IOPS for S3
C.Partitioning data by date to improve query performance
D.Using a single Availability Zone for data storage
E.Encrypting data at rest using AWS KMS
AnswersA, C, E

Lifecycle policies manage cost.

Why this answer

S3 Lifecycle policies allow you to automatically transition objects to colder storage classes (e.g., S3 Standard-IA, S3 Glacier) based on age or other rules, reducing storage costs for infrequently accessed data in a data lake. This is a key design consideration for managing data lifecycle and cost efficiency at scale.

Exam trap

The trap here is that candidates may confuse S3 with EBS features (like Provisioned IOPS) or overlook that S3 inherently provides multi-AZ durability, making single-AZ storage an anti-pattern for data lakes.

588
Multi-Selecthard

A data scientist is training a random forest model for regression. The model shows high variance on the validation set. Which TWO actions are most likely to reduce variance? (Choose 2.)

Select 2 answers
A.Use bootstrap sampling with replacement
B.Decrease the maximum depth of trees
C.Increase the minimum samples per leaf
D.Increase the number of trees in the forest
E.Increase the number of features considered at each split
AnswersB, C

Shallow trees reduce overfitting, lowering variance.

Why this answer

Both decreasing the maximum depth of trees (B) and increasing the minimum samples per leaf (C) reduce the complexity of individual trees. Decreasing max depth limits tree growth, preventing overfitting to noise. Increasing min samples per leaf forces leaves to contain more samples, smoothing predictions and reducing variance.

Together, these regularization techniques directly combat high variance in random forest models.

Exam trap

The MLS-C01 exam often tests the misconception that adding more trees always reduces variance, but the trap here is that while more trees reduce variance from averaging, they do not address the root cause of overfitting from overly complex individual trees.

589
MCQeasy

A machine learning team is training a deep learning model on Amazon SageMaker and notices that the training loss is decreasing but the validation loss is increasing. What is the most likely cause?

A.Vanishing gradients
B.Overfitting the training data
C.Learning rate is too high
D.Underfitting the training data
AnswerB

Overfitting occurs when model learns noise, causing validation loss to increase after a point.

Why this answer

When training loss continues to decrease while validation loss increases, the model is memorizing the training data rather than learning generalizable patterns. This is the classic symptom of overfitting, where the model's capacity exceeds what is needed for the underlying data distribution, causing it to fit noise in the training set. In Amazon SageMaker, this can be observed by monitoring the validation loss metric during training jobs.

Exam trap

The MLS-C01 exam often tests the distinction between overfitting and high learning rate by presenting a scenario where training loss decreases but validation loss increases, and candidates mistakenly attribute it to a learning rate that is too high, not recognizing that a high learning rate would cause both losses to diverge or oscillate.

How to eliminate wrong answers

Option A is wrong because vanishing gradients cause the model to stop learning entirely, resulting in both training and validation loss stagnating or decreasing very slowly, not a divergence between the two. Option C is wrong because a learning rate that is too high typically causes the loss to oscillate or diverge on both training and validation sets, not a monotonic decrease in training loss with an increase in validation loss. Option D is wrong because underfitting means the model is too simple to capture patterns, leading to high loss on both training and validation sets, not a decreasing training loss.

590
Multi-Selecthard

A machine learning team is using Amazon SageMaker to train a deep learning model on a large dataset stored in Amazon S3. The training job is taking too long. The team wants to reduce training time without modifying the model architecture. Which THREE actions should the team take? (Choose 3.)

Select 3 answers
A.Enable SageMaker Managed Spot Training to use cheaper spot instances.
B.Use a larger instance type with more vCPUs and memory.
C.Use distributed training with multiple GPU instances.
D.Use Pipe input mode to stream data from S3 instead of downloading it.
E.Use SageMaker Processing to preprocess the data.
AnswersA, C, D

SageMaker Managed Spot Training leverages spare AWS EC2 compute capacity at a significantly reduced cost, but the primary mechanism that reduces training time is the ability to scale horizontally across more instances for the same budget. Since the stem prohibits modifying the model architecture, this option satisfies the constraint by allowing the team to allocate the saved cost towards provisioning additional GPU instances, thereby decreasing wall-clock training duration through increased parallelism.

Why this answer

SageMaker Managed Spot Training enables the use of spot instances at a reduced cost, allowing the team to allocate more resources (e.g., more or larger instances) within the same budget, which can directly reduce training time. Option C is correct because distributed training across multiple GPU instances parallelizes the workload, significantly reducing training duration. Option D is correct because Pipe input mode streams data from Amazon S3 directly to the training algorithm, minimizing I/O bottlenecks and reducing time spent waiting for data to load.

Option B is not one of the three best choices because simply using a larger instance may not fully address I/O or parallelism bottlenecks and can be more expensive. Option E is incorrect because SageMaker Processing is designed for data preprocessing, not for accelerating training itself.

Exam trap

The trap here is that candidates often confuse cost-saving techniques (like Spot Training) with performance-optimization techniques, and they may overlook that Pipe input mode and distributed training directly address I/O and compute bottlenecks, respectively, while Spot Training primarily saves money.

591
Multi-Selecthard

Which THREE factors should be considered when choosing an instance type for a SageMaker training job?

Select 3 answers
A.The number of vCPUs needed for parallel processing
B.The memory requirements of the model
C.The endpoint latency requirement
D.The AWS region where the instance is launched
E.The GPU requirements for model training
AnswersA, B, E

More vCPUs can speed up training.

Why this answer

The number of vCPUs directly determines the parallel processing capability of the training job. SageMaker training instances with more vCPUs can handle larger batch sizes and more concurrent data loading, which is critical for CPU-bound preprocessing or model training that does not rely on GPUs. Choosing an instance with insufficient vCPUs can lead to underutilization of other resources or excessive training time.

Exam trap

The trap here is that candidates confuse training job requirements with inference endpoint requirements, incorrectly selecting endpoint latency (Option C) as a factor for training, when it only applies to SageMaker hosting endpoints.

592
MCQhard

A data scientist is performing feature engineering on a dataset with high cardinality categorical features (e.g., ZIP codes with thousands of unique values). Which technique is most effective for reducing dimensionality while preserving predictive power?

A.Hash encoding
B.One-hot encoding
C.Target encoding
D.Label encoding
AnswerC

Correct: Target encoding reduces cardinality by using target statistics, preserving predictive power.

Why this answer

Target encoding (also known as mean encoding) replaces each category with the mean of the target variable for that category. This preserves the predictive signal by directly encoding the relationship between the category and the target, while reducing the dimensionality to a single continuous feature. Hash encoding can cause collisions and loss of information.

One-hot encoding creates too many dummy variables for high cardinality features. Label encoding imposes an arbitrary ordinal relationship that may not exist and can mislead models.

593
MCQmedium

Refer to the exhibit. An ML engineer runs the above CLI command to inspect files in an S3 bucket. The training data consists of 200 CSV files, each 1 GB. The engineer plans to use Amazon SageMaker to train a model using this data. What should the engineer do to optimize training performance?

A.Increase the number of training instances to process files in parallel.
B.Use Amazon Athena to transform the data into CSV format with headers.
C.Use the File input mode and copy all files to the training instance's EBS volume.
D.Convert the CSV files to Parquet format and use Pipe input mode.
AnswerD

Parquet is columnar and compressed; Pipe mode streams data directly from S3.

Why this answer

Converting CSV files to Parquet format and using Pipe input mode significantly improves training performance. Parquet is a columnar storage format that reduces I/O by reading only relevant columns, and it is compressed. Pipe input mode streams data directly from S3 to the training algorithm without downloading to EBS, reducing startup time and disk usage.

Option A is incorrect because simply increasing the number of instances does not address the inefficiency of reading CSV files; it may help parallelization but not per-instance throughput. Option B is incorrect because Amazon Athena is a query service, not a data transformation tool for SageMaker; converting to CSV with headers does not improve performance. Option C is incorrect because using File input mode copies all files to the training instance's EBS volume, which is slow for 200 GB of data and does not leverage streaming benefits.

594
MCQmedium

A data engineer is designing a data lake on Amazon S3. The data is collected from IoT devices and is highly variable in volume. The engineer needs to ensure that the data is ingested reliably and can be processed in near real-time. Which AWS service should be used to ingest the data into the data lake?

A.Amazon Kinesis Data Firehose
B.AWS Glue
C.Amazon Kinesis Data Streams
D.Amazon Simple Queue Service (SQS)
AnswerA

Firehose can load streaming data directly into S3 with near real-time latency.

Why this answer

Amazon Kinesis Data Firehose is the correct choice because it is a fully managed service designed to reliably load streaming data into data lakes on Amazon S3 with near-real-time latency (typically 60 seconds). It automatically handles scaling to accommodate highly variable IoT data volumes, provides built-in data transformation and compression, and requires no manual shard management or consumer code, making it ideal for ingestion into S3-based data lakes.

Exam trap

The trap here is that candidates often confuse Amazon Kinesis Data Streams (a raw streaming service requiring custom consumers) with Amazon Kinesis Data Firehose (a fully managed delivery service), leading them to select Data Streams for direct S3 ingestion when it actually requires additional code and infrastructure to write to S3.

How to eliminate wrong answers

Option B (AWS Glue) is wrong because it is a serverless ETL and data catalog service for batch processing and schema discovery, not a real-time data ingestion service; it cannot ingest streaming data directly into S3. Option C (Amazon Kinesis Data Streams) is wrong because it is a real-time data streaming service that requires you to write custom consumer code to read and write data to S3, and it does not natively deliver data to S3 without additional infrastructure; it is designed for custom stream processing, not direct ingestion into a data lake. Option D (Amazon Simple Queue Service (SQS)) is wrong because it is a message queue service for decoupling application components, not a streaming ingestion service; it does not provide near-real-time delivery to S3 and lacks built-in data transformation or compression capabilities for data lake ingestion.

595
MCQmedium

A company is deploying a machine learning model using SageMaker. The model is a PyTorch model that requires GPU for inference. The company wants to minimize costs while ensuring low latency. Which instance type should be used for the SageMaker endpoint?

A.ml.m5.large
B.ml.p3.2xlarge
C.ml.c5.2xlarge
D.ml.g4dn.xlarge
AnswerD

Correct. ml.g4dn.xlarge provides a cost-effective GPU instance (NVIDIA T4) suitable for PyTorch inference with low latency, balancing cost and performance.

Why this answer

Ml.g4dn.xlarge is a GPU instance with an NVIDIA T4, optimized for inference, and is more cost-effective than ml.p3.2xlarge while still providing low latency for PyTorch models. Option A (ml.m5.large) is wrong as it is a CPU instance without GPU support. Option B (ml.p3.2xlarge) is wrong because although it has a GPU, it is more expensive and not necessary for low-latency inference; ml.g4dn.xlarge offers similar performance at lower cost.

Option C (ml.c5.2xlarge) is also a CPU instance and unsuitable.

596
MCQhard

A data engineer configures an S3 event notification to trigger an AWS Lambda function when a new object is created in 'my-input-bucket'. The Lambda function processes the CSV file and writes results to 'my-output-bucket'. The engineer notices that the Lambda function is not triggered for some objects. Which step should the engineer take to diagnose the issue?

A.Check the Lambda function's execution role for permissions to write to the output bucket.
B.Review the CloudWatch Logs for the Lambda function to see if there are errors.
C.Check the Lambda function's resource-based policy to ensure S3 has permission to invoke the function.
D.Verify that the S3 event notification is configured with the correct prefix and suffix filters.
AnswerC

Missing invoke permission is a common cause of trigger failure.

Why this answer

The most likely cause of the Lambda function not being triggered for some objects is that S3 lacks the necessary permission to invoke the function. S3 event notifications require a resource-based policy (also known as a Lambda function policy) that explicitly grants the S3 service principal permission to invoke the function. Without this policy, S3 will not be able to trigger the Lambda function, even if the event notification configuration is correct.

Exam trap

The trap here is that candidates often focus on the Lambda function's execution role (Option A) or the event notification filters (Option D), overlooking the critical resource-based policy that grants S3 permission to invoke the function.

How to eliminate wrong answers

Option A is wrong because the Lambda function's execution role permissions to write to the output bucket affect the function's ability to write results, not whether the function is triggered in the first place. Option B is wrong because reviewing CloudWatch Logs would only help after the function has been invoked; if the function is never triggered, there will be no logs to review. Option D is wrong because while prefix and suffix filters could cause some objects to be excluded, the question states that the function is not triggered for 'some objects' — if the filters were the issue, the function would not be triggered for objects that do not match the filter, which is expected behavior, not a problem to diagnose.

597
MCQhard

A data engineer runs the AWS CLI command shown and notices a zero-byte file in the results. What is the most likely cause of this zero-byte file?

A.The S3 bucket has a lifecycle policy that deleted the content.
B.The file was written with the wrong prefix.
C.The file was compressed, reducing size to zero.
D.The file was created by a failed Spark task that wrote no data.
AnswerD

Failed tasks can produce empty files.

Why this answer

Zero-byte files often occur when an ETL job fails partway through writing, or when a task starts but writes no data. A completed write would have non-zero size. The other options are less likely: prefix typo wouldn't produce a file; correct permissions wouldn't cause zero bytes; compression would produce some output.

598
MCQhard

A company operates a real-time fraud detection system using SageMaker. The model is deployed on an ml.c5.xlarge instance behind an Application Load Balancer (ALB). Recently, during a sales event, traffic spiked and the endpoint returned HTTP 503 errors. The team scaled the instance count from 2 to 5, but errors persisted. CloudWatch metrics show low CPU utilization (~30%) and high memory usage (~90%). The model loads a large dictionary file (2GB) into memory at startup. Which action should resolve the issue?

A.Enable auto-scaling with Spot instances.
B.Switch to a compute-optimized instance type like c5.2xlarge.
C.Increase the number of instances further to 10.
D.Use a memory-optimized instance type like r5.large.
AnswerB

Switching to c5.2xlarge doubles memory (16 GB) and increases CPU cores, directly addressing the memory exhaustion and providing headroom for concurrent requests.

Why this answer

The high memory usage (~90%) with low CPU (~30%) indicates the instance is memory-constrained under load. The ml.c5.xlarge has 8 GB memory, and the model's 2 GB dictionary plus overhead exhausts memory, causing 503 errors. Scaling out doesn't help because each instance is individually memory-bound.

Option B switches to c5.2xlarge, which provides 16 GB memory (doubling capacity) and more CPU cores, addressing both memory exhaustion and ensuring sufficient compute for concurrent requests. Option A (Spot instances) does not increase per-instance memory. Option C (scaling to 10 instances) still uses c5.xlarge instances with 8 GB each, so each remains memory-limited.

Option D (r5.large) offers 16 GB memory but reduces vCPUs to 2, which could create a CPU bottleneck for the inference workload, making B the better choice.

599
MCQhard

A large e-commerce company is using Amazon DynamoDB as the source for real-time analytics. The data is streamed to Amazon Kinesis Data Streams using DynamoDB Streams and then processed by an AWS Lambda function. The Lambda function writes the data to an Amazon Elasticsearch Service cluster for search and visualization. Recently, the Lambda function has been failing with throttling errors from the Elasticsearch cluster. What is the MOST effective way to handle this?

A.Increase the Lambda function's reserved concurrency to handle more invocations.
B.Increase the number of shards in the Kinesis data stream.
C.Decrease the Kinesis stream's retention period to reduce the data volume.
D.Configure a Dead Letter Queue (DLQ) on the Lambda function to capture failed records and implement retry logic.
AnswerD

DLQ captures records that fail due to throttling, allowing later reprocessing without blocking the stream.

Why this answer

Using a Dead Letter Queue (DLQ) allows the Lambda function to capture records that fail due to Elasticsearch throttling, so they can be retried later without blocking the function's processing of other records. This prevents data loss and handles backpressure effectively. Option A is incorrect because increasing Lambda concurrency would increase the rate of writes to the Elasticsearch cluster, worsening the throttling.

Option B is incorrect because increasing Kinesis shards would increase the throughput of data arriving at the Lambda function, again exacerbating the throttling. Option C is incorrect because decreasing the Kinesis retention period does not reduce the data volume; it only changes how long data is stored in the stream, and it would not solve the throttling issue.

600
MCQeasy

A data scientist wants to deploy a PyTorch model for real-time inference with low latency. Which AWS service should they use?

A.Amazon Elastic Container Service (ECS)
B.Amazon SageMaker batch transform
C.Amazon SageMaker real-time endpoint
D.AWS Lambda
AnswerC

Designed for low-latency inference.

Why this answer

Amazon SageMaker real-time endpoints are specifically designed for low-latency inference on deployed models, including PyTorch models. They provide persistent HTTPS endpoints that autoscale and support custom containers, making them ideal for real-time prediction workloads.

Exam trap

The trap here is that candidates often confuse batch transform (asynchronous, offline) with real-time endpoints (synchronous, low-latency), or assume that any container service like ECS is sufficient without considering the specialized model hosting and scaling capabilities of SageMaker endpoints.

How to eliminate wrong answers

Option A is wrong because Amazon ECS is a container orchestration service that requires manual setup of load balancing, scaling, and monitoring, adding operational overhead and not providing built-in model hosting features like SageMaker endpoints. Option B is wrong because Amazon SageMaker batch transform is designed for asynchronous, offline inference on large datasets, not for real-time, low-latency predictions. Option D is wrong because AWS Lambda has a maximum execution timeout of 15 minutes and is better suited for short-lived, event-driven tasks, not for hosting a PyTorch model that requires persistent, low-latency inference.

Page 7

Page 8 of 23

Page 9