Courseiva

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

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

Page 4

Page 5 of 23

Page 6
301
Multi-Selecthard

Which THREE factors should be considered when choosing between SageMaker built-in algorithms and custom algorithms? (Choose THREE.)

Select 3 answers
A.Custom algorithms allow you to implement any architecture, including proprietary ones
B.Built-in algorithms are optimized for distributed training
C.Built-in algorithms can only be used with CSV and JSON formats
D.Custom algorithms require you to bring your own Docker container, but SageMaker built-in algorithms do not support frameworks like PyTorch
E.Built-in algorithms have predefined hyperparameters that may not fit all use cases
AnswersA, B, E

Custom algorithms offer full flexibility.

Why this answer

Custom algorithms in SageMaker allow you to implement any architecture, including proprietary or novel models that are not available as built-in algorithms. This flexibility is essential when you need to use a custom neural network, a unique loss function, or a model from a research paper that SageMaker does not natively support.

Exam trap

The trap here is that candidates often assume built-in algorithms are limited to CSV/JSON formats and do not support popular frameworks like PyTorch, when in fact SageMaker provides optimized built-in framework containers for PyTorch, TensorFlow, and others, and built-in algorithms support a wide variety of data formats.

302
MCQmedium

A data science team is building a real-time fraud detection system. Transactions are streamed via Amazon Kinesis Data Streams, and a Lambda function performs feature engineering and invokes an Amazon SageMaker endpoint for predictions. The team notices that the Lambda function is timing out and causing data loss. Which solution should the team implement to process the stream reliably and at low latency?

A.Use Amazon Kinesis Data Analytics for Apache Flink to consume the stream, perform feature engineering, and invoke the SageMaker endpoint with exactly-once processing.
B.Use the Kinesis Client Library (KCL) to process the stream in an Amazon EC2 instance, and store the predictions in Amazon DynamoDB.
C.Increase the Lambda function timeout to 15 minutes and allocate more memory to reduce processing time.
D.Configure Amazon Kinesis Firehose to deliver the stream to an Amazon S3 bucket, then trigger a Lambda function to process the data in batches.
AnswerA

Kinesis Data Analytics provides stateful stream processing with checkpointing, ensuring no data loss and low-latency integration with SageMaker.

Why this answer

Amazon Kinesis Data Analytics for Apache Flink provides a stateful, low-latency stream processing engine that can consume from Kinesis Data Streams, perform feature engineering in real-time, and invoke SageMaker endpoints with exactly-once processing semantics. This eliminates Lambda timeouts and data loss by using a long-running, scalable application instead of a short-lived function.

Exam trap

The trap here is that candidates often assume increasing Lambda resources (timeout/memory) or moving to a batch-based approach (Firehose/S3) can solve real-time streaming issues, but the exam tests the understanding that stateful, long-running stream processing engines like Flink are required for reliable, low-latency, exactly-once processing in production.

How to eliminate wrong answers

Option B is wrong because using the Kinesis Client Library (KCL) on an EC2 instance requires manual management of scaling, fault tolerance, and checkpointing, and does not natively integrate with SageMaker for low-latency predictions; it also adds operational overhead and potential for data loss if the instance fails. Option C is wrong because increasing the Lambda timeout to 15 minutes and allocating more memory only masks the underlying issue of Lambda's 15-minute maximum execution time and does not address the fundamental problem of stream processing at scale; Lambda is not designed for long-running, stateful stream processing and can still lose data if the function fails or throttles. Option D is wrong because Amazon Kinesis Firehose delivers data in batches to S3, which introduces significant latency (typically minutes) and is not suitable for real-time fraud detection; triggering a Lambda on S3 objects adds further delay and does not provide low-latency, per-record processing.

303
MCQhard

A data engineer has attached the above IAM policy to an IAM role used by an AWS Glue ETL job. The job reads from and writes to 'my-data-bucket'. The job is failing with an Access Denied error. What is the most likely cause?

A.The condition restricts access to a specific IP range that does not include the AWS Glue service IPs.
B.The IAM role needs to have s3:ListBucket permission.
C.The IAM role does not have permission to list the bucket.
D.The resource ARN should include the bucket itself, not just the objects.
AnswerA

The condition requires the request source IP to be in 10.0.0.0/24, but Glue's IPs are different.

Why this answer

The IAM policy includes a condition that restricts access to requests originating from a specific IP address range. AWS Glue ETL jobs run on ephemeral compute resources that use a dynamic pool of IP addresses, which are not guaranteed to fall within any fixed customer-managed IP range. Therefore, the condition causes the Access Denied error because the Glue service IPs are not within the allowed range.

Exam trap

The trap here is that candidates assume the IAM policy is missing a permission like s3:ListBucket, but the real issue is the IP condition that inadvertently blocks the Glue service because its source IPs are not within the specified range.

How to eliminate wrong answers

Option B is wrong because s3:ListBucket is not required for reading or writing objects; the error is Access Denied, not a missing permission, and the policy already includes s3:GetObject and s3:PutObject. Option C is wrong because the policy does not deny s3:ListBucket, and the error is not about listing the bucket; the job fails when trying to access objects, not when listing. Option D is wrong because the resource ARN 'arn:aws:s3:::my-data-bucket/*' correctly specifies objects within the bucket; including the bucket itself would be needed for bucket-level operations like ListBucket, but the job only needs object-level permissions.

304
MCQmedium

A company uses Amazon Kinesis Data Firehose to deliver streaming data to Amazon S3. They notice that the data is delivered in 5-minute intervals even though they set the buffer interval to 60 seconds. What could be the cause?

A.The source Kinesis stream has insufficient shards.
B.The buffer size is set to a value larger than the incoming data rate.
C.The S3 bucket is in a different region.
D.The IAM role does not have permission to write to S3.
AnswerB

If the buffer size is large and data rate low, Firehose waits longer.

Why this answer

B is correct because Kinesis Data Firehose delivers data based on whichever condition is met first: the buffer interval (60 seconds) or the buffer size (e.g., 5 MB). If the incoming data rate is very low, the buffer size threshold may never be reached within 60 seconds, causing Firehose to wait longer—up to the maximum buffer interval of 900 seconds—before delivering. In this case, the data rate is so low that it takes 5 minutes to fill the buffer, overriding the 60-second interval setting.

Exam trap

The trap here is that candidates assume the buffer interval is a strict timer, but Firehose actually uses a 'first-trigger' model where the buffer size can override the interval, causing longer delivery delays than expected.

How to eliminate wrong answers

Option A is wrong because insufficient shards in the source Kinesis stream would cause throttling or data loss, not a delay in delivery intervals; Firehose reads from the stream independently of shard count. Option C is wrong because cross-region S3 buckets do not affect Firehose's buffer interval; they may add latency but not change the delivery frequency. Option D is wrong because if the IAM role lacked S3 write permissions, Firehose would fail to deliver data entirely, not deliver it at 5-minute intervals.

305
Multi-Selecthard

A machine learning engineer is evaluating a multi-class classification model that predicts product categories. The model outputs probabilities for 10 classes. The engineer wants to improve the model's calibration so that the predicted probabilities reflect the true likelihood of each class. Which THREE techniques can help?

Select 3 answers
A.Use temperature scaling
B.Apply isotonic regression
C.Increase model complexity
D.Apply Platt scaling
E.Use focal loss
AnswersA, B, D

Temperature scaling adjusts the softmax temperature to improve calibration for neural networks.

Why this answer

Platt scaling and isotonic regression are common calibration methods for classification models. Temperature scaling is a variant of Platt scaling for neural networks. Using a different loss function like cross-entropy helps but is not a calibration technique per se.

306
MCQmedium

A media company uses SageMaker to deploy a real-time inference endpoint for content recommendation. The model is a PyTorch model that uses GPU. The endpoint is deployed with an ml.p3.2xlarge instance. Over time, the endpoint's latency increases significantly during peak hours. The company has enabled auto scaling based on CPU utilization. However, the latency spikes occur even when CPU utilization is low. The model is stateless and the inference code is efficient. What is the MOST likely cause of the latency spikes?

A.The model uses stateful processing that accumulates requests
B.Auto scaling is configured based on CPU utilization, but the bottleneck is GPU utilization
C.The inference container has a memory leak that causes gradual slowdown
D.The instance type is too small for the model
AnswerB

GPU metrics should be used for auto scaling.

Why this answer

The model runs on GPU, so the bottleneck is GPU utilization, not CPU. Auto scaling based on CPU utilization does not help when the GPU is saturated. The latency spikes during peak hours suggest that the GPU is overloaded, but auto scaling is not triggered because CPU utilization remains low.

307
MCQeasy

Refer to the exhibit. A data scientist examines a sample of data and notices that all columns are numeric. The scientist wants to check for multicollinearity. Which statistic should be computed from this sample?

A.Correlation matrix (Pearson)
B.Chi-square test of independence
C.Variance Inflation Factor (VIF)
D.Covariance matrix
AnswerA

A correlation matrix can reveal high pairwise correlations.

Why this answer

The correlation matrix shows pairwise Pearson correlations, which can indicate high collinearity. Option B is wrong because chi-square is for categorical variables, not numeric. Option C is wrong because VIF requires more variables than observations (or typically used after regression).

Option D is wrong because covariance alone is scale-dependent.

308
Multi-Selecteasy

Which TWO techniques can help reduce overfitting in a decision tree model?

Select 2 answers
A.Increase the number of trees in the forest
B.Increase the number of features considered per split
C.Limit the maximum depth of the tree
D.Prune the tree after training
E.Increase the maximum depth of the tree
AnswersC, D

Shallower trees generalize better.

Why this answer

Limiting the maximum depth of the tree (Option C) directly restricts the number of splits, preventing the model from learning overly specific patterns in the training data. Pruning the tree after training (Option D) removes branches that have little predictive power, reducing variance and improving generalization. Both techniques combat overfitting by controlling the complexity of the decision tree.

Exam trap

AWS often tests the distinction between techniques that reduce overfitting in a single decision tree versus ensemble methods, so candidates mistakenly apply Random Forest concepts (like increasing trees or features) to a standalone tree.

309
MCQeasy

A team needs to automatically retrain a model every week using new data. Which SageMaker feature is designed to schedule and automate this workflow?

A.SageMaker Pipelines
B.SageMaker Automatic Model Tuning
C.SageMaker Model Monitor
D.SageMaker Data Wrangler
AnswerA

Pipelines can define and schedule training workflows.

Why this answer

SageMaker Pipelines enables building, automating, and scheduling end-to-end ML workflows, making it suitable for weekly retraining. Option A is correct. Option B, SageMaker Automatic Model Tuning, is for hyperparameter optimization, not scheduling.

Option C, SageMaker Model Monitor, is for monitoring model quality and drift, not scheduling. Option D, SageMaker Data Wrangler, is for data preparation and feature engineering, not scheduling.

310
MCQhard

A company is using Amazon SageMaker to train a deep learning model for image classification. The training job is using a single p3.2xlarge instance and takes 10 hours. The data scientist wants to reduce training time using distributed training. Which SageMaker feature should be used?

A.Use the SageMaker distributed data parallelism library with multiple p3.2xlarge instances.
B.Use SageMaker Managed Spot Training to reduce cost, but training time remains the same.
C.Use SageMaker Hyperparameter Tuning to find optimal hyperparameters faster.
D.Use the SageMaker distributed model parallelism library with a single p3dn.24xlarge instance.
AnswerA

Data parallelism divides the batch across GPUs and synchronizes gradients, scaling training.

Why this answer

The goal is to reduce training time, and the SageMaker distributed data parallelism library is designed to split the mini-batch across multiple GPU instances, enabling synchronous or asynchronous gradient updates that scale near-linearly with the number of instances. By adding more p3.2xlarge instances, the effective throughput increases, directly reducing wall-clock training time for the image classification model.

Exam trap

The trap here is confusing distributed data parallelism (which reduces time by adding more instances) with model parallelism (which handles large models but not necessarily faster training) or with cost-saving features like Spot Training that do not affect training duration.

How to eliminate wrong answers

Option B is wrong because Managed Spot Training reduces cost by using spare EC2 capacity, but it does not change the training time — the job still runs for the same duration on a single instance. Option C is wrong because Hyperparameter Tuning optimizes model accuracy by searching hyperparameter combinations, not by parallelizing the training computation across instances to reduce time. Option D is wrong because distributed model parallelism splits the model layers across devices, which is beneficial for models too large to fit on one GPU, but using a single p3dn.24xlarge instance does not distribute the workload across multiple instances and thus does not reduce training time through data parallelism.

311
MCQmedium

A company uses Amazon Kinesis Data Firehose to deliver streaming data to Amazon S3. The data is in JSON format, and the company wants to convert it to Parquet for efficient querying. Which configuration should be used?

A.Enable data transformation in Firehose using an AWS Lambda function to convert JSON to Parquet, and set the output format to Parquet.
B.Use an AWS Glue job to convert the JSON files in S3 to Parquet after delivery.
C.Use Amazon Kinesis Data Analytics to convert the stream to Parquet before sending to Firehose.
D.Configure Firehose to deliver data directly to Amazon Redshift, which automatically converts to Parquet.
AnswerA

Firehose can invoke a Lambda function for transformation and write Parquet to S3.

Why this answer

Amazon Kinesis Data Firehose supports data transformation via AWS Lambda, allowing you to convert incoming JSON records to Parquet format before delivery to S3. By enabling a Lambda function to perform the conversion and setting the output format to Parquet, Firehose handles the transformation in-stream, ensuring the data lands in S3 already in the optimized columnar format for efficient querying with services like Amazon Athena or Amazon Redshift Spectrum.

Exam trap

The trap here is that candidates often assume post-processing with AWS Glue (Option B) is the standard approach, overlooking Firehose’s built-in Lambda transformation capability for real-time format conversion, which is more efficient for streaming workloads.

How to eliminate wrong answers

Option B is wrong because running an AWS Glue job after delivery introduces latency and additional cost, as the data must first be stored as JSON in S3 and then reprocessed, which is less efficient than converting in-stream. Option C is wrong because Amazon Kinesis Data Analytics processes data using SQL or Apache Flink but does not natively output to Parquet; it can only output to destinations like Firehose or Lambda, and the conversion to Parquet would still require a downstream transformation. Option D is wrong because Amazon Redshift does not automatically convert data to Parquet; it stores data in its own columnar format, and while it can query Parquet files in S3 via Spectrum, direct delivery to Redshift bypasses the Parquet conversion requirement and does not produce Parquet files in S3.

312
MCQeasy

A data engineer needs to set up a data pipeline that ingests data from an Amazon RDS MySQL database into Amazon S3. The pipeline should run daily and capture incremental changes (inserts, updates, deletes) from the source database. Which AWS service should be used as the data ingestion tool?

A.AWS Database Migration Service (DMS) with continuous change data capture (CDC).
B.Amazon Kinesis Data Streams with a Lambda function.
C.AWS Data Pipeline with a SQL activity.
D.AWS Glue with a scheduled crawler.
AnswerA

Correct: DMS with CDC can capture incremental changes.

Why this answer

AWS DMS with continuous CDC is the correct choice because it is specifically designed to capture incremental changes (inserts, updates, deletes) from a relational database like Amazon RDS MySQL and replicate them to Amazon S3. DMS uses the MySQL binary log (binlog) to track row-level changes in near real-time, making it ideal for daily incremental pipelines. Other services either lack native CDC support or are not optimized for database-to-object-store incremental ingestion.

Exam trap

The trap here is that candidates often confuse AWS Glue crawlers or Data Pipeline SQL activities with CDC capabilities, but neither service natively captures incremental database changes from MySQL binlogs, which is the core requirement for this scenario.

How to eliminate wrong answers

Option B is wrong because Amazon Kinesis Data Streams is a real-time streaming service that requires a custom producer to capture database changes, and while a Lambda function can process records, it does not natively read MySQL binlogs or handle schema evolution for incremental database changes. Option C is wrong because AWS Data Pipeline with a SQL activity is designed for batch ETL jobs using SQL queries against databases, but it cannot capture incremental changes (especially deletes) without complex custom logic and does not support CDC from MySQL binlogs. Option D is wrong because AWS Glue with a scheduled crawler is used for schema discovery and metadata cataloging, not for capturing incremental data changes; a crawler only updates the Data Catalog and does not extract or replicate row-level inserts, updates, or deletes from a source database.

313
MCQeasy

A startup is building a data pipeline that ingests data from multiple sources into an Amazon S3 data lake. The data includes CSV files from legacy systems, JSON from web APIs, and Avro from mobile apps. The data must be transformed into Parquet format and cataloged for querying with Amazon Athena. The pipeline must be serverless and minimize operational overhead. The team has decided to use AWS Glue for ETL and cataloging. However, they are concerned about the cost of running Glue jobs continuously. The data arrives in small batches every 10 minutes. Which approach should the team use to minimize cost while meeting the requirements?

A.Use AWS Lambda functions to transform each file upon arrival and store as Parquet
B.Use Amazon Kinesis Data Firehose to stream data directly into S3 and use Glue to catalog it
C.Use scheduled Glue jobs to process the data every hour, consolidating multiple batches
D.Use a single daily Glue job to process all data at once
AnswerC

Hourly batch processing balances cost and latency.

Why this answer

Using scheduled Glue jobs every hour to process accumulated data reduces the number of job runs and associated costs, while still providing near-real-time processing (within the hour). Option A is wrong because Lambda functions have limited execution time and memory, making them unsuitable for large-scale transformations. Option B is wrong because Kinesis Data Firehose can directly deliver streaming data to S3, but it does not handle all source formats natively (e.g., CSV, Avro) and additional transformation may be needed.

Option D is wrong because a single daily Glue job introduces too much latency for batch arrivals every 10 minutes.

314
MCQhard

A company is running a real-time inference endpoint on Amazon SageMaker. The endpoint is using an ml.c5.xlarge instance. Over the past month, the CPU utilization has been consistently below 10%, and the latency is well within requirements. The company wants to reduce costs. What should they do?

A.Use a smaller instance type
B.Set up a scaling policy to scale down to zero
C.Switch to a multi-model endpoint
D.Use a batch transform job instead
E.Move to a serverless inference endpoint
AnswerA

A smaller instance can reduce cost while meeting performance.

Why this answer

The CPU utilization is consistently below 10%, indicating significant over-provisioning. Downgrading to a smaller instance type (e.g., ml.c5.large or ml.t3.medium) directly reduces the per-hour cost while still meeting the latency requirements. This is the most straightforward cost optimization when the current instance is underutilized and performance is already satisfactory.

Exam trap

The trap here is that candidates may overcomplicate the solution by considering advanced AWS features like multi-model endpoints or serverless inference, when the simplest and most effective fix is to right-size the instance based on the observed utilization metrics.

How to eliminate wrong answers

Option B is wrong because scaling down to zero would cause the endpoint to have no capacity to serve requests, resulting in 503 Service Unavailable errors for any incoming traffic; SageMaker endpoints do not support scaling to zero instances. Option C is wrong because switching to a multi-model endpoint reduces costs by hosting multiple models on a single instance, but the problem is about a single model with low CPU utilization, so the simpler fix is to downsize the instance. Option D is wrong because batch transform jobs are asynchronous and not suitable for real-time inference; the requirement is for a real-time endpoint, and batch processing would break the latency SLA.

Option E is wrong because moving to a serverless inference endpoint could introduce cold start latency and is not necessary when the current latency is already acceptable; the issue is simply over-provisioned compute capacity.

315
MCQhard

A data scientist is performing EDA on a dataset with missing values in 3 of 20 features. The missing rate is 5% for each feature. The scientist wants to preserve as much data as possible while avoiding bias. Which imputation strategy is most appropriate?

A.Remove rows with any missing values.
B.Impute missing values with the mean of each feature.
C.Use K-Nearest Neighbors (KNN) imputation.
D.Impute missing values with the median of each feature.
AnswerD

Median imputation is robust to outliers, preserves the dataset size, and is a simple, effective method for low missing rates (5% per feature).

Why this answer

Median imputation (Option D) is the most appropriate because it preserves the dataset size, is robust to outliers, and avoids bias introduced by more complex methods. Removing rows (Option A) would discard approximately 14% of the data if missing patterns are independent, unnecessarily reducing sample size. Mean imputation (Option B) is sensitive to outliers, which could skew the distribution.

KNN imputation (Option C) may introduce bias if the neighborhood size is not properly tuned and is computationally expensive for large datasets. Therefore, median imputation provides a simple, robust solution that maintains data integrity.

316
MCQhard

A company is using Amazon SageMaker Ground Truth to create labeled datasets for a text classification task. The labeling job uses a private workforce of 10 annotators. After labeling 10,000 items, the quality of labels is inconsistent. Which approach will MOST effectively improve labeling consistency?

A.Remove annotations from annotators with low agreement after the job completes.
B.Increase the number of annotators to 20 to average out inconsistencies.
C.Configure the labeling job to use annotation consolidation with majority voting and require multiple annotations per item.
D.Use active learning to automatically label the most confident samples and only send uncertain ones to annotators.
AnswerC

Consensus from multiple annotators and majority voting yields more consistent labels.

Why this answer

Requiring multiple annotations per item and using annotation consolidation with majority voting directly improves labeling consistency by reducing individual annotator bias and ensuring that the final label is based on consensus. Option A is incorrect because removing annotations from low-agreement annotators after the job completes does not improve the quality of labels already assigned; it may also discard valid data. Option B is incorrect because simply increasing the number of annotators does not guarantee consistency; it may introduce more variance without a consolidation mechanism.

Option D is incorrect because active learning is used to select which items to label, not to improve the consistency of labeling; it does not address the inconsistency in the labeling process itself.

317
MCQeasy

A data scientist is deploying a model using Amazon SageMaker. The model endpoint needs to handle real-time inference requests with low latency. The model is a large ensemble of 10 deep learning models, each approximately 500 MB. What is the most cost-effective deployment strategy that meets the low-latency requirement?

A.Deploy each model to a separate endpoint and use a load balancer.
B.Use a single endpoint with multiple instances behind it.
C.Use a SageMaker batch transform job to process inference requests in batches.
D.Use a SageMaker multi-model endpoint to host all models on one or more instances.
AnswerD

Multi-model endpoints efficiently host multiple models on shared instances, reducing cost.

Why this answer

A SageMaker multi-model endpoint (MME) allows hosting multiple models on a single or few instances, dynamically loading them from Amazon S3 into memory as needed. This is the most cost-effective option for a large ensemble of 500 MB models because it avoids the expense of separate endpoints or multiple instances per model, while still supporting low-latency real-time inference by keeping frequently used models cached.

Exam trap

The trap here is that candidates may confuse multi-model endpoints with multi-container endpoints or assume that a single endpoint cannot host multiple models, leading them to choose the expensive separate-endpoint approach (Option A) or the memory-inefficient single-endpoint approach (Option B).

How to eliminate wrong answers

Option A is wrong because deploying each model to a separate endpoint and using a load balancer would incur high costs (10 endpoints × instance costs) and add network latency from the load balancer, making it neither cost-effective nor optimal for low latency. Option B is wrong because a single endpoint with multiple instances behind it would require all 10 models to be loaded on every instance, consuming excessive memory (5 GB per instance) and increasing cost without leveraging model-sharing efficiencies. Option C is wrong because SageMaker batch transform is designed for asynchronous, offline inference on large datasets, not for real-time requests, and would introduce unacceptable latency for live inference.

318
MCQmedium

A data scientist is analyzing a dataset with missing values in 30% of the rows for the 'age' column. The data scientist decides to impute the missing values with the median of the observed 'age' values. What is a potential drawback of this approach?

A.The imputation will introduce bias if the missing values are not random.
B.Imputation using median is computationally expensive for large datasets.
C.The imputed values may reduce the variance of the 'age' distribution.
D.The imputed values will increase the variance of the feature, leading to overfitting.
AnswerC

Replacing missing values with a constant reduces the variability of the feature.

Why this answer

Imputing missing values with the median of the observed data artificially concentrates imputed values around the center of the distribution. This reduces the overall variance of the 'age' column because the imputed values do not reflect the natural spread of the data, potentially distorting downstream analyses like regression or clustering that rely on variance structure.

Exam trap

The MLS-C01 exam often tests the subtle distinction between bias (which is a general risk of any imputation under non-random missingness) and variance reduction (which is a specific, guaranteed statistical consequence of constant-value imputation).

How to eliminate wrong answers

Option A is wrong because while imputation can introduce bias if data are not missing at random (MNAR), the question specifically asks about a drawback of using median imputation; the bias concern is not unique to median imputation and is a general risk of any imputation method under MNAR, not the primary technical drawback described. Option B is wrong because computing the median is O(n) with efficient algorithms and is not computationally expensive even for large datasets; mean or median imputation is among the cheapest imputation methods. Option D is wrong because median imputation reduces variance, not increases it; increased variance would be a concern with methods like mean imputation with added noise, not with simple median imputation.

319
MCQeasy

A data engineer needs to transfer 50 TB of historical data from an on-premises HDFS cluster to Amazon S3. The company has a 1 Gbps internet connection. Which service would complete the transfer in the shortest time?

A.AWS Snowball
B.Amazon S3 Transfer Acceleration
C.AWS Direct Connect
D.AWS DataSync
AnswerA

Snowball can transfer 50 TB physically in days.

Why this answer

AWS Snowball is the correct choice because transferring 50 TB over a 1 Gbps internet connection would take approximately 5.5 days (50 TB × 1024 GB/TB × 8 bits/byte ÷ 1 Gbps ÷ 86400 seconds/day), assuming full utilization, which is unrealistic due to overhead and contention. Snowball provides a physical appliance that can be loaded with data locally and shipped to AWS, completing the transfer in a few days including shipping time, making it faster than any network-based method for this volume.

Exam trap

The trap here is that candidates underestimate the time required for large data transfers over a 1 Gbps link and overestimate the speed improvements of network acceleration services like S3 Transfer Acceleration or DataSync, which cannot overcome the fundamental bandwidth limitation.

How to eliminate wrong answers

Option B (Amazon S3 Transfer Acceleration) is wrong because it only optimizes the network path using AWS edge locations and does not increase bandwidth beyond the 1 Gbps internet connection, so the transfer would still take days. Option C (AWS Direct Connect) is wrong because even with a dedicated 1 Gbps connection, the theoretical minimum transfer time is still ~5.5 days, and provisioning a Direct Connect circuit typically takes weeks, adding significant delay. Option D (AWS DataSync) is wrong because it is a software agent that transfers data over the network and is still limited by the 1 Gbps internet bandwidth, offering no speed advantage over a raw network transfer for this volume.

320
MCQhard

A company uses AWS Glue to run ETL jobs on a daily schedule. The jobs are failing intermittently with 'OutOfMemory' errors. The data volume has grown 5x over the past month. Which is the MOST cost-effective fix?

A.Increase the number of partitions in the source S3 data
B.Increase the number of DPUs for the Glue job
C.Reduce the data volume by sampling
D.Switch from AWS Glue to Amazon EMR
AnswerB

More DPUs provide more memory and parallelism.

Why this answer

The 'OutOfMemory' errors in AWS Glue are caused by insufficient compute resources (DPUs) to process the 5x increased data volume. Increasing the number of DPUs allocates more memory and processing capacity to the job, directly addressing the memory shortage without changing the data or architecture. This is the most cost-effective fix because it scales resources incrementally rather than switching to a more expensive service like EMR.

Exam trap

The trap here is that candidates may assume the issue is data partitioning (Option A) or that a more powerful service like EMR (Option D) is always better, when in fact the simplest and most cost-effective solution is to adjust the Glue job's DPU allocation to match the increased workload.

How to eliminate wrong answers

Option A is wrong because increasing partitions in source S3 data does not directly increase the memory available to the Glue job; it may improve parallelism but does not resolve the OutOfMemory error caused by insufficient DPU allocation. Option C is wrong because reducing data volume by sampling would discard data and compromise the completeness of the ETL output, which is not a valid production fix for growing data. Option D is wrong because switching from AWS Glue to Amazon EMR is a more complex and costly solution that introduces cluster management overhead; it is not the most cost-effective fix when simply increasing DPUs in Glue can resolve the issue.

321
MCQhard

A data science team is deploying a machine learning model to production using SageMaker. The model is a PyTorch model that requires custom inference logic including image preprocessing. The team needs to ensure that the endpoint can handle variable batch sizes and has low latency. Which deployment approach should the team use?

A.Use SageMaker Inference Pipelines with a preprocessing container followed by the PyTorch model container.
B.Deploy the model as an AWS Lambda function and use API Gateway.
C.Use the SageMaker Python SDK's Predictor class with the model artifact.
D.Use a SageMaker multi-model endpoint to host the model with a custom container.
E.Use SageMaker Batch Transform for real-time inference.
AnswerA

Inference Pipelines allow custom preprocessing and model serving with low latency.

Why this answer

SageMaker Inference Pipelines allow chaining of preprocessing and prediction containers, which enables custom inference logic like image preprocessing and supports variable batch sizes with low latency. Option B (AWS Lambda with API Gateway) is not designed for real-time inference with large models and variable batch sizes due to execution time and payload limits. Option C (SageMaker Python SDK's Predictor class) is a client interface to invoke an already deployed endpoint, not a deployment approach.

Option D (SageMaker multi-model endpoint) hosts multiple models on a single endpoint but does not directly address custom inference logic or preprocessing. Option E (SageMaker Batch Transform) is for offline batch inference, not real-time low-latency inference.

322
Multi-Selecteasy

A data scientist is using Amazon SageMaker to train a linear regression model. The training data contains missing values. Which TWO techniques are appropriate for handling missing values in the dataset?

Select 2 answers
A.Use a decision tree model that can handle missing values internally
B.Set missing values to zero
C.Remove rows with missing values if the proportion is small
D.Impute missing values with the mean of the column
E.Create a separate category for missing values
AnswersC, D

If a small fraction of rows have missing values, removing them is acceptable.

Why this answer

Removing rows with missing values is a straightforward and effective technique when the proportion of missing data is small (e.g., less than 5% of the total dataset). This avoids introducing bias or distorting the distribution, which is critical for linear regression models that assume complete and normally distributed data. In Amazon SageMaker, this can be done during data preprocessing using built-in transformations or custom scripts before training.

Exam trap

The MLS-C01 exam often tests the misconception that any missing value handling technique is universally applicable, but the correct choice depends on the model type (e.g., linear regression vs. tree-based models) and the nature of the missing data (e.g., MCAR vs. MAR).

323
Multi-Selecteasy

Which TWO AWS services can be used to visualize data distributions as part of exploratory data analysis? (Select TWO.)

Select 2 answers
A.AWS Glue
B.Amazon QuickSight
C.Amazon Athena
D.Amazon Comprehend
E.Amazon SageMaker Data Wrangler
AnswersB, E

QuickSight provides interactive dashboards and visualizations.

Why this answer

Amazon QuickSight is a cloud-native business intelligence service that can visualize data distributions through histograms, box plots, scatter plots, and other chart types, making it suitable for exploratory data analysis. Amazon SageMaker Data Wrangler provides a visual interface to create data distribution charts (e.g., histograms, bar charts) directly within the data preparation workflow, enabling quick inspection of feature distributions before model building.

Exam trap

The MLS-C01 exam often tests the misconception that AWS Glue or Athena can visualize data distributions because they are used in data preparation or querying, but neither provides native charting or plotting capabilities—they only return raw data or tabular results.

324
Multi-Selectmedium

A data scientist is analyzing a dataset and finds that two features have a Pearson correlation coefficient of 0.95. Which TWO actions should the data scientist consider? (Choose two.)

Select 2 answers
A.Combine the two features into a single feature using PCA or averaging
B.Add interaction terms between the features
C.Increase regularization strength in the model
D.Remove one of the correlated features
E.Apply standard scaling to both features
AnswersA, D

Combining captures information from both while reducing dimensionality.

Why this answer

A Pearson correlation coefficient of 0.95 indicates strong multicollinearity between the two features. Multicollinearity can inflate coefficient variances and reduce model interpretability. Two standard remedies are to remove one of the correlated features (Option D) or to combine them into a single feature using techniques like PCA, averaging, or summing (Option A).

Option B (adding interaction terms) would introduce additional correlated terms and exacerbate multicollinearity. Option C (increasing regularization) can help stabilize coefficients but does not directly address the high pairwise correlation; it is often used as a secondary technique after feature selection or combination. Option E (standard scaling) does not change the correlation coefficient and therefore does not mitigate multicollinearity.

325
MCQmedium

A company is using Amazon SageMaker to train a deep learning model for image segmentation. The training job uses a single ml.p3.2xlarge instance and takes 48 hours to complete. The team needs to reduce training time to under 12 hours to meet a deadline. The dataset is 50 GB of images stored in S3. The team currently uses File mode to download the data to the training instance. The model architecture is a convolutional neural network (CNN) with 50 layers. The team has access to multiple instances of the same type. Which approach will most effectively reduce training time?

A.Reduce the number of layers in the CNN to speed up training.
B.Increase the batch size on the single instance to process more data per iteration.
C.Use SageMaker's distributed data parallelism with multiple instances.
D.Switch to Pipe mode to stream data from S3, reducing data loading time.
AnswerC

Distributed training across instances parallelizes computation and can achieve near-linear speedup.

Why this answer

SageMaker's distributed data parallelism splits the 50 GB dataset across multiple ml.p3.2xlarge instances, allowing each instance to process a subset of the data in parallel. This can reduce training time from 48 hours to under 12 hours, assuming near-linear scaling with the number of instances (e.g., 4 instances for a 4x speedup). The approach directly addresses the need to reduce wall-clock time without altering the model architecture or data loading method.

Exam trap

The trap here is that candidates may confuse data loading optimization (Pipe mode) with compute parallelism, overlooking that the 48-hour bottleneck is GPU compute time, not I/O, and that distributed training is the only viable method to achieve a 4x speedup without altering the model.

How to eliminate wrong answers

Option A is wrong because reducing the number of layers in the CNN would degrade model accuracy for image segmentation, and the goal is to reduce training time without compromising model quality; it also does not leverage the available multiple instances. Option B is wrong because increasing the batch size on a single instance may improve GPU utilization but is unlikely to reduce training time from 48 hours to under 12 hours, as it does not address the fundamental bottleneck of sequential processing on one GPU; it can also cause out-of-memory errors or convergence issues. Option D is wrong because switching to Pipe mode streams data directly from S3 without downloading, reducing I/O overhead, but the primary bottleneck is compute (GPU processing), not data loading; the training time is dominated by forward/backward passes through 50 layers, not by data transfer.

326
Multi-Selectmedium

A data scientist is training a model using SageMaker and wants to use spot instances to reduce costs. Which THREE considerations should the scientist evaluate? (Choose THREE.)

Select 3 answers
A.Spot instances have a fixed, lower price than on-demand.
B.The training job must support checkpointing to save progress.
C.Spot instances are only available for inference, not training.
D.The training algorithm must be fault-tolerant to handle interruptions.
E.Spot instances can be reclaimed with a two-minute notice.
AnswersB, D, E

Needed to resume after interruption.

Why this answer

SageMaker managed spot training requires checkpointing to save model state at regular intervals. If a spot instance is interrupted, the training job can resume from the last checkpoint rather than starting from scratch, which is essential for long-running or expensive training jobs.

Exam trap

The MLS-C01 exam often tests the misconception that spot instances have a fixed lower price, when in reality the price is dynamic and based on a bidding model, and that spot instances are only for inference, whereas they are widely used for training to reduce costs.

327
MCQeasy

A company wants to analyze historical data stored in Amazon S3 using Amazon Athena. The data is in CSV format and is partitioned by date. Which action will provide the best query performance and cost optimization?

A.Use AWS Glue to compress the CSV files with gzip
B.Create an S3 event notification to trigger a Lambda function that warms up Athena
C.Keep CSV format but ensure partitions are in the format year=YYYY/month=MM/day=DD
D.Convert the data to Parquet format and use the existing partition structure
AnswerD

Parquet is columnar and compressed, reducing scanned data and improving performance.

Why this answer

Converting data to Parquet and partitioning provides the best performance and cost savings because Athena can use predicate pushdown and column pruning, scanning less data. Option A (using Glue to gzip compress) still uses CSV which requires full scan. Option B (S3 event notification to warm up Athena) is not relevant because Athena caches results but doesn't need warming.

Option C (only partitioning) helps but CSV is still row-based and less efficient than Parquet.

328
MCQeasy

A machine learning engineer is performing exploratory data analysis on a dataset containing customer transaction records. The dataset includes a column 'transaction_date' with timestamps. The engineer wants to derive features such as day of the week, hour, and month for modeling. Which AWS service can be used directly to extract these features without writing custom code?

A.AWS Glue ETL with built-in timestamp transforms
B.Amazon Athena with SQL date functions
C.Amazon QuickSight
D.Amazon SageMaker Data Wrangler
AnswerA

AWS Glue provides transforms like 'ExtractTimestamp' to derive date components without custom code.

Why this answer

AWS Glue ETL provides built-in transforms like `ExtractTimestamp` that can parse timestamps and extract date/time components (e.g., day of week, hour, month) without writing custom code. Option B is wrong because Amazon Athena requires writing SQL queries to extract date parts, which constitutes custom code. Option C is wrong because Amazon QuickSight is a BI visualization tool, not designed for feature engineering.

Option D is wrong because Amazon SageMaker Data Wrangler, while offering visual transformations, requires an active SageMaker Studio environment and is not a serverless ETL service like AWS Glue.

329
MCQhard

A company uses Amazon SageMaker to deploy a model for real-time predictions. The model is updated weekly. The company wants to ensure that the new model version is gradually rolled out to a small percentage of traffic before full deployment, and that it can be rolled back quickly if issues are detected. Which deployment strategy should be used?

A.Blue/green deployment
B.A/B testing with a holdout group
C.Canary deployment using SageMaker endpoint variants
D.Rolling deployment across multiple endpoints
AnswerC

Canary deployment allows sending a small percentage of traffic to the new variant and can be rolled back by shifting traffic back.

Why this answer

Amazon SageMaker endpoint variants support canary deployments, where you can shift a small percentage of traffic to a new model version (e.g., 5%) while the majority remains on the old version. This allows gradual rollout and immediate rollback by simply adjusting the traffic distribution weights or deleting the new variant, meeting the requirement for quick rollback without redeploying.

Exam trap

The trap here is that candidates confuse A/B testing (a statistical evaluation method) with canary deployment (a traffic management strategy), leading them to select Option B even though SageMaker's endpoint variants directly support gradual traffic shifting and rollback.

How to eliminate wrong answers

Option A is wrong because blue/green deployment typically involves switching all traffic at once from the old (blue) to the new (green) environment, which does not provide a gradual rollout to a small percentage of traffic before full deployment. Option B is wrong because A/B testing with a holdout group is a statistical method for comparing model performance, not a deployment strategy for gradually shifting traffic with rollback capability; it requires manual intervention to route traffic and does not inherently support quick rollback via endpoint variants. Option D is wrong because rolling deployment across multiple endpoints would require managing separate endpoints and DNS routing, which is more complex and does not leverage SageMaker's built-in traffic shifting and variant management for gradual rollout and rollback.

330
MCQhard

A data scientist is using SageMaker to train a custom TensorFlow model. The training script reads data from S3 using TensorFlow's tf.data API. The training is bottlenecked by I/O. Which strategy would MOST effectively improve data throughput?

A.Compress the data files in S3
B.Use Amazon FSx for Lustre as a mounted filesystem
C.Increase the number of parallel workers in tf.data
D.Use SageMaker Pipe mode and shard the S3 dataset
AnswerD

Pipe mode streams data directly, and sharding distributes data across instances, improving throughput.

Why this answer

Using SageMaker Pipe mode with a sharded S3 dataset allows the training instances to stream data in parallel, reducing I/O bottlenecks. Increasing workers in tf.data may help but not as effectively as optimizing data ingestion. Using FSx for Lustre provides high throughput but adds cost and complexity.

331
Multi-Selecthard

A data engineer needs to set up a data lake on S3 that supports both batch and streaming ingestion. The data must be queryable by Athena, Redshift Spectrum, and EMR. Which TWO configurations are essential? (Choose two.)

Select 2 answers
A.Store data in columnar formats like Parquet or ORC.
B.Use the AWS Glue Data Catalog as a central metadata repository.
C.Enable S3 Select on the target buckets.
D.Enable S3 versioning on all buckets.
E.Set up Kinesis Data Firehose for streaming ingestion.
AnswersA, B

Columnar formats improve query performance and reduce scan costs for Athena and Redshift Spectrum.

Why this answer

Columnar formats like Parquet and ORC are optimized for analytical queries, reducing I/O by reading only the necessary columns. This is essential for Athena, Redshift Spectrum, and EMR, which all benefit from the efficient compression and predicate pushdown capabilities of these formats, enabling faster query performance and lower costs.

Exam trap

The trap here is that candidates may confuse the ingestion mechanism (e.g., Kinesis Data Firehose) with the essential data lake configuration, or assume that S3 Select is required for queryability, when in fact the core requirements are a unified metadata catalog and an efficient storage format.

332
MCQeasy

A data scientist needs to create a SageMaker notebook instance with access to a private S3 bucket. The bucket uses SSE-KMS encryption. Which additional configuration is required?

A.Add a lifecycle configuration script
B.Modify the bucket policy to allow s3:GetObject
C.Place the notebook instance in a VPC
D.Attach a policy to the notebook's IAM role that allows kms:Decrypt
AnswerD

Needed to decrypt objects encrypted with SSE-KMS.

Why this answer

When an S3 bucket uses SSE-KMS encryption, the SageMaker notebook instance's IAM role must include a policy that allows the kms:Decrypt action. This is necessary because SageMaker needs to decrypt the data using the KMS key when reading objects from the bucket. Without this permission, the notebook instance will fail to access the encrypted S3 objects, even if the bucket policy allows s3:GetObject.

Exam trap

The trap here is that candidates often assume that modifying the bucket policy (Option B) or placing the notebook in a VPC (Option C) is sufficient, overlooking the fact that SSE-KMS requires explicit KMS key permissions in the IAM role, not just S3-level access controls.

How to eliminate wrong answers

Option A is wrong because lifecycle configuration scripts are used to automate notebook instance setup (e.g., installing packages or cloning repositories) and do not grant access to encrypted S3 buckets. Option B is wrong because modifying the bucket policy to allow s3:GetObject addresses S3-level permissions but does not grant the necessary KMS key permissions required for decrypting SSE-KMS encrypted objects. Option C is wrong because placing the notebook instance in a VPC controls network access but does not provide the IAM permissions needed to decrypt SSE-KMS encrypted data.

333
Multi-Selectmedium

A data engineer is designing a data ingestion pipeline that will receive up to 5 GB of data per hour from thousands of IoT devices. The data must be stored in Amazon S3 and analyzed in near real-time. Which TWO services should be used together to meet these requirements? (Choose TWO.)

Select 2 answers
A.AWS Lambda
B.Amazon Kinesis Data Analytics
C.Amazon Athena
D.Amazon Kinesis Data Firehose
E.Amazon Simple Queue Service (Amazon SQS)
AnswersB, D

Kinesis Data Analytics can run SQL queries on streaming data for near real-time analysis.

Why this answer

Amazon Kinesis Data Firehose is the correct service because it can reliably ingest streaming data from thousands of IoT devices at up to 5 GB per hour, automatically buffer, compress, and deliver the data to Amazon S3 with near-real-time latency (typically 60 seconds). Amazon Kinesis Data Analytics is correct because it enables real-time SQL-based analytics on the streaming data before it is stored in S3, allowing the data engineer to derive insights as data arrives without needing to query the S3 bucket after storage.

Exam trap

The trap here is that candidates often confuse Amazon Kinesis Data Firehose with Amazon Kinesis Data Streams, or mistakenly think Amazon Athena can ingest streaming data because it can query S3 in near-real-time, but Athena is purely a query engine and cannot replace the ingestion and streaming analytics components required for this pipeline.

334
Multi-Selectmedium

A company is designing a data pipeline to ingest data from multiple sources into an Amazon S3 data lake. The data must be encrypted at rest and in transit. Which TWO actions should be taken to meet these requirements?

Select 2 answers
A.Enable Server-Side Encryption on the S3 bucket
B.Enable S3 Transfer Acceleration
C.Enforce HTTPS for all S3 API requests using bucket policy
D.Use client-side encryption before uploading
E.Use S3 VPC Endpoint
AnswersA, C

Encrypts objects at rest.

Why this answer

Enabling Server-Side Encryption (SSE-S3 or SSE-KMS) on the S3 bucket automatically encrypts data at rest when written to disk, using AES-256 encryption. This meets the requirement for encryption at rest without any client-side changes.

Exam trap

The trap here is that candidates often confuse S3 Transfer Acceleration or VPC Endpoints with encryption features, or mistakenly think client-side encryption is required alongside server-side encryption, when the simplest AWS-native pair is SSE + HTTPS enforcement.

335
MCQeasy

A data engineer needs to move 50 TB of historical data from an on-premises Hadoop cluster to Amazon S3. The network bandwidth is limited to 100 Mbps. Which AWS service should be used to transfer the data most efficiently?

A.Amazon S3 Transfer Acceleration to speed up the transfer.
B.AWS Snowball Edge device to physically ship the data.
C.AWS Direct Connect to establish a dedicated network connection.
D.AWS Site-to-Site VPN to connect and copy data.
AnswerB

Snowball bypasses network limitations by shipping data physically.

Why this answer

Given 50 TB of data and a 100 Mbps network link, the theoretical minimum transfer time over the network is over 46 days (50 TB * 8 / 100 Mbps ≈ 4,000,000 seconds ≈ 46.3 days), not accounting for protocol overhead, retransmissions, or contention. AWS Snowball Edge is a physical appliance that bypasses the network bottleneck entirely, allowing you to copy data locally and ship it to AWS, making it the most efficient option for this volume over a constrained link.

Exam trap

The trap here is that candidates often overestimate the impact of acceleration or dedicated connections on large data volumes over low-bandwidth links, failing to calculate that even with perfect efficiency, a 100 Mbps link cannot transfer 50 TB in a reasonable time frame, making physical shipping the only viable option.

How to eliminate wrong answers

Option A is wrong because Amazon S3 Transfer Acceleration uses optimized network paths and edge locations but still relies on the same 100 Mbps internet link, so it cannot overcome the fundamental bandwidth limitation; the transfer would still take weeks. Option C is wrong because AWS Direct Connect provides a dedicated network connection with consistent bandwidth, but it does not increase the available 100 Mbps capacity—it would still require the same multi-week transfer time and involves significant setup cost and lead time. Option D is wrong because AWS Site-to-Site VPN encrypts traffic over the public internet but does not improve throughput; it adds overhead and still depends on the same 100 Mbps bottleneck, making it even slower than a direct transfer.

336
MCQmedium

A data scientist is using SageMaker to train a model using the built-in XGBoost algorithm. The training job fails with the error 'AlgorithmError: Framework error: No module named 'xgboost''. What is the most likely cause?

A.The training data is not in CSV format.
B.The training job is using a custom container that does not have XGBoost installed.
C.The IAM role does not have permission to access SageMaker.
D.The S3 output path is incorrect.
AnswerB

Missing module indicates container issue.

Why this answer

The built-in XGBoost algorithm requires the 'xgboost' Python package; SageMaker's built-in algorithms provide the necessary environment, but if the container is overridden or the wrong image is used, the module may be missing. Option A is wrong because the error is about missing module, not data format. Option C is wrong because the error is not about permissions.

Option D is wrong because the error is not about output path.

337
MCQmedium

A machine learning team needs to preprocess large volumes of clickstream data stored in Amazon S3 before training a model. The preprocessing includes data cleaning, feature engineering, and normalization. The team wants to use a serverless solution that minimizes operational overhead. Which combination of services should the team use?

A.Amazon SageMaker Notebooks with custom Python scripts.
B.Amazon EMR with Spark clusters.
C.AWS Glue ETL jobs reading from and writing to S3.
D.Amazon Athena with SQL queries.
AnswerC

AWS Glue is serverless and designed for ETL on data lakes.

Why this answer

AWS Glue ETL jobs are a serverless solution that automatically provisions and scales the underlying compute resources, making them ideal for preprocessing large volumes of clickstream data stored in S3. Glue can read directly from S3, perform data cleaning, feature engineering, and normalization using PySpark or Scala, and write the transformed data back to S3, all without managing any infrastructure. This minimizes operational overhead while handling the required preprocessing tasks at scale.

Exam trap

The trap here is that candidates often confuse 'serverless' with 'managed' — EMR is managed but not serverless, while Athena is serverless but lacks the flexibility for complex ETL transformations, leading them to incorrectly choose Athena or EMR.

How to eliminate wrong answers

Option A is wrong because Amazon SageMaker Notebooks run on EC2 instances that require manual provisioning, scaling, and lifecycle management, which introduces operational overhead and is not serverless. Option B is wrong because Amazon EMR with Spark clusters requires you to manage cluster provisioning, scaling, and termination, adding significant operational overhead compared to a serverless solution. Option D is wrong because Amazon Athena is primarily an interactive query service for ad-hoc analysis using SQL, not designed for complex ETL pipelines involving custom feature engineering and normalization logic that go beyond SQL capabilities.

338
MCQmedium

A company uses Amazon Kinesis Data Analytics for Apache Flink to process streaming data. The application reads from a Kinesis data stream and writes results to a sink. The application is failing with an 'OutOfMemoryError'. The application has parallelism set to 4 and uses 1 Kinesis Processing Unit (KPU). What is the MOST likely cause and solution?

A.The application is using too many operators; reduce parallelism to 2.
B.The heap memory per operator is too low; increase parallelism to 8.
C.The checkpoint interval is too short; increase it to 5 minutes.
D.The buffer timeout is too high; reduce it to 50 ms.
AnswerB

Higher parallelism allocates more total memory across tasks.

Why this answer

With parallelism set to 4 but only 1 KPU, each operator slot receives a fraction of the available heap memory, leading to an OutOfMemoryError. Increasing parallelism to 8 distributes the workload across more slots, but more importantly, it forces Kinesis Data Analytics to allocate additional KPUs (each KPU provides 4 GB of memory), thereby increasing the total heap memory available to the application.

Exam trap

The trap here is that candidates assume increasing parallelism always reduces per-operator memory, but in Kinesis Data Analytics, parallelism is tied to KPU allocation, so increasing parallelism can actually increase total memory by provisioning more KPUs.

How to eliminate wrong answers

Option A is wrong because reducing parallelism would further decrease the number of operator slots, concentrating memory usage and worsening the OutOfMemoryError. Option C is wrong because a short checkpoint interval can cause backpressure and increased memory usage, but the primary issue here is insufficient heap memory per operator, not checkpoint timing. Option D is wrong because buffer timeout affects latency and batching behavior, not heap memory allocation; reducing it would increase the number of small records processed, potentially increasing memory pressure.

339
Multi-Selectmedium

Which TWO metrics are MOST appropriate for evaluating a regression model that predicts house prices, where the business is most sensitive to large errors?

Select 2 answers
A.Root Mean Squared Error (RMSE)
B.Mean Absolute Percentage Error (MAPE)
C.Accuracy
D.Mean Absolute Error (MAE)
E.R-squared
AnswersA, B

RMSE squares errors, so large errors are penalized heavily.

Why this answer

RMSE is most appropriate because it squares the errors before averaging, which heavily penalizes large errors. Since the business is most sensitive to large errors in house price predictions, RMSE directly aligns with this requirement by amplifying the impact of outliers, making it a suitable metric for evaluating model performance in this context.

Exam trap

The trap here is that candidates often choose MAE (Option D) because it is a common regression metric, but they fail to recognize that MAE does not penalize large errors more heavily, which is the key business requirement in this scenario.

340
MCQmedium

A data scientist trains a model using SageMaker and notices that the training loss decreases but validation loss increases after a few epochs. What is the MOST likely issue?

A.The learning rate is too low.
B.There is data leakage from validation to training.
C.The model is underfitting the training data.
D.The model is overfitting the training data.
AnswerD

Classic sign of overfitting: training loss decreases, validation loss increases.

Why this answer

Overfitting occurs when the model performs well on training data but poorly on validation data. Option D is correct. Option A is incorrect because a low learning rate would slow convergence, not cause validation loss to increase while training loss decreases.

Option B is incorrect because data leakage would cause both training and validation loss to be artificially low. Option C is incorrect because underfitting would show high training loss.

341
MCQhard

A research team is developing a deep learning model to classify medical images into 10 disease categories. They have a dataset of 50,000 labeled images, but the class distribution is highly imbalanced: the most common class has 20,000 images, while the rarest class has only 200 images. To address this, they apply data augmentation (random rotations, flips, and brightness adjustments) to the minority classes until each class has 20,000 images. They then train a convolutional neural network (CNN) from scratch using cross-entropy loss. The model achieves 95% overall accuracy but only 30% recall on the rarest class. Which change is MOST likely to improve recall on the rarest class without significantly reducing overall accuracy?

A.Increase dropout rate from 0.2 to 0.5 to reduce overfitting
B.Replace cross-entropy loss with focal loss
C.Switch from Adam optimizer to SGD with momentum
D.Reduce the batch size from 64 to 16 to increase stochasticity
AnswerB

Focal loss reduces the loss contribution from easy examples and focuses on hard, minority examples, improving recall.

Why this answer

Focal loss is specifically designed to address class imbalance by down-weighting the loss contribution from well-classified examples (majority classes) and focusing training on hard, misclassified examples (minority classes). This directly improves recall on the rarest class, while cross-entropy loss treats all classes equally, causing the model to be biased toward the majority classes.

Exam trap

The MLS-C01 exam often tests the distinction between regularization techniques (dropout, batch size) and loss function modifications (focal loss) for class imbalance, trapping candidates who think overfitting is the primary issue when the real problem is the model's bias toward majority classes.

How to eliminate wrong answers

Option A is wrong because increasing dropout from 0.2 to 0.5 is a regularization technique that reduces overfitting, but the model already achieves 95% overall accuracy, indicating it is not overfitting; this change would likely reduce capacity and hurt recall on the rare class without addressing the imbalance. Option C is wrong because switching from Adam to SGD with momentum changes the optimization dynamics (e.g., learning rate scheduling, convergence speed) but does not directly address the class imbalance problem; it may even slow convergence and fail to improve minority class recall. Option D is wrong because reducing batch size from 64 to 16 increases gradient stochasticity, which can help escape local minima but does not specifically target the imbalance; it may cause training instability and does not re-weight the loss to focus on minority classes.

342
Multi-Selectmedium

A company is using SageMaker Autopilot to automatically build ML models. They want to ensure that the generated models are reproducible. Which TWO settings should they configure?

Select 2 answers
A.Set a random seed.
B.Specify a validation split.
C.Use multiple trials.
D.Enable early stopping.
E.Enable automatic feature engineering.
AnswersA, B

Random seeds make train/test split and model initialization deterministic.

Why this answer

Setting a random seed (Option A) ensures that the stochastic processes in model training (e.g., weight initialization, data shuffling, and hyperparameter sampling) produce identical results across runs. SageMaker Autopilot uses algorithms like XGBoost and linear learners that rely on randomness; fixing the seed guarantees reproducibility of the final model.

Exam trap

AWS often tests the misconception that enabling automatic feature engineering or using multiple trials inherently ensures reproducibility, when in fact only controlling randomness via a seed and fixing the data split guarantees identical results.

343
MCQhard

A data scientist is performing EDA on a dataset containing text reviews. To understand the most common words, the data scientist generates a word cloud. Which preprocessing step is most important to ensure the word cloud reflects meaningful content?

A.Stop word removal
B.Part-of-speech tagging
C.Stemming
D.Tokenization
AnswerA

Stop word removal eliminates common, uninformative words.

Why this answer

Removing stop words (common words like 'the', 'and') ensures that the word cloud highlights meaningful content. Stemming (C) may not be necessary for a word cloud. Tokenization (D) is fundamental but not the most critical for meaningfulness.

POS tagging (B) is overkill.

344
Multi-Selectmedium

Which THREE techniques are commonly used in exploratory data analysis to understand the relationships between features and the target variable? (Select THREE.)

Select 3 answers
A.Use box plots to compare feature distributions across target classes.
B.Perform K-means clustering on the features.
C.Compute the correlation matrix between features and target.
D.Generate scatter plots or pair plots to visualize feature interactions.
E.Apply Principal Component Analysis (PCA) to reduce dimensions.
AnswersA, C, D

Box plots by class reveal differences in feature distributions.

Why this answer

Options A, C, and D are correct. Box plots (A) are useful for comparing feature distributions across different target classes, revealing differences that may indicate predictive power. Scatter plots or pair plots (D) allow visual inspection of relationships between features and the target, highlighting patterns, clusters, or outliers.

A correlation matrix (C) quantifies linear relationships between features and the target variable, helping identify strongly correlated features. B is incorrect because K-means clustering is an unsupervised technique used for grouping data, not for understanding feature-target relationships. E is incorrect because PCA is a dimensionality reduction technique, not a direct method for analyzing relationships between features and a target variable.

345
Multi-Selecteasy

A data scientist is training a k-means clustering model on a dataset with 1,000 points. The scientist uses the elbow method to choose the number of clusters. The elbow plot shows a clear bend at k=4. After running k-means with k=4, the scientist wants to evaluate the quality of the clustering. Which THREE of the following are suitable internal clustering validation metrics? (Choose THREE.)

Select 3 answers
A.Adjusted Rand index
B.Rand index
C.Calinski-Harabasz index
D.Silhouette score
E.Davies-Bouldin index
AnswersC, D, E

Ratio of between-cluster variance to within-cluster variance; higher is better.

Why this answer

Silhouette score, Davies-Bouldin index, and Calinski-Harabasz index are all internal validation metrics that do not require ground truth labels. They measure compactness and separation. Rand index and adjusted Rand index require ground truth labels (external validation).

346
MCQeasy

A data scientist is training a linear regression model on a dataset with 50 features. After training, they notice that the model performs well on training data but poorly on test data. They suspect overfitting. Which action should they take to reduce overfitting?

A.Use a larger learning rate
B.Add L2 regularization (Ridge regression)
C.Add more features to the model
D.Increase the number of training epochs
AnswerB

L2 regularization penalizes large coefficients, reducing overfitting.

Why this answer

L2 regularization (Ridge regression) adds a penalty term proportional to the square of the magnitude of the coefficients to the loss function. This discourages the model from fitting the noise in the training data by shrinking the weights, which reduces variance and mitigates overfitting, improving generalization to the test data.

Exam trap

The MLS-C01 exam often tests the misconception that adding more data or training longer always helps, but the trap here is that overfitting is a variance problem best addressed by regularization or reducing model complexity, not by extending training or adding features.

How to eliminate wrong answers

Option A is wrong because increasing the learning rate can cause the optimization to overshoot the minimum or diverge, and it does not address overfitting—it may even worsen training instability. Option C is wrong because adding more features increases model complexity and typically exacerbates overfitting, especially when the model already has 50 features. Option D is wrong because increasing the number of training epochs allows the model to continue minimizing training loss, which can lead to further overfitting on the training data without improving generalization.

347
MCQeasy

A data scientist is exploring a dataset and wants to understand the distribution of a continuous feature. Which visualization is most appropriate for identifying skewness and potential outliers?

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

A box plot explicitly shows median, quartiles, and outliers, making it ideal for identifying skewness and potential outliers.

Why this answer

(bar chart) is wrong because bar charts are for categorical data, not for showing distribution of a continuous feature. Option B (scatter plot) is wrong because scatter plots show relationships between two variables, not distribution. Option C is correct because a box plot explicitly shows median, quartiles, and outliers.

Option D is wrong because heatmaps show correlations, not distribution.

348
MCQeasy

A data scientist is training a linear regression model and observes that the training loss is low but validation loss is high. Which step should the data scientist take to address this issue?

A.Apply L2 regularization to the model
B.Increase the number of training epochs
C.Reduce the size of the training dataset
D.Add more features to the model
AnswerA

Regularization penalizes large weights, reducing overfitting.

Why this answer

The model is overfitting (low training loss, high validation loss). L2 regularization adds a penalty on the magnitude of coefficients, which discourages complexity and reduces overfitting. Increasing training epochs (B) would likely worsen overfitting by allowing the model to memorize more.

Reducing the training dataset size (C) would provide less data, making overfitting worse. Adding more features (D) increases model complexity and typically exacerbates overfitting.

349
Matchingmedium

Match each hyperparameter tuning strategy to its description.

Drag a concept onto its matching description — or click a concept then click the description.

Concepts
Matches

Exhaustive search over specified hyperparameter values

Random sampling of hyperparameter combinations

Probabilistic model to guide search

Early stopping and resource allocation

SageMaker automatic tuning

Why these pairings

The correct matches are: Grid Search exhaustively searches all combinations; Random Search samples randomly; Bayesian Optimization uses a probabilistic model. Common confusions involve swapping the descriptions of Grid Search and Random Search, or confusing Random Search with Bayesian Optimization.

350
MCQmedium

A company is deploying a machine learning model for real-time fraud detection. The model must respond within 100ms. Which SageMaker endpoint deployment strategy should be used?

A.Deploy the model to a SageMaker Serverless Inference endpoint.
B.Deploy the model to a SageMaker Real-Time Inference endpoint with a Multi-Model Endpoint configuration.
C.Deploy the model as an AWS Lambda function with an API Gateway trigger.
D.Use SageMaker Batch Transform to process requests in batches.
AnswerB

Multi-Model Endpoints provide low latency and cost efficiency for real-time serving.

Why this answer

A SageMaker Real-Time Inference endpoint with a Multi-Model Endpoint configuration provides low-latency (sub-100ms) responses by keeping models loaded in memory and routing requests efficiently. This architecture is ideal for real-time fraud detection where multiple models may be needed, and it meets the strict latency requirement without the cold-start overhead of serverless options.

Exam trap

The trap here is that candidates may confuse serverless or Lambda-based solutions as inherently low-latency, overlooking the cold-start penalty and network overhead that make them unsuitable for sub-100ms real-time inference in SageMaker.

How to eliminate wrong answers

Option A is wrong because SageMaker Serverless Inference endpoints have a cold-start latency that can exceed 100ms, especially for infrequent or bursty traffic, making them unsuitable for real-time fraud detection with strict latency constraints. Option C is wrong because deploying as an AWS Lambda function with API Gateway introduces additional network hops and cold-start delays, and Lambda has a maximum execution timeout of 15 minutes but is not optimized for sub-100ms ML inference with large models or frameworks. Option D is wrong because SageMaker Batch Transform is designed for asynchronous, offline processing of large datasets in batches, not for real-time, low-latency inference required by fraud detection.

351
MCQmedium

A company is using Amazon SageMaker to train a model. The training job is taking too long. The data scientist notices that the GPU utilization is low. Which action should be taken to improve training performance?

A.Increase the number of training instances.
B.Use spot instances to reduce cost.
C.Decrease the batch size to reduce memory usage.
D.Increase the batch size in the training script.
AnswerD

Larger batch size keeps GPU busy.

Why this answer

Low GPU utilization during training typically indicates that the GPU is waiting for data, often due to a small batch size that underutilizes the GPU's parallel processing capacity. Increasing the batch size allows the GPU to process more samples per step, improving computational efficiency and throughput, which directly addresses the low utilization issue.

Exam trap

AWS often tests the misconception that low GPU utilization is caused by insufficient compute resources, leading candidates to choose increasing instances (Option A) instead of recognizing it as a data pipeline or batch size issue.

How to eliminate wrong answers

Option A is wrong because increasing the number of training instances (distributed training) adds communication overhead and does not solve the root cause of low GPU utilization per instance; it may even exacerbate the problem if the batch size per GPU remains small. Option B is wrong because using spot instances reduces cost but does not affect GPU utilization or training speed; it can introduce interruptions that degrade performance. Option C is wrong because decreasing the batch size reduces memory usage but further lowers GPU utilization by making each step process fewer samples, worsening the underutilization problem.

352
MCQmedium

A data scientist is working on a binary classification problem to predict loan default. The dataset has 200,000 samples and 50 features. The target variable is imbalanced: 5% default, 95% non-default. The scientist trains a logistic regression model and achieves 95% accuracy, but the recall for the default class is only 20%. The business requires that at least 70% of actual defaults be identified (recall >= 0.7). Which approach should the scientist take to improve recall without significantly sacrificing precision?

A.Use random undersampling of the majority class to balance the dataset
B.Use oversampling techniques like SMOTE to create synthetic samples of the minority class
C.Change the decision threshold to 0.3
D.Increase the regularization strength (C) in logistic regression
AnswerB

SMOTE generates synthetic minority samples, helping the model learn better decision boundaries for the minority class, improving recall with less precision loss.

Why this answer

SMOTE (Synthetic Minority Oversampling Technique) creates synthetic samples for the minority class by interpolating between existing minority instances, which increases the representation of the default class in the training data. This directly addresses the low recall (20%) by providing the logistic regression model with more balanced class distributions, enabling it to learn decision boundaries that capture more true positives without discarding majority class information. Unlike simple oversampling, SMOTE reduces overfitting risk by generating novel samples rather than duplicating existing ones, which helps maintain precision while improving recall.

Exam trap

The trap here is that candidates often choose threshold adjustment (Option C) as a quick fix for recall, failing to recognize that it is a superficial change that does not improve the model's learned decision boundary and typically sacrifices precision disproportionately, whereas SMOTE addresses the root cause of imbalance in the training data.

How to eliminate wrong answers

Option A is wrong because random undersampling of the majority class discards 95% of the data (190,000 samples), which can lead to significant information loss and reduced model precision due to a smaller, less representative training set. Option C is wrong because changing the decision threshold to 0.3 is a post-hoc adjustment that does not address the underlying class imbalance; while it may increase recall by classifying more instances as positive, it typically causes a sharp drop in precision as many false positives are introduced. Option D is wrong because increasing regularization strength (lower C value) penalizes model complexity more heavily, which can cause underfitting and further reduce recall by making the decision boundary too simplistic to capture the minority class patterns.

353
MCQmedium

A data science team is using Amazon SageMaker to train a model. The training job is failing with an 'OutOfMemory' error. The team is using a p3.2xlarge instance with 61 GB of memory. They need to resolve this issue as quickly as possible. Which action should they take?

A.Use a larger instance type, such as p3.8xlarge
B.Reduce the batch size in the training script
C.Use a spot instance to save costs
D.Enable distributed training across multiple instances
AnswerA

Larger instance types have more memory and can handle the workload.

Why this answer

The 'OutOfMemory' error indicates the training job requires more memory than the 61 GB available on the p3.2xlarge instance. The fastest resolution is to scale vertically by using a larger instance type, such as the p3.8xlarge, which provides 244 GB of memory. This directly addresses the memory shortage without requiring code changes or architectural modifications, minimizing downtime.

Exam trap

The trap here is that candidates may overthink optimization strategies (like reducing batch size or enabling distributed training) when the simplest and fastest solution is to increase instance memory, as the question explicitly asks for the quickest resolution.

How to eliminate wrong answers

Option B is wrong because reducing the batch size may lower memory usage but requires modifying the training script and retesting, which is not the quickest fix; it also may not resolve the issue if the model or data itself exceeds memory limits. Option C is wrong because using a spot instance does not change the instance's memory capacity and could introduce interruptions, making it irrelevant to an OutOfMemory error. Option D is wrong because enabling distributed training across multiple instances requires code changes (e.g., using SageMaker's distributed data parallelism or model parallelism) and adds complexity, which is slower than simply using a larger instance.

354
MCQmedium

A company is migrating its on-premises Hadoop cluster to AWS. They have a large amount of historical data stored in HDFS. Which approach is the most efficient for transferring this data to Amazon S3?

A.Use AWS Snowball Edge devices.
B.Use AWS Direct Connect.
C.Use AWS DataSync over the internet.
D.Use S3 Transfer Acceleration.
AnswerA

Snowball is designed for large offline data transfers.

Why this answer

AWS Snowball Edge is ideal for large data transfers when network bandwidth is limited. AWS DataSync is for network transfers, but slower for huge datasets. S3 Transfer Acceleration improves speed but still network.

Direct Connect is network-based.

355
Matchingmedium

Match each SageMaker built-in algorithm to its primary use case.

Drag a concept onto its matching description — or click a concept then click the description.

Concepts
Matches

Gradient boosted trees for regression and classification

Word2Vec and text classification

Learning embeddings for pairs of objects

Anomaly detection in IP traffic

Time series forecasting

Why these pairings

Correct matches: Linear Learner → regression/classification, Object Detection → image object detection. Common confusions: swapping XGBoost (gradient boosting) with BlazingText (text vectors).

356
MCQeasy

Refer to the exhibit. A data scientist checks the status of a SageMaker endpoint and sees the output above. The endpoint is receiving traffic, but the data scientist notices that the number of instances has not increased to the desired count. What is the most likely reason?

A.The endpoint is performing a rolling update
B.The endpoint is currently being updated
C.The account has reached its instance limit
D.Automatic scaling is not configured for the endpoint
AnswerD

The desired instance count will not be applied automatically without a scaling policy; it's just a target.

Why this answer

The endpoint is receiving traffic but not scaling out, which indicates that automatic scaling (Application Auto Scaling) has not been configured for the SageMaker endpoint. Without a scaling policy, the endpoint will only use the initial instance count, regardless of traffic load. The status shown does not indicate any update or quota issue, so the lack of scaling is the most likely cause.

Exam trap

AWS often tests the distinction between endpoint status (e.g., 'InService' vs. 'Updating') and scaling configuration, trapping candidates who assume that any traffic increase automatically triggers scaling without an explicit scaling policy.

How to eliminate wrong answers

Option A is wrong because a rolling update would show a status like 'Updating' or 'RollingUpdate', not the current steady state, and would not prevent scaling beyond the desired count. Option B is wrong because if the endpoint were being updated, the status would reflect an 'InService' transition or 'Updating', and the instance count would not remain static at the initial value. Option C is wrong because an instance limit would cause a scaling failure or error message, not simply a failure to increase instances while the endpoint remains healthy and receiving traffic.

357
MCQmedium

Refer to the exhibit. An IAM policy is attached to a SageMaker notebook instance. The data scientist runs a training job that reads from s3://my-bucket/training-data/ and writes to s3://my-bucket/output/. The training job fails with an access denied error. What is the most likely cause?

A.The policy does not allow sagemaker:CreateTrainingJob
B.The policy does not allow s3:PutObject on the output location
C.The policy is missing the sagemaker:InvokeEndpoint action
D.The policy does not allow s3:GetObject on the training data
AnswerB

The s3:PutObject action is restricted to the training-data prefix only.

Why this answer

The training job fails because the IAM policy does not grant s3:PutObject permission to the output location (s3://my-bucket/output/). The policy likely only allows s3:PutObject on the training-data prefix. Option A is incorrect because sagemaker:CreateTrainingJob is not directly related to write access; the job can be created but execution fails.

Option C is incorrect because InvokeEndpoint is used for real-time inference, not training. Option D is incorrect because the policy does allow s3:GetObject on the training data (as it permits read access to that prefix).

358
MCQmedium

A financial services company is developing a fraud detection model using gradient boosting. The dataset contains 10 million transactions with 0.1% fraudulent. The model is trained on a SageMaker ml.m5.2xlarge instance and takes 8 hours. The team needs to reduce training time without sacrificing model performance. They have permission to use up to 4 instances. What should they do?

A.Switch to a built-in XGBoost with GPU support and use a p3.2xlarge instance
B.Use SageMaker hyperparameter tuning to find faster hyperparameters
C.Use SageMaker's distributed training with data parallelism across 4 ml.m5.2xlarge instances
D.Use SageMaker managed spot training with checkpointing
AnswerA

GPU acceleration can significantly reduce training time for gradient boosting.

Why this answer

GPU instances like p3.2xlarge accelerate XGBoost training substantially.

359
MCQmedium

A data scientist is analyzing a dataset with a time series component. They suspect there is a weekly seasonality. Which technique should they use to confirm this?

A.Plot the time series line chart
B.Compute autocorrelation function (ACF)
C.Perform Fourier transform
D.Compute a 7-day moving average
AnswerB

Correct. ACF at lag 7 shows the correlation with the value 7 days earlier; a significant positive autocorrelation indicates weekly seasonality.

Why this answer

The autocorrelation function (ACF) measures the correlation between a time series and its lagged values. A significant spike at lag 7 confirms weekly seasonality. Option A (line chart) is subjective and not a definitive test.

Option C (Fourier transform) identifies frequency components but is more complex and less direct for confirming seasonality. Option D (moving average) smooths the series and may obscure seasonality.

360
Multi-Selectmedium

Which TWO actions can help reduce overfitting in a neural network? (Choose 2.)

Select 2 answers
A.Increase the number of layers.
B.Decrease the learning rate.
C.Apply L1 or L2 regularization.
D.Increase the training dataset size.
E.Add dropout layers.
AnswersC, E

Regularization penalizes large weights, reducing overfitting.

Why this answer

Options C and E are correct because L1/L2 regularization penalizes large weights to prevent overfitting, and dropout randomly deactivates neurons to reduce co-adaptation. Option A is incorrect because adding layers increases model complexity, which can worsen overfitting. Option B is incorrect because decreasing the learning rate only affects training speed, not overfitting.

Option D is incorrect because, although increasing dataset size can help reduce overfitting, it is not one of the two actions specified; L1/L2 regularization and dropout are the correct choices.

361
Multi-Selecteasy

A company stores IoT sensor data in Amazon S3 and uses Amazon Athena for ad-hoc queries. The data is partitioned by date, but queries are still slow and expensive. Which TWO actions can improve query performance and reduce cost? (Choose TWO.)

Select 2 answers
A.Use S3 lifecycle policies to compact small files into larger ones
B.Convert the data from CSV to Parquet format
C.Disable server-side encryption on the S3 bucket
D.Use AWS Glue instead of Athena for querying
E.Increase the number of partitions to hour-level granularity
AnswersA, B

Fewer, larger files reduce the overhead of opening many files in Athena.

Why this answer

Compacts small files into larger ones, reducing the number of objects and minimizing metadata overhead, which improves query performance. Option B converts data from CSV to Parquet, a columnar format that reduces the amount of data scanned by Athena, lowering cost and speeding up queries. Option C (disabling encryption) does not affect performance and is not recommended.

Option D (using Glue) is a different service and not a direct improvement for Athena queries. Option E (increasing partitions to hour-level) can create many small files, degrading performance.

362
MCQmedium

A data scientist is building a model to predict insurance claim amounts. The target variable is right-skewed with many small claims and a few very large claims. The scientist wants to minimize the impact of outliers. Which loss function or transformation is MOST appropriate?

A.Use mean squared error loss without any transformation
B.Use quantile loss to predict the median
C.Use Poisson loss assuming the target follows a Poisson distribution
D.Apply a log transformation to the target variable
AnswerD

Log transformation reduces skewness and makes the distribution more symmetric, reducing outlier impact.

Why this answer

Applying a log transformation to the target variable reduces skewness and mitigates the impact of outliers by compressing the scale of large values. This makes the distribution more symmetric and suitable for models like linear regression. Option A (mean squared error) is sensitive to outliers.

Option B (quantile loss) predicts the median, which is robust but not typical for mean prediction. Option C (Poisson loss) is designed for count data, not continuous skewed targets. Option D (log transformation) is the standard approach for right-skewed continuous targets.

363
MCQmedium

A data scientist is using principal component analysis (PCA) for dimensionality reduction before training a classifier. The classifier's performance on the test set is poor. What is the most likely cause?

A.The classifier is overfitting
B.The data was not scaled before applying PCA
C.Too few principal components were retained, losing important information
D.Too many principal components were retained, including noise
AnswerC

Discards discriminative features.

Why this answer

C is correct because PCA is an unsupervised dimensionality reduction technique that projects data onto principal components capturing the maximum variance. If too few components are retained, the reduced representation may discard features that are critical for the classifier to distinguish between classes, leading to poor test performance due to underfitting.

Exam trap

AWS often tests the misconception that PCA always improves classifier performance by removing noise, but the trap here is that candidates may overlook the risk of underfitting when too few components are retained, especially when the discarded variance contains critical discriminative features.

How to eliminate wrong answers

Option A is wrong because overfitting would cause high training accuracy but poor test accuracy, whereas the question states the classifier's performance on the test set is poor without mentioning training performance, making underfitting from information loss more likely. Option B is wrong because while scaling is a best practice for PCA (since PCA is sensitive to variances), unscaled data would typically distort component directions and degrade performance, but the most likely cause given poor test performance is retaining too few components, not scaling alone. Option D is wrong because retaining too many components, including noise, would typically lead to overfitting (high variance, poor generalization), but the question's scenario of poor test performance without context of training performance points more directly to underfitting from insufficient components.

364
Multi-Selecthard

A data scientist is analyzing a dataset of customer reviews. The dataset contains a text column 'review' and a numerical rating from 1 to 5. The data scientist wants to create features for sentiment analysis. Which THREE preprocessing steps should be applied to the text data before feature extraction? (Choose THREE.)

Select 3 answers
A.Standardize the text data using z-score normalization.
B.Apply stemming to reduce words to their root form.
C.Tokenize the text into individual words.
D.Convert all text to lowercase.
E.Remove common stop words (e.g., 'the', 'and', 'is').
AnswersB, D, E

Stemming groups related words, reducing feature dimensionality.

Why this answer

Stemming reduces words to their root form (e.g., 'running' to 'run'), which consolidates variations of the same word and reduces feature dimensionality. This is a standard preprocessing step before feature extraction in NLP tasks like sentiment analysis, as it helps the model generalize across different word forms.

Exam trap

The MLS-C01 exam often tests the distinction between preprocessing steps that are specific to text (like stemming, lowercasing, stop word removal) versus those meant for numerical data (like normalization), and candidates may mistakenly apply scaling techniques to text or forget that tokenization is a prerequisite but not always listed as a separate 'correct' step in multi-select questions.

365
Multi-Selectmedium

Which TWO techniques are appropriate for detecting outliers in a univariate numeric dataset?

Select 2 answers
A.Cook's distance
B.Mahalanobis distance
C.Z-score method
D.Interquartile range (IQR) method
E.DBSCAN clustering
AnswersC, D

Z-score flags points beyond a threshold (e.g., |z|>3).

Why this answer

Options C and D are correct. The Z-score method identifies outliers by measuring how many standard deviations a data point is from the mean; points with |Z| > 3 are often considered outliers. The Interquartile Range (IQR) method defines outliers as points falling below Q1 - 1.5*IQR or above Q3 + 1.5*IQR.

Option A (Cook's distance) is used in regression to identify influential points, not general univariate outlier detection. Option B (Mahalanobis distance) is a multivariate distance measure. Option E (DBSCAN) is a clustering algorithm that can identify outliers in multivariate space, but not specifically for univariate numeric data.

366
MCQeasy

A data scientist is using Amazon SageMaker to train a classification model. The dataset contains categorical features with high cardinality. Which encoding method is most appropriate for handling high-cardinality categorical features in a linear model?

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

Target encoding replaces categories with the mean of the target variable, reducing dimensionality and capturing predictive power.

Why this answer

One-hot encoding creates many binary columns, which can cause the curse of dimensionality for high-cardinality features. Label encoding assigns arbitrary integers, which linear models may interpret as ordinal. Target encoding (mean encoding) replaces categories with the mean of the target variable, which captures information without expanding dimensionality.

This is often used for high-cardinality features. Ordinal encoding is similar to label encoding.

367
Multi-Selectmedium

Which TWO metrics are appropriate for evaluating a binary classification model trained on imbalanced data? (Select TWO.)

Select 2 answers
A.Log loss
B.F1 score
C.Accuracy
D.Precision-recall curve
E.ROC-AUC
AnswersB, D

F1 balances precision and recall.

Why this answer

The F1 score is appropriate for imbalanced binary classification because it balances precision and recall, making it robust when the positive class is rare. Unlike accuracy, it does not get inflated by a majority negative class, and it directly penalizes models that predict the majority class for all instances.

Exam trap

The MLS-C01 exam often tests the misconception that ROC-AUC is always the best metric for imbalanced data, but the trap here is that ROC-AUC can be misleadingly high when the positive class is rare, whereas precision-recall curve and F1 score better reflect model performance on the minority class.

368
MCQhard

A data engineer is setting up a data lake on Amazon S3 for a large retail company. The data includes customer transactions, inventory, and web logs. The company wants to use AWS Glue for ETL and Amazon Athena for ad-hoc queries. The data is partitioned by year, month, day, and hour. The engineer notices that Athena queries are slow and often scan large amounts of data even when only a specific hour is needed. The engineer has already enabled partitioning and used columnar formats like Parquet. What additional step should the engineer take to optimize query performance and reduce data scanned?

A.Use a coarser partition layout, such as partitioning only by date, and leverage Hive-style partitioning with AWS Glue Crawlers to avoid excessive small files.
B.Convert the Parquet files to CSV format to reduce the overhead of columnar storage and improve compression.
C.Use S3 Select to push down filters to S3, reducing the amount of data scanned by Athena.
D.Increase the granularity of partitioning to include minute-level partitions to further limit data scanned.
AnswerA

Coarser partitions reduce the number of partitions and improve query planning.

Why this answer

Partitioning at a granularity of hour can result in a large number of small files, increasing metadata overhead and slowing query planning. By using a coarser partition layout (e.g., by date) and leveraging Hive-style partitioning with AWS Glue Crawlers, the number of partitions is reduced, which improves query performance and reduces the amount of data scanned. Option B is incorrect because converting Parquet to CSV would increase storage and scan costs due to lack of columnar compression and predicate pushdown.

Option C is incorrect because S3 Select operates on a single object, not across partitions; it is not designed for optimizing Athena queries over many files. Option D is incorrect because increasing partition granularity (e.g., minute-level) would create even more small files, worsening the issue.

369
MCQhard

A data engineer is running an Amazon SageMaker Data Wrangler flow on a dataset with 5 million rows. The flow includes several transformations. The engineer wants to validate the data quality by checking for missing values and outliers before training. Which approach is most efficient?

A.Use Data Wrangler's data quality and insights report to generate a report with statistics and visualizations.
B.Export the transformed data to S3 and query with Amazon Athena.
C.Use Amazon EMR with Spark to compute statistics.
D.Import the data into Amazon QuickSight and create dashboards.
AnswerA

Data Wrangler has a built-in report for data quality.

Why this answer

Using Data Wrangler's built-in data quality and insights report is the most efficient way to get statistics and detect issues without custom code. Option B (Athena) requires writing SQL queries. Option C (QuickSight) needs exporting.

Option D (EMR) is overkill.

370
MCQmedium

A data scientist is analyzing a dataset with 100 features and 10,000 samples. The target variable is highly imbalanced (1% positive class). Which exploratory data analysis step is most critical before model training?

A.Apply PCA and visualize the first two principal components
B.Compute pairwise correlation matrix among all features
C.Impute missing values using mean imputation
D.Plot the histogram of the target variable
AnswerD

Plotting the histogram of the target variable directly shows the class distribution, confirming the severe imbalance (1% positive). This insight is crucial for deciding on resampling techniques, evaluation metrics, or algorithmic adjustments.

Why this answer

The most critical EDA step for a highly imbalanced target variable is to examine its distribution. Therefore, plotting the histogram of the target variable (D) reveals the imbalance and guides decisions on resampling or evaluation metrics. Option A (PCA) is primarily for dimensionality reduction and not essential for understanding target balance.

Option B (correlation matrix) examines feature relationships, not target distribution. Option C (mean imputation) addresses missing values, which is important but not the most critical for handling class imbalance.

371
MCQmedium

A company uses Amazon Kinesis Data Streams for real-time clickstream analysis. The data is consumed by a Lambda function that enriches the records and stores them in Amazon S3. Recently, the Lambda function has been failing with throttling errors, and the consumer is falling behind. The team needs to increase the throughput of the consumer without changing the data format or the Lambda function code. What should the team do?

A.Add a second Kinesis data stream and send duplicate records to both.
B.Increase the batch size in the event source mapping for Lambda.
C.Increase the number of shards in the Kinesis data stream.
D.Increase the reserved concurrency of the Lambda function.
AnswerC

More shards increase the stream's capacity and number of Lambda consumers.

Why this answer

Increase the number of shards in the Kinesis data stream. Each shard supports a fixed number of read transactions per second and a maximum data read rate. Increasing the number of shards increases the parallelism of the stream, allowing the Lambda function to process records from multiple shards concurrently, thus increasing throughput.

Option A is incorrect because adding a second stream would require duplicating data and does not address the throttling on the existing stream. Option B is incorrect because increasing the batch size may reduce the number of Lambda invocations but does not increase the parallelism of the stream; the bottleneck is the shard count. Option D is incorrect because increasing reserved concurrency does not overcome the limitation that each shard can only trigger one Lambda invocation at a time; the main constraint is the number of shards.

372
Multi-Selecthard

Which THREE techniques are effective for reducing overfitting in a deep neural network?

Select 3 answers
A.Increasing model complexity
B.Early stopping
C.Dropout
D.Reducing the amount of training data
E.L2 regularization
AnswersB, C, E

Early stopping prevents overfitting by stopping training.

Why this answer

Dropout (C) randomly drops neurons during training, forcing the network to learn redundant representations and reducing overfitting. L2 regularization (E) adds a penalty on large weights, discouraging complex models. Early stopping (B) monitors validation loss and halts training before the model starts overfitting.

Increasing model complexity (A) would worsen overfitting, and reducing training data (D) also increases overfitting risk due to less generalization. Thus, the correct techniques are B, C, and E.

373
MCQeasy

During EDA, a data scientist discovers that a numerical feature 'income' has a skewness of 3.5. Which transformation should the scientist apply to make the distribution more symmetric?

A.Standardization (Z-score)
B.Square transformation
C.Log transformation
D.Min-Max scaling
AnswerC

Log transformation compresses the tail and reduces right skewness.

Why this answer

A log transformation is commonly applied to right-skewed positive data to reduce skewness and make the distribution more symmetric. Option A is wrong because standardization (Z-score) centers and scales the data but does not change the shape of the distribution. Option B is wrong because a square transformation would increase skewness for right-skewed data.

Option D is wrong because min-max scaling rescales the data to a fixed range but does not alter the distribution's skewness.

374
MCQhard

A machine learning team is using Amazon SageMaker to train a PyTorch model on a dataset that is 500 GB in size. The training job runs on a single ml.p3.2xlarge instance, but the training takes over 48 hours, which exceeds the maximum allowed time. The team wants to reduce training time to under 24 hours. They are open to using multiple instances and have budget for up to 4 instances. The dataset is stored in Amazon S3 and can be split into shards by a key. The model architecture must remain unchanged. What should the team do?

A.Use SageMaker distributed data parallelism with 4 ml.p3.2xlarge instances.
B.Use SageMaker Processing to split the data and train separate models.
C.Change the instance type to ml.p3.16xlarge.
D.Switch to Pipe input mode to stream data faster.
AnswerA

Distributed training can reduce time proportionally with data parallelism.

Why this answer

SageMaker's distributed data parallelism library (SMDDP) efficiently splits the dataset across multiple GPUs, allowing the training to complete in approximately 1/4 of the time (assuming near-linear scaling). This directly addresses the timeout issue. Option B is incorrect: SageMaker Processing is for data preprocessing, not model training; training separate models would not produce a single model.

Option C is incorrect: upgrading to a single larger instance (ml.p3.16xlarge) may provide up to 8x more GPU power but may not reduce training time to under 24 hours due to memory and I/O bottlenecks, and it exceeds the budget limitation of using up to 4 instances. Option D is incorrect: Pipe input mode reduces data loading latency but does not reduce the computation required for training, so it would not sufficiently decrease training time.

375
Multi-Selecthard

You are building a CI/CD pipeline for SageMaker using AWS CodePipeline. Which THREE components are essential for a fully automated model training and deployment pipeline?

Select 3 answers
A.AWS CodeCommit to store the training script and model code
B.AWS CodeBuild to run the training job as a build step
C.AWS Lambda function to create or update the SageMaker endpoint
D.AWS CodeDeploy to deploy the model to an endpoint
E.AWS CloudFormation to define the infrastructure
AnswersA, B, C

Source control is essential for CI/CD.

Why this answer

AWS CodeCommit is essential because it provides a secure, scalable Git repository to store the training script and model code, which serves as the source stage in the CI/CD pipeline. This ensures version control and triggers the pipeline automatically on code changes, enabling a fully automated workflow.

Exam trap

The trap here is that candidates often assume AWS CodeDeploy is the standard deployment service for all AWS resources, but SageMaker endpoints require the SageMaker API, making a Lambda function the correct choice for endpoint updates.

Page 4

Page 5 of 23

Page 6