Courseiva

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

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

Page 6

Page 7 of 23

Page 8
451
MCQmedium

A team is training a large language model using SageMaker's distributed training. They notice that the training loss is not decreasing after the first few epochs. Which action is MOST likely to resolve this issue?

A.Increase the batch size
B.Add L2 regularization
C.Reduce the learning rate
D.Switch from Adam to SGD optimizer
AnswerC

A high learning rate can cause the loss to plateau or oscillate. Reducing the learning rate allows the optimizer to take smaller steps, enabling the loss to continue decreasing. This is the most direct fix.

Why this answer

When training loss plateaus or does not decrease after the first few epochs, a common cause is that the learning rate is too high, causing the optimizer to overshoot minima. Reducing the learning rate helps the model converge. Increasing the batch size (option A) mainly affects gradient variance and training speed but does not address an overly large step size.

Adding L2 regularization (option B) helps prevent overfitting but does not resolve a high learning rate. Switching from Adam to SGD (option D) may not help because Adam typically adapts learning rates per parameter; if the base learning rate is too high, both optimizers can struggle. Therefore, reducing the learning rate is the most direct and effective action.

452
MCQeasy

A data scientist is using Amazon SageMaker Data Wrangler for exploratory data analysis. The dataset contains a column with missing values that are encoded as 'NA' strings. The data scientist wants to treat these as missing values during the import. Which step should the data scientist take?

A.Configure a custom missing value symbol 'NA' in the import settings of Data Wrangler.
B.Use the 'Impute' transform to fill 'NA' with the mean of the column.
C.Use the 'Replace missing' transform to replace 'NA' with null after import.
D.Use the 'Drop missing' transform to remove rows containing 'NA'.
AnswerA

Data Wrangler supports custom missing value symbols during data import.

Why this answer

Amazon SageMaker Data Wrangler allows specifying custom missing value symbols during the import step. By configuring 'NA' as a custom missing value symbol in the import settings, Data Wrangler will automatically treat 'NA' strings as missing values when reading the dataset. Option B is incorrect because the 'Impute' transform is used to fill missing values after they have been recognized as missing; it does not handle the initial identification of 'NA' strings as missing.

Option C is incorrect because using 'Replace missing' after import is less efficient and not the recommended approach; it is better to handle it during import to ensure downstream transforms treat the values correctly. Option D is incorrect because dropping rows with 'NA' prematurely discards data before any analysis; the goal is to treat 'NA' as missing, not to remove the rows.

453
MCQmedium

A data scientist is using Amazon SageMaker to train a model. The training data is stored in Amazon S3 and is approximately 500 GB. The data scientist notices that the training job is taking a long time to start because the data is being copied to the training instance's storage. The data scientist wants to reduce the startup time for subsequent training jobs. Which action should the data scientist take?

A.Use Pipe input mode instead of File input mode for the training job
B.Use an EBS-optimized instance type
C.Use Amazon FSx for Lustre as a high-performance file system mounted to the training instance
D.Increase the size of the training instance's Amazon EBS storage volume
AnswerA

Pipe mode streams data from S3 directly, reducing startup time.

Why this answer

Using Pipe input mode streams data directly from S3 to the training algorithm without downloading, reducing startup time. Option B is wrong because FSx for Lustre is not needed for simple streaming. Option C is wrong because increasing instance storage does not address the data transfer issue.

Option D is wrong because using EBS optimized instances does not change the data loading mechanism.

454
MCQmedium

A team trained a multiclass classification model using SageMaker built-in XGBoost. The model's accuracy is high, but for a specific class, recall is very low. The team wants to improve recall for that class without significant accuracy drop. Which approach is MOST effective?

A.Add more training data from all classes
B.Resample the training data to balance the class representation
C.Increase the max_depth hyperparameter of XGBoost
D.Switch from XGBoost to a linear learner
AnswerB

Resampling addresses class imbalance, improving recall for minority class.

Why this answer

Resampling the training data to balance class representation directly addresses the root cause of low recall for a specific class in a multiclass XGBoost model. XGBoost's built-in objective functions (e.g., 'multi:softmax') optimize for overall accuracy, which can bias the model toward majority classes; resampling (e.g., oversampling the minority class or undersampling the majority) forces the model to learn decision boundaries that better capture the minority class, improving recall without drastically reducing overall accuracy.

Exam trap

The trap here is that candidates often assume increasing model complexity (max_depth) or switching algorithms will fix class imbalance, when in fact the most effective and direct approach is to rebalance the training data through resampling.

How to eliminate wrong answers

Option A is wrong because adding more data from all classes does not specifically target the underrepresented class; it may even worsen the imbalance if the new data is also skewed, and it does not guarantee improved recall for the minority class. Option C is wrong because increasing max_depth can lead to overfitting, which might temporarily boost recall on training data but often degrades generalization and overall accuracy, and it does not systematically address class imbalance. Option D is wrong because switching from XGBoost to a linear learner (e.g., LinearLearner in SageMaker) assumes linear separability, which is rarely true for complex multiclass problems; linear models typically have lower capacity to model minority class patterns and often yield worse recall than tree-based methods like XGBoost.

455
MCQmedium

A data scientist is performing hyperparameter tuning using Amazon SageMaker Automatic Model Tuning (AMT). The job uses a random search strategy. After 20 training jobs, the best objective metric value has plateaued. The data scientist wants to explore more of the hyperparameter space. Which action should the data scientist take?

A.Change the tuning strategy from Random to Bayesian.
B.Enable early stopping.
C.Decrease the maximum number of training jobs.
D.Increase the number of parallel training jobs.
AnswerA

Bayesian search uses past results to guide exploration.

Why this answer

Changing the tuning strategy from Random to Bayesian allows the tuning job to use previous results to guide the search toward more promising hyperparameter regions, which can explore the space more efficiently after plateauing. Option B is incorrect because enabling early stopping terminates underperforming trials early but does not alter the search strategy itself; it may even reduce exploration. Option C is incorrect because decreasing the maximum number of training jobs reduces the total exploration of the hyperparameter space.

Option D is incorrect because increasing the number of parallel training jobs only speeds up the process but still uses the same random search strategy, which is unlikely to escape the plateau.

456
MCQeasy

A data scientist is training a model and wants to monitor training progress. Which AWS service can be used to track metrics like loss and accuracy in real time?

A.Amazon SageMaker Ground Truth
B.Amazon SageMaker Automatic Model Tuning
C.AWS Glue
D.Amazon CloudWatch
AnswerD

CloudWatch can monitor custom metrics.

Why this answer

Amazon CloudWatch is the correct service because it provides real-time monitoring of metrics such as loss and accuracy during model training. When using SageMaker, training jobs automatically emit metrics to CloudWatch via the CloudWatch agent, allowing you to view logs and set alarms on metric thresholds in near real-time.

Exam trap

The trap here is that candidates may confuse Amazon SageMaker Automatic Model Tuning (which orchestrates hyperparameter searches) with a monitoring service, but it does not provide real-time metric tracking itself—only CloudWatch does.

How to eliminate wrong answers

Option A is wrong because Amazon SageMaker Ground Truth is a data labeling service, not a monitoring tool for training metrics. Option B is wrong because Amazon SageMaker Automatic Model Tuning (hyperparameter tuning) launches training jobs with different hyperparameters but does not itself track real-time metrics; it relies on CloudWatch for that. Option C is wrong because AWS Glue is a serverless data integration and ETL service, not designed for real-time metric tracking during model training.

457
MCQeasy

A data scientist is training a model on Amazon SageMaker and notices that the training job is taking much longer than expected. The instance type is ml.m5.xlarge and the dataset is 10 GB in CSV format. Which action is MOST likely to reduce training time without changing the instance type?

A.Change the instance type to ml.p3.2xlarge (GPU) for faster computation.
B.Reduce the number of training epochs to speed up convergence.
C.Convert the dataset to RecordIO or Parquet format before training.
D.Increase the batch size to the maximum supported by the instance memory.
AnswerC

RecordIO and Parquet are columnar formats that reduce I/O and allow faster data loading in SageMaker.

Why this answer

Converting the dataset from CSV to a columnar format like Parquet or RecordIO reduces I/O overhead and improves data throughput during training. SageMaker's built-in algorithms and many deep learning frameworks can read these formats more efficiently, especially for large datasets, because they enable better compression and predicate pushdown, reducing the time spent on data loading.

Exam trap

The trap here is that candidates often assume that changing the instance type (Option A) to a GPU instance is the only way to speed up training on SageMaker, or that hyperparameter tuning (like reducing epochs or increasing batch size) is always effective, but the question specifically tests understanding of data format optimization (e.g., using Parquet or RecordIO) as a cost-effective and instance-agnostic method to reduce I/O bottlenecks in SageMaker.

How to eliminate wrong answers

Option A is wrong because changing the instance type to a GPU instance (ml.p3.2xlarge) violates the constraint of not changing the instance type, and while it could speed up computation, the question explicitly asks for an action without changing the instance type. Option B is wrong because reducing the number of training epochs may harm model convergence and accuracy; it is a hyperparameter change that trades off training time for model quality, not a guaranteed way to reduce time without side effects. Option D is wrong because increasing the batch size to the maximum supported by instance memory can cause out-of-memory errors or degrade model convergence due to larger batch sizes requiring more memory and potentially leading to poor generalization; it does not address the I/O bottleneck that is the primary cause of slow training with large CSV files.

458
MCQmedium

A company is using Amazon Kinesis Data Firehose to deliver streaming data to an S3 bucket. The data is JSON and must be transformed into Parquet format before delivery. Which approach should the data engineer use?

A.Send the data to Amazon Kinesis Data Analytics to convert to Parquet
B.Configure Kinesis Data Firehose to convert the record format to Parquet using a schema from AWS Glue Data Catalog
C.Use an AWS Lambda function to transform JSON to Parquet and write to S3
D.Use an AWS Glue ETL job to read from Firehose and write Parquet to S3
AnswerB

Firehose can convert JSON to Parquet using a Glue Data Catalog schema.

Why this answer

Amazon Kinesis Data Firehose can directly convert incoming JSON records to Parquet format by referencing a schema stored in the AWS Glue Data Catalog. This is a built-in feature of Firehose that does not require additional services for the conversion. Option A is wrong because Kinesis Data Analytics is for real-time analytics, not format conversion.

Option C is wrong because while Lambda can transform data, using it for Parquet conversion adds latency and complexity; Firehose's native conversion is simpler. Option D is wrong because an AWS Glue ETL job is for batch processing, not real-time streaming transformation.

459
MCQhard

The exhibit shows an IAM policy for a SageMaker notebook. A data scientist wants to use the notebook to run an Athena query and then load the results into a pandas DataFrame. Which action is NOT possible with this policy?

A.Read the Athena query results from the output S3 location
B.Start an Athena query execution
C.Read a specific object from the my-training-data bucket
D.List objects in the my-training-data bucket
AnswerA

The policy only allows read on my-training-data, not the Athena output bucket.

Why this answer

The policy grants s3:GetObject on the 'my-training-data' bucket, so reading a specific object from that bucket (Option C) is possible. It also grants s3:ListBucket on that bucket, so listing objects (Option D) is possible. The policy includes Athena permissions, so starting a query execution (Option B) is allowed.

However, to read Athena query results, the user needs s3:GetObject permission on the S3 location where Athena writes the results, which is typically a different bucket (the query output location). The policy does not grant s3:GetObject on that output bucket, so reading the results (Option A) is not possible.

460
MCQeasy

A data scientist is using Amazon SageMaker to train a model. Training is taking longer than expected. The scientist notices that the training job is using a single instance type with limited GPU memory. Which action will MOST likely reduce training time?

A.Configure the training job to use distributed data parallelism across multiple instances.
B.Use SageMaker Managed Spot Training to lower cost.
C.Use batch normalization layers.
D.Enable SageMaker Debugger for real-time monitoring.
AnswerA

Distributed data parallelism splits the dataset across multiple GPUs/instances, reducing per-worker memory and training time.

Why this answer

The training job is bottlenecked by limited GPU memory on a single instance. Distributed data parallelism splits the dataset across multiple instances, each processing a subset of the data in parallel, which directly reduces wall-clock training time by leveraging aggregate GPU memory and compute. This is the most effective action to address the stated problem of slow training due to limited GPU memory.

Exam trap

The trap here is that candidates often confuse cost optimization (Spot Training) with performance optimization, or they assume that algorithmic improvements (batch normalization) can compensate for hardware limitations, when the real fix is scaling out compute resources.

How to eliminate wrong answers

Option B is wrong because Managed Spot Training reduces cost by using spare EC2 capacity, but it does not increase GPU memory or parallelism, so it will not reduce training time. Option C is wrong because batch normalization layers improve training stability and convergence speed per epoch, but they do not address the fundamental bottleneck of limited GPU memory on a single instance. Option D is wrong because SageMaker Debugger provides real-time monitoring and debugging, but it adds overhead and does not accelerate training; it only helps identify issues.

461
MCQeasy

A data scientist uses Amazon SageMaker Data Wrangler to explore a dataset and notices that the target variable is highly imbalanced. Which technique should the data scientist apply to balance the dataset before training?

A.Synthetic Minority Oversampling Technique (SMOTE)
B.One-hot encoding of the target variable
C.Random undersampling of the majority class
D.Min-Max scaling of all features
AnswerA

SMOTE creates synthetic minority samples to balance the dataset.

Why this answer

Synthetic Minority Oversampling Technique (SMOTE) is the correct technique because it generates synthetic samples for the minority class by interpolating between existing minority instances and their k-nearest neighbors, effectively balancing the dataset without simply duplicating data. Amazon SageMaker Data Wrangler includes a built-in SMOTE transform, making it directly applicable for handling imbalanced target variables during exploratory data analysis.

Exam trap

The MLS-C01 exam often tests the misconception that random undersampling is always safe, but the trap here is that candidates may overlook the information loss from discarding majority class data, while SMOTE provides a more robust synthetic oversampling approach.

How to eliminate wrong answers

Option B is wrong because one-hot encoding is a technique for converting categorical features into binary vectors, not for addressing class imbalance in the target variable. Option C is wrong because random undersampling of the majority class can lead to loss of valuable information and potential underfitting, whereas SMOTE creates synthetic data to preserve information. Option D is wrong because Min-Max scaling normalizes feature ranges to [0,1] and has no effect on class distribution or imbalance.

462
MCQeasy

A company is using Amazon S3 as a data lake. The data engineering team needs to catalog the schema of the data and make it available for querying with Amazon Athena. Which AWS Glue component should be used?

A.AWS Glue Studio
B.AWS Glue Crawlers
C.AWS Glue ETL jobs
D.AWS Glue DataBrew
AnswerB

Crawlers populate the Glue Data Catalog with table definitions.

Why this answer

AWS Glue Crawlers automatically scan data in Amazon S3, infer the schema, and populate the AWS Glue Data Catalog with metadata tables. This makes the data immediately available for querying with Amazon Athena without manual schema definition.

Exam trap

The trap here is that candidates confuse Glue Crawlers (schema discovery) with Glue ETL jobs (data transformation) or Glue DataBrew (data preparation), assuming any Glue component can catalog data, but only Crawlers perform automatic schema inference and metadata population.

How to eliminate wrong answers

Option A is wrong because AWS Glue Studio is a visual interface for authoring ETL jobs, not for cataloging schemas. Option C is wrong because AWS Glue ETL jobs are used for transforming and moving data, not for schema discovery and cataloging. Option D is wrong because AWS Glue DataBrew is a visual data preparation tool for cleaning and normalizing data, not for automatic schema inference and catalog population.

463
Multi-Selectmedium

A company is using Amazon SageMaker to build a machine learning pipeline. The pipeline includes data preprocessing, training, and evaluation steps. The company wants to ensure that the pipeline is reproducible and that artifacts are versioned. Which TWO actions should be taken? (Choose TWO.)

Select 2 answers
A.Use a naming convention for training jobs that includes the date.
B.Use SageMaker Pipelines to create the pipeline and enable versioning on the pipeline artifacts.
C.Create a requirements.txt file with specific library versions for the training script.
D.Use AWS CodePipeline to trigger the pipeline on code changes.
E.Store the training dataset in a versioned S3 bucket.
AnswersB, C

SageMaker Pipelines version artifacts automatically.

Why this answer

SageMaker Pipelines provides a native way to define, orchestrate, and version machine learning pipelines. By enabling versioning on pipeline artifacts (e.g., via the `Pipeline` object's `version` parameter or by using SageMaker Model Registry), each pipeline run is tracked with a unique version, ensuring reproducibility. This directly addresses the requirement for reproducible pipelines and versioned artifacts.

Exam trap

The trap here is that candidates often confuse data versioning (Option E) with pipeline versioning, or assume that a naming convention (Option A) or CI/CD trigger (Option D) is sufficient for reproducibility, when in fact only a purpose-built pipeline orchestration service with artifact versioning (Option B) combined with environment pinning (Option C) meets both requirements.

464
MCQeasy

A data analyst is using Amazon QuickSight to explore a dataset with 10 million rows. The analyst wants to create a histogram of a numerical column. However, the query is taking too long. Which action should the analyst take to improve performance without losing accuracy?

A.Change the data source to Amazon Athena directly with a limit clause.
B.Reduce the number of bins in the histogram.
C.Use a sample of the data (e.g., 1 million rows) for the histogram.
D.Import the dataset into SPICE (Super-fast, Parallel, In-memory Calculation Engine).
AnswerD

SPICE accelerates queries by loading data into memory.

Why this answer

SPICE (Super-fast, Parallel, In-memory Calculation Engine) is Amazon QuickSight's in-memory engine that caches data, enabling fast query performance without losing accuracy. Importing the dataset into SPICE speeds up histogram computation while preserving full data. Option A is incorrect because using Athena with a limit clause reduces the number of rows, losing accuracy.

Option B is incorrect because reducing bins changes histogram granularity, not necessarily improving performance and potentially losing detail. Option C is incorrect because sampling reduces accuracy by excluding data points.

465
MCQeasy

After loading a dataset into a pandas DataFrame, a data scientist runs df.info() and sees that a column 'income' has object dtype. What does this indicate, and what EDA step should be taken?

A.The column has missing values; impute them.
B.The column contains strings; convert to numeric using pd.to_numeric() and investigate non-convertible values.
C.Normalize the column to a 0-1 range.
D.The column is already numeric; proceed.
AnswerB

Conversion to numeric is necessary for analysis; non-convertible values may indicate errors.

Why this answer

'object' dtype in pandas typically indicates string or mixed types. The appropriate EDA step is to attempt conversion to numeric using pd.to_numeric() and investigate non-convertible values to handle data quality issues. Option A is incorrect because object dtype does not specifically indicate missing values; missing values can appear in any dtype.

Option C is premature; conversion should precede normalization. Option D is incorrect because object dtype is not numeric.

466
MCQhard

A data scientist is tuning a gradient boosting model using SageMaker automatic model tuning. The hyperparameter 'num_round' ranges from 50 to 500. The tuning job uses 'ObjectiveMetric' = 'validation:auc'. After 50 training jobs, the best objective value is 0.95. The data scientist suspects overfitting. What should the data scientist do?

A.Increase 'max_depth' to capture more complex patterns.
B.Add an early stopping round and increase the range for regularization hyperparameters like 'gamma' and 'lambda'.
C.Increase 'num_round' to 1000 and keep other hyperparameters unchanged.
D.Decrease the range of 'num_round' to 10-100.
AnswerB

Early stopping prevents overfitting; regularization penalizes complexity.

Why this answer

Adding an early stopping round prevents training after validation performance stops improving, and increasing the range of regularization hyperparameters like 'gamma' (minimum loss reduction) and 'lambda' (L2 regularization) helps penalize overly complex models, reducing overfitting. Option A (increasing 'max_depth') would allow deeper trees that can memorize noise, worsening overfitting. Option C (increasing 'num_round' to 1000) with no regularization and no early stopping would likely lead to further overfitting.

Option D (decreasing 'num_round' to 10-100) might underfit, but it does not address the root cause of overfitting and could reduce performance.

467
Multi-Selecthard

A company uses Amazon S3 to store historical transaction data in CSV format. The data is partitioned by transaction_date. A data analyst runs Amazon Athena queries that frequently filter on customer_id and transaction_date. The queries are slow and expensive. The team needs to improve query performance and reduce cost. Which combination of actions should the team take? (Choose TWO.)

Select 2 answers
A.Enable S3 Select pushdown in Athena to reduce data transfer.
B.Convert the data to JSON format for better query performance.
C.Convert the data from CSV to Parquet format.
D.Reorganize the data by partitioning on customer_id first, then transaction_date.
E.Increase the number of Athena query workers.
AnswersC, D

Parquet is columnar and compressed, reducing data scanned.

Why this answer

Converting CSV to Parquet (option C) improves performance because Parquet is a columnar storage format that reduces the amount of data scanned by Athena, especially when queries only select a subset of columns. It also uses efficient compression, reducing storage and data scanned. Reorganizing the partition order (option D) to have customer_id first (the most frequently filtered column) improves partition pruning, reducing the amount of data read.

Option A (S3 Select pushdown) is not fully supported by Athena; Athena already uses S3 Select for certain formats, but it doesn't guarantee significant improvement and may not be applicable. Option B (JSON) is worse than CSV because JSON is typically larger and not columnar. Option E (increasing workers) is not applicable as Athena is serverless and automatically scales.

468
MCQmedium

A data scientist is training a model using Amazon SageMaker and notices that training is taking much longer than expected. The training job uses a single ml.p3.2xlarge instance. The data is stored in S3 and is about 50 GB in size. Which action would MOST likely reduce training time?

A.Enable automatic data sharding in the SageMaker training job.
B.Enable S3 server-side encryption on the training data.
C.Use a larger instance type, such as ml.p3.16xlarge.
D.Change the input mode from File to Pipe.
AnswerD

Pipe mode streams data directly from S3, reducing I/O time.

Why this answer

Changing the input mode from File to Pipe reduces training time by streaming data directly from S3 to the training algorithm without first downloading it to the local disk. In File mode, SageMaker first downloads the entire 50 GB dataset to the instance's Amazon EBS volume, which adds significant I/O latency and storage overhead. Pipe mode uses a Linux FIFO (named pipe) to feed data on-the-fly, eliminating the download step and allowing the GPU to start processing sooner.

Exam trap

The trap here is that candidates often assume upgrading to a larger instance (Option C) is the default solution for slow training, overlooking that the bottleneck is data ingestion (File mode download) rather than compute, and that Pipe mode is a cost-effective alternative that directly addresses the I/O bottleneck.

How to eliminate wrong answers

Option A is wrong because automatic data sharding is not a SageMaker feature; sharding refers to distributing data across multiple instances in distributed training, but this job uses a single instance, so sharding would not apply. Option B is wrong because enabling S3 server-side encryption does not affect data transfer speed or training performance; it only adds encryption at rest, which has negligible impact on I/O. Option C is wrong because while a larger instance like ml.p3.16xlarge provides more GPU and memory, the bottleneck here is the data download time in File mode, not compute capacity; upgrading the instance would still incur the same 50 GB download overhead and is less cost-effective than switching to Pipe mode.

469
MCQhard

A machine learning engineer is using Amazon SageMaker to train a model. The training job is taking too long. The engineer suspects the data loading is a bottleneck. Which action would MOST effectively diagnose the issue?

A.Monitor CPU utilization in CloudWatch
B.Enable SageMaker Model Monitor
C.Use SageMaker Debugger to profile the training job
D.Increase the instance type to a larger one
AnswerC

Debugger can capture detailed metrics like data loading time.

Why this answer

SageMaker Debugger can profile the training job and identify bottlenecks. Option A may add overhead. Option B is not detailed.

Option D is for inference.

470
Multi-Selecteasy

Which TWO techniques are used for feature scaling? (Choose 2.)

Select 2 answers
A.One-hot encoding
B.Standardization (Z-score normalization)
C.Min-Max scaling
D.Principal Component Analysis (PCA)
E.Label encoding
AnswersB, C

Standardization scales features to have mean 0 and variance 1.

Why this answer

Standardization (Z-score normalization) is a feature scaling technique that transforms data to have a mean of 0 and a standard deviation of 1, using the formula z = (x - μ) / σ. This is essential for algorithms like SVM, k-means, and PCA that assume normally distributed features and are sensitive to feature magnitudes.

Exam trap

The MLS-C01 exam often tests the distinction between feature scaling techniques (which transform numerical feature values) and encoding or dimensionality reduction techniques, leading candidates to mistakenly select one-hot encoding or PCA as scaling methods.

471
MCQhard

A data analyst is examining a dataset with a target variable that has three classes: A, B, C. They plot the distribution of a feature 'X' for each class and notice that for classes A and B, the distributions are bimodal, while for class C it is unimodal. They want to assess whether feature 'X' is useful for separating the classes. Which of the following metrics should they compute to quantify the separability?

A.ANOVA F-statistic between feature X and the target.
B.Variance ratio (between-group variance / within-group variance).
C.Chi-square test of independence.
D.Mutual information between X and the target.
AnswerA

Correct. The ANOVA F-statistic tests whether the means of feature X differ significantly across classes A, B, and C, which is a direct measure of separability.

Why this answer

The ANOVA F-statistic measures the ratio of between-group variance to within-group variance, directly quantifying separability. Option B is wrong because 'variance ratio' is not the standard name; the correct metric is the F-statistic. Option C is wrong because the chi-square test is for categorical features, not continuous ones like feature X.

Option D is wrong because mutual information measures dependency but does not specifically test separability in terms of variance between groups.

472
MCQeasy

A company is using Amazon SageMaker to deploy a model for real-time inference. The model receives requests with varying payload sizes. The company observes occasional latency spikes. Which feature can help mitigate this?

A.Multi-model endpoints
B.Amazon Elastic Inference
C.Automatic scaling
D.Amazon SageMaker Inference Recommender
AnswerD

Inference Recommender runs benchmarks to recommend optimal instance and endpoint configuration.

Why this answer

SageMaker Inference Recommender provides load testing and recommendations for instance type and endpoint configuration. It can help identify optimal settings to reduce latency spikes. Multi-model endpoints are for hosting multiple models, not directly for latency spikes.

Elastic Inference is for accelerating deep learning inference, not general latency. Automatic scaling adjusts capacity but not per-request latency.

473
MCQhard

A company is using Amazon SageMaker to train and deploy a fraud detection model. The model is a gradient boosting machine (GBM) trained on a dataset with 10 million rows and 50 features. The training job runs on an ml.m5.2xlarge instance with 8 vCPUs and 32 GB memory. The training completes successfully, and the model is deployed to a real-time endpoint. After deployment, the inference latency is around 200 ms per request, which is acceptable. However, after a week, the company observes that latency increases to over 1 second during peak hours (12:00-13:00 UTC). CloudWatch metrics show CPU utilization on the endpoint instance reaches 95% during these peaks. The endpoint is configured with a single ml.m5.large instance. The company wants to maintain latency under 500 ms during peak hours without incurring unnecessary cost during off-peak hours. Which solution should the company implement?

A.Reduce the number of instances to zero during off-peak hours and manually launch a new endpoint every day at 12:00
B.Switch to SageMaker Batch Transform and have the application send requests in batches
C.Configure SageMaker endpoint auto scaling with a target CPU utilization of 70% and a minimum instance count of 1
D.Replace the endpoint instance type with ml.m5.4xlarge to handle peak load
AnswerC

Auto scaling dynamically adjusts instance count to handle load, keeping latency low and cost efficient.

Why this answer

Configuring auto scaling based on CPU utilization dynamically adds instances during peak hours (when CPU exceeds target) and removes them during off-peak, maintaining latency under 500 ms while minimizing cost. Option A is incorrect because reducing instances to zero and manually launching a new endpoint is not automated, causes downtime, and is impractical. Option B is incorrect because Batch Transform is designed for offline, batch inference, not for real-time requests.

Option D is incorrect because replacing the instance with a larger, always-on type (ml.m5.4xlarge) would handle peak load but incur higher cost during off-peak hours, unlike auto scaling which scales in.

474
MCQeasy

A data scientist is exploring a dataset with 10 features and observes that the correlation between feature A and feature B is 0.98. Which action should be taken to address multicollinearity before training a linear regression model?

A.Use Principal Component Analysis (PCA) to combine them.
B.Apply Min-Max scaling to both features.
C.Remove one of the two features from the dataset.
D.Add polynomial features to both.
AnswerC

Dropping one of the highly correlated features removes redundancy and mitigates multicollinearity, which is a simple and effective solution.

Why this answer

Dropping one of the highly correlated features reduces redundancy and mitigates multicollinearity. Option A (PCA) creates orthogonal components, which addresses multicollinearity but reduces interpretability; dropping a feature is more straightforward. Option B (Min-Max scaling) does not address collinearity at all.

Option D is wrong because adding polynomial features increases correlation.

475
Multi-Selecthard

Which TWO statements about handling missing data during exploratory data analysis are correct? (Select TWO.)

Select 2 answers
A.Missing values can be ignored during EDA and handled during model training.
B.Visualizing the pattern of missingness can help determine if data is missing at random.
C.Understanding the missing data mechanism (MCAR, MAR, MNAR) is important for choosing an imputation strategy.
D.Listwise deletion (removing rows with missing values) is always safe and unbiased.
E.Imputing missing values with the mean preserves the original variance.
AnswersB, C

Missingness patterns inform assumptions about missing data mechanisms.

Why this answer

Options B and C are correct. Visualizing the pattern of missingness helps determine if data is missing at random, which is a key EDA step. Understanding the missing data mechanism (MCAR, MAR, MNAR) is important for selecting an appropriate imputation strategy.

Option A is incorrect because missing values should be addressed during EDA, not deferred to model training. Option D is incorrect because listwise deletion can introduce bias if data is not MCAR. Option E is incorrect because mean imputation reduces the variance of the imputed variable.

476
MCQhard

A company is using SageMaker to train a large NLP model. The training job is taking too long due to high I/O wait time. The data is stored as CSV files in S3. Which optimization should the company implement to reduce I/O wait time?

A.Convert CSV files to RecordIO format
B.Use SageMaker Pipe mode to stream data directly from S3
C.Use SageMaker batch transform before training
D.Use SageMaker File mode with larger instance storage
E.Use SageMaker ShardedByS3Key data distribution
AnswerB

Pipe mode avoids disk I/O by streaming data.

Why this answer

SageMaker Pipe mode streams data directly from S3 into the training algorithm without first writing it to the local disk, eliminating the I/O wait time caused by downloading and decompressing CSV files. This is the most effective optimization for high I/O wait during training because it bypasses the bottleneck of writing large datasets to the instance's local storage.

Exam trap

The trap here is that candidates often confuse data format optimizations (like RecordIO) or distribution strategies (like ShardedByS3Key) with the fundamental I/O bottleneck caused by downloading data to disk, leading them to overlook Pipe mode's direct streaming approach.

How to eliminate wrong answers

Option A is wrong because converting CSV to RecordIO format can improve throughput for certain frameworks (e.g., MXNet) but does not address the root cause of high I/O wait time from disk writes; it still requires downloading the data to local storage. Option C is wrong because SageMaker batch transform is used for inference on large datasets, not for training optimization, and does not reduce I/O wait during training. Option D is wrong because SageMaker File mode (the default) downloads the entire dataset to the instance's local disk before training starts, which is the very behavior causing high I/O wait; larger instance storage would not reduce the wait time.

Option E is wrong because ShardedByS3Key is a data distribution strategy for distributed training (splitting data across instances), not a mechanism to reduce I/O wait time on a single instance.

477
MCQhard

A research lab is training a large language model (LLM) on SageMaker using PyTorch. The model has 1 billion parameters and does not fit on a single GPU. They have access to a cluster of 16 p4d.24xlarge instances (each with 8 A100 GPUs). They need to train the model with minimal changes to the training script. Which SageMaker feature should they use?

A.SageMaker's model parallelism with automatic partitioning
B.SageMaker's distributed data parallelism with Horovod
C.Use SageMaker's built-in BlazingText algorithm
D.SageMaker's managed spot training with checkpointing
AnswerA

Model parallelism splits the model across GPUs, and SageMaker's library automates this.

Why this answer

SageMaker's model parallelism is designed for large models that don't fit on a single device.

478
MCQmedium

A data scientist is using Amazon SageMaker Autopilot to automatically build a binary classification model. After the Autopilot job completes, the best model has an accuracy of 0.85 on the validation set. However, the data scientist notices a class imbalance (90% negative, 10% positive). Which metric should the data scientist use to evaluate the model's performance on the positive class?

A.Area Under the ROC Curve (AUC)
B.Recall
C.Accuracy
D.Precision
AnswerA

AUC is robust to class imbalance and evaluates overall ranking performance.

Why this answer

A is correct because Area Under the ROC Curve (AUC) is threshold-independent and evaluates the model's ability to distinguish between positive and negative classes across all classification thresholds. In the presence of severe class imbalance (90% negative, 10% positive), AUC provides a robust measure of model performance on the positive class without being skewed by the majority class, unlike accuracy which would be high even if the model predicts all negatives.

Exam trap

The trap here is that candidates often default to accuracy as the primary metric, failing to recognize that class imbalance renders accuracy misleading, and they overlook AUC's threshold-agnostic property which is specifically designed for evaluating model performance on the minority class in imbalanced datasets.

How to eliminate wrong answers

Option B (Recall) is wrong because recall only measures the proportion of actual positives correctly identified, but it ignores false positives and does not account for the model's performance across different thresholds; it can be misleadingly high if the model predicts positive too often. Option C (Accuracy) is wrong because with 90% negative class, a model that predicts all negatives achieves 90% accuracy, masking poor performance on the positive class; accuracy is not suitable for imbalanced datasets. Option D (Precision) is wrong because precision focuses on the proportion of positive predictions that are correct, but it does not consider false negatives and is highly sensitive to the decision threshold; it does not provide a holistic view of model discrimination ability.

479
MCQeasy

A data scientist wants to identify outliers in a dataset with 1,000 samples and 5 numerical features. Which technique is most appropriate for univariate outlier detection?

A.Principal component analysis (PCA)
B.Interquartile range (IQR) method
C.Mahalanobis distance
D.Z-score with a threshold of 3
AnswerB

IQR is robust and suitable for univariate outlier detection.

Why this answer

The IQR method, where outliers are defined as points below Q1 - 1.5*IQR or above Q3 + 1.5*IQR, is appropriate for univariate outlier detection as it does not assume a specific distribution and is robust to extreme values. PCA (A) is a dimensionality reduction technique, not for outlier detection. Mahalanobis distance (C) is for multivariate outliers.

Z-score with threshold 3 (D) assumes normality and is sensitive to extreme outliers.

480
MCQeasy

A company uses Amazon SageMaker to host a model for real-time predictions. The model endpoint is experiencing high latency during peak hours. The data scientist wants to reduce latency without increasing cost. Which action should they take?

A.Enable data capture for the endpoint to log requests
B.Switch to a larger instance type
C.Reduce the number of instances behind the endpoint
D.Enable auto-scaling for the endpoint based on latency metrics
AnswerD

Auto-scaling adjusts capacity to demand, maintaining low latency without over-provisioning.

Why this answer

Using SageMaker's production variants with auto-scaling can help handle traffic spikes without over-provisioning, thus managing latency and cost. Switching to a larger instance would increase cost. Reducing the number of instances would increase latency.

Enabling data capture adds overhead and increases latency.

481
Multi-Selecteasy

Which TWO of the following are common techniques to handle missing values in a dataset?

Select 2 answers
A.Standardization
B.Principal Component Analysis (PCA)
C.One-hot encoding
D.Remove rows with missing values
E.Imputation with mean or median
AnswersD, E

Removing rows is a simple approach.

Why this answer

Options D and E are correct. D is correct because removing rows with missing values (listwise deletion) is a common approach when missing data is random and not extensive. E is correct because imputation with mean or median fills missing values with central tendency measures, preserving data size.

A (standardization) is a scaling technique, not for missing values. B (PCA) is a dimensionality reduction method. C (one-hot encoding) is for converting categorical variables into numerical format, not for handling missing values.

482
Multi-Selectmedium

An ML team is deploying a model for real-time inference. They require A/B testing to compare a new model against the existing one. Which THREE steps should they take to set up this test?

Select 3 answers
A.Set up a second production variant for the existing model
B.Set up a SageMaker Batch Transform job for each model
C.Configure CloudWatch alarms to trigger variant switching
D.Configure the endpoint to route a percentage of traffic to each variant
E.Create a SageMaker production variant for the new model
AnswersA, D, E

Both models must be variants to split traffic.

Why this answer

To perform A/B testing with SageMaker, you must create a second production variant for the existing model so that both the old and new models are deployed as separate variants under the same endpoint. This allows the endpoint to serve both models simultaneously and compare their performance.

Exam trap

The trap here is that candidates confuse batch inference (Batch Transform) with real-time inference (endpoint variants), or mistakenly think CloudWatch alarms can directly control traffic routing, when in fact traffic weights are set manually or via SDK/CLI updates.

483
MCQhard

A team is using SageMaker to train a custom PyTorch model on a large dataset (10 TB) stored in S3. The training job is repeatedly failing due to 'OutOfMemory' errors on the GPU. The team is using a single ml.p3.8xlarge instance. Which change is most likely to resolve the issue?

A.Change the instance type to ml.p3.16xlarge (more GPUs)
B.Use managed spot training to reduce cost
C.Reduce the batch size in the training script
D.Switch the input mode from Pipe to File
AnswerC

Reducing batch size decreases GPU memory usage per step, resolving OOM errors.

Why this answer

The 'OutOfMemory' error on the GPU indicates that the model and its associated data exceed the available GPU memory. Reducing the batch size directly decreases the memory footprint per training step, allowing the model to fit within the GPU's memory limits. This is the most direct and effective fix for GPU OOM errors, as it reduces the amount of data processed simultaneously without changing the instance type or input mode.

Exam trap

The MLS-C01 exam often tests the misconception that adding more GPUs (Option A) solves per-GPU memory issues, but the OOM error is per-device and requires reducing per-device memory usage, not increasing the number of devices.

How to eliminate wrong answers

Option A is wrong because switching to ml.p3.16xlarge adds more GPUs but does not increase the memory per GPU (each GPU still has 16 GB); the OOM error occurs on a single GPU, so more GPUs won't resolve the per-GPU memory exhaustion. Option B is wrong because managed spot training reduces cost but does not affect GPU memory usage; it could even cause interruptions that complicate debugging. Option D is wrong because switching from Pipe to File input mode changes how data is streamed (Pipe streams directly from S3, File downloads to local storage) but does not reduce the memory consumed by batches during training; in fact, File mode may increase local disk usage but not GPU memory.

484
MCQmedium

A data analyst is using Amazon Athena to query a partitioned dataset in S3. They notice that queries are scanning more data than expected. Which step should they take during exploratory data analysis to optimize query performance?

A.Convert the data to Parquet format.
B.Use S3 Select to filter data before querying.
C.Increase the number of workers in Athena.
D.Check the partition metadata to ensure queries are pruning partitions.
AnswerD

Verifying partition structure ensures efficient partition pruning.

Why this answer

Checking partition metadata (e.g., using SHOW PARTITIONS or querying information_schema) ensures that queries are applying partition pruning, which reduces the amount of data scanned. Option A is incorrect: converting to Parquet improves columnar scan efficiency but does not directly address partition misuse. Option B is incorrect: S3 Select filters data at the object level, but Athena already pushes down filters; this does not fix a lack of partition pruning.

Option C is incorrect: increasing workers improves parallelism but does not reduce scanned data if partitions are not pruned.

485
Multi-Selecthard

A company is using Amazon SageMaker to train a machine learning model. The training job is configured to use the File mode to download data from S3 to the training instances. The training data is stored in a single S3 bucket with multiple prefixes. Which TWO actions are required to ensure the training job can access the data? (Choose TWO.)

Select 2 answers
A.Grant the SageMaker execution role s3:GetObject permission for the data bucket.
B.Configure the training job to use Pipe mode.
C.Specify the S3 data channel with the correct prefix.
D.Concatenate all data files into a single file.
E.Convert the data to RecordIO-protobuf format.
AnswersA, C

Needed to read objects.

Why this answer

Options A and C are correct. Option A: The SageMaker execution role must have the s3:GetObject permission for the data bucket to read the training data. Option C: When using File mode, the training job must specify the S3 data channel with the correct prefix to indicate the location of the data.

Option B is incorrect because Pipe mode is not required for File mode. Option D is incorrect because concatenating all data into a single file is unnecessary for File mode. Option E is incorrect because File mode does not require RecordIO-protobuf format.

486
Multi-Selecthard

A data scientist is performing EDA on a dataset stored in Amazon S3 using Amazon Athena. The dataset is partitioned by date, and each partition contains CSV files. The data scientist notices that some queries return zero rows for partitions that should have data. Which THREE steps should the data scientist take to troubleshoot? (Choose 3.)

Select 3 answers
A.Verify that the CSV files exist in the S3 bucket for the specific partition.
B.Run MSCK REPAIR TABLE to add new partitions to the Glue Data Catalog.
C.Convert the CSV files to Parquet format.
D.Check the data types of the columns used in the query's WHERE clause.
E.Re-run the query with a LIMIT clause to force partition discovery.
AnswersA, B, D

Files may have been moved or deleted.

Why this answer

Verifying that the CSV files actually exist in the S3 bucket for the specific partition confirms whether data is present. Option B is correct because MSCK REPAIR TABLE adds new partitions to the Glue Data Catalog that may not have been registered automatically. Option D is correct because incorrect data types in the query's WHERE clause can cause filters to exclude rows, resulting in zero returned rows.

Option C is incorrect because converting to Parquet is not a troubleshooting step for this issue—it is an optimization. Option E is incorrect because adding a LIMIT clause does not force partition discovery; it only limits the number of rows returned.

487
MCQmedium

A company is using Amazon Kinesis Data Streams to ingest real-time clickstream data. The data is consumed by a Lambda function that writes to an S3 bucket. Recently, the Lambda function started failing with 'ProvisionedThroughputExceededException' errors. What is the MOST likely cause?

A.The data retention period of the stream is too short.
B.The S3 bucket has insufficient write capacity.
C.The Kinesis stream has too few shards for the data volume.
D.The Lambda function's reserved concurrency is set too high.
AnswerC

Insufficient shards cause ProvisionedThroughputExceededException.

Why this answer

The 'ProvisionedThroughputExceededException' error in Amazon Kinesis Data Streams indicates that the data ingestion rate exceeds the write capacity of the stream's shards. Each shard supports up to 1 MB/s or 1,000 records/s for writes. If the clickstream data volume surpasses this limit, the Lambda function, which reads from the stream, will encounter this exception.

Increasing the number of shards scales the write capacity to match the data volume.

Exam trap

The trap here is that candidates confuse Kinesis throughput limits with Lambda concurrency or S3 capacity, but the specific exception name 'ProvisionedThroughputExceededException' is a direct indicator of insufficient shard write capacity in Kinesis.

How to eliminate wrong answers

Option A is wrong because the data retention period (default 24 hours, up to 365 days) controls how long records are stored, not the write throughput; a short retention period would cause data loss, not throughput errors. Option B is wrong because S3 buckets have virtually unlimited write capacity (thousands of PUT requests per second per prefix) and do not produce 'ProvisionedThroughputExceededException' errors, which are specific to Kinesis. Option D is wrong because setting reserved concurrency too high for the Lambda function would not cause a Kinesis throughput error; it might lead to throttling of the Lambda itself, but the exception originates from the Kinesis stream's shard limits.

488
Multi-Selecthard

Which THREE are valid considerations when deploying a large deep learning model (10 GB) on a SageMaker endpoint? (Choose 3.)

Select 3 answers
A.Enable SageMaker Data Compression for network transfer.
B.Use GPU instances (e.g., p3, inf1) for faster inference.
C.Use SageMaker Multi-Model Endpoints to serve multiple models.
D.Use SageMaker Serverless Inference to avoid managing instances.
E.Attach Elastic Inference accelerators.
AnswersA, B, C

Compression reduces data transfer time.

Why this answer

SageMaker Data Compression uses HTTP compression (e.g., gzip) to reduce the payload size during network transfer between the client and endpoint, which is critical for a 10 GB model to minimize latency and bandwidth consumption. This is especially beneficial when the model is large and inference requests involve substantial input or output data.

Exam trap

The trap here is that candidates may assume Serverless Inference or Elastic Inference can handle any model size, but both have hard limits (1 GB for Elastic Inference, 1 GB model size and 6 MB payload for Serverless) that make them invalid for a 10 GB model.

489
MCQmedium

A data scientist is training a binary classification model on a dataset with 100 features and 10,000 rows. The model overfits significantly: training accuracy is 99%, but validation accuracy is 80%. The data scientist has tried L1 and L2 regularization without improvement. The dataset is clean and representative. Which approach is MOST likely to reduce overfitting? A. Increase the number of training epochs. B. Add more training data by generating synthetic samples using SMOTE. C. Reduce the number of features using PCA. D. Use a simpler model like logistic regression instead of a decision tree ensemble. The data scientist needs to maintain a validation accuracy above 85%, but the current model is too complex. The company has limited budget for data labeling. Which option is BEST?

A.Use a simpler model like logistic regression
B.Add more training data by generating synthetic samples using SMOTE
C.Reduce the number of features using PCA
D.Increase the number of training epochs
AnswerA

Simpler model reduces capacity and overfitting.

Why this answer

The current model (likely a decision tree ensemble like Random Forest or XGBoost) is too complex for the dataset, causing overfitting. Switching to a simpler model like logistic regression reduces variance by limiting the hypothesis space, which directly addresses overfitting without requiring additional data or feature engineering. Given the limited labeling budget, this approach is cost-effective and can improve generalization, potentially achieving the required >85% validation accuracy.

Exam trap

The trap here is that candidates often assume more data (SMOTE) or dimensionality reduction (PCA) will always reduce overfitting, but in this scenario the core issue is model complexity, not data quantity or feature noise.

How to eliminate wrong answers

Option B is wrong because SMOTE generates synthetic samples by interpolating between existing minority class instances, which does not add new independent information; it can exacerbate overfitting by creating artificial patterns that the model already memorizes. Option C is wrong because PCA reduces dimensionality by projecting features onto principal components, but it is unsupervised and may discard features that are discriminative for the binary classification task, potentially harming validation accuracy. Option D is wrong because increasing the number of training epochs allows the model to further minimize training loss, which worsens overfitting by making the model memorize noise rather than generalize.

490
Multi-Selecthard

A company is deploying a real-time inference endpoint with SageMaker. The model is a large neural network that requires GPU acceleration. Which TWO configurations must be set?

Select 2 answers
A.Instance type with GPU
B.Create a SageMaker model with the inference code and model artifacts
C.Batch transform job
D.Production variant
E.Training container image
AnswersA, B

Required for GPU inference.

Why this answer

Deploying a real-time inference endpoint with a large neural network that requires GPU acceleration necessitates selecting an instance type with a GPU, such as the ml.p3 or ml.g4dn series, to provide the parallel processing power needed for low-latency inference. Without a GPU instance, the model would fall back to CPU, leading to unacceptable inference times for large neural networks.

Exam trap

The trap here is that candidates often confuse the required configurations for deploying a real-time endpoint with those for training or batch processing, mistakenly selecting Batch Transform or Training Container Image instead of recognizing that the instance type with GPU and the SageMaker model definition are the two essential components.

491
MCQhard

A media company uses Amazon SageMaker to train a deep learning model for video classification. The training job uses a single ml.p3.2xlarge instance and processes 50 GB of labeled video data stored in Amazon S3. The training completes successfully in 12 hours. However, the data scientists report that the model’s accuracy is lower than expected. They suspect the training data contains labeling errors. To improve model accuracy without incurring significant additional cost, they want to identify and remove mislabeled training examples before retraining. They have a small budget of $50 and need to complete the analysis within 2 hours. Which approach should the data scientists take?

A.Use SageMaker Ground Truth to create a new labeling job for the entire dataset, then compare the new labels with the original labels to identify discrepancies.
B.Use SageMaker Clarify to generate a bias report for the training data and remove instances that contribute to bias.
C.Train a small, fast model on a random sample of the data (e.g., 1 GB) using a cheaper instance like ml.m5.xlarge, then use the model's prediction confidence to flag low-confidence examples as potential mislabels for manual review.
D.Manually review all 50 GB of video data to correct labels.
AnswerC

This approach is cost-effective (within $50) and fast (under 2 hours). The small model can identify likely mislabeled examples by low confidence, allowing targeted manual review.

Why this answer

Training a small, fast model on a 1 GB random sample using a cheaper instance (ml.m5.xlarge) allows the team to quickly identify low-confidence predictions, which are strong indicators of mislabeled examples. This approach fits within the $50 budget and 2-hour time constraint, as it avoids processing the full 50 GB dataset and leverages a lightweight model for rapid iteration. By flagging only suspicious samples for manual review, the team can efficiently clean the training data without incurring the cost of re-labeling the entire dataset.

Exam trap

The trap here is that candidates may choose SageMaker Ground Truth (Option A) assuming it is the standard tool for label correction, but they overlook the strict budget and time constraints that make it infeasible for the full dataset.

How to eliminate wrong answers

Option A is wrong because using SageMaker Ground Truth to create a new labeling job for the entire 50 GB dataset would exceed the $50 budget and 2-hour time limit, as labeling large video datasets is expensive and time-consuming. Option B is wrong because SageMaker Clarify is designed for detecting bias in data and models, not for identifying individual mislabeled examples; it generates bias reports but cannot pinpoint which specific labels are erroneous. Option D is wrong because manually reviewing all 50 GB of video data is impractical within the 2-hour window and would far exceed the $50 budget, requiring significant human effort and cost.

492
MCQhard

A data scientist is using Amazon SageMaker to train a model with a large dataset that does not fit into memory on a single instance. The training algorithm supports distributed training. Which approach should the scientist use to train the model efficiently?

A.Use SageMaker File mode and increase the instance volume size
B.Use Amazon EMR to preprocess data and then train on a smaller sample
C.Split the data into smaller files and use multiple training jobs sequentially
D.Use SageMaker Pipe mode to stream data directly from S3
AnswerD

Pipe mode allows the algorithm to read data on the fly, handling large datasets.

Why this answer

SageMaker Pipe mode streams data from S3 directly to the training algorithm without writing to disk, enabling processing of large datasets beyond memory.

493
Multi-Selecthard

A company is deploying a machine learning model to a SageMaker endpoint and wants to ensure that the endpoint is resilient to instance failures. Which THREE steps should the company take to achieve high availability? (Choose THREE.)

Select 3 answers
A.Deploy the endpoint in a VPC with subnets in at least two Availability Zones.
B.Use a single instance type with the largest size to handle capacity.
C.Configure the endpoint with an initial instance count of at least 2.
D.Use a single Availability Zone for simplicity.
E.Enable auto-scaling to automatically replace unhealthy instances.
AnswersA, C, E

Provides AZ redundancy.

Why this answer

Deploying the endpoint in a VPC with subnets in at least two Availability Zones ensures that if one Availability Zone fails, the endpoint can still serve traffic from the other zone. SageMaker endpoints distribute instances across the specified subnets, so multi-AZ deployment provides fault isolation and high availability at the infrastructure level.

Exam trap

The trap here is that candidates often think a single large instance or a single Availability Zone is sufficient for high availability, but AWS's shared responsibility model requires you to architect for failure across multiple AZs and use auto-scaling to replace unhealthy instances automatically.

494
MCQeasy

In exploratory data analysis, a data scientist notices that the distribution of a continuous variable is bimodal. The scientist suspects that the two modes correspond to two different groups in the data. Which visualization is MOST appropriate to confirm this suspicion?

A.Box plot
B.Bar chart
C.Histogram with overlaid densities by group
D.Scatter plot
AnswerC

Overlaying densities by group allows visual comparison of the two modes.

Why this answer

The most appropriate because a histogram with overlaid densities, colored by group, directly shows the distribution of each group and can reveal whether the two modes correspond to different groups. Option A (box plot) displays summary statistics but not the shape or modality. Option B (bar chart) is for categorical data, not continuous.

Option D (scatter plot) is for two continuous variables, not for examining a single distribution.

495
MCQhard

A company is deploying a real-time fraud detection system using a gradient boosting model on AWS SageMaker. The model uses 200 features and is trained on 50 GB of data. The inference latency requirement is under 10 ms per request. During load testing, the endpoint shows average latency of 15 ms. Which change is MOST likely to reduce latency below 10 ms?

A.Switch to a GPU-based instance type
B.Reduce the number of features to the top 50 based on feature importance
C.Increase the number of trees in the model
D.Use a larger batch size for inference
AnswerB

Fewer features reduce inference computation time, directly lowering latency.

Why this answer

Reducing the number of features from 200 to the top 50 directly decreases the amount of data each inference request must process, which lowers both feature engineering overhead and model evaluation time. For gradient boosting models on SageMaker, fewer features mean fewer decision tree splits to traverse per prediction, which can significantly reduce latency without requiring hardware changes. This is the most direct and cost-effective way to meet the 10 ms requirement.

Exam trap

The trap here is that candidates often assume GPU instances universally speed up inference, but for tree-based models like gradient boosting, the bottleneck is sequential tree traversal, not parallel computation, so feature reduction is the correct optimization.

How to eliminate wrong answers

Option A is wrong because switching to a GPU-based instance type does not inherently reduce latency for gradient boosting models; GPUs excel at parallel matrix operations (e.g., deep learning) but offer minimal benefit for tree-based models where inference is sequential and CPU-bound. Option C is wrong because increasing the number of trees in the model increases the ensemble size, requiring more sequential evaluations per prediction, which would increase latency, not reduce it. Option D is wrong because using a larger batch size for inference increases throughput (requests per second) but does not reduce per-request latency; in fact, it can increase latency for individual requests due to queuing and processing delays.

496
Multi-Selecthard

A data scientist is using Amazon SageMaker to train a model using a custom Docker container. The training job fails with an error message indicating that the container exited with a non-zero code. Which THREE steps should the data scientist take to diagnose the issue? (Choose THREE.)

Select 3 answers
A.Retry the training job with the same configuration; the error might be transient.
B.Use the SageMaker Debugger to capture system metrics and output tensors for analysis.
C.Check the CloudWatch Logs for the training job to see the container's stdout and stderr.
D.Increase the number of training instances to distribute the workload.
E.Run the container locally using SageMaker Local Mode to simulate the training environment.
AnswersB, C, E

Debugger can capture detailed metrics that help identify why the container exited.

Why this answer

SageMaker Debugger can capture system metrics (e.g., CPU/GPU utilization, memory) and output tensors during training, which helps identify issues like resource exhaustion or problematic gradients that cause non-zero exit codes. It provides deep visibility into the training process without requiring code changes, making it a powerful diagnostic tool for custom container failures.

Exam trap

The trap here is that candidates may think retrying the job (Option A) is a valid first step for transient errors, but the MLS-C01 exam emphasizes systematic debugging using tools like CloudWatch Logs and SageMaker Debugger rather than guesswork.

497
MCQeasy

A data scientist is trying to create a SageMaker training job using an execution role with the attached IAM policy. The training job fails with an access denied error when trying to read training data from the S3 bucket 'my-bucket'. What is the most likely cause?

A.The S3 bucket policy explicitly denies access to the role.
B.The IAM policy does not include s3:ListBucket permission.
C.The S3 bucket is in a different AWS account.
D.The sagemaker:CreateTrainingJob action is not allowed.
AnswerA

Even if IAM allows, bucket policy can deny.

Why this answer

The most likely cause is that the S3 bucket policy explicitly denies access to the SageMaker execution role. Even if the IAM policy grants the necessary permissions, an explicit deny in the bucket policy overrides any allow, resulting in an access denied error when the training job attempts to read training data from the S3 bucket.

Exam trap

The trap here is that candidates often assume the IAM policy is insufficient (e.g., missing ListBucket) or that cross-account issues are the cause, but the most likely cause is an explicit deny in the bucket policy, which is a classic AWS IAM evaluation logic trick.

How to eliminate wrong answers

Option B is wrong because the s3:ListBucket permission is not required to read objects from S3; the s3:GetObject permission is sufficient for reading training data, and the error is about reading data, not listing. Option C is wrong because if the bucket is in a different AWS account, the error would typically be an access denied due to cross-account permissions, but the question does not indicate cross-account access, and the most likely cause is an explicit deny in the bucket policy. Option D is wrong because the error occurs when reading training data from S3, not when creating the training job; the sagemaker:CreateTrainingJob action is likely allowed since the training job was created but failed during data access.

498
Multi-Selectmedium

Which THREE of the following are appropriate data visualization techniques for exploring the relationship between two numerical variables?

Select 3 answers
A.Scatter plot
B.Hexbin plot
C.Box plot
D.Bar chart
E.Pair plot
AnswersA, B, E

Scatter plots directly show the relationship between two numerical variables.

Why this answer

Scatter plot, hexbin plot, and pair plot are designed for bivariate numerical relationships. Bar chart is for categorical. Box plot is for numerical vs categorical.

499
MCQeasy

During exploratory data analysis, a data scientist notices that the target variable is highly imbalanced. Which technique should be used to address this issue before training a classification model?

A.Apply PCA to reduce dimensionality
B.Remove outliers from the majority class
C.Use cross-validation to evaluate the model
D.Apply feature scaling to all features
E.Use SMOTE to generate synthetic samples for the minority class
AnswerE

SMOTE is a standard technique for imbalanced classification.

Why this answer

SMOTE (Synthetic Minority Over-sampling Technique) is a popular method for handling imbalanced datasets by generating synthetic samples for the minority class. Option A (PCA) is wrong because dimensionality reduction does not address class imbalance. Option B (removing outliers) is wrong because it may worsen imbalance and is not a standard technique for imbalance.

Option C (cross-validation) is a model evaluation technique, not a solution for imbalance. Option D (feature scaling) does not affect class distribution.

500
MCQhard

A machine learning engineer is deploying a model on Amazon SageMaker that was trained using a custom Docker container. The container is stored in Amazon ECR. The engineer creates a SageMaker model and endpoint configuration, but when creating the endpoint, it fails with an error: 'Could not find the inference code at the expected path.' The engineer verified that the container image is correct and the model artifacts are in S3. What is the most likely cause?

A.The container is not compatible with the SageMaker inference environment.
B.The SageMaker execution role does not have ECR pull permissions.
C.The model artifacts are not in the correct format.
D.The inference code is not placed in the /opt/ml/model directory inside the container.
AnswerD

SageMaker expects code in /opt/ml/model for custom containers.

Why this answer

The error 'Could not find the inference code at the expected path' indicates that SageMaker cannot locate the inference script (e.g., serve.py, inference.py) inside the container. SageMaker expects the inference code to be placed in the /opt/ml/model/ directory within the container. Option D correctly identifies that the inference code is not placed in /opt/ml/model.

Option A is incorrect because container compatibility would cause a different error (e.g., unsupported base image). Option B is incorrect because ECR pull permissions typically result in an 'Unauthorized' error when pulling the image. Option C is incorrect because model artifacts being in the wrong format would cause loading errors, not inference code path errors.

501
MCQhard

A data engineer is preparing a dataset for training a binary classification model. The target variable is highly imbalanced (95% negative, 5% positive). The engineer needs to split the data into training and test sets while maintaining the class distribution in both sets. Which method should the engineer use?

A.Use k-fold cross-validation and then split the data
B.Oversample the minority class first, then do a random split
C.Perform a simple random 80/20 split
D.Use stratified random sampling to split the data
AnswerD

Stratified split preserves class proportions in each subset.

Why this answer

Stratified random sampling ensures the proportion of classes is preserved in both training and test sets. Option A is wrong because k-fold cross-validation is a model evaluation technique, not a method for splitting data into training and test sets; using it before splitting would not guarantee class balance. Option B is wrong because oversampling should be done after splitting to avoid data leakage and ensure the test set reflects the original distribution.

Option C is wrong because a simple random 80/20 split may not preserve the class distribution due to random variation, especially with imbalanced data.

502
MCQeasy

A data scientist is building a binary classifier and obtains the following confusion matrix on the test set: TP=80, FP=20, TN=70, FN=30. What is the precision?

A.0.727
B.0.8
C.0.75
D.0.762
AnswerB

Precision = TP/(TP+FP) = 80/100 = 0.8.

Why this answer

Precision = TP / (TP+FP) = 80/(80+20)=0.8. Recall = TP/(TP+FN)=80/110≈0.727. Accuracy = (80+70)/200=0.75.

F1 = 2*(0.8*0.727)/(0.8+0.727)≈0.762.

503
MCQeasy

An AWS Glue job is failing with an error that it cannot access an S3 bucket. The IAM role attached to the Glue job is shown in the exhibit. What is the MOST likely cause of the failure?

A.The S3 bucket has a bucket policy that denies access to this role
B.The role lacks S3 permissions
C.The role does not have permission to call S3 APIs
D.The trust policy does not allow Glue to assume the role
AnswerA

A bucket policy can override the role's permissions.

Why this answer

Even if the IAM role has S3 permissions, an S3 bucket policy that explicitly denies access to that role will override any allow. AWS evaluates all policies (identity-based and resource-based) and a deny in any policy results in a final deny decision. The error indicates the Glue job cannot access the bucket, which is consistent with a bucket-level deny.

Exam trap

The trap here is that candidates assume the IAM role's permissions are the only factor, ignoring that S3 bucket policies can independently deny access, which overrides any allow in the role's policy.

How to eliminate wrong answers

Option B is wrong because the IAM role shown in the exhibit likely includes S3 permissions (e.g., s3:GetObject, s3:PutObject) — the question states the role is attached, so lacking S3 permissions is not the most likely cause given the error. Option C is wrong because 'lacks S3 permissions' and 'does not have permission to call S3 APIs' are essentially the same misconception; the role may have API permissions but be blocked by the bucket policy. Option D is wrong because if the trust policy did not allow Glue to assume the role, the job would fail with an assume-role error, not an S3 access error.

504
MCQmedium

Refer to the exhibit. A data scientist is unable to read a CSV file from the S3 bucket 'my-bucket' using SageMaker. The IAM policy attached to the SageMaker execution role is shown. What is the most likely cause of the failure?

A.The policy does not allow the s3:GetObject action
B.The policy does not grant read access to the bucket
C.The bucket uses server-side encryption with AWS KMS (SSE-KMS) and the policy lacks kms:Decrypt permission
D.The policy does not include s3:ListBucket action
AnswerC

KMS-encrypted objects require kms:Decrypt permission.

Why this answer

The policy includes s3:GetObject and s3:ListBucket, so it allows reading objects. However, if the S3 bucket uses server-side encryption with AWS KMS (SSE-KMS), the SageMaker execution role must also have the kms:Decrypt permission to decrypt the object. Without this permission, the read operation fails even though the S3 permissions are correct.

Therefore, the most likely cause is that the bucket uses SSE-KMS and the policy lacks kms:Decrypt, making option C correct.

505
MCQhard

A company deploys a real-time inference endpoint using Amazon SageMaker with an ML model that has strict latency requirements. The endpoint currently uses a single ml.c5.xlarge instance. During a load test, the p99 latency exceeds the 100ms threshold. The team adds more instances but latency does not improve because the model is heavily CPU-bound. What is the MOST cost-effective change to meet the latency requirement?

A.Change the instance type to a GPU instance such as ml.g4dn.xlarge.
B.Use a multi-model endpoint to serve multiple models on the same instance.
C.Enable automatic scaling based on inference latency.
D.Increase the number of instances and use a target tracking scaling policy.
AnswerA

GPU instances accelerate model inference, reducing per-request latency.

Why this answer

The model is CPU-bound, meaning the bottleneck is compute capacity, not throughput. GPU instances like ml.g4dn.xlarge offload parallel computation from the CPU, significantly reducing per-inference latency. This directly addresses the root cause without over-provisioning, making it the most cost-effective solution.

Exam trap

The trap here is that candidates assume adding more instances (horizontal scaling) always reduces latency, but for CPU-bound models, the bottleneck is per-instance compute, not request queuing, so vertical scaling with GPU instances is required.

How to eliminate wrong answers

Option B is wrong because a multi-model endpoint reduces memory overhead for multiple models but does not accelerate a single CPU-bound model's inference. Option C is wrong because automatic scaling based on latency only adds more instances, which does not help when the model is CPU-bound and each instance is already saturated. Option D is wrong because increasing instances and using target tracking scaling does not resolve the CPU bottleneck; it only distributes load across more instances, each still suffering high latency.

506
Multi-Selectmedium

A data scientist is performing EDA on a dataset with 500,000 rows and 20 columns. The dataset contains missing values in some columns. Which TWO approaches are appropriate for handling missing data during EDA? (Choose 2)

Select 2 answers
A.Use forward fill to propagate the last observed value
B.Remove all rows with any missing value (listwise deletion)
C.Create an indicator column to flag whether the value was missing, then impute with a placeholder
D.Impute missing values with the mean of each column
E.Impute missing values with the median for numerical columns and mode for categorical columns
AnswersC, E

This retains the information about missingness and is a common practice.

Why this answer

Options C and E are correct. Creating an indicator column to flag missingness and then imputing with a placeholder (e.g., mean/median) is a common technique to preserve information about missing patterns. Imputing numerical columns with median and categorical with mode is robust to outliers and preserves distribution.

Option A (forward fill) is typically used for time series data, not general tabular EDA. Option B (listwise deletion) can reduce sample size and introduce bias if data is not missing completely at random. Option D (mean imputation) is sensitive to outliers and can distort variance.

507
MCQeasy

A data analyst is performing EDA on a dataset containing timestamps of user logins. They want to understand daily login patterns. The timestamp column is in Unix epoch format (integer). Which of the following is the most appropriate transformation to extract day-of-week patterns?

A.Convert the timestamps to datetime objects and extract the day-of-week.
B.Convert the timestamps to string and split into date and time.
C.Apply min-max scaling to the timestamp values.
D.Bin the timestamps into 1-hour intervals.
AnswerA

This enables grouping by day of the week to analyze patterns.

Why this answer

Converting Unix epoch timestamps to datetime objects allows extraction of the day-of-week using functions like .dt.dayofweek() in pandas. Option B is wrong because converting to string and splitting into date and time does not directly give day-of-week patterns and loses temporal properties. Option C is wrong because min-max scaling is used for normalizing numerical features, not for extracting temporal patterns.

Option D is wrong because binning into 1-hour intervals captures hourly patterns, not day-of-week patterns.

508
MCQeasy

A data analyst needs to visualize the distribution of a numerical feature in a dataset. Which AWS service can be used to create a histogram directly from data stored in S3 without writing code?

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

QuickSight provides no-code visualizations like histograms.

Why this answer

Mazon QuickSight (Option C) because it is a business intelligence (BI) service that can connect directly to data stored in Amazon S3 and create visualizations such as histograms without requiring any coding. Amazon Athena (Option A) is an interactive query service that returns raw query results, not visualizations. Amazon SageMaker Studio (Option B) is a machine learning IDE that typically requires writing code or using notebooks to generate plots.

AWS Glue (Option D) is a serverless data integration service for ETL operations, not for visualization.

509
MCQhard

A data science team at a financial services company is building a fraud detection model using a dataset of credit card transactions. The dataset contains 10 million rows and 20 features, including transaction amount, merchant category, time since last transaction, and customer ID. The target variable 'is_fraud' is highly imbalanced: only 0.1% of transactions are fraudulent. The team is performing exploratory data analysis (EDA) on a sample of 100,000 rows. They compute the correlation matrix and find that 'transaction amount' has a correlation of 0.02 with 'is_fraud'. They also plot the distribution of 'transaction amount' and see that it is heavily right-skewed with a long tail. The team wants to understand the relationship between 'transaction amount' and fraud more deeply before feature engineering. They have access to AWS SageMaker and can run processing jobs. Which course of action is most appropriate?

A.Conclude that 'transaction amount' is not predictive because the correlation is near zero
B.Train a random forest model on the sample and use feature importance to assess the predictive power of 'transaction amount'
C.Create bins for 'transaction amount' (e.g., 0-10, 10-50, 50-100, 100+) and compute the fraud rate per bin to detect any non-linear patterns
D.Apply a log transformation to 'transaction amount' to reduce skewness and re-run the correlation analysis
AnswerC

Binning and examining fraud rates per bin can reveal non-linear relationships.

Why this answer

Binning the transaction amount and computing fraud rates per bin can reveal non-linear relationships that correlation might miss. Option A is wrong because concluding non-predictiveness based solely on correlation ignores potential non-linear patterns. Option B is premature since feature importance from a random forest model is typically used after feature engineering, not during initial EDA.

Option D is a data transformation that addresses skewness but does not directly help understand the relationship with the target; it would be more appropriate as a preprocessing step.

510
MCQmedium

A data engineering team is building a real-time fraud detection system. Transactions are ingested via Amazon Kinesis Data Streams, and a machine learning model (deployed on Amazon SageMaker) scores each transaction. The team needs to store the raw transactions and the model's predictions in Amazon S3 for later analysis. Which architecture should the team use?

A.Use AWS Lambda to read from Kinesis, invoke SageMaker, and write directly to S3.
B.Use Amazon Kinesis Data Firehose with a transformation Lambda to call SageMaker.
C.Use Amazon Kinesis Data Analytics for Apache Flink to enrich records with SageMaker predictions, then output to Firehose for S3.
D.Use AWS Lambda to invoke the SageMaker endpoint for each record, then write to S3 via Firehose.
AnswerC

Flink can handle high-throughput, call SageMaker per record, and output to Firehose.

Why this answer

It uses Amazon Kinesis Data Analytics for Apache Flink to perform real-time enrichment by invoking the SageMaker endpoint for each transaction, then streams the enriched records to Kinesis Data Firehose for reliable, batched delivery to S3. This architecture handles the asynchronous nature of model inference without blocking the ingestion stream, and Firehose provides automatic retry and compression for S3 storage.

Exam trap

The trap here is that candidates often assume Lambda is the only serverless option for real-time enrichment, but the exam tests whether you understand that Kinesis Data Analytics for Apache Flink is the correct service for asynchronous, stateful enrichment before delivery to S3 via Firehose.

How to eliminate wrong answers

Option A is wrong because AWS Lambda reading directly from Kinesis and writing to S3 would require per-record Lambda invocations, leading to high latency, potential throttling, and no built-in buffering or retry mechanism for S3 writes. Option B is wrong because Kinesis Data Firehose's transformation Lambda is synchronous and cannot asynchronously invoke an external endpoint like SageMaker; it is designed for simple record transformations, not for making external HTTP calls that may time out or fail. Option D is wrong because using Lambda to invoke SageMaker and then write to S3 via Firehose adds unnecessary complexity and latency, as Firehose expects a stream of records, not individual Lambda outputs; this approach also duplicates the buffering logic that Firehose already provides.

511
MCQmedium

A data scientist is using Amazon SageMaker to train a model with a custom Docker container. The training job fails with an error: 'Container exited with code 137'. What is the most likely cause?

A.The training data was corrupted.
B.The training job exceeded the maximum runtime.
C.The Docker entrypoint script was not found.
D.The training instance ran out of memory.
AnswerD

Exit code 137 indicates OOM kill.

Why this answer

Exit code 137 (128+9) indicates the container was killed by the SIGKILL signal, which typically occurs when the Linux Out-Of-Memory (OOM) killer terminates a process that has exceeded its memory allocation. In Amazon SageMaker, training instances have finite memory, and if the training algorithm or data loading exceeds that limit, the OOM killer forcibly stops the container, resulting in exit code 137.

Exam trap

The trap here is that candidates often confuse exit code 137 with a generic 'container error' or 'runtime timeout' (option B), not realizing that 137 specifically signals a SIGKILL from the OOM killer due to memory exhaustion.

How to eliminate wrong answers

Option A is wrong because corrupted training data would typically cause a non-zero exit code like 1 or a Python traceback, not a SIGKILL (137). Option B is wrong because exceeding the maximum runtime results in exit code 143 (SIGTERM) or a timeout error, not 137. Option C is wrong because a missing entrypoint script would cause an immediate container startup failure with exit code 127 (command not found) or 126 (permission denied), not a memory-related kill signal.

512
MCQhard

A company is using Amazon Kinesis Data Analytics for Apache Flink to process real-time sensor data. The application reads from a Kinesis data stream, performs windowed aggregations, and writes results to an S3 bucket. Recently, the application has been experiencing high latency and checkpoint failures. What is the MOST likely cause?

A.The number of shards in the Kinesis stream is insufficient for the data volume
B.The S3 destination bucket is located in a different AWS Region than the Kinesis application
C.The record size in the Kinesis stream exceeds the 1 MB limit
D.The parallelism of the Flink application is set too low for the number of shards
AnswerB

Cross-region writes increase latency and can cause checkpoint timeouts.

Why this answer

The S3 destination bucket is located in a different AWS Region than the Kinesis application. Cross-region data transfer introduces network latency and increases the likelihood of checkpoint failures because Apache Flink checkpoints require writes to complete within a timeout. Option A (insufficient shards) would cause throttling (ProvisionedThroughputExceededException) but not directly checkpoint failures.

Option C (record size > 1 MB) is impossible because Kinesis Data Streams enforces a 1 MB maximum record size. Option D (low parallelism) could cause backpressure but not typically checkpoint failures unless resources are severely constrained. Therefore, the most likely cause is the cross-region S3 bucket.

513
MCQeasy

A data scientist needs to deploy a trained model to Amazon SageMaker for real-time inference. The model is stored as a .tar.gz file in Amazon S3. Which AWS service is used to create a SageMaker endpoint?

A.SageMaker Model and Endpoint Configuration
B.AWS Lambda
C.AWS CloudFormation
D.Amazon ECS
AnswerA

You create a Model, then EndpointConfig, then Endpoint.

Why this answer

To create a SageMaker endpoint, you must first create a SageMaker Model (which points to the model artifact in S3 and the inference code) and then create an Endpoint Configuration (which specifies the model variant, instance type, and initial instance count). These are done using the SageMaker Model and Endpoint Configuration services. AWS Lambda, CloudFormation, and ECS are not directly used for creating the endpoint; they could be part of deployment automation but are not required.

514
MCQmedium

A company is using SageMaker's built-in image classification algorithm to classify product images into 100 categories. The training takes 3 hours on a single p3.2xlarge instance. They need to reduce training time to under 1 hour. They have access to a cluster of 4 p3.2xlarge instances. Which approach should they take?

A.Use SageMaker's hyperparameter tuning to find faster convergence
B.Use a smaller batch size on each instance
C.Use SageMaker's managed spot training with checkpointing
D.Use SageMaker's distributed training with data parallelism using Horovod
AnswerD

Data parallelism across 4 instances can reduce training time nearly linearly.

Why this answer

SageMaker's built-in image classification algorithm supports distributed training with data parallelism using Horovod, which splits the mini-batch across multiple GPUs and synchronizes gradients via allreduce. With 4 p3.2xlarge instances (each with 1 GPU), this reduces per-iteration time proportionally, enabling the 3-hour job to complete in under 1 hour when scaling batch size and learning rate appropriately.

Exam trap

The trap here is that candidates confuse cost-saving techniques (spot training) or accuracy-tuning methods (hyperparameter tuning) with performance scaling, failing to recognize that distributed data parallelism is the only option that directly reduces training time by leveraging multiple GPUs in parallel.

How to eliminate wrong answers

Option A is wrong because hyperparameter tuning (e.g., learning rate, momentum) optimizes model accuracy, not training speed; it actually increases total wall-clock time by launching multiple training jobs. Option B is wrong because using a smaller batch size on each instance reduces GPU utilization and increases the number of iterations, making training slower, not faster. Option C is wrong because managed spot training with checkpointing reduces cost by using preemptible instances, but does not reduce training time; it may even add delays from interruptions and checkpoint restores.

515
Multi-Selecthard

Which THREE of the following are best practices for optimizing performance of Amazon EMR clusters? (Choose 3)

Select 3 answers
A.Use Spot Instances for task nodes
B.Consolidate small files into larger ones before processing
C.Use instance fleets for heterogeneous instances
D.Enable EBS optimization on EC2 instances
E.Use Spot Instances to reduce costs
AnswersB, C, D

Consolidation reduces overhead and improves performance.

Why this answer

Consolidating small files into larger ones before processing on Amazon EMR reduces the overhead of the Hadoop Distributed File System (HDFS) metadata operations. Each small file consumes a block of memory in the NameNode, and processing many small files leads to excessive task launches and I/O overhead, degrading performance. Using tools like `s3-dist-cp` to combine files into fewer, larger blocks improves throughput and reduces job execution time.

Exam trap

The trap here is that candidates confuse cost optimization strategies (like Spot Instances) with performance optimization, leading them to select options A or E even though the question explicitly asks for performance best practices.

516
MCQhard

A data scientist is performing EDA on a dataset of 1 million images stored in Amazon S3. Each image is 100x100 pixels in RGB format. The data scientist wants to compute the mean pixel value per channel across the entire dataset. Which approach is most efficient?

A.Use Amazon SageMaker Processing with a custom Python script that iterates over S3 objects and aggregates pixel values.
B.Use Amazon Athena with a SQL query on the image metadata stored in a CSV file.
C.Use AWS Glue ETL to read images and compute the mean.
D.Use a SageMaker notebook instance with a large instance type to load all images into memory and compute the mean.
AnswerA

SageMaker Processing can distribute the workload across multiple instances for efficient computation.

Why this answer

(Amazon SageMaker Processing with a custom Python script) is the most efficient because it can distribute the computation across multiple instances, processing images in parallel without loading all into memory at once. This is ideal for a large dataset of 1 million images. Option B (Athena) is designed for querying structured data, not image processing.

Option C (AWS Glue ETL) is for ETL on tabular data, not image processing. Option D (SageMaker notebook with large instance) would require loading all images into memory, which is not feasible for 1 million images.

517
MCQeasy

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

A.Increase the value of the max_depth hyperparameter.
B.Increase the value of the subsample hyperparameter to 1.0.
C.Increase the value of the lambda (L2 regularization) hyperparameter.
D.Increase the value of the num_round hyperparameter.
AnswerC

L2 regularization penalizes large coefficients, reducing model complexity and overfitting.

Why this answer

Increasing the lambda (L2 regularization) hyperparameter adds a penalty on the squared magnitude of the model weights, which discourages the model from fitting noise in the training data. This directly reduces overfitting by shrinking the influence of individual features, a standard regularization technique in XGBoost.

Exam trap

AWS exam candidates often mistakenly think that increasing any hyperparameter that adds complexity (like max_depth or num_round) can reduce overfitting, when in fact only regularization parameters or those that reduce model capacity are effective.

How to eliminate wrong answers

Option A is wrong because increasing max_depth makes trees deeper, allowing the model to capture more complex patterns and noise, which exacerbates overfitting rather than reducing it. Option B is wrong because increasing subsample to 1.0 means using 100% of the training data for each tree, removing the stochasticity that helps prevent overfitting; lower subsample values (e.g., 0.5–0.8) are typically used to introduce randomness. Option D is wrong because increasing num_round (the number of boosting rounds) allows the model to continue fitting the training data more closely, increasing the risk of overfitting; early stopping or reducing num_round is a common countermeasure.

518
Multi-Selecthard

A company is using Amazon SageMaker to build a custom model. The training job is failing with a 'ResourceLimitExceeded' error. Which TWO actions should the company take to resolve this issue?

Select 2 answers
A.Request a service quota increase for SageMaker training instances.
B.Use spot instances for training.
C.Use Amazon EFS for training data.
D.Reduce the size of the training dataset.
E.Use a smaller instance type.
AnswersA, B

Increases the maximum number of instances.

Why this answer

The 'ResourceLimitExceeded' error indicates that the AWS account has reached its service quota for SageMaker training instances. Requesting a service quota increase through the AWS Service Quotas console or API allows the account to launch additional instances of the required type, directly resolving the limit issue.

Exam trap

The trap here is that candidates may confuse a resource limit error with a performance or storage issue, leading them to choose dataset reduction or storage changes instead of addressing the actual AWS service quota.

519
MCQeasy

A data scientist is training a binary classification model and wants to evaluate its performance using a metric that is robust to class imbalance. Which metric should be used?

A.Mean squared error
B.Area under the ROC curve (AUC)
C.F1 score
D.Accuracy
AnswerC

F1 score balances precision and recall and is robust to class imbalance.

Why this answer

The F1 score is the harmonic mean of precision and recall and is robust to class imbalance because it considers both false positives and false negatives. Accuracy can be misleading with imbalanced classes.

520
MCQhard

A data scientist is analyzing a dataset with 1 million records and 20 features. The target variable is continuous. The scientist wants to identify non-linear relationships between features and the target. Which technique is MOST suitable for this purpose during exploratory data analysis?

A.Visualize the correlation matrix heatmap of all features.
B.Apply Principal Component Analysis (PCA) and examine the loadings.
C.Calculate mutual information scores between each feature and the target.
D.Compute Pearson correlation coefficients between each feature and the target.
AnswerC

Mutual information captures non-linear dependencies.

Why this answer

Mutual information captures any kind of dependency, including non-linear. Option A is wrong because a correlation matrix heatmap only shows pairwise linear correlations among features, not feature-target relationships. Option B is wrong because PCA is for dimensionality reduction and does not directly assess feature-target relationships.

Option D is wrong because Pearson correlation only measures linear relationships, missing non-linear ones.

521
MCQeasy

A data scientist is analyzing a dataset with a target variable that is binary (0/1). Which visualization is most appropriate to explore the relationship between a continuous feature and the target?

A.Scatter plot of the feature vs. the target.
B.Bar chart of the feature.
C.Box plot of the feature grouped by target.
D.Histogram of the feature.
AnswerC

Box plots compare distributions across categories.

Why this answer

The most appropriate visualization to explore the relationship between a continuous feature and a binary target is a box plot of the feature grouped by the target. This allows comparing the distribution of the continuous feature across the two target classes (0 and 1), revealing differences in central tendency, spread, and outliers. Option A (scatter plot) is unsuitable because scatter plots are for two continuous variables, not a binary target.

Option B (bar chart) is typically used for categorical features, not continuous ones. Option D (histogram) shows the distribution of a single continuous variable but does not separate by target class, so it cannot reveal the relationship with the binary target. Therefore, option C is correct.

522
MCQhard

Refer to the exhibit. A data engineer runs the AWS CLI command to check an object in an S3 bucket. The bucket is part of a data lake and is configured with versioning enabled. However, the output shows "VersionId": null. What is the most likely reason for this?

A.The object is encrypted using SSE-S3, which hides the version ID
B.The object was uploaded before versioning was enabled
C.The command must include the --version-id parameter to display the version ID
D.Versioning is not enabled on the bucket
AnswerB

Objects uploaded before versioning was enabled have a null version ID.

Why this answer

The most likely reason is that the object was uploaded before versioning was enabled on the bucket. When versioning is enabled, objects uploaded afterward receive a unique version ID, while objects that existed before versioning was enabled have a null version ID. Option B is correct.

Option A is incorrect because SSE-S3 encryption does not affect version IDs; version IDs are metadata independent of encryption. Option C is incorrect because the `head-object` command automatically returns the version ID of the latest version; no `--version-id` parameter is needed to display it. Option D is incorrect because the bucket is explicitly stated to have versioning enabled.

523
MCQhard

A company uses Amazon SageMaker to train a deep learning model for image classification. The training dataset consists of 500,000 images, each 256x256 pixels, stored in S3. The team uses a single ml.p3.2xlarge instance for training. The training time is unacceptably long (over 48 hours). The team wants to reduce training time without sacrificing model accuracy. They have already optimized the data pipeline by using SageMaker Pipe mode and sharding the S3 dataset. The model is a ResNet-50 implemented in TensorFlow. The team is considering the following options: A) Switch to a ml.p3.16xlarge instance which has 8 GPUs and more memory. B) Implement distributed data parallelism using Horovod across multiple instances. C) Use SageMaker's built-in Hyperparameter Tuning to find optimal hyperparameters. D) Reduce the image resolution to 128x128 to speed up training. Which option will MOST effectively reduce training time while maintaining accuracy?

A.Switch to a ml.p3.16xlarge instance
B.Reduce the image resolution to 128x128
C.Implement distributed data parallelism using Horovod across multiple instances
D.Use SageMaker's built-in Hyperparameter Tuning
AnswerC

Horovod enables efficient multi-GPU, multi-instance training, scaling training time linearly.

Why this answer

Using multiple instances with Horovod for distributed data parallelism can scale training linearly with the number of GPUs, significantly reducing time. A larger single instance (ml.p3.16xlarge) provides 8 GPUs but still limited by single instance. Hyperparameter tuning does not directly reduce training time.

Reducing resolution may lose accuracy.

524
MCQhard

A company uses Amazon EMR to run Spark jobs on a transient cluster that processes data from S3. The jobs are failing with 'OutOfMemory' errors. The data engineer has already increased the executor memory. Which additional configuration change would MOST likely resolve the issue?

A.Use fewer, larger instance types for the core nodes
B.Increase the number of partitions in the data
C.Increase the driver memory
D.Increase the number of executors
AnswerB

More partitions means smaller data per task, reducing memory usage.

Why this answer

The 'OutOfMemory' errors in Spark on EMR typically occur when individual partitions hold too much data for the executor's memory to process. Increasing the number of partitions distributes the data more evenly across available memory, reducing the per-partition size and preventing memory overflow during shuffle or aggregation operations. This directly addresses the root cause of memory pressure, whereas simply increasing executor memory may only delay the failure.

Exam trap

The trap here is that candidates often assume adding more memory (executor or driver) or scaling vertically (larger instances) is the solution, but the exam tests understanding that memory errors in Spark are frequently caused by partition size imbalance, not insufficient total memory.

How to eliminate wrong answers

Option A is wrong because using fewer, larger instance types reduces the total number of cores and task slots, which can actually increase memory pressure per executor and worsen OutOfMemory errors. Option C is wrong because driver memory is used for the Spark driver process (e.g., collecting results, scheduling), not for executor-side data processing; increasing it does not help with executor OutOfMemory errors. Option D is wrong because increasing the number of executors without adjusting partitions can lead to more tasks competing for the same data, but each executor still processes the same large partitions, so memory errors persist.

525
MCQmedium

A team is building a data pipeline that ingests data from an Amazon S3 bucket, transforms it using AWS Glue, and loads it into Amazon Redshift for analysis. The Glue job runs on a schedule every hour. The team has noticed that the job takes longer than expected and sometimes fails due to memory issues. The data volume is variable, with occasional spikes. Which solution should the team implement to optimize the pipeline?

A.Decrease the number of workers to reduce memory contention.
B.Enable job bookmarks to process only new data and use a G.2X worker type for more memory.
C.Increase the schedule frequency to run the job more often with smaller data increments.
D.Replace AWS Glue with Amazon EMR using Spark.
AnswerB

Job bookmarks prevent reprocessing and larger workers provide more memory.

Why this answer

Enabling job bookmarks allows the Glue job to process only new or changed data since the last run, reducing the data volume per execution. Using the G.2X worker type provides additional memory (e.g., 16 GB per DPU vs. 4 GB for G.1X), which helps prevent out-of-memory failures during data spikes. Together, these optimizations address both the variable data volume and memory constraints without requiring a complete pipeline redesign.

Exam trap

The trap here is that candidates may assume increasing job frequency (Option C) will automatically reduce per-run data volume, but without incremental processing (job bookmarks), each run still processes the entire dataset, leading to the same memory issues and higher costs.

How to eliminate wrong answers

Option A is wrong because decreasing the number of workers reduces parallelism and available memory, which would likely worsen performance and increase the chance of memory failures. Option C is wrong because increasing the schedule frequency does not reduce the per-run data volume unless combined with incremental processing; it would only run the same full dataset more often, potentially increasing resource contention and cost. Option D is wrong because replacing AWS Glue with Amazon EMR is an unnecessary architectural change; Glue is already suitable for this use case, and the issues can be resolved with proper configuration (job bookmarks and worker type) without migrating to a more complex managed Spark cluster.

Page 6

Page 7 of 23

Page 8