Courseiva

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

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

Page 3

Page 4 of 23

Page 5
226
Matchingmedium

Match each AWS security service to its function in ML.

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

Concepts
Matches

Manage access to AWS resources

Encryption key management

Audit API calls

Isolate network resources

Discover and protect sensitive data

Why these pairings

In ML, AWS KMS handles encryption keys, IAM manages access, CloudTrail provides audit logs. Common confusions arise because these services often work together, but each has a distinct primary function.

227
MCQmedium

A data scientist is working with a dataset containing customer transaction records stored in Amazon S3 as CSV files. The dataset has 500 columns and 2 million rows. The scientist wants to perform EDA to understand data types, missing values, and summary statistics for each column. They need to do this quickly and without writing custom code. The scientist has access to AWS Glue DataBrew and Amazon SageMaker Data Wrangler. Which approach should the scientist take?

A.Use Amazon SageMaker Data Wrangler to import the data and generate a report
B.Use Amazon Athena to run SELECT statements on each column
C.Use AWS Glue DataBrew to create a profile job that outputs data quality reports
D.Use AWS Glue ETL jobs with PySpark to compute statistics
AnswerC

DataBrew's profile job automatically computes statistics and detects missing values.

Why this answer

AWS Glue DataBrew provides a visual interface for data profiling and can handle large datasets without writing code. It automatically detects data types, missing values, and summary statistics. Option A is wrong because SageMaker Data Wrangler requires more manual setup and coding, and is not as straightforward for quick profiling.

Option B is wrong because Amazon Athena requires writing SQL queries and is not a dedicated profiling tool. Option D is wrong because AWS Glue ETL with PySpark requires writing custom code.

228
Drag & Dropmedium

Drag and drop the steps to deploy a model as a SageMaker endpoint for real-time inference in the correct order.

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

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

Why this order

Deployment requires model creation, endpoint configuration, endpoint creation, and testing.

229
MCQmedium

A DevOps engineer runs the CloudWatch Logs Insights query shown above on the log group for an ML training job. The result shows a spike in ERROR messages at a specific hour. What should the engineer do next to identify the root cause?

A.Modify the query to display the actual @message for the hour with the spike.
B.Remove the filter on ERROR to see all messages.
C.Change the bin to 5m to see more detailed spikes.
D.Increase the limit to 50 to see more hours.
AnswerA

Directly see error details.

Why this answer

Modifying the query to include the @message field for the specific hour with the spike allows the engineer to see the actual error messages, which is the direct way to identify the root cause. Option B is incorrect because removing the filter would show all messages, which is less targeted. Option C is incorrect because changing the bin to 5m might be too granular and not helpful without examining the messages.

Option D is incorrect because increasing the limit does not help identify the cause without seeing the messages.

230
Multi-Selecthard

A data engineer is performing exploratory data analysis on a dataset with 1 million rows and 50 features. The engineer wants to identify missing values and outliers. Which THREE approaches should the engineer use? (Choose three.)

Select 3 answers
A.Create a correlation heatmap of all features
B.Use a DataFrame.info() method to see non-null counts
C.Plot box plots for all features simultaneously
D.Use a missingno matrix to visualize missing data patterns
E.Use a DataFrame.describe() to view summary statistics
AnswersB, D, E

info() shows non-null counts and data types.

Why this answer

Options B, D, and E are correct because they directly help identify missing values and outliers. DataFrame.info() shows non-null counts per column, revealing missing values. The missingno matrix visualizes missing data patterns across rows and columns.

DataFrame.describe() provides summary statistics (count, mean, std, min, max, quartiles) that can indicate outliers (e.g., values far outside the interquartile range). Option A (correlation heatmap) is used to assess relationships between features, not to detect missing values or outliers. Option C (box plots for all features simultaneously) is impractical with 50 features because it would be cluttered and hard to interpret; box plots are more useful when applied selectively to a few features or after filtering.

231
MCQmedium

A machine learning engineer is monitoring a deployed model on SageMaker and notices that the prediction latency is increasing over time. The model is a linear regression with a small number of features. Which is the MOST likely cause?

A.The number of features is too large
B.The CPU utilization is too low
C.The model is overfitting to recent data
D.The inference code has a memory leak
AnswerD

Memory leaks cause gradual performance degradation and increased latency.

Why this answer

Memory leak or accumulation of model artifacts in inference code can cause latency growth over time.

232
MCQmedium

A data scientist uses SageMaker Studio to run EDA on a dataset with 500 features. The goal is to reduce dimensionality before modeling. Which EDA technique should the data scientist use to understand the variance explained by each feature?

A.Histogram of the target variable
B.Scree plot of principal components
C.Heatmap of feature correlations
D.Box plot of each feature
AnswerB

Scree plot displays variance explained by each component.

Why this answer

A Scree plot from PCA shows the eigenvalues or variance explained by each principal component, helping decide how many components to retain. Option A is wrong because a histogram shows distribution, not variance. Option C is wrong because a heatmap of correlations shows pairwise relationships, not variance.

Option D is wrong because a box plot shows summary statistics.

233
MCQhard

A financial services company uses Amazon Kinesis Data Streams with 50 shards to ingest real-time stock trade data. The data is consumed by a custom Java application running on Amazon EC2 instances. Recently, the application has been experiencing high latency, and CloudWatch metrics show that the average iterator age is increasing. The application uses the Kinesis Client Library (KCL) with DynamoDB for lease tracking. The EC2 instances are in an Auto Scaling group with a minimum of 2 and maximum of 10 instances, and the current CPU utilization is below 50%. The team wants to reduce latency without increasing costs significantly. What should they do?

A.Increase the provisioned read capacity of the DynamoDB lease table
B.Enable enhanced fan-out on the Kinesis stream
C.Increase the number of shards in the Kinesis stream
D.Increase the maximum size of the Auto Scaling group and set a scaling policy based on iterator age
AnswerD

Increasing the maximum size of the Auto Scaling group and setting a scaling policy based on iterator age allows more EC2 instances to be added dynamically, increasing the number of consumers processing shards in parallel, which directly reduces iterator age without significant cost increase.

Why this answer

Increasing the number of consumers (EC2 instances) by raising the Auto Scaling group maximum and setting a scaling policy based on iterator age allows more shards to be processed concurrently, reducing the iterator age. Option A is incorrect because the DynamoDB lease table is not the bottleneck; lease operations are lightweight and the current read capacity is sufficient. Option B is incorrect because enhanced fan-out is designed for multiple consumer applications to get dedicated throughput, but here there is a single consumer group; it would not reduce latency for the existing consumer and would add cost.

Option C is incorrect because increasing shards would increase the stream's throughput capacity but also cost, whereas the current issue is consumer-side capacity, not stream capacity.

234
MCQhard

A team is training a deep learning model on SageMaker using a custom Docker container. The training job fails with 'OutOfMemoryError'. The instance type is ml.p3.2xlarge with 61 GB memory. Which change should increase available memory?

A.Reduce the batch size to use less memory.
B.Use SageMaker distributed data parallelism to distribute the model across multiple instances.
C.Set the 'shm-size' parameter in the SageMaker training container to a larger value.
D.Mount an Amazon FSx for Lustre file system to offload data.
AnswerC

Increasing shared memory (/dev/shm) can resolve OutOfMemory errors in deep learning frameworks.

Why this answer

The 'OutOfMemoryError' in a SageMaker training container often stems from insufficient shared memory (/dev/shm) for data-loading workers, especially with PyTorch or TensorFlow dataloaders that use multiprocessing. Increasing the 'shm-size' parameter allocates more shared memory to the container, resolving the error without altering the model or instance type.

Exam trap

The MLS-C01 exam often tests the misconception that 'OutOfMemoryError' always refers to GPU memory, leading candidates to choose batch size reduction, when in SageMaker containers it frequently indicates insufficient shared memory for data-loading processes.

How to eliminate wrong answers

Option A is wrong because reducing the batch size decreases GPU memory usage, not the shared memory (/dev/shm) that causes the 'OutOfMemoryError' in this context. Option B is wrong because SageMaker distributed data parallelism splits the model or data across multiple instances, which does not increase the memory available to a single container; it adds complexity without addressing the shared memory limit. Option D is wrong because mounting an Amazon FSx for Lustre file system offloads storage, not memory; it does not increase the container's shared memory or RAM capacity.

235
MCQmedium

A data scientist creates a model resource in SageMaker using the JSON configuration in the exhibit. When creating an endpoint, the deployment fails with an error 'ModelError: Cannot find inference code'. What is the MOST likely cause?

A.The model.tar.gz file is missing the model weights
B.The ECR image does not exist
C.The inference container environment does not specify SAGEMAKER_PROGRAM
D.The training container does not have the SAGEMAKER_PROGRAM variable
AnswerC

The inference container needs the SAGEMAKER_PROGRAM variable to point to the inference script.

Why this answer

The error 'Cannot find inference code' occurs because SageMaker requires the `SAGEMAKER_PROGRAM` environment variable in the inference container to specify the entry-point script (e.g., `inference.py`) inside the `model.tar.gz`. Without this variable, SageMaker does not know which script to execute for inference, causing the deployment to fail. Option C correctly identifies this missing environment variable as the root cause.

Exam trap

The trap here is that candidates confuse missing model weights (Option A) with missing inference code, but SageMaker's error message explicitly states 'Cannot find inference code', which points to the entry-point script, not the model artifacts.

How to eliminate wrong answers

Option A is wrong because missing model weights would cause a runtime error during inference (e.g., 'Unable to load model'), not a deployment failure about missing inference code. Option B is wrong because if the ECR image did not exist, SageMaker would return a different error such as 'ImageNotFoundException' or 'RepositoryNotFoundException', not 'Cannot find inference code'. Option D is wrong because the training container's environment variables are irrelevant to the inference endpoint; the inference container is a separate container that must have its own `SAGEMAKER_PROGRAM` set.

236
MCQmedium

A company is using AWS Glue Data Catalog as the metadata store for their data lake. They have multiple AWS accounts and want to share the catalog across accounts. Which feature should they use?

A.Amazon Athena Federated Query
B.AWS Lake Formation
C.AWS Resource Access Manager (RAM)
D.Amazon S3 Cross-Region Replication
AnswerC

RAM allows sharing Glue Data Catalog across accounts.

Why this answer

AWS Resource Access Manager (RAM) enables you to share AWS Glue Data Catalog databases and tables across multiple AWS accounts without needing to copy metadata. This allows a centralized catalog to be consumed by different accounts for querying and ETL operations, maintaining a single source of truth for the data lake.

Exam trap

The trap here is that candidates often confuse AWS Lake Formation's cross-account access capabilities with the actual sharing mechanism, but Lake Formation relies on AWS RAM to enable the sharing of Data Catalog resources.

How to eliminate wrong answers

Option A is wrong because Amazon Athena Federated Query allows querying data from external sources (e.g., CloudWatch, DynamoDB) using connectors, but it does not share the Glue Data Catalog across accounts. Option B is wrong because AWS Lake Formation provides fine-grained access control and data lake management, but cross-account catalog sharing is implemented via AWS RAM, not directly by Lake Formation (though Lake Formation can use RAM for sharing). Option D is wrong because Amazon S3 Cross-Region Replication replicates objects between S3 buckets in different regions, but it does not share the Glue Data Catalog metadata store across accounts.

237
MCQhard

A financial services company uses Amazon SageMaker to train a model for credit risk prediction. The dataset contains 500 features and 1 million records. The target variable is binary with 20% default rate. The data scientist uses a gradient boosting algorithm (XGBoost) with default hyperparameters. After training, the model achieves 95% accuracy, but the precision for the default class is only 30%, and recall is 15%. The business requires at least 50% recall and 40% precision for the default class. The data scientist tries to adjust the decision threshold, but this does not simultaneously meet both targets. The scientist suspects that the model is not learning the default patterns well. The company also has a large dataset of unlabeled transactions that could be used. Which action should the data scientist take to improve the model?

A.Apply PCA to reduce dimensionality and noise.
B.Use the unlabeled data for semi-supervised learning with pseudo-labeling.
C.Increase the learning rate to accelerate convergence.
D.Reduce the number of features using feature selection to simplify the model.
AnswerB

Pseudo-labeling leverages unlabeled data to improve minority class detection.

Why this answer

Using unlabeled data for pseudo-labeling can help the model learn patterns of the minority class by generating additional training examples, which is especially beneficial when the labeled dataset is imbalanced. Option A is incorrect because PCA reduces dimensionality but does not address class imbalance and may discard features important for the default class. Option C is incorrect because increasing the learning rate can cause the model to overshoot optimal minima and may lead to overfitting, not improving recall and precision for the minority class.

Option D is incorrect because feature selection reduces the number of features but does not directly address class imbalance; it could even remove features that are relevant for predicting defaults.

238
MCQeasy

A data scientist needs to query a 2 TB dataset stored in Amazon S3 using Amazon Athena. The data is in CSV format and is used for exploratory analysis. Queries are currently slow and expensive. Which action will improve query performance and reduce cost?

A.Convert the data to JSON format to improve compression.
B.Increase the number of workers in the Athena query engine.
C.Convert the data to Parquet format and partition by a commonly filtered column.
D.Create a composite index on the data using Athena's index feature.
AnswerC

Parquet reduces data scanned due to columnar storage, and partitioning limits scan range.

Why this answer

Converting CSV data to Parquet (a columnar storage format) significantly reduces the amount of data scanned by Athena, as only the columns needed for the query are read. Partitioning by a commonly filtered column (e.g., date or region) further limits the data scanned to only relevant partitions, directly reducing both query cost (Athena charges per TB scanned) and query execution time.

Exam trap

The trap here is that candidates may think increasing compute resources (Option B) or adding indexes (Option D) works in Athena as it does in traditional databases, but Athena is serverless and index-free, relying on storage format and partitioning for optimization.

How to eliminate wrong answers

Option A is wrong because JSON is a row-based format that typically results in larger file sizes than CSV (due to repeated keys) and does not support columnar pruning or efficient compression for analytical queries, so it would not improve performance or reduce cost. Option B is wrong because Athena does not have a configurable 'number of workers' parameter; it automatically scales underlying resources based on query complexity, so this option reflects a misunderstanding of Athena's serverless architecture. Option D is wrong because Athena does not support creating composite indexes on data; it relies on partitioning, columnar formats, and data skipping (e.g., with Parquet) to optimize queries, not traditional database indexes.

239
MCQmedium

A data scientist is deploying a PyTorch model to Amazon SageMaker for real-time inference. The model runs on a large instance but inference latency is too high. Which action is MOST likely to reduce latency without sacrificing accuracy?

A.Compile the model using SageMaker Neo
B.Switch from a GPU instance to a CPU instance
C.Quantize the model weights from FP32 to INT8
D.Deploy the model to a multi-model endpoint
AnswerA

Neo optimizes the model for the target hardware, reducing latency without retraining or accuracy loss.

Why this answer

SageMaker Neo compiles the trained model into an optimized runtime using Apache TVM, applying graph-level optimizations, operator fusion, and memory layout transformations specifically tuned for the target hardware. This reduces inference latency by improving computational efficiency without altering the model's weights or architecture, thus preserving accuracy.

Exam trap

The trap here is that candidates often confuse model quantization (which reduces accuracy) with model compilation (which optimizes execution without changing weights), leading them to choose quantization as a latency fix despite the 'without sacrificing accuracy' constraint.

How to eliminate wrong answers

Option B is wrong because switching from a GPU instance to a CPU instance would typically increase latency for deep learning inference, as GPUs are designed for parallel matrix operations that accelerate neural network computations. Option C is wrong because quantizing model weights from FP32 to INT8 reduces numerical precision, which can introduce accuracy degradation, especially for models sensitive to low-precision arithmetic. Option D is wrong because deploying to a multi-model endpoint is designed to improve resource utilization and cost efficiency by sharing an instance across multiple models, but it does not inherently reduce the inference latency of a single model; it may even increase latency due to contention.

240
Multi-Selectmedium

Which TWO options are valid ways to reduce the amount of data scanned by Amazon Athena queries, thereby reducing cost?

Select 2 answers
A.Use columnar storage formats like Parquet or ORC
B.Use LIMIT clause in SQL queries
C.Convert data to CSV format
D.Create materialized views in Athena
E.Partition the data by a frequently filtered column
AnswersA, E

Columnar formats allow reading only required columns.

Why this answer

A is correct because columnar storage formats like Parquet and ORC store data in a compressed, column-oriented layout. When Athena queries only a subset of columns, it can skip reading the entire row, drastically reducing the amount of data scanned from disk. This directly lowers the cost, as Athena charges based on the volume of data read per query.

Exam trap

The trap here is that candidates confuse the LIMIT clause with a query optimization technique, not realizing that Athena must still fully scan the underlying data to produce the limited result set, making it ineffective for cost reduction.

241
MCQhard

A company uses SageMaker to deploy a model for real-time inference. The model is a large ensemble that requires 8 GB of memory and has high latency. The team wants to reduce latency without increasing cost. Which strategy is most effective?

A.Use a larger instance type with more memory.
B.Deploy the model on multiple instances behind a load balancer.
C.Use SageMaker Neo to compile the model for the target instance.
D.Switch from real-time inference to batch transform.
AnswerC

Neo optimizes model for faster inference without additional cost.

Why this answer

SageMaker Neo compiles and optimizes the model for the target hardware, reducing latency and memory footprint without increasing cost. Option A is wrong because a larger instance would increase cost. Option B is wrong because deploying on multiple instances increases cost and complexity without necessarily reducing latency.

Option D is wrong because batch transform is for offline inference, not real-time, and does not address the low latency requirement.

242
MCQmedium

A data scientist is using Amazon SageMaker to train a model. The training data is stored in an S3 bucket encrypted with AWS KMS. During training, the job fails with an access denied error. What is the MOST likely cause?

A.The training instance type does not support encryption
B.The training data is not in the same region as the SageMaker notebook
C.The S3 bucket policy does not allow SageMaker to list objects
D.The SageMaker execution role lacks kms:Decrypt permission for the KMS key
AnswerD

SageMaker needs KMS decrypt permissions to read encrypted data from S3.

Why this answer

SageMaker needs permission to use the KMS key to decrypt the data; the execution role must have kms:Decrypt permissions.

243
MCQmedium

A machine learning engineer is trying to deploy a model using a SageMaker endpoint but receives an access denied error. The IAM policy attached to the role is shown in the exhibit. What is the MOST likely cause of the error?

A.The policy does not include sagemaker:CreateEndpoint.
B.The policy does not specify resource ARNs.
C.The policy does not include sagemaker:InvokeEndpoint.
D.The policy does not include iam:PassRole.
AnswerD

SageMaker requires iam:PassRole to use the execution role.

Why this answer

The error occurs because the IAM role used by SageMaker does not have the iam:PassRole permission, which is required to allow SageMaker to assume the role and access the necessary resources (e.g., S3 buckets, EC2 instances) during endpoint deployment. Without this permission, SageMaker cannot pass the role to the service, resulting in an access denied error even if other SageMaker actions are allowed.

Exam trap

The trap here is that candidates often focus on missing SageMaker-specific actions (like CreateEndpoint or InvokeEndpoint) rather than recognizing that the fundamental issue is the missing iam:PassRole permission, which is a common prerequisite for any AWS service that needs to assume a role.

How to eliminate wrong answers

Option A is wrong because sagemaker:CreateEndpoint is not required for deploying a model to an existing endpoint; the error occurs during the deployment step where the role is passed, not during endpoint creation. Option B is wrong because the policy does specify resource ARNs (e.g., 'Resource': '*'), so the absence of ARNs is not the issue. Option C is wrong because sagemaker:InvokeEndpoint is used for invoking the endpoint after deployment, not for the deployment itself, and the error occurs before invocation.

244
MCQmedium

An IAM policy attached to a SageMaker notebook role is shown. The data engineer tries to run an Athena query on a table in the 'my_database' Glue database. The query fails with an access denied error. What is the MOST likely cause?

A.The policy does not allow s3:PutObject on the query results location.
B.The policy does not allow glue:GetTable on the specific database.
C.The policy does not allow athena:StartQueryExecution on the Athena workgroup.
D.The policy does not allow s3:ListBucket on the bucket.
AnswerC

Correct because the IAM policy lacks the `athena:StartQueryExecution` action on the specific workgroup. This action is required to initiate an Athena query. Without it, any attempt to run a query will result in an access denied error, regardless of other permissions.

Why this answer

The IAM policy does not include the `athena:StartQueryExecution` action on the Athena workgroup, which is required to submit a query. Even if the role has permissions for Glue and S3, Athena will deny the request if the workgroup-level permission to start queries is missing, resulting in an access denied error.

Exam trap

The trap here is that candidates assume the error is due to missing S3 or Glue permissions because the query accesses those services, but the actual missing permission is the Athena-specific action required to initiate the query execution.

How to eliminate wrong answers

Option A is wrong because the error occurs at query submission, not at result writing; `s3:PutObject` on the query results location is needed only after the query runs successfully. Option B is wrong because the policy includes `glue:GetTable` on `my_database`, so the role can access the table metadata. Option D is wrong because `s3:ListBucket` is not required for Athena to read the table data; Athena uses `s3:GetObject` on the underlying data files, and the error is not about listing the bucket.

245
MCQhard

A data scientist trains a neural network using TensorFlow on SageMaker. The training job fails with a 'CUDA out of memory' error. What is the most likely cause and solution?

A.The dataset is too large. Use SageMaker Pipe mode.
B.The model is too large for the GPU. Use a smaller batch size.
C.The training script has a bug. Use SageMaker Debugger.
D.The instance type is insufficient. Use distributed training across multiple instances.
AnswerB

Reducing batch size decreases memory usage.

Why this answer

CUDA out of memory indicates that the GPU memory is insufficient for the batch size or model size. Reducing the batch size is a common fix. Switching to CPU is not ideal for deep learning.

Increasing the number of instances may help but requires distributed training setup. Upgrading to a larger instance type is another option, but reducing batch size is simpler.

246
MCQeasy

A company uses SageMaker to host a real-time inference endpoint. The endpoint is receiving a large number of requests, but the latency is higher than expected. The data scientist observes that the CPU utilization is low but memory utilization is high. Which action should be taken to reduce latency?

A.Switch to an instance type with more memory or optimize the model to reduce memory footprint.
B.Enable VPC traffic mirroring to diagnose network issues.
C.Use an instance type with more vCPUs.
D.Increase the number of instances in the endpoint.
AnswerA

Addresses memory bottleneck.

Why this answer

High memory utilization indicates the model is memory-bound. Increasing instance memory or optimizing the model to reduce memory footprint can reduce latency. Option B is wrong because VPC traffic mirroring is used for network diagnostics, not for addressing memory bottlenecks.

Option C is wrong because CPU utilization is low, so adding more vCPUs would not help; the bottleneck is memory, not CPU. Option D is wrong because increasing the number of instances can improve throughput but does not directly reduce per-request latency for a memory-bound model; it may also increase cost.

247
MCQeasy

A data engineer needs to transfer 50 TB of data from an on-premises HDFS cluster to Amazon S3. The data must be encrypted in transit and at rest. The on-premises network has a 1 Gbps connection to AWS. The transfer must complete within 5 days. Which solution is MOST cost-effective and meets the requirements?

A.Use S3 Transfer Acceleration to upload the data directly from HDFS to S3.
B.Use AWS DataSync with a DataSync agent installed on-premises to transfer the data to S3.
C.Order an AWS Snowball Edge device and copy the data to it, then ship it back.
D.Use AWS Glue to read from HDFS and write to S3 in a continuous ETL job.
AnswerB

DataSync can transfer over network with encryption and is optimized for speed.

Why this answer

(AWS DataSync). With a 1 Gbps connection, the maximum theoretical transfer in 5 days is about 54 TB (1 Gbps = 0.125 GB/s, 0.125 * 86400 * 5 = 54000 GB = 54 TB), so network transfer is feasible within the time limit. AWS DataSync uses a DataSync agent installed on-premises to transfer data from HDFS to S3, encrypting data in transit (TLS) and at rest (S3 server-side encryption).

This is the most cost-effective solution because it avoids the hardware and shipping costs of Snowball Edge (option C). Option A (S3 Transfer Acceleration) does not directly integrate with HDFS and is designed for speeding up uploads over public internet, not for encrypting data from HDFS. Option D (AWS Glue) is an ETL service, not a data transfer solution, and would require additional infrastructure and complexity.

248
Multi-Selecthard

Which THREE of the following are best practices when performing exploratory data analysis on a dataset with both numerical and categorical features?

Select 3 answers
A.Check the proportion of missing values for each feature.
B.Compute pairwise correlation coefficients between numerical features.
C.Encode all categorical features using label encoding for simplicity.
D.Include all categorical features with high cardinality as-is in the model.
E.Visualize the distribution of numerical features using histograms and box plots.
AnswersA, B, E

Missing value analysis is a key EDA step.

Why this answer

Checking the proportion of missing values for each feature is a fundamental step in exploratory data analysis (EDA). It helps identify data quality issues, such as systematic missingness, which can bias downstream modeling and inform decisions about imputation strategies or feature exclusion.

Exam trap

The trap here is that candidates may assume label encoding is harmless for categorical features, but it imposes an artificial order that can distort model behavior, especially in tree-based models that rely on split points.

249
MCQeasy

A company is using Amazon SageMaker to train a model and wants to track hyperparameter tuning jobs. Which AWS service is BEST suited to store and query metadata such as tuning job configurations and results?

A.Amazon CloudWatch Logs
B.Amazon S3 with Amazon Athena
C.Amazon SageMaker Experiments
D.Amazon DynamoDB
AnswerC

SageMaker Experiments is the native solution for tracking tuning jobs and their results.

Why this answer

Amazon SageMaker Experiments is purpose-built for tracking, organizing, and querying metadata from machine learning training runs, including hyperparameter tuning jobs. It automatically captures configurations, metrics, and results, and provides a Python SDK and SDK API to search and compare trials, making it the best choice for this use case.

Exam trap

The trap here is that candidates often confuse CloudWatch Logs for tracking metadata because it is the default logging service, but it is designed for unstructured logs, not structured experiment metadata, and lacks the search and comparison capabilities of SageMaker Experiments.

How to eliminate wrong answers

Option A is wrong because Amazon CloudWatch Logs stores unstructured log data, not structured metadata like tuning job configurations and results, and lacks native query capabilities for comparing hyperparameter trials. Option B is wrong because while Amazon S3 with Athena can store and query metadata, it requires manual setup to log tuning job data and does not integrate natively with SageMaker's hyperparameter tuning jobs, adding unnecessary complexity. Option D is wrong because Amazon DynamoDB is a NoSQL database that can store metadata but lacks built-in integration with SageMaker tuning jobs, requiring custom code to capture and query the metadata, and does not provide the experiment tracking and comparison features of SageMaker Experiments.

250
Multi-Selectmedium

A data scientist is analyzing a dataset with 100 features and 10,000 observations. The target variable is binary (0/1). Initial exploratory data analysis reveals that many features have missing values, high correlation with each other, and non-normal distributions. The data scientist wants to identify the most important features for predicting the target while reducing dimensionality. Which TWO actions should the data scientist take? (Choose two.)

Select 2 answers
A.Use chi-squared test to rank features by p-value.
B.Apply Principal Component Analysis (PCA) to reduce dimensionality.
C.Perform a t-test for each feature to compare means between classes.
D.Calculate Pearson correlation coefficients between features and target.
E.Compute mutual information between each feature and the target.
AnswersB, E

PCA reduces dimensionality by creating uncorrelated components, handling multicollinearity.

Why this answer

B is correct because Principal Component Analysis (PCA) is a dimensionality reduction technique that transforms correlated features into a set of linearly uncorrelated principal components, effectively handling high correlation and reducing the feature space. It does not require normality assumptions and can work with missing values after imputation, making it suitable for this dataset.

Exam trap

The MLS-C01 exam often tests the misconception that correlation-based methods (like Pearson or chi-squared) are sufficient for feature selection in high-dimensional, non-normal data, when in fact they fail due to assumptions about linearity and distribution.

251
MCQeasy

During EDA, a data scientist notices that a feature has a high proportion of missing values (e.g., 70%). The feature is continuous and expected to be important based on domain knowledge. What is the best approach to handle this?

A.Remove the feature entirely to avoid bias.
B.Create a binary indicator for missingness and impute the continuous values with the median.
C.Impute missing values with -1 since it is out of range.
D.Drop all rows with missing values in that feature.
AnswerB

This captures both the pattern of missingness and the distribution.

Why this answer

It preserves the predictive signal from the feature while accounting for the pattern of missingness. Creating a binary indicator allows the model to learn whether missingness itself is informative, and median imputation is robust to outliers for a continuous feature. This approach avoids the bias of dropping the feature entirely and is more principled than arbitrary out-of-range imputation.

Exam trap

The trap here is that candidates often choose to drop the feature or rows without considering that missingness can be a meaningful signal, and that a binary indicator combined with robust imputation is a standard technique for high-missingness continuous features.

How to eliminate wrong answers

Option A is wrong because removing a feature with 70% missing values discards potentially important domain-driven signal, and the missingness itself may be informative. Option C is wrong because imputing with -1 (an arbitrary out-of-range value) can distort the feature's distribution and introduce a false signal that the model may misinterpret as a valid numeric relationship. Option D is wrong because dropping all rows with missing values in that feature would discard 70% of the dataset, leading to severe sample size reduction and potential selection bias.

252
MCQeasy

A data analyst is exploring a dataset and wants to identify outliers in a numerical feature. Which visualization technique is most effective for detecting outliers?

A.Line chart
B.Histogram
C.Scatter plot
D.Box plot
AnswerD

Box plots display outliers as individual points outside the whiskers.

Why this answer

Box plot. A box plot is specifically designed to show quartiles and highlight outliers as points beyond the whiskers. A line chart (A) is for trends over time, a histogram (B) shows distribution but does not isolate outliers, and a scatter plot (C) is for bivariate relationships.

253
MCQmedium

A data engineering team needs to ingest streaming data from thousands of IoT devices into a data lake on Amazon S3 for near-real-time analytics. The data must be partitioned by device ID and timestamp, and the team must minimize data loss during ingestion failures. Which solution is MOST appropriate?

A.Use Amazon Kinesis Data Streams with a Lambda function that writes to S3.
B.Use Amazon Kinesis Data Firehose to write directly to S3 with dynamic partitioning.
C.Use Amazon S3 Transfer Acceleration with direct uploads from devices.
D.Use AWS Lambda to receive data via API Gateway and write to S3.
AnswerB

Firehose provides automatic partitioning, retries, and near-real-time delivery to S3.

Why this answer

Amazon Kinesis Data Firehose with dynamic partitioning is the most appropriate solution because it natively supports partitioning incoming data by device ID and timestamp before writing to S3, and it provides built-in data buffering and retry logic to minimize data loss during ingestion failures. Unlike a Lambda-based approach, Firehose handles large-scale streaming ingestion without requiring custom code for partitioning or error handling, making it ideal for near-real-time analytics on IoT data.

Exam trap

The trap here is that candidates often choose Option A (Lambda with Kinesis Data Streams) because they think it offers more control, but they overlook Firehose’s native dynamic partitioning and managed retry capabilities, which are more reliable and cost-effective for high-volume streaming ingestion to S3.

How to eliminate wrong answers

Option A is wrong because using a Lambda function with Kinesis Data Streams introduces a scaling bottleneck and potential data loss if the Lambda fails or throttles, as Lambda has a maximum invocation concurrency limit and does not natively retry failed records to S3 without custom logic. Option C is wrong because S3 Transfer Acceleration is designed to speed up uploads over long distances, not to ingest streaming data or handle partitioning by device ID and timestamp, and it provides no built-in mechanism for near-real-time analytics or failure recovery. Option D is wrong because using API Gateway with Lambda to receive data directly from devices is not scalable for thousands of IoT devices, introduces latency from HTTP overhead, and lacks native streaming data buffering and retry capabilities, increasing the risk of data loss during failures.

254
MCQmedium

A company uses Amazon EMR to run Spark jobs on a cluster with 10 core nodes of type r5.xlarge. The jobs are I/O intensive and read large amounts of data from S3. The team notices high network throughput but low CPU utilization. Which configuration change would improve job performance at the same cost?

A.Change the instance type to m5.xlarge (general purpose) to balance resources.
B.Increase the number of core nodes to 20.
C.Replace the core nodes with r5d.xlarge instances that have local SSDs.
D.Use spot instances for the core nodes to save cost and reinvest in more nodes.
AnswerC

Local SSDs provide high I/O for caching, reducing network traffic.

Why this answer

R5d instances include local NVMe SSDs. These SSDs can be used for caching intermediate data during Spark jobs, reducing the need to read from and write to S3 over the network. This directly addresses the I/O bottleneck and high network throughput observed, improving job performance.

Option A is incorrect because moving to general-purpose m5 instances does not provide local SSDs and may not improve I/O. Option B is incorrect because doubling the number of core nodes would increase cost significantly without necessarily solving the I/O issue. Option D is incorrect because spot instances reduce cost but do not inherently improve I/O performance; they may even add instability.

255
Multi-Selectmedium

A machine learning engineer is analyzing a dataset with 500 features and suspects multicollinearity. Which TWO techniques can help identify and address multicollinearity during exploratory data analysis? (Choose TWO.)

Select 2 answers
A.Apply t-SNE for visualization
B.Apply Principal Component Analysis (PCA)
C.Calculate Variance Inflation Factor (VIF) for each feature
D.Generate a correlation matrix heatmap
E.Use Lasso regression to select features
AnswersC, D

VIF > 5-10 indicates multicollinearity.

Why this answer

Variance Inflation Factor (VIF) measures how much the variance of a regression coefficient is inflated due to multicollinearity. Correlation matrix heatmap shows pairwise correlations. PCA reduces dimensionality but does not directly identify multicollinearity.

Lasso regression addresses it via regularization but is a modeling step. t-SNE is for visualization of high-dimensional data.

256
Multi-Selecteasy

A data engineer is building a data pipeline using AWS Glue. The pipeline reads data from Amazon S3, transforms it, and writes it back to S3 in a different format. The engineer needs to handle schema evolution (new columns added over time). Which TWO features of AWS Glue can help manage schema evolution?

Select 2 answers
A.AWS Glue Data Catalog
B.AWS Glue DynamicFrame
C.AWS Lake Formation
D.Amazon Athena
E.Amazon S3 object tags
AnswersA, B

Data Catalog stores schema and can be updated as schema evolves.

Why this answer

AWS Glue Data Catalog is correct because it stores schema metadata and can be updated automatically or manually to reflect new columns added to source data, enabling schema evolution tracking. AWS Glue DynamicFrame is correct because it provides a flexible, schema-on-read structure that can accommodate varying schemas across records, allowing transformations to handle new columns without breaking the pipeline.

Exam trap

The trap here is that candidates may confuse AWS Lake Formation's data lake governance features with schema evolution capabilities, or assume Athena's query-time schema flexibility is equivalent to Glue's ETL-time schema handling.

257
MCQhard

A data scientist is building a training dataset from data stored in Amazon S3. The data consists of JSON files each containing a 'timestamp' field. The scientist wants to use AWS Glue to catalog the data and enable querying via Amazon Athena. However, Athena queries are returning zero results for time-range filters. What is the most likely cause?

A.The AWS Glue crawler does not have permissions to read the S3 bucket.
B.Athena cannot query nested JSON objects.
C.The JSON files are not in the correct format for Athena.
D.The 'timestamp' field is not defined as a partition column in the Glue table.
AnswerC

Correct. JSON files may have timestamps in an unsupported format or structural issues preventing proper parsing.

Why this answer

Athena supports querying JSON data, but the JSON files must have a schema that Athena can interpret. If the 'timestamp' field is in an unrecognized date/time format or the JSON structure is inconsistent, Athena may fail to parse the data correctly, resulting in zero rows for time-range filters. Option C is correct because the most likely cause is the JSON files not being in a format that Athena can parse properly for timestamp filtering.

Option A is wrong because permission issues would cause an access denied error. Option B is wrong because Athena supports nested JSON. Option D is wrong because even if the timestamp is not a partition column, filtering on it should still return results if the data matches the filter condition.

Exam trap

Candidates may assume that time-range filter failures are always due to missing partition columns, but often the issue is with the data format or timestamp parsing.

258
Multi-Selecteasy

Which TWO actions are appropriate when dealing with outliers in a dataset during exploratory data analysis? (Select TWO.)

Select 2 answers
A.Replace the mean with the median for numerical features.
B.Apply log transformation to reduce the impact of extreme values.
C.Remove all outliers without further investigation.
D.Use visualization techniques like box plots to identify outliers.
E.Assume outliers are errors and delete them.
AnswersB, D

Log transformation can compress skewed distributions and reduce outlier influence.

Why this answer

Applying a log transformation compresses the range of the data, reducing the influence of extreme values without removing them. This is a common technique in exploratory data analysis for right-skewed distributions, as it can make the data more normally distributed and improve the performance of models that assume normality.

Exam trap

The MLS-C01 exam often tests the distinction between data transformation techniques (like log transformation) and data removal or replacement strategies, trapping candidates who think that simply changing a summary statistic (mean to median) or deleting outliers without investigation is a proper handling method.

259
Multi-Selectmedium

A data scientist is training a deep neural network on Amazon SageMaker. The training is taking a long time and the data scientist wants to speed it up. Which THREE actions can help reduce training time?

Select 3 answers
A.Use GPU instances instead of CPU instances
B.Use distributed training across multiple instances
C.Use Pipe mode to stream data from S3
D.Increase the batch size
E.Use a smaller instance type
AnswersA, B, C

GPUs accelerate deep learning computations.

Why this answer

GPU instances (e.g., P3, P4d) are optimized for the massively parallel matrix operations required by deep neural networks, providing orders-of-magnitude faster computation than CPU instances for training tasks. By offloading tensor operations to GPU cores, the training time is significantly reduced, especially for large models and datasets.

Exam trap

AWS often tests the misconception that increasing batch size always speeds up training, but candidates overlook the memory constraints and potential negative impact on model accuracy, while also confusing smaller instance types as a cost-saving measure that inadvertently slows training.

260
MCQmedium

A data engineer ingests streaming data into Amazon Kinesis Data Streams. The data science team needs to analyze the data using Amazon SageMaker notebooks. What is the most efficient way to provide access to the stream data for ad-hoc exploration?

A.Create an AWS Lambda function to transform and write data to DynamoDB, then query DynamoDB from the notebook.
B.Configure a Kinesis Firehose delivery stream to deliver data to an S3 bucket, then query the data from the notebook using Athena.
C.Install the Kinesis Agent on the SageMaker notebook instance and configure it to write data to a local file.
D.Use the Kinesis connector for Spark to read data directly from the stream into a Spark DataFrame in the notebook.
AnswerD

Direct, real-time access for ad-hoc exploration.

Why this answer

The Kinesis connector for Spark enables direct reading of streaming data into a Spark DataFrame in the SageMaker notebook, allowing real-time ad-hoc analysis with minimal latency. Option A is incorrect because writing to DynamoDB via Lambda adds unnecessary transformation steps and latency, and DynamoDB is not optimized for large-scale streaming data exploration. Option B is incorrect because using Kinesis Firehose to deliver data to S3 and then querying with Athena introduces significant latency (data is written in batches) and is not suitable for real-time exploration.

Option C is incorrect because the Kinesis Agent is designed for sending data from sources to Kinesis, not for consuming or reading data; it cannot be used to read stream data into a notebook.

261
MCQeasy

A startup is deploying a machine learning model for real-time recommendation on Amazon SageMaker. The model is a TensorFlow model (1 GB) and the endpoint uses a single ml.c5.2xlarge instance. The inference latency is currently 500 ms per request. The startup expects traffic to increase 10x in the next month. They want to maintain latency under 500 ms. What is the most cost-effective solution?

A.Use SageMaker Batch Transform to process requests in batches
B.Switch to a GPU instance type for faster inference
C.Set up auto-scaling for the endpoint based on average latency or request count
D.Upgrade to a larger CPU instance type, such as ml.c5.4xlarge
AnswerC

Auto-scaling adds capacity dynamically, handling traffic spikes cost-effectively.

Why this answer

Auto-scaling dynamically adds instances based on demand, handling a 10x increase in traffic while maintaining latency under 500 ms. This is more cost-effective than over-provisioning a larger instance (D) or switching to an expensive GPU instance (B). SageMaker Batch Transform (A) is not suitable for real-time inference.

262
MCQeasy

A data scientist is training a binary classification model on an imbalanced dataset where the positive class accounts for 5% of the data. The model achieves 95% accuracy but has a recall of only 10% for the positive class. Which metric should the data scientist primarily use to evaluate model performance?

A.RMSE
B.F1 Score
C.Accuracy
D.AUC-ROC
AnswerB

F1 score considers both precision and recall.

Why this answer

The F1 Score is the harmonic mean of precision and recall, making it ideal for imbalanced datasets where accuracy is misleading. With 95% accuracy but only 10% recall, the model is simply predicting the majority class (negative) almost always, so F1 Score captures the trade-off between false positives and false negatives better than accuracy or AUC-ROC.

Exam trap

AWS often tests the misconception that high accuracy always indicates good model performance, especially on imbalanced datasets, leading candidates to overlook metrics like F1 Score that account for class distribution.

How to eliminate wrong answers

Option A is wrong because RMSE (Root Mean Squared Error) is a regression metric that measures the square root of the average squared differences between predicted and actual values, not applicable to binary classification. Option C is wrong because accuracy is misleading on imbalanced datasets; a model that always predicts the negative class achieves 95% accuracy but fails to identify the positive class (5% prevalence), as seen with 10% recall. Option D is wrong because AUC-ROC can be overly optimistic on highly imbalanced data; it measures the area under the ROC curve (TPR vs FPR), but with only 5% positives, the FPR remains low even if the model rarely predicts positive, giving a falsely high score.

263
MCQeasy

A company is using Amazon SageMaker to train a model and wants to automatically retrain the model every week using new data. Which AWS service should be used to orchestrate the retraining pipeline?

A.Amazon CloudWatch Events
B.AWS Lambda
C.AWS Step Functions
D.AWS Data Pipeline
AnswerC

Step Functions can orchestrate multiple SageMaker API calls and handle retries.

Why this answer

AWS Step Functions is the correct choice because it provides a serverless workflow orchestration service that can coordinate multiple AWS services (e.g., SageMaker training jobs, Lambda functions, and data processing) into a state machine. It supports scheduling via Amazon EventBridge (formerly CloudWatch Events) to trigger the pipeline weekly, and it can handle retries, error handling, and parallel execution, making it ideal for automating a retraining pipeline.

Exam trap

The trap here is that candidates often confuse a scheduling service (CloudWatch Events) with a workflow orchestrator (Step Functions), or assume that a single Lambda function can handle the entire pipeline, overlooking the need for state management, error handling, and multi-step coordination.

How to eliminate wrong answers

Option A is wrong because Amazon CloudWatch Events (now Amazon EventBridge) is a scheduling and event notification service, not a workflow orchestrator; it can trigger a Lambda function or Step Functions on a schedule, but it cannot itself orchestrate the multi-step retraining pipeline. Option B is wrong because AWS Lambda is a serverless compute service for running code in response to events, but it lacks built-in workflow orchestration, state management, and error handling for complex multi-step pipelines; using Lambda alone would require custom code to manage retries, sequencing, and monitoring. Option D is wrong because AWS Data Pipeline is designed for batch data processing and movement (e.g., ETL jobs), not for orchestrating machine learning training workflows; it does not natively integrate with SageMaker training jobs or provide the state machine capabilities needed for retraining pipelines.

264
MCQeasy

A data scientist is using SageMaker to train a model. The training data is stored in an S3 bucket in a different AWS account. What is required to allow SageMaker to access the data?

A.Configure the SageMaker execution role with a policy that grants cross-account access to the S3 bucket.
B.Set up VPC peering between the two accounts.
C.Create a SageMaker notebook instance in the same account as the S3 bucket.
D.Launch the training job from a SageMaker notebook in the account containing the S3 bucket.
AnswerA

The IAM role used by SageMaker must have permissions to access the S3 bucket in the other account.

Why this answer

SageMaker uses an IAM execution role to access resources. To allow cross-account access to an S3 bucket, the SageMaker execution role must have an IAM policy that grants s3:GetObject and s3:ListBucket permissions for the bucket, and the S3 bucket policy must also grant cross-account access to that role. This is the standard AWS mechanism for cross-account resource access.

Exam trap

The trap here is that candidates often confuse network-level solutions (VPC peering) with IAM-based access control, or assume that running the job from the same account as the data automatically grants access, ignoring that the SageMaker execution role is the key security boundary.

How to eliminate wrong answers

Option B is wrong because VPC peering is used for network connectivity between VPCs, not for granting IAM-based data access permissions; SageMaker accesses S3 via AWS APIs, not through VPC peering. Option C is wrong because creating a SageMaker notebook instance in the same account as the S3 bucket does not resolve the cross-account access issue; the training job still runs in the original account and requires proper IAM permissions. Option D is wrong because launching the training job from a notebook in the account containing the S3 bucket does not change the fact that the training job runs under the execution role of the original account; cross-account access must be explicitly configured via IAM policies.

265
Multi-Selectmedium

A company is deploying a machine learning model using Amazon SageMaker. The model needs to be updated frequently. Which THREE practices should the company implement for model versioning and deployment?

Select 3 answers
A.Use AWS CodePipeline to automate the training and deployment pipeline.
B.Use the SageMaker Model Registry to catalog model versions.
C.Manually update the endpoint configuration each time.
D.Store all training datasets in a single S3 bucket without versioning.
E.Deploy new model versions using canary deployments with SageMaker endpoints.
AnswersA, B, E

CodePipeline automates CI/CD.

Why this answer

AWS CodePipeline is correct because it enables continuous integration and continuous delivery (CI/CD) for machine learning models, automating the build, train, test, and deploy stages. By integrating with SageMaker, CodePipeline can trigger retraining on new data, run evaluation steps, and automatically update the endpoint, ensuring frequent model updates are reliable and repeatable.

Exam trap

The trap here is that candidates may think manual endpoint updates (Option C) are acceptable for small-scale deployments, but the exam emphasizes automation and reproducibility for frequent updates, making manual steps a clear anti-pattern.

266
MCQeasy

A team is training a binary classifier and obtains a confusion matrix with 100 true positives, 10 false positives, 20 false negatives, and 200 true negatives. What is the precision of the model?

A.0.91
B.0.87
C.0.94
D.0.83
AnswerA

Precision = 100/(100+10)=0.91.

Why this answer

Precision is calculated as TP / (TP + FP). With 100 true positives and 10 false positives, precision = 100 / (100 + 10) = 100 / 110 ≈ 0.909, which rounds to 0.91. This metric measures how many of the positive predictions were actually correct.

Exam trap

The trap here is that candidates often confuse precision with recall or accuracy, especially when the numbers are close, leading them to pick 0.83 (recall) or miscalculate the denominator.

How to eliminate wrong answers

Option B (0.87) is wrong because it incorrectly uses recall (TP / (TP + FN) = 100/120 ≈ 0.833) or misapplies the denominator. Option C (0.94) is wrong because it likely uses accuracy (TP+TN / total = 300/330 ≈ 0.909) but miscalculates or uses F1-score logic. Option D (0.83) is wrong because it represents recall (100/120 ≈ 0.833), not precision.

267
MCQhard

A data scientist is training a deep learning model for object detection. The training loss decreases rapidly in the first few epochs but then plateaus at a high value. The validation loss starts increasing after a few epochs. Which adjustment is MOST likely to improve generalization?

A.Add more convolutional layers
B.Use more aggressive data augmentation
C.Increase the learning rate
D.Implement early stopping with a patience parameter
AnswerD

Early stopping prevents overfitting by terminating training when validation loss degrades.

Why this answer

The described behavior—training loss plateauing at a high value while validation loss increases—is a classic sign of overfitting. Early stopping with a patience parameter halts training when validation performance stops improving, preventing the model from memorizing noise and thus improving generalization. This directly addresses the overfitting without altering the model architecture or data distribution.

Exam trap

AWS often tests the distinction between underfitting and overfitting symptoms, and candidates may mistakenly choose data augmentation (Option B) as a universal fix, but the plateauing training loss and rising validation loss specifically indicate overfitting, where early stopping is the most direct remedy.

How to eliminate wrong answers

Option A is wrong because adding more convolutional layers increases model capacity, which would exacerbate overfitting and likely worsen the validation loss increase. Option B is wrong because more aggressive data augmentation could help reduce overfitting, but the question asks for the adjustment most likely to improve generalization given the specific symptoms; early stopping is a more direct and immediate fix for the observed plateau and divergence, whereas augmentation might not address the core issue of training too long. Option C is wrong because increasing the learning rate would cause the loss to oscillate or diverge, not improve generalization, and the training loss is already plateauing, indicating the optimizer is near a minimum.

268
MCQmedium

A data scientist is deploying a machine learning model using SageMaker and wants to automate the retraining pipeline. The training data is updated daily in an S3 bucket. Which combination of AWS services should the data scientist use to trigger a new training job when new data arrives?

A.Amazon SQS queue to store S3 events and a cron job to poll and start training
B.Use SageMaker Pipelines with a schedule to check for new data every hour
C.Amazon S3 event notification to directly start a SageMaker training job
D.Amazon CloudWatch Events to run an AWS Step Functions state machine that starts a SageMaker training job
E.Amazon CloudWatch Events to invoke an AWS Lambda function that starts a SageMaker training job
AnswerE

CloudWatch Events can capture S3 events and invoke Lambda to start training.

Why this answer

Amazon S3 event notifications can be sent to Amazon CloudWatch Events (via Amazon EventBridge), which then triggers an AWS Lambda function. The Lambda function contains code to start a SageMaker training job using the boto3 SDK. This serverless architecture provides a fully automated, event-driven pipeline that responds immediately when new data arrives in the S3 bucket, without polling or manual intervention.

Exam trap

AWS often tests the misconception that S3 event notifications can directly invoke SageMaker actions, but in reality, S3 events can only trigger Lambda, SQS, SNS, or EventBridge — a middleman service is always required to call the SageMaker API.

How to eliminate wrong answers

Option A is wrong because using an SQS queue with a cron job to poll introduces latency, complexity, and unnecessary cost; it is not a real-time event-driven solution and violates the principle of automation. Option B is wrong because SageMaker Pipelines with a schedule checks for new data on a fixed interval (e.g., every hour), which is not event-driven and may miss data arriving between checks or cause unnecessary runs when no new data exists. Option C is wrong because Amazon S3 event notifications cannot directly start a SageMaker training job; S3 events can only target Lambda, SQS, SNS, or EventBridge, not SageMaker API actions directly.

Option D is wrong because while CloudWatch Events can trigger Step Functions, this adds unnecessary orchestration complexity when a single Lambda function can directly start the training job; Step Functions is overkill for a simple trigger-and-run pattern.

269
MCQeasy

A data scientist is deploying a model using Amazon SageMaker for real-time inference. The model is memory-intensive and requires a GPU. Which instance type should be selected for the endpoint?

A.i3.2xlarge
B.c5.2xlarge
C.r5.2xlarge
D.p3.2xlarge
AnswerD

GPU instance suitable for memory-intensive models.

Why this answer

The p3.2xlarge instance is correct because it provides a GPU (NVIDIA Tesla V100) with high memory bandwidth, which is essential for memory-intensive deep learning models requiring GPU acceleration for real-time inference. SageMaker endpoints for GPU-based models must use instance types from the P or G families, as CPU-only instances like i3, c5, or r5 lack the parallel processing capabilities needed for efficient GPU inference.

Exam trap

The MLS-C01 exam often tests the distinction between CPU-optimized instance families (c5, r5, i3) and GPU-accelerated families (p3, g4dn), where candidates mistakenly assume that high RAM (r5) or high compute (c5) can substitute for a GPU, ignoring the fundamental hardware requirement for GPU-based inference.

How to eliminate wrong answers

Option A (i3.2xlarge) is wrong because it is a storage-optimized instance with NVMe SSD storage, designed for high I/O workloads, not for GPU-accelerated inference. Option B (c5.2xlarge) is wrong because it is a compute-optimized instance with only CPUs, lacking a GPU, which is explicitly required for the memory-intensive model. Option C (r5.2xlarge) is wrong because it is a memory-optimized instance with high RAM but no GPU, making it unsuitable for GPU-dependent inference tasks.

270
Multi-Selectmedium

A company uses SageMaker to train a model. The training job is taking too long and the data scientist wants to speed it up. Which THREE strategies should the data scientist consider? (Select THREE.)

Select 3 answers
A.Reduce the number of training epochs
B.Use a GPU instance type like ml.p3.2xlarge
C.Use distributed training with multiple instances
D.Use Pipe input mode to stream data from S3
E.Increase the batch size in the training script
AnswersB, C, D

GPUs accelerate training for deep learning.

Why this answer

GPU instances like ml.p3.2xlarge are optimized for parallel computation, significantly accelerating the training of deep learning models by handling matrix operations more efficiently than CPUs. SageMaker supports a range of GPU instances (e.g., ml.p3, ml.p4, ml.g5) that can reduce training time for compute-intensive workloads.

Exam trap

The trap here is that candidates may incorrectly select 'Increase the batch size' (Option E) as a guaranteed speed-up, overlooking that it requires hyperparameter tuning and can cause convergence problems, while the question asks for strategies that are directly and reliably effective.

271
MCQhard

A company stores sensitive customer data in an S3 bucket. The security team requires that all data be encrypted at rest with a key that is automatically rotated every year. Which solution meets these requirements with the least operational overhead?

A.Use SSE-KMS with a customer-managed key and automatic rotation
B.Use SSE-C (customer-provided keys)
C.Use SSE-S3 (Amazon S3-managed keys)
D.Use SSE-KMS with a customer-managed key and manual rotation
AnswerC

SSE-S3 automatically rotates keys and requires no customer management.

Why this answer

SSE-S3 uses Amazon S3-managed keys (AES-256) that are automatically rotated annually by AWS, meeting the encryption-at-rest and automatic rotation requirements with zero operational overhead. This is the simplest option because no key management or rotation configuration is needed from the customer.

Exam trap

The trap here is that candidates often overthink and choose SSE-KMS with customer-managed keys because they associate 'customer-managed' with more control, but the question explicitly asks for the least operational overhead, which SSE-S3 provides by eliminating all key management tasks.

How to eliminate wrong answers

Option A is wrong because SSE-KMS with a customer-managed key requires you to enable automatic rotation (which is optional and only rotates the backing key, not the data key), adding operational overhead for key policy and permission management. Option B is wrong because SSE-C requires you to provide and manage your own encryption keys, including manual rotation, which incurs significant operational overhead and does not meet the automatic rotation requirement. Option D is wrong because manual rotation of a customer-managed key requires you to create new keys, update applications, and manage key aliases, which is high operational overhead and contradicts the 'least operational overhead' requirement.

272
Multi-Selecthard

A data science team is training a large deep learning model using Amazon SageMaker. The training job is taking a long time because the model has many layers and the dataset is large. The team wants to reduce training time by distributing the training across multiple GPUs on a single instance, as well as across multiple instances. Which TWO actions should the team take? (Choose two.)

Select 2 answers
A.Use SageMaker's distributed data parallelism (SMDDP) library to shard the model across GPUs.
B.Configure the training job to use SageMaker's model parallelism (SMP) library for pipeline or tensor parallelism.
C.Use SageMaker's managed training with a single instance containing multiple GPUs and enable data parallelism.
D.Use Horovod for data parallelism across multiple instances.
E.Set the instance type to a single GPU instance and rely on automatic model parallelism.
AnswersB, D

SMP allows splitting the model across multiple GPUs and instances, reducing memory footprint per GPU and enabling training of large models that would otherwise not fit. This complements data parallelism.

Why this answer

The SageMaker model parallelism (SMP) library is specifically designed to split large deep learning models across multiple GPUs using pipeline or tensor parallelism. This allows the team to train models that are too large to fit on a single GPU and to reduce training time by parallelizing computation across devices within and across instances.

Exam trap

The trap here is that candidates often confuse data parallelism (which shards data) with model parallelism (which shards the model), and assume that simply using multiple GPUs on a single instance automatically distributes the model, when in fact explicit model parallelism libraries like SMP are required for large models that do not fit in GPU memory.

273
MCQeasy

A data engineering team needs to ingest streaming data from thousands of IoT devices into Amazon S3 for near-real-time analytics. The data arrives in bursts and must be processed with minimal latency. Which AWS service is most appropriate for the ingestion layer?

A.Amazon Kinesis Data Streams
B.Amazon Kinesis Data Firehose
C.Amazon SQS
D.Amazon S3
AnswerA

Kinesis Data Streams provides low-latency, real-time data ingestion.

Why this answer

Amazon Kinesis Data Streams is the most appropriate ingestion layer because it is designed for real-time, low-latency data ingestion from thousands of sources, such as IoT devices. It can handle bursty traffic by scaling shards dynamically and provides sub-second to second-level latency for data to be available for processing, which meets the minimal latency requirement for near-real-time analytics.

Exam trap

The trap here is that candidates often confuse Kinesis Data Firehose with Kinesis Data Streams, assuming Firehose's direct S3 integration makes it faster, but they overlook the mandatory buffer delay that Firehose imposes, which violates the minimal latency requirement.

How to eliminate wrong answers

Option B (Amazon Kinesis Data Firehose) is wrong because it is a fully managed service for loading streaming data into S3, but it introduces a buffer interval (default 60 seconds or 1 MB) before writing to S3, which adds latency that does not meet the minimal latency requirement. Option C (Amazon SQS) is wrong because it is a message queue service designed for decoupling applications, not for real-time streaming analytics; it does not support sharding or parallel processing of high-throughput streams like IoT data bursts. Option D (Amazon S3) is wrong because it is an object storage service, not an ingestion layer; it cannot directly ingest streaming data in real-time and would require an intermediary service to collect and write data, adding latency and complexity.

274
MCQeasy

A data scientist is building a regression model to predict house prices. The dataset has 10 features, and the model shows high variance with a low bias. Which technique should the data scientist use to reduce variance?

A.Apply L2 regularization to the model.
B.Increase the depth of decision trees in the ensemble.
C.Add more features to the model.
D.Reduce the amount of training data.
AnswerA

L2 regularization reduces variance by penalizing large coefficients.

Why this answer

L2 regularization (Ridge regression) penalizes large coefficients by adding a squared magnitude term to the loss function, which shrinks the model's weights and reduces variance without substantially increasing bias. This directly addresses the high-variance, low-bias symptom, making the model less sensitive to fluctuations in the training data.

Exam trap

The MLS-C01 exam often tests the misconception that adding more data or features always reduces variance, but the trap here is that high variance is best addressed by regularization or simplifying the model, not by increasing complexity or reducing data.

How to eliminate wrong answers

Option B is wrong because increasing the depth of decision trees in an ensemble (e.g., random forest or gradient boosting) increases model complexity, which typically raises variance and worsens overfitting, not reduces it. Option C is wrong because adding more features increases the dimensionality and capacity of the model, which tends to increase variance further, especially when the current model already shows high variance. Option D is wrong because reducing the amount of training data generally increases variance (the model becomes more sensitive to the specific sample) and can also increase bias due to insufficient learning, which is the opposite of the desired effect.

275
MCQmedium

A company is using Amazon SageMaker to deploy a model that predicts customer churn. The model was trained using a linear learner algorithm. During inference, the endpoint returns predictions that are always 0.5 (the probability of churn). What is the most likely cause?

A.The dataset is highly imbalanced, and the model is predicting the majority class
B.The model was trained with too few epochs
C.The input features are not normalized
D.The learning rate is set too high, causing the model to converge to the mean prediction
AnswerD

A high learning rate can cause the model to overshoot and settle at the mean of the target variable.

Why this answer

If the model always outputs 0.5, it suggests that the model is not learning and is stuck at the prior probability. This often happens when the learning rate is too high (causing divergence) or too low (causing slow convergence) so that the model does not update weights. The other options would cause different symptoms: data imbalance might bias towards 0 or 1, not exactly 0.5; feature scaling issues typically cause NaN or poor convergence; insufficient epochs might not converge but not necessarily give exactly 0.5.

276
Multi-Selectmedium

A data scientist is using Amazon SageMaker to train a linear regression model. The training data contains outliers. Which THREE techniques can mitigate the impact of outliers?

Select 3 answers
A.Remove observations with outlier values from the dataset.
B.Increase the number of layers in the model.
C.Standardize the features to have mean zero and unit variance.
D.Apply winsorization to the feature values.
E.Use a loss function that is robust to outliers, such as Huber loss.
AnswersA, D, E

Direct removal eliminates outlier impact.

Why this answer

Removing observations with outlier values directly eliminates data points that can disproportionately influence the linear regression coefficients, leading to a more stable and representative model. In Amazon SageMaker, this can be done during data preprocessing using built-in algorithms or custom scripts in a SageMaker Processing job.

Exam trap

AWS often tests the misconception that feature scaling (standardization) alone can handle outliers, but scaling does not reduce the leverage of extreme values; it only changes their numeric range.

277
MCQeasy

The exhibit shows a data quality report for a column named 'age'. Which potential data issue should be investigated further?

A.The mean and median are significantly different
B.The minimum age of 0 and maximum age of 120 may be outliers
C.The missing value rate of 2.3% is too high
D.The number of unique values (85) is too high
AnswerB

Age 0 and 120 are likely data errors.

Why this answer

A minimum age of 0 and maximum age of 120 are potential data entry errors or outliers that warrant further investigation, as extreme values can skew analysis. Option A is incorrect because the mean and median being close suggests the distribution is relatively symmetric and not a data quality issue. Option C is incorrect because a missing value rate of 2.3% is generally considered low and may be handled without major concern.

Option D is incorrect because 85 unique values for age is reasonable given the possible age range; it does not indicate a problem.

278
MCQhard

During exploratory data analysis, a data scientist notices that the correlation matrix of features shows many pairs with absolute correlation > 0.95. The dataset includes both numerical and categorical variables. Which technique is most appropriate to reduce multicollinearity while preserving the most information?

A.Apply Principal Component Analysis (PCA) to the features.
B.Use only one-hot encoded categorical features.
C.Apply L1 regularization during model training.
D.Remove one feature from each highly correlated pair.
AnswerA

PCA reduces dimensionality and decorrelates features.

Why this answer

PCA is the most appropriate technique because it transforms correlated features into orthogonal principal components, effectively handling multicollinearity while preserving variance. Option B (using only one-hot encoded categorical features) discards numerical features and may not address multicollinearity; Option C (L1 regularization) is a modeling technique, not for EDA; Option D (removing one feature per highly correlated pair) is ad-hoc and can lose information compared to PCA which captures variance in fewer dimensions.

279
MCQeasy

A data engineer needs to load data from a MySQL database to Amazon S3 daily. The database is 500 GB and the load window is 2 hours. The data must be extracted without impacting the source database performance. Which AWS service should be used to perform the extraction?

A.AWS Glue ETL job using a JDBC connection to read the full table.
B.AWS Database Migration Service (AWS DMS) with a full-load task to S3.
C.Amazon Athena with the MySQL federated query connector.
D.Amazon EMR with a Spark job reading from MySQL via JDBC.
AnswerB

DMS is designed for minimal impact migration and can load data directly to S3.

Why this answer

(AWS Database Migration Service). AWS DMS is specifically designed for migrating databases to AWS with minimal impact on the source. It can perform a full-load task to extract data from MySQL and write it to S3 efficiently within the 2-hour window.

Option A (AWS Glue ETL) uses JDBC and can cause higher overhead on the source, potentially impacting performance. Option C (Amazon Athena with MySQL federated query) is a query service, not an extraction tool, and may not handle 500 GB efficiently. Option D (Amazon EMR with Spark) is for big data processing and incurs overhead for setup and coordination, making it less suitable for direct daily extraction without impact.

280
MCQeasy

A data scientist is training a linear regression model and notices that the model performs well on training data but poorly on validation data. Which technique should be applied to reduce overfitting?

A.Apply L2 regularization (Ridge)
B.Increase the number of epochs
C.Add more features
D.Remove training examples
AnswerA

Regularization reduces overfitting by penalizing large coefficients.

Why this answer

L2 regularization (Ridge) adds a penalty term proportional to the square of the magnitude of the coefficients to the loss function. This shrinks the weights toward zero, reducing the model's sensitivity to individual features and preventing it from fitting noise in the training data, which directly addresses overfitting.

Exam trap

The trap here is that candidates often confuse regularization with techniques that increase model capacity (like adding features or more training iterations), not realizing that overfitting requires reducing complexity, not increasing it.

How to eliminate wrong answers

Option B is wrong because increasing the number of epochs (training iterations) typically allows the model to fit the training data even more closely, worsening overfitting rather than reducing it. Option C is wrong because adding more features increases model complexity and the risk of capturing noise, which exacerbates overfitting. Option D is wrong because removing training examples reduces the amount of data available for learning, which can increase variance and make overfitting more likely, not less.

281
MCQeasy

A data scientist is evaluating a regression model. The RMSE on the training set is 2.5, and on the test set is 2.7. The R² on the test set is 0.98. What does this indicate?

A.The model has high bias
B.The model generalizes well with no severe overfitting
C.The model is underfitting because R² is too high
D.The model is overfitting because RMSE is lower on training data
AnswerB

Small difference in RMSE and high test R² indicate good generalization.

Why this answer

The model has low error and high R² on both sets, indicating good generalization without significant overfitting. The small difference between training and test RMSE suggests no severe overfitting.

282
MCQhard

A data scientist needs to run ad-hoc SQL queries on a large dataset stored in Amazon S3 (Parquet format, 2 TB). The queries are interactive and require sub-second response times. Which service should they use?

A.Amazon Redshift Spectrum
B.Amazon QuickSight
C.Amazon EMR with Spark SQL
D.Amazon Athena
AnswerD

Athena is serverless and optimized for interactive queries on S3 data.

Why this answer

Amazon Athena is the correct choice because it is a serverless, interactive query service designed for ad-hoc SQL queries on data stored in Amazon S3, with no infrastructure to manage. It natively supports Parquet format and can achieve sub-second response times on 2 TB datasets through columnar projection, predicate pushdown, and data partitioning, making it ideal for this use case.

Exam trap

The trap here is that candidates often confuse Amazon Athena with Amazon Redshift Spectrum, assuming both are equally serverless, but Spectrum still requires a provisioned Redshift cluster, whereas Athena is truly serverless and pay-per-query.

How to eliminate wrong answers

Option A is wrong because Amazon Redshift Spectrum requires an active Redshift cluster to be provisioned and running, adding latency and cost for ad-hoc queries, and it is not serverless like Athena. Option B is wrong because Amazon QuickSight is a business intelligence (BI) visualization tool, not a SQL query engine; it cannot run raw SQL queries directly on S3 data. Option C is wrong because Amazon EMR with Spark SQL involves provisioning and managing a cluster, which introduces startup delays and operational overhead, making it unsuitable for interactive sub-second queries that require instant response.

283
MCQmedium

A data scientist is using SageMaker Debugger to monitor a training job. The training loss is not decreasing as expected. Which Debugger feature can help identify the issue?

A.Automatic hyperparameter tuning
B.Saving tensors every step
C.Deploying a model endpoint for real-time monitoring
D.Built-in rules to detect training anomalies
AnswerD

Rules like vanishing gradient can pinpoint issues.

Why this answer

SageMaker Debugger's built-in rules are designed to automatically monitor training jobs for common issues such as vanishing gradients, overfitting, and loss not decreasing. When the training loss plateaus or fails to decrease, a rule like 'LossNotDecreasing' can trigger a CloudWatch alarm or stop the training job, providing immediate insight into the problem without manual inspection of tensors.

Exam trap

The MLS-C01 exam often tests the distinction between Debugger's monitoring and analysis features versus its data capture capabilities, so the trap here is that candidates confuse 'saving tensors' (a data collection mechanism) with 'built-in rules' (the actual analysis engine that detects anomalies).

How to eliminate wrong answers

Option A is wrong because automatic hyperparameter tuning (SageMaker Automatic Model Tuning) is a separate feature that searches for optimal hyperparameters, not a Debugger feature for monitoring training anomalies. Option B is wrong because saving tensors every step is a Debugger configuration detail that enables data capture but does not itself analyze or identify issues; it merely provides raw data for later analysis. Option C is wrong because deploying a model endpoint for real-time monitoring is unrelated to Debugger; it is a SageMaker hosting feature for inference, not for diagnosing training problems.

284
Multi-Selecteasy

A machine learning team is using Amazon SageMaker to train a model. The training job uses spot instances to reduce cost. However, the training job is frequently interrupted. Which TWO actions can help mitigate the impact of spot interruptions? (Choose TWO.)

Select 2 answers
A.Increase the number of training instances.
B.Use a larger instance type that is less likely to be interrupted.
C.Use managed spot training with SageMaker's 'ManagedSpotTraining' parameter set to True.
D.Enable checkpointing to save intermediate results to Amazon S3.
E.Switch to on-demand instances.
AnswersC, D

Managed spot training handles interruptions.

Why this answer

Managed spot training (C) automatically manages the lifecycle of spot instances, including saving checkpoints and relaunching training when capacity becomes available. Checkpointing (D) saves model state periodically to Amazon S3, allowing training to resume from the last checkpoint after an interruption, minimizing progress loss. Option A (increasing instances) does not prevent interruptions and raises cost.

Option B (larger instance type) does not guarantee lower interruption rates and is cost-inefficient. Option E (on-demand instances) avoids interruptions but defeats the purpose of cost reduction.

285
MCQeasy

A data scientist is training a linear regression model. After training, the model has a high bias and low variance. Which technique should the data scientist use to reduce bias?

A.Decrease the model complexity
B.Add more relevant features
C.Apply L2 regularization (Ridge)
D.Reduce the amount of training data
AnswerB

Adding features increases model complexity and can reduce bias.

Why this answer

High bias indicates the model is underfitting the data, meaning it is too simple to capture the underlying patterns. Adding more relevant features increases model complexity, allowing it to learn more from the data and reduce bias. This directly addresses the underfitting issue without increasing variance excessively, provided the features are meaningful.

Exam trap

The MLS-C01 exam often tests the bias-variance tradeoff by presenting regularization as a solution for high bias, but candidates must remember that regularization (L1/L2) primarily reduces variance, not bias, and can actually increase bias if applied too strongly.

How to eliminate wrong answers

Option A is wrong because decreasing model complexity (e.g., using fewer features or a simpler algorithm) would further increase bias, worsening the underfitting problem. Option C is wrong because L2 regularization (Ridge) adds a penalty on large coefficients, which reduces variance but can increase bias by shrinking coefficients toward zero, making the model simpler. Option D is wrong because reducing the amount of training data typically increases variance and can also increase bias if the remaining data is not representative, but it does not directly reduce bias and may harm generalization.

286
Multi-Selecteasy

Which TWO AWS services can be used to transform data in transit before storing it in Amazon S3? (Choose TWO.)

Select 2 answers
A.AWS Glue
B.Amazon Redshift Spectrum
C.AWS Data Pipeline
D.Amazon Kinesis Data Firehose
E.Amazon Athena
AnswersA, D

Glue can process streaming data with streaming ETL jobs.

Why this answer

AWS Glue is correct because it provides a serverless data integration service that can transform data in transit using its built-in transformation jobs (e.g., PySpark scripts) before writing the results to Amazon S3. This allows you to clean, enrich, or reshape streaming or batch data as it moves through the pipeline.

Exam trap

The trap here is that candidates often confuse query engines (like Athena or Redshift Spectrum) with transformation services, forgetting that in-transit transformation requires processing before the data reaches its final storage location.

287
MCQmedium

A company deploys a machine learning model on Amazon SageMaker for real-time inference. The model receives requests with large payloads (up to 5 MB) and the inference latency is high. Which configuration change would MOST likely reduce latency?

A.Pre-load multiple model containers on the same endpoint
B.Reduce the batch size for inference requests
C.Use a larger instance type with more memory and compute
D.Enable payload compression using SageMaker built-in compression
AnswerC

Larger instances can process large payloads faster.

Why this answer

Increasing the instance type to one with more memory and compute directly addresses the bottleneck caused by large payloads (up to 5 MB) and high inference latency. SageMaker real-time endpoints process requests synchronously, so a larger instance provides more CPU/GPU and memory bandwidth to serialize/deserialize and process the payload faster, reducing overall latency.

Exam trap

The trap here is that candidates often confuse batch size (relevant for batch transform jobs) with real-time inference request size, or assume that multi-model endpoints improve single-request latency, when in fact they add overhead.

How to eliminate wrong answers

Option A is wrong because pre-loading multiple model containers on the same endpoint (multi-model endpoints) does not reduce latency for a single large payload; it is designed to serve multiple models from a shared endpoint, which can actually increase per-request overhead due to container switching. Option B is wrong because reducing batch size is irrelevant for real-time inference where each request is processed individually (batch size is typically 1); this option confuses batch inference with real-time inference. Option D is wrong because SageMaker does not have a built-in compression feature for real-time inference payloads; compression would need to be implemented manually in the inference code, and even then, the overhead of compressing/decompressing a 5 MB payload could increase latency rather than reduce it.

288
MCQhard

A machine learning engineer is analyzing a dataset for a regression problem. The target variable has a long-tail distribution with extreme outliers. The engineer wants to reduce the influence of outliers while preserving the relative order of values. Which data transformation should the engineer apply to the target variable?

A.Min-max normalization
B.Box-Cox transformation
C.Rank transformation
D.Log transformation
AnswerC

Rank transformation replaces values with their rank order, making the distribution uniform and robust to outliers.

Why this answer

The rank transformation is correct because it maps each value to its rank in the dataset, preserving the relative order of values while eliminating the impact of magnitude differences. This effectively reduces the influence of extreme outliers without distorting the ordinal relationships. Option A (min-max normalization) is incorrect because it linearly scales values to a fixed range, and outliers can still dominate the scaling.

Option B (Box-Cox transformation) can reduce skew but requires positive values and does not fully remove outlier influence; it transforms the distribution shape but still allows extreme values to affect the transformation parameters. Option D (log transformation) reduces right skew but remains monotonic, so extreme high values still have a disproportionate effect on the model compared to rank transformation.

289
Multi-Selecthard

A company is using SageMaker to train a model and wants to ensure that the training data is encrypted at rest and in transit, and that the trained model artifacts are also encrypted. Which THREE actions should the company take?

Select 3 answers
A.Specify a KMS key in the SageMaker training job configuration to encrypt the ML storage volume
B.Enable SageMaker model encryption using a KMS key
C.Configure the training job to run in a VPC with no internet access
D.Enable AWS CloudTrail to log all API calls
E.Enable S3 server-side encryption (SSE-KMS) on the training data bucket
AnswersA, B, E

Encrypts the training instance's storage volume.

Why this answer

Options A, B, and E are correct. A: Specifying a KMS key in the SageMaker training job configuration encrypts the ML storage volume used during training. B: Enabling SageMaker model encryption with a KMS key encrypts the model artifacts.

E: Enabling S3 server-side encryption (SSE-KMS) on the training data bucket encrypts the data at rest in S3 and in transit (when SageMaker accesses it). Option C (VPC with no internet access) provides network isolation but not encryption. Option D (CloudTrail) is for auditing API calls, not encryption.

290
MCQmedium

A financial services company is building a fraud detection model using a large dataset of credit card transactions. The dataset contains 10 million rows with 50 features, including transaction amount, merchant category, time of day, and customer historical features. The label is binary: fraudulent (1% of data) or legitimate. The company wants to deploy a real-time inference endpoint using Amazon SageMaker that can score transactions with sub-100ms latency. The current model is a gradient boosting model (XGBoost) trained on a sample of 1 million rows due to memory constraints. The model achieves 0.95 AUC on a held-out test set but the fraud recall (sensitivity) is only 0.4, which is unacceptable because the cost of missing a fraud is high. The data science team has access to a larger compute instance (ml.m5.24xlarge) for training. Which course of action is most likely to improve fraud recall while maintaining latency requirements?

A.Train the XGBoost model on the full 10 million rows using an ml.p3.2xlarge instance with GPU support, and apply SMOTE oversampling to the minority class before training.
B.Engineer additional features from transaction time and merchant category, then retrain the XGBoost model on the same 1 million row sample.
C.Downsample the majority class to 1% of the original size to create a balanced dataset of 200,000 rows, then retrain the XGBoost model on this balanced sample.
D.Replace XGBoost with a logistic regression model trained on the full dataset, as linear models are faster to train and may generalize better on large data.
AnswerA

Using a GPU instance allows training on the full dataset efficiently, and SMOTE oversampling balances the classes, directly improving recall.

Why this answer

Training on the full 10 million rows with a GPU-accelerated instance (ml.p3.2xlarge) allows the XGBoost model to learn from the complete data distribution, addressing the bias introduced by the 1 million row sample. Applying SMOTE oversampling to the minority class (fraud) directly tackles the class imbalance (1% fraud), which is the root cause of the low recall (0.4). SMOTE generates synthetic fraudulent examples, improving the model's ability to detect fraud without significantly increasing inference latency, as the model architecture and deployment remain unchanged.

Exam trap

The trap here is that candidates may choose downsampling (Option C) as a quick fix for class imbalance, overlooking that it discards valuable majority class data and can harm model generalization, while SMOTE (Option A) preserves data and synthetically balances the classes to improve recall without sacrificing latency.

How to eliminate wrong answers

Option B is wrong because engineering additional features and retraining on the same 1 million row sample does not address the fundamental issue of insufficient fraudulent examples in the training data; the model will still suffer from low recall due to class imbalance. Option C is wrong because downsampling the majority class to 1% reduces the dataset to only 200,000 rows, discarding 99% of legitimate transactions, which can lead to loss of valuable patterns and degrade model generalization, while not guaranteeing improved fraud recall. Option D is wrong because replacing XGBoost with logistic regression, a linear model, is unlikely to capture complex non-linear interactions in transaction data, and while it may train faster, it will not improve recall to the required level and may even worsen performance.

291
MCQeasy

A data scientist is training a binary classification model on an imbalanced dataset where the positive class represents 5% of the data. Which metric is most appropriate for evaluating model performance?

A.Accuracy
B.AUC-ROC
C.Root Mean Squared Error (RMSE)
D.R-squared
AnswerB

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

Why this answer

AUC-ROC is robust to class imbalance and measures the trade-off between true positive rate and false positive rate. Option A is wrong because accuracy can be misleading with imbalanced data. Option C is wrong because RMSE is for regression.

Option D is wrong because R-squared is for regression.

292
Multi-Selecthard

A company uses Amazon Athena to query a data lake in Amazon S3. The data is partitioned by year, month, day, and hour. The team notices that queries are slow and expensive. The team wants to improve performance and reduce costs. Which THREE actions should the team take?

Select 3 answers
A.Ensure queries filter on partition columns (year, month, day, hour).
B.Increase the number of partitions by adding a partition for minute.
C.Convert data from CSV to Parquet format.
D.Use CSV format with GZIP compression.
E.Use S3 storage classes like S3 Intelligent-Tiering for cost savings.
AnswersA, C, E

Partition pruning reduces scanned data.

Why this answer

Athena charges based on the amount of data scanned per query. By filtering on partition columns (year, month, day, hour), Athena uses partition pruning to skip reading irrelevant S3 prefixes, drastically reducing the data scanned and thus lowering both cost and query latency.

Exam trap

The trap here is that candidates often think more granular partitions (e.g., minute) always improve performance, but in Athena, excessive partitions increase metadata overhead and can slow down queries due to the overhead of listing many small S3 prefixes.

293
MCQmedium

A data scientist is performing EDA on a time-series dataset and observes a strong upward trend and seasonal patterns. The scientist needs to make the data stationary for modeling. Which transformation should be applied?

A.Apply one-hot encoding
B.Apply PCA
C.Apply min-max scaling
D.Apply differencing to the series
E.Apply logarithmic transformation
AnswerD

Differencing removes trends and seasonality, making the series stationary.

Why this answer

Differencing is a technique that removes trends and seasonality by subtracting the previous observation from the current one, making the time series stationary. One-hot encoding (A) is used for categorical variables. PCA (B) reduces dimensionality but does not address stationarity.

Min-max scaling (C) normalizes the range of data but does not remove trend or seasonality. Logarithmic transformation (E) stabilizes variance but does not eliminate trends. Therefore, differencing (D) is the correct choice.

294
MCQmedium

A company is using Amazon SageMaker to train a model on a dataset with many categorical features. They want to use SageMaker's built-in Linear Learner algorithm. What preprocessing step is required for the categorical features?

A.Apply one-hot encoding to convert them to numerical vectors.
B.Use label encoding to assign integers to categories.
C.Normalize the categorical features using min-max scaling.
D.Remove categorical features with high cardinality.
AnswerA

Linear models need numerical features; one-hot encoding is standard.

Why this answer

The SageMaker Linear Learner algorithm requires numerical input features. Categorical features must be converted to numerical vectors, typically via one-hot encoding, because the algorithm performs linear regression or classification on numerical data. Without this preprocessing, the algorithm cannot interpret categorical values directly.

Exam trap

The trap here is that candidates confuse label encoding (assigning integers) with one-hot encoding, assuming any numerical conversion suffices, but label encoding introduces false ordinality that degrades linear model performance.

How to eliminate wrong answers

Option B is wrong because label encoding assigns arbitrary integers to categories, which implies an ordinal relationship that can mislead the linear model into treating categories as ordered numerical values. Option C is wrong because normalization (min-max scaling) is a scaling technique for numerical features, not a method to convert categorical features to numerical form. Option D is wrong because removing high-cardinality categorical features is a data reduction strategy, not a required preprocessing step for the Linear Learner algorithm; the algorithm can handle one-hot encoded features regardless of cardinality.

295
MCQhard

A data scientist is exploring a large dataset (10 TB) stored in Amazon S3. The dataset is in CSV format and has many columns. The scientist wants to quickly compute summary statistics (mean, min, max, count) for each column without moving the data. Which approach is most cost-effective and efficient?

A.Import the data into Amazon SageMaker Data Wrangler
B.Launch an Amazon EMR cluster with Spark
C.Use S3 Select to compute statistics
D.Use Amazon Athena with SQL queries
E.Use AWS Glue DataBrew to profile the data
AnswerD

Athena queries data in place with no data movement and pay-per-query pricing.

Why this answer

Amazon Athena is a serverless query service that allows you to run SQL queries directly on data stored in S3 without moving it. It is cost-effective because you pay only for the data scanned per query. For summary statistics like mean, min, max, count, you can use aggregate functions like AVG, MIN, MAX, COUNT in SQL.

Option A (SageMaker Data Wrangler) requires importing data into SageMaker, incurring transfer costs and time. Option B (Amazon EMR) requires provisioning a cluster, which adds overhead and cost for a simple summary task. Option C (S3 Select) works on a single object and cannot compute statistics across entire dataset easily; it is more suited for filtering.

Option E (AWS Glue DataBrew) is a data preparation tool that may be more expensive and overkill for simple summary statistics.

296
MCQmedium

A company is using Amazon SageMaker to train a XGBoost model on a large dataset. The training job is taking a long time. The data scientist wants to reduce training time without sacrificing model accuracy. The dataset is 100 GB in CSV format stored in S3. What is the most effective approach?

A.Reduce the number of instances to avoid communication overhead.
B.Use Pipe mode to stream data from S3 instead of downloading it first.
C.Use random sampling to reduce the dataset size to 10 GB.
D.Use SageMaker Managed Spot Training to reduce cost, but training time may increase due to interruptions.
AnswerB

Pipe mode reduces I/O time by streaming data directly to the algorithm.

Why this answer

SageMaker's Pipe mode streams data directly from S3 to the training algorithm without writing it to disk, eliminating the I/O bottleneck of downloading the full 100 GB dataset. This reduces training time significantly by overlapping data loading with computation, while preserving model accuracy since the entire dataset is still used.

Exam trap

The trap here is that candidates often confuse cost optimization (Spot Training) with performance optimization, or incorrectly assume that reducing instances or data size is the only way to speed up training, ignoring SageMaker's specialized data streaming capability.

How to eliminate wrong answers

Option A is wrong because reducing the number of instances increases per-instance data load and can increase training time due to less parallelism, and communication overhead is negligible compared to I/O for large datasets. Option C is wrong because random sampling reduces dataset size, which sacrifices model accuracy by discarding potentially important data patterns, and the goal is to reduce time without sacrificing accuracy. Option D is wrong because SageMaker Managed Spot Training reduces cost, not training time; interruptions can actually increase training time due to checkpoint restarts, making it ineffective for the stated goal.

297
MCQeasy

A Lambda function is triggered by S3 events. The event payload shown in the exhibit is received by the Lambda function. The function is supposed to process the CSV file and load it into DynamoDB. However, the function fails because it cannot read the file. What is the MOST likely cause?

A.The Lambda function lacks DynamoDB write permissions
B.The Lambda function's IAM role does not have s3:GetObject permission
C.The S3 bucket does not exist
D.The S3 event notification is misconfigured
AnswerB

Without read permission, the function cannot access the S3 object.

Why this answer

The Lambda function cannot read the file from S3 because its IAM role does not have the s3:GetObject permission. Option A is wrong because the failure is not due to DynamoDB write permissions; the function fails before writing. Option C is wrong because the S3 bucket exists, as indicated by the event triggering.

Option D is wrong because the event notification is correctly configured to trigger the Lambda function, as evidenced by the function receiving the event.

298
MCQhard

A company is designing a data pipeline to process log files from multiple sources. The logs are written to Amazon S3 every hour. The data is then transformed using AWS Glue ETL jobs and loaded into Amazon Redshift for analysis. The company needs to ensure that the data is available for analysis within 30 minutes of being written to S3. Currently, the Glue job is triggered hourly, but the company wants to reduce the latency. Which solution should the company implement?

A.Increase the frequency of the Glue crawler to run every 5 minutes
B.Use Amazon Redshift Spectrum to query the data directly from S3 without transformation
C.Use Amazon S3 event notifications to invoke an AWS Lambda function that starts the Glue job automatically
D.Reduce the Glue job trigger frequency to every 15 minutes
AnswerC

S3 events trigger Lambda immediately, which starts the Glue job with low latency.

Why this answer

Configuring an S3 event notification to invoke AWS Lambda, which starts the Glue job, allows near-real-time processing within minutes. Option A is wrong because hourly triggers do not reduce latency. Option B is wrong because increasing the crawler frequency does not trigger ETL jobs.

Option D is wrong because Redshift Spectrum does not transform data.

299
MCQmedium

A data scientist is analyzing a dataset with missing values in several columns. The dataset contains both numerical and categorical features. Which approach should the data scientist use to handle missing values while minimizing bias and preserving relationships in the data?

A.Use multiple imputation (e.g., MICE) to impute missing values
B.Use forward-fill to propagate the last observed value
C.Delete all rows with missing values
D.Replace missing values with the mean or median of each column
AnswerA

MICE models each variable as a function of others, preserving relationships and reducing bias.

Why this answer

Multiple Imputation by Chained Equations (MICE) models each missing value as a function of other variables, preserving relationships and reducing bias. Option B (forward-fill) is unsuitable for non-time-series data and can introduce bias. Option C (deleting rows) reduces sample size and may introduce bias if data is not missing completely at random.

Option D (mean/median imputation) distorts distributions and reduces variance, potentially biasing relationships.

300
MCQeasy

A company needs to ingest real-time clickstream data from thousands of web servers into AWS for near-real-time analytics. The data volume varies and can spike during promotions. Which service should be used to capture and buffer the data before processing?

A.Amazon SQS
B.Amazon Kinesis Data Firehose
C.Amazon Kinesis Data Streams
D.Amazon MQ
AnswerC

Kinesis Data Streams provides a durable buffer for real-time data, enabling multiple consumers.

Why this answer

Amazon Kinesis Data Streams is the correct choice because it is designed for real-time data ingestion and buffering of large streams of data, such as clickstream events from thousands of web servers. It provides durable, low-latency storage (up to 365 days retention) and supports multiple consumers for near-real-time analytics, making it ideal for handling variable and spiky data volumes during promotions.

Exam trap

A common pitfall is confusing the buffering capabilities of Kinesis Data Streams versus Kinesis Data Firehose. Candidates often choose Firehose because they think 'buffer' implies a simple staging area, but Firehose lacks the multi-consumer and replay capabilities required for near-real-time analytics.

How to eliminate wrong answers

Option A is wrong because Amazon SQS is a message queue service for decoupling application components, not designed for high-throughput streaming data ingestion or near-real-time analytics; it lacks the ability to replay data and has a 256 KB message size limit. Option B is wrong because Amazon Kinesis Data Firehose is a fully managed service for loading streaming data into destinations like S3 or Redshift, but it does not provide a buffer for multiple consumers or allow custom processing logic; it is better suited for batch-oriented delivery rather than real-time analytics. Option D is wrong because Amazon MQ is a managed message broker service for Apache ActiveMQ and RabbitMQ, which is intended for traditional messaging patterns (e.g., JMS) and not optimized for high-velocity, real-time clickstream ingestion or replay capabilities.

Page 3

Page 4 of 23

Page 5