Courseiva

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

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

Page 19

Page 20 of 23

Page 21
1426
MCQmedium

A company stores sensor data in Amazon S3. A data scientist wants to explore the data using SQL without moving it. Which AWS service should they use?

A.Amazon EMR
B.Amazon Redshift
C.Amazon QuickSight
D.Amazon Athena
AnswerD

Athena queries data directly in S3 using SQL.

Why this answer

Amazon Athena is the correct choice because it is a serverless interactive query service that allows you to analyze data directly in Amazon S3 using standard SQL without any data movement or infrastructure management. Athena uses Presto under the hood and charges only for the data scanned per query, making it ideal for ad-hoc exploratory analysis on sensor data stored in S3.

Exam trap

The trap here is that candidates often confuse Amazon Athena with Amazon EMR or Redshift, thinking they need a full cluster or data warehouse for SQL queries, but Athena is specifically designed for serverless, direct S3 querying with no data movement.

How to eliminate wrong answers

Option A is wrong because Amazon EMR is a managed big data platform that requires provisioning and managing clusters (e.g., Hadoop, Spark), which involves moving or processing data in a separate compute layer, not querying it directly in S3 with SQL without setup. Option B is wrong because Amazon Redshift is a data warehouse that requires loading data from S3 into its own storage before querying, violating the 'without moving it' requirement. Option C is wrong because Amazon QuickSight is a business intelligence (BI) visualization tool, not a SQL query engine; it can connect to Athena but cannot directly run SQL queries on S3 data on its own.

1427
Multi-Selecthard

A data scientist is analyzing a dataset with many missing values. The scientist wants to decide on an imputation strategy. Which THREE considerations are important for choosing the imputation method?

Select 3 answers
A.The mechanism of missingness (MCAR, MAR, MNAR).
B.The class imbalance of the target variable.
C.The percentage of missing values in each feature.
D.The distribution of the feature (e.g., skewed, normal).
E.The feature importance according to a random forest model.
AnswersA, C, D

Determines whether imputation is valid.

Why this answer

The three correct considerations are: missing data mechanism (MCAR/MAR/MNAR) which determines whether imputation can be unbiased; percentage of missing values in each feature, which affects the reliability of imputation and whether deletion is preferable; and feature distribution (e.g., skewed, normal), which guides the choice between mean, median, or model-based imputation. Option B (class imbalance) is a consideration for classification models, not imputation. Option E (feature importance) is not a standard criterion for choosing imputation methods.

1428
MCQmedium

A data scientist ran a SageMaker training job that failed with the error shown. The training script expects the data in '/opt/ml/input/data/training/train.csv'. What is the most likely issue?

A.The hyperparameter 'sagemaker_program' is misspelled
B.The training script has a bug in reading the file
C.The channel name should be 'train' instead of 'training'
D.The S3 data path should point to the exact file, not the folder
AnswerD

SageMaker copies the prefix content into the channel directory; if train.csv is not at the root of that prefix, the path is wrong.

Why this answer

The SageMaker training job expects the S3 data path to point directly to the CSV file (e.g., s3://bucket/train.csv), not to a folder containing the file. When the path points to a folder, SageMaker downloads the folder contents but the training script's hardcoded path '/opt/ml/input/data/training/train.csv' fails because the file is not placed at that exact location—SageMaker copies the file into the channel directory with its original name, but the folder path causes the file to be nested or missing, leading to a file-not-found error.

Exam trap

The trap here is that candidates often confuse the channel name (which is arbitrary) with the S3 data path format, assuming the error is about the channel name mismatch rather than the distinction between pointing to a file versus a folder in S3.

How to eliminate wrong answers

Option A is wrong because 'sagemaker_program' is not a valid hyperparameter; the correct hyperparameter is 'sagemaker_program' is actually 'sagemaker_program' is not a standard SageMaker hyperparameter—the training script is specified via the 'entry_point' argument in the Estimator, not a hyperparameter, and a misspelling would cause a different error (e.g., unrecognized hyperparameter). Option B is wrong because the error message indicates a file-not-found issue, not a bug in reading the file; if the script had a bug, it would likely throw a Python exception (e.g., pandas read error) rather than an OS-level file-not-found error. Option C is wrong because the channel name in the SageMaker API is arbitrary and user-defined; the error shows the script expects data in '/opt/ml/input/data/training/', which matches a channel named 'training'—changing it to 'train' would require modifying both the channel definition and the script path, but the error is about the S3 path, not the channel name.

1429
MCQeasy

A machine learning engineer is deploying a model to SageMaker for real-time inference. The model is a TensorFlow SavedModel. Which SageMaker capability should be used to create an endpoint?

A.SageMaker hosting with TensorFlow Serving container
B.SageMaker Pipelines
C.SageMaker Model Monitor
D.SageMaker Ground Truth
AnswerA

SageMaker provides managed TensorFlow serving containers, which can be used to host the SavedModel for real-time inference.

Why this answer

SageMaker provides managed TensorFlow serving containers for deploying TensorFlow SavedModels to real-time endpoints. Option B is wrong because SageMaker Pipelines is used for building and managing ML workflows, not for deploying models to endpoints. Option C is wrong because SageMaker Model Monitor is used for monitoring model quality and drift, not for deployment.

Option D is wrong because SageMaker Ground Truth is used for labeling data, not for hosting models.

1430
MCQhard

A data engineer is performing exploratory data analysis on a large dataset stored in Amazon S3 (10 TB in CSV format). The dataset has 2000 columns and 50 million rows. The engineer needs to compute summary statistics (mean, median, standard deviation) for each numeric column and identify missing values. Which approach is MOST cost-effective and time-efficient?

A.Use Amazon Redshift Spectrum to query the data directly from S3.
B.Load the data into Amazon SageMaker Data Wrangler and compute statistics interactively.
C.Convert the data to Apache Parquet format, then use Amazon Athena to run SQL queries for statistics.
D.Use AWS Glue ETL to compute statistics and write results to S3.
AnswerC

Parquet reduces data scanned, and Athena is cost-effective for ad-hoc queries.

Why this answer

Using Amazon Athena with columnar formats like Parquet after converting from CSV reduces query costs and improves performance. Option A (Redshift Spectrum) requires setting up a Redshift cluster, which is overkill. Option B (SageMaker Data Wrangler) may struggle with 2000 columns.

Option D (AWS Glue ETL) is more expensive and slower for simple statistics.

1431
Multi-Selectmedium

Which TWO are appropriate techniques for detecting outliers in a dataset during exploratory data analysis?

Select 2 answers
A.Z-score method (assuming normal distribution)
B.One-hot encoding
C.Principal component analysis (PCA)
D.t-SNE
E.Interquartile range (IQR) method
AnswersA, E

Z-score identifies outliers based on standard deviations.

1432
Multi-Selecteasy

A data scientist is using Amazon SageMaker to train a model. The training data is stored in an S3 bucket encrypted with AWS KMS. Which TWO actions are necessary to allow SageMaker to access the data?

Select 2 answers
A.Ensure the SageMaker execution role has s3:GetObject permission.
B.Enable S3 Transfer Acceleration.
C.Set up a VPC endpoint for S3.
D.Add a bucket policy allowing SageMaker access.
E.Grant the SageMaker execution role kms:Decrypt permission.
AnswersA, E

Required to read objects.

Why this answer

A is correct because the SageMaker execution role must have the s3:GetObject permission to read objects from the S3 bucket. Without this IAM permission, SageMaker cannot retrieve the training data, even if the bucket is otherwise accessible.

Exam trap

The trap here is that candidates often forget that KMS-encrypted S3 objects require both s3:GetObject and kms:Decrypt permissions, leading them to select only the S3 permission and miss the KMS permission.

1433
Multi-Selecthard

A data scientist is using Amazon SageMaker Debugger to monitor training. Which THREE types of issues can Debugger monitor?

Select 3 answers
A.Hardware failures
B.Poor weight initialization
C.Data drift
D.Overfitting
E.Vanishing gradients
AnswersB, D, E

Debugger can detect issues from poor initialization.

Why this answer

Amazon SageMaker Debugger can monitor training for poor weight initialization by analyzing tensors and gradients during the training process. It uses built-in rules to detect if weights are initialized with values that are too large or too small, which can lead to slow convergence or failure to learn. This is a core capability of Debugger's real-time monitoring of model parameters.

Exam trap

The trap here is that candidates confuse SageMaker Debugger (which monitors training metrics like gradients and weights) with SageMaker Model Monitor (which monitors inference data for drift and bias), leading them to incorrectly select data drift as a Debugger capability.

1434
MCQhard

A data science team uses Amazon SageMaker to train models on a dataset stored in Amazon S3. The dataset is 2 TB and is accessed by multiple training jobs. The team notices that training jobs are slow due to high S3 GET request latency. Which solution would provide the fastest and most cost-effective data access?

A.Place all training instances in a Cluster Placement Group
B.Enable S3 Transfer Acceleration on the bucket
C.Mount an Amazon FSx for Lustre file system integrated with the S3 bucket
D.Use Elastic Fabric Adapter (EFA) for training instances
AnswerC

FSx for Lustre provides a high-performance file system that can read data from S3 with low latency.

Why this answer

Amazon FSx for Lustre provides a high-performance, POSIX-compliant file system that can be directly linked to an S3 bucket, allowing training instances to access data with sub-millisecond latency instead of S3 GET request latency. This integration enables data to be read from the Lustre file system at up to hundreds of gigabytes per second of throughput, which is significantly faster than reading directly from S3, and it is cost-effective because you only pay for the storage and throughput you provision during training.

Exam trap

The trap here is that candidates confuse network-level optimizations (Placement Groups, EFA) or upload acceleration (S3 Transfer Acceleration) with the actual data access bottleneck, which is the latency of S3 GET requests when reading a large dataset repeatedly during training.

How to eliminate wrong answers

Option A is wrong because a Cluster Placement Group only reduces network latency between instances within a single Availability Zone but does not address the bottleneck of S3 GET request latency when reading data from S3. Option B is wrong because S3 Transfer Acceleration speeds up uploads to S3 over long distances by using edge locations, but it does not improve read latency for training jobs that are already in the same region as the bucket. Option D is wrong because Elastic Fabric Adapter (EFA) is a network interface that accelerates inter-instance communication for distributed training (e.g., MPI), not the data access path from S3 to the training instances.

1435
Multi-Selecthard

A company is using Amazon Kinesis Data Streams to ingest real-time clickstream data. The data must be processed and stored in S3 in near real-time. Which THREE services can be used together to achieve this?

Select 3 answers
A.Amazon Kinesis Data Analytics
B.Amazon Kinesis Data Firehose
C.AWS Glue ETL
D.AWS Lambda
E.Amazon EMR
AnswersA, B, D

Can process streaming data in real-time.

Why this answer

Amazon Kinesis Data Analytics is correct because it can process streaming clickstream data in real-time using SQL or Apache Flink, enabling transformations, aggregations, and filtering before the data is delivered downstream. It integrates directly with Kinesis Data Streams as a source and can output processed records to Kinesis Data Firehose for storage in Amazon S3, achieving near real-time processing and storage.

Exam trap

The trap here is that candidates often assume AWS Glue ETL can handle real-time streaming because it supports Spark Streaming, but Glue ETL jobs are fundamentally batch-oriented and not designed for continuous, low-latency ingestion from Kinesis Data Streams into S3.

1436
MCQeasy

A data engineer needs to store streaming data from thousands of IoT devices for real-time analytics. Which AWS service is most suitable for ingesting and storing this data for subsequent processing by Amazon Kinesis Data Analytics?

A.Amazon Kinesis Data Streams
B.Amazon S3
C.Amazon RDS
D.Amazon DynamoDB
AnswerA

Kinesis Data Streams ingests and stores streaming data in real-time for analytics.

Why this answer

Amazon Kinesis Data Streams is the most suitable service for ingesting and storing streaming data from thousands of IoT devices because it is designed for real-time data ingestion, can handle high throughput from many sources, and integrates natively with Amazon Kinesis Data Analytics for real-time analytics without needing additional storage layers. Its shard-based architecture allows for scalable, durable storage of streaming records for up to 365 days, enabling immediate processing by Kinesis Data Analytics.

Exam trap

The trap here is that candidates often confuse durable storage (S3) or database services (RDS, DynamoDB) with the real-time ingestion and buffering capabilities of a stream, overlooking that Kinesis Data Analytics requires a streaming source like Kinesis Data Streams for continuous, low-latency processing.

How to eliminate wrong answers

Option B (Amazon S3) is wrong because S3 is an object storage service optimized for batch storage and retrieval, not for real-time streaming ingestion; it lacks the low-latency, continuous data capture and record-level ordering required by Kinesis Data Analytics. Option C (Amazon RDS) is wrong because RDS is a relational database service designed for transactional workloads and structured querying, not for high-velocity streaming data ingestion, and it cannot natively feed data into Kinesis Data Analytics without custom connectors. Option D (Amazon DynamoDB) is wrong because DynamoDB is a NoSQL key-value and document database optimized for low-latency queries on stored data, not for streaming ingestion; while it can be used as a source via DynamoDB Streams, it is not designed for the primary ingestion and temporary storage of raw streaming data for real-time analytics.

1437
Multi-Selecthard

A company is using Amazon SageMaker to tune hyperparameters for a gradient boosting model. The objective is to minimize root mean squared error (RMSE). The data scientist wants to explore the hyperparameter space efficiently. Which THREE hyperparameter tuning strategies should the data scientist consider? (Choose 3.)

Select 3 answers
A.Bayesian optimization
B.Random search
C.Grid search
D.Manual search
E.Hyperband
AnswersA, B, E

Uses probabilistic model to guide search.

Why this answer

Bayesian optimization is correct because it builds a probabilistic model of the objective function (RMSE) and uses an acquisition function to select the next hyperparameter combination to evaluate. This approach is sample-efficient, making it ideal for expensive-to-evaluate models like gradient boosting, as it balances exploration and exploitation to find optimal hyperparameters with fewer trials.

Exam trap

The trap here is that candidates often assume grid search is the most thorough strategy, but in practice it is inefficient for high-dimensional spaces, while SageMaker explicitly supports Bayesian optimization, random search, and Hyperband as the three built-in tuning strategies.

1438
Multi-Selectmedium

A data scientist is training a neural network for image classification. The training loss is not decreasing significantly, and the validation loss is high. Which TWO actions should the scientist take to address potential vanishing gradients?

Select 2 answers
A.Increase the learning rate
B.Use ReLU activation functions in hidden layers
C.Switch activation functions from ReLU to sigmoid
D.Add batch normalization layers
E.Remove dropout layers
AnswersB, D

ReLU does not saturate for positive inputs, reducing vanishing gradient risk.

Why this answer

ReLU activation functions help mitigate vanishing gradients because they output a constant gradient of 1 for positive inputs, preventing the gradient from shrinking as it propagates backward through many layers. This avoids the exponential decay of gradients that occurs with saturating activations like sigmoid or tanh, enabling effective training of deep networks.

Exam trap

The trap here is that candidates may confuse vanishing gradients with overfitting or learning rate issues, leading them to choose options like increasing the learning rate or removing dropout, which do not address the fundamental gradient propagation problem.

1439
MCQmedium

In exploratory data analysis, a data scientist notices that the distribution of a feature 'income' is heavily right-skewed. Which transformation is most appropriate to reduce skewness?

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

Log transformation reduces right skew.

Why this answer

Log transformation is the most appropriate technique to reduce right skewness in a feature like 'income' because it compresses the long tail of high values while expanding the lower end, making the distribution more symmetric. This is particularly effective for income data, which often follows a log-normal distribution, and is a standard preprocessing step in machine learning to improve model performance.

Exam trap

The trap here is that candidates confuse scaling techniques (which change range or variance) with transformations that alter distribution shape, leading them to pick standardization or min-max scaling as a fix for skewness.

How to eliminate wrong answers

Option A is wrong because standardization (z-score) centers and scales the data to have mean 0 and standard deviation 1, but it does not change the shape of the distribution, so skewness remains. Option B is wrong because a square transformation amplifies larger values even more, which would worsen right skewness rather than reduce it. Option C is wrong because min-max scaling linearly rescales the data to a fixed range (e.g., [0,1]), which preserves the original distribution shape and does not address skewness.

1440
MCQmedium

A company is building a data pipeline using AWS Glue to transform data from Amazon RDS to Amazon S3. The pipeline runs daily and processes about 500 GB of data. The team notices that the job is taking longer than expected. Which change would MOST improve the job performance?

A.Disable job bookmarking
B.Increase the number of DPUs for the Glue job
C.Upgrade the RDS instance to a larger class
D.Use smaller file sizes in S3 output
AnswerB

More DPUs provide more parallelism and can speed up the job.

Why this answer

Increasing the number of DPUs (Data Processing Units) for the AWS Glue job directly allocates more distributed computing resources, allowing the job to process the 500 GB dataset in parallel across multiple workers. This is the most effective way to reduce runtime for a large-scale ETL job, as Glue's Spark-based execution scales horizontally with DPU count.

Exam trap

The trap here is that candidates often confuse increasing DPUs with simply adding more memory, when in fact it scales both CPU and memory, and they may incorrectly assume that optimizing output file sizes or disabling bookmarks is a performance fix, whereas those changes address different concerns like cost or incremental processing.

How to eliminate wrong answers

Option A is wrong because disabling job bookmarking would prevent incremental processing, forcing a full reprocess of all data each run, which would increase runtime, not improve it. Option C is wrong because the bottleneck is in the Glue job's processing capacity, not the RDS instance's throughput; upgrading RDS would only help if the read stage were the constraint, but the pipeline is already extracting data to S3. Option D is wrong because using smaller file sizes in S3 output would increase the number of files and metadata operations, degrading performance due to overhead in S3 listing and Spark task scheduling.

1441
MCQmedium

A company runs a daily batch ETL job using AWS Glue that reads from Amazon RDS (MySQL), transforms the data, and writes to Amazon Redshift. The job takes 6 hours and processes 500 GB of data. Management wants to reduce the runtime. Which action would be MOST effective?

A.Increase the node size of the Redshift cluster
B.Use the Redshift COPY command to load data directly from RDS
C.Use Amazon RDS with Provisioned IOPS SSD storage
D.Increase the number of DPUs allocated to the Glue job
AnswerD

More DPUs allow Glue to process data in parallel, reducing overall runtime.

Why this answer

Increasing the number of DPUs (Data Processing Units) allocated to the AWS Glue job directly increases the parallelism of the Spark-based ETL job, allowing it to process the 500 GB of data faster. Since the bottleneck is the Glue job's compute capacity, adding more DPUs reduces runtime without changing the source or target infrastructure.

Exam trap

The trap here is that candidates often assume the bottleneck is the target database (Redshift) or the source database (RDS), but the question explicitly states the Glue job takes 6 hours, so the compute capacity of Glue itself is the primary constraint.

How to eliminate wrong answers

Option A is wrong because increasing Redshift node size improves query performance and data loading speed, but the bottleneck here is the Glue ETL processing, not Redshift ingestion. Option B is wrong because the COPY command loads data from Amazon S3 or other sources, not directly from RDS; it cannot read from a MySQL database, so this is not a valid alternative. Option C is wrong because Provisioned IOPS SSD storage improves RDS I/O performance for transactional workloads, but the Glue job reads data via JDBC, which is network-bound and not limited by RDS storage IOPS for batch reads of 500 GB.

1442
MCQhard

A data scientist is analyzing a dataset for a binary classification problem. The dataset has 10,000 samples and 200 features. After splitting into training (80%) and test (20%), the data scientist trains a decision tree classifier and achieves 100% accuracy on the training set but only 55% on the test set. Which step should the data scientist take first to address this issue?

A.Use cross-validation to evaluate model performance
B.Collect more training data
C.Add more features to the model
D.Prune the decision tree to reduce complexity
AnswerD

Why D is correct

Why this answer

The large discrepancy between training and test accuracy indicates overfitting, and pruning the decision tree (e.g., limiting max_depth) reduces overfitting. Option A is wrong because cross-validation is a technique to evaluate model performance but does not directly fix overfitting. Option B is wrong because more data may help but is not the first step; also data is limited.

Option C is wrong because more features may worsen overfitting.

1443
MCQhard

A data scientist is using Amazon SageMaker's built-in BlazingText algorithm for word2vec embeddings. The dataset is a corpus of 10 million documents. After training, the data scientist observes that the learned embeddings do not capture semantic similarity well (e.g., 'king' and 'queen' are not close). Which hyperparameter adjustment is most likely to improve the quality of embeddings?

A.Increase the vector dimensionality
B.Decrease the window size
C.Decrease the number of negative samples
D.Increase the learning rate
AnswerA

Higher dimensionality allows embeddings to capture more fine-grained semantic relationships.

Why this answer

Increasing the vector dimensionality allows the model to capture more nuanced semantic relationships and co-occurrence patterns in the data. With 10 million documents, the default dimensionality (typically 100 or 300) may be insufficient to encode the rich contextual information, so raising it (e.g., to 300 or 500) gives the model more capacity to learn high-quality embeddings where words like 'king' and 'queen' become closer in vector space.

Exam trap

The trap here is that candidates often confuse 'window size' with 'context size' and assume decreasing it helps with similarity, but in reality, a larger window captures broader topical relationships, while a smaller window captures syntactic patterns; for semantic similarity, a moderate to large window is needed.

How to eliminate wrong answers

Option B is wrong because decreasing the window size reduces the context window, making the model focus on very local word co-occurrences, which actually harms the capture of broader semantic similarity like 'king' and 'queen'. Option C is wrong because decreasing the number of negative samples reduces the discriminative training signal, making it harder for the model to separate similar from dissimilar words, thus degrading embedding quality. Option D is wrong because increasing the learning rate can cause the optimization to overshoot minima or diverge, leading to unstable training and poor embeddings; the default learning rate in BlazingText is already tuned for convergence.

1444
MCQmedium

A data scientist is training a neural network for time series forecasting. The training loss decreases initially but then starts to increase after 20 epochs. Which action should the scientist take to address this?

A.Increase the dropout rate
B.Increase the learning rate
C.Implement early stopping based on validation loss
D.Add more layers to the network
AnswerC

Early stopping halts training when validation loss stops improving, preventing overfitting.

Why this answer

Early stopping monitors validation loss and stops training when it starts increasing, preventing overfitting. Option A is wrong because increasing dropout may help with overfitting but the immediate issue of increasing loss is better addressed by early stopping, and dropout alone doesn't stop training. Option B is wrong because increasing the learning rate can cause divergence, making the loss increase worse.

Option D is wrong because adding more layers increases model capacity and typically worsens overfitting.

1445
Multi-Selecteasy

A data scientist is using Amazon SageMaker to build a custom training algorithm. The algorithm requires a specific library that is not included in the default SageMaker containers. The scientist wants to create a custom container that includes this library. Which TWO steps are required? (Choose TWO.)

Select 2 answers
A.Upload the Docker image to an Amazon S3 bucket
B.Create an AWS Lambda layer with the library
C.Build a Docker image with the required library
D.Register the container in the SageMaker Model Registry
E.Push the Docker image to Amazon ECR
AnswersC, E

Docker is used to create custom containers.

Why this answer

Building a Docker image with the required library is the foundational step to create a custom container that includes dependencies not present in the default SageMaker containers. Option E is correct because the Docker image must be pushed to Amazon Elastic Container Registry (ECR) so that SageMaker can pull it when training jobs are launched. SageMaker does not directly use images stored in S3; it requires the image to be hosted in ECR.

Exam trap

The MLS-C01 exam often tests the misconception that Docker images can be stored in S3 for SageMaker, but the platform strictly requires ECR for container image storage and retrieval.

1446
MCQmedium

An IAM policy is attached to a SageMaker notebook instance. The data scientist wants to use the notebook to train a model using data from S3 bucket 'my-bucket'. However, the training job fails with an access denied error. What is the MOST likely cause?

A.The notebook instance role does not have iam:PassRole permission to pass the SageMaker execution role
B.The sagemaker:CreateTrainingJob permission is not allowed on the specific resource
C.The S3 bucket resource ARN is incorrectly formatted
D.The s3:GetObject permission is missing for the bucket
AnswerA

SageMaker needs the notebook role to pass an execution role to training jobs.

Why this answer

The most likely cause is that the notebook instance role lacks the iam:PassRole permission, which is required to pass the SageMaker execution role to the training job. When a SageMaker notebook instance creates a training job, it must pass an execution role that the training job will assume to access resources like S3. Without iam:PassRole on the notebook's role, the API call fails with an access denied error, even if all other permissions are correctly configured.

Exam trap

The trap here is that candidates often focus on S3 permissions (s3:GetObject) or SageMaker action permissions, overlooking the IAM pass-role mechanism that is required for the notebook to delegate permissions to the training job.

How to eliminate wrong answers

Option B is wrong because sagemaker:CreateTrainingJob permission is typically allowed on the notebook instance role, and the error is about access denied during the training job creation, not about the action itself being denied on a specific resource. Option C is wrong because an incorrectly formatted S3 bucket resource ARN would cause a different error (e.g., MalformedPolicy or InvalidArn), not an access denied error during training job creation. Option D is wrong because s3:GetObject permission is needed for the training job execution role, not the notebook instance role; the notebook role only needs iam:PassRole to pass the execution role, and the execution role handles S3 access.

1447
Multi-Selecthard

A data scientist is performing EDA on a dataset with 1 million rows and 50 features. The dataset includes a column 'user_id' with unique identifiers, a column 'event_date' with timestamps, and other columns. Which TWO actions should the data scientist take to understand data quality issues?

Select 2 answers
A.Analyze missing value patterns across columns
B.Check for duplicate rows based on 'user_id' and 'event_date'
C.Drop the 'user_id' column to reduce dimensionality
D.Use PCA to reduce dimensions and visualize
E.Train a random forest model to identify feature importance
AnswersA, B

Missing value analysis is key for data quality.

Why this answer

Analyzing missing value patterns (A) is a fundamental EDA step to identify data quality issues such as incomplete records. Checking for duplicate rows based on 'user_id' and 'event_date' (B) helps ensure data integrity, as duplicates can skew analysis. Option C (dropping 'user_id') is premature; identifier columns can be useful for deduplication and merging.

Option D (PCA) is a dimensionality reduction technique used later, not for initial data quality checks. Option E (training a model) is part of modeling, not EDA.

1448
MCQmedium

A data pipeline uses Amazon Kinesis Data Streams to ingest clickstream data. The data is consumed by an AWS Lambda function that transforms and writes to Amazon DynamoDB. The Lambda function is throttled during traffic spikes, causing data to be reprocessed. Which solution should the team implement to handle the throttling without losing data?

A.Use Amazon SQS as an intermediate buffer between Kinesis and Lambda.
B.Increase the number of shards in the Kinesis stream and configure a dead-letter queue (DLQ) for the Lambda function.
C.Enable DynamoDB auto scaling to handle writes.
D.Reduce the batch size in the Lambda event source mapping.
AnswerB

More shards increase parallelism; DLQ captures failures for reprocessing.

Why this answer

Increasing the number of shards in the Kinesis stream raises the throughput capacity, reducing the likelihood of Lambda throttling. Configuring a dead-letter queue (DLQ) for the Lambda function captures any records that fail processing after exhausting retries, preventing data loss. This combination addresses both the throttling cause and provides a safety net for unprocessed records.

Exam trap

The trap here is that candidates often confuse Lambda throttling with DynamoDB write capacity issues, leading them to choose DynamoDB auto scaling (Option C) instead of addressing the upstream Kinesis shard count and Lambda error handling with a DLQ.

How to eliminate wrong answers

Option A is wrong because inserting an SQS buffer between Kinesis and Lambda would break the native Kinesis-to-Lambda integration, add latency, and still require Lambda to handle the same volume of data; it does not address the root cause of throttling. Option C is wrong because DynamoDB auto scaling handles write capacity issues at the database layer, but the problem is Lambda throttling due to Kinesis throughput, not DynamoDB write limits. Option D is wrong because reducing the batch size in the Lambda event source mapping would increase the number of invocations, potentially worsening throttling, and does not prevent data loss from failed processing.

1449
MCQeasy

A data scientist needs to understand the distribution of a continuous variable in a large dataset stored in Amazon S3. Which AWS service is most appropriate for quickly generating summary statistics and visualizations?

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

Correct: QuickSight can directly connect to S3 and create interactive dashboards with summary statistics.

Why this answer

Amazon QuickSight is a business analytics service that easily connects to S3 data to create interactive visualizations, dashboards, and summary statistics like histograms, making it ideal for this task. Amazon Athena is a query service for running SQL on S3, but it does not generate visualizations. Amazon SageMaker Studio is a machine learning IDE for building and training models, not for quick ad-hoc analysis.

AWS Glue is a serverless data integration service for ETL, not for analysis or visualization.

1450
MCQhard

A company is using Amazon SageMaker to deploy a model for real-time inference. The model endpoint is behind an Application Load Balancer (ALB) for A/B testing. The data scientist notices that the endpoint is returning HTTP 503 errors intermittently. The CloudWatch metrics show that the endpoint's Invocations metric is within limits, but the ModelLatency metric has high variance. What is the most likely cause?

A.The model container is using a custom inference code that has a bug.
B.The ALB health check is misconfigured and marking instances unhealthy.
C.The endpoint instance type does not have enough memory for the model.
D.The endpoint is configured with too few instances; increase the instance count.
AnswerC

Insufficient memory can cause the model to fail to respond, leading to 503 errors.

Why this answer

High variance in ModelLatency combined with intermittent 503 errors strongly indicates that the model container is running out of memory under load. When memory is insufficient, the inference process may be killed by the kernel (OOM killer) or the container may be throttled, causing sporadic failures that manifest as 503s even though the Invocations metric (request count) appears within limits. The latency spikes occur because the container struggles to allocate memory for each request, leading to timeouts or crashes.

Exam trap

The trap here is that candidates confuse 'Invocations within limits' with 'sufficient capacity,' overlooking that memory exhaustion can cause failures even when request rate is low, and they incorrectly attribute 503s solely to scaling issues (Option D) rather than resource constraints on each instance.

How to eliminate wrong answers

Option A is wrong because a bug in custom inference code would typically cause consistent errors (e.g., 500s) or incorrect predictions, not intermittent 503s with high latency variance; the 503 status specifically points to resource exhaustion or overload, not application logic bugs. Option B is wrong because a misconfigured ALB health check would cause the ALB to mark instances as unhealthy and stop routing traffic to them, resulting in persistent 503s for all requests, not intermittent errors with high latency variance; the health check failure would be visible in ALB metrics, not ModelLatency. Option D is wrong because too few instances would cause the Invocations metric to exceed the instance's capacity, leading to throttling and 503s, but the question states Invocations is within limits; increasing instance count would not fix memory exhaustion on each instance, which is the root cause.

1451
MCQeasy

A data scientist needs to perform hyperparameter optimization for a model. Which AWS service provides built-in hyperparameter tuning jobs?

A.Amazon EMR
B.AWS Step Functions
C.Amazon SageMaker
D.AWS Batch
AnswerC

SageMaker has automatic model tuning.

Why this answer

Amazon SageMaker provides built-in hyperparameter tuning jobs as a managed service, allowing data scientists to automatically search for optimal hyperparameter values using strategies like Bayesian optimization, random search, or Hyperband. This is a core feature of SageMaker's automatic model tuning capability, which integrates directly with SageMaker training jobs and supports early stopping to reduce compute costs.

Exam trap

The trap here is that candidates may confuse AWS Batch or Step Functions as capable of hyperparameter tuning because they can orchestrate multiple jobs, but they lack the built-in optimization algorithms and managed tuning lifecycle that SageMaker provides.

How to eliminate wrong answers

Option A is wrong because Amazon EMR is a big data processing service for running Apache Spark, Hadoop, and other distributed frameworks, and it does not include built-in hyperparameter tuning jobs. Option B is wrong because AWS Step Functions is a serverless workflow orchestration service that can coordinate multiple AWS services but does not natively provide hyperparameter tuning algorithms or managed tuning jobs. Option D is wrong because AWS Batch is a batch computing service for running containerized jobs at scale, but it lacks built-in hyperparameter optimization capabilities and requires custom implementation for tuning.

1452
Multi-Selectmedium

A data scientist is training a model using Amazon SageMaker. The training job is running on GPU instances, but the GPU utilization is low. Which TWO actions could improve GPU utilization?

Select 2 answers
A.Increase the number of epochs
B.Use a larger instance with multiple GPUs
C.Increase the batch size
D.Switch to CPU instances
E.Decrease the batch size
AnswersB, C

Using a larger instance with multiple GPUs provides more parallel compute resources, improving overall GPU utilization.

Why this answer

Using a larger instance with multiple GPUs allows more parallel processing, improving GPU utilization. Option C is correct because increasing the batch size provides more data per step, better utilizing GPU parallelism. Option A is incorrect because increasing epochs does not affect utilization per step.

Option D is incorrect because switching to CPU instances would not utilize GPU. Option E is incorrect because decreasing batch size reduces parallelism and lowers GPU utilization.

1453
Multi-Selectmedium

Which THREE actions are valid steps in exploratory data analysis when working with a new dataset? (Choose three.)

Select 3 answers
A.Check the data types of each column.
B.Generate descriptive statistics (mean, std, min, max).
C.Fit a linear regression model to identify important features.
D.Split the dataset into training and test sets.
E.Create histograms for numerical features.
AnswersA, B, E

Understanding data types is essential.

Why this answer

Options A, B, and E are correct. A: Checking data types is fundamental in EDA to understand the nature of each variable. B: Generating descriptive statistics (mean, std, min, max) provides a quick summary of central tendency, dispersion, and range for numerical features.

E: Creating histograms helps visualize the distribution of numerical features, revealing skewness, outliers, or patterns. Option C is incorrect because fitting a linear regression model is a modeling step, not part of EDA. Option D is incorrect because splitting the dataset into training and test sets is for model validation, not for initial data exploration.

1454
Multi-Selecthard

A data scientist is analyzing a dataset with high multicollinearity. Which TWO techniques can help identify and address multicollinearity?

Select 2 answers
A.Plot a correlation matrix
B.Apply Lasso regression
C.Use Recursive Feature Elimination (RFE)
D.Use Principal Component Analysis (PCA)
E.Compute Variance Inflation Factor (VIF)
AnswersD, E

Correct: PCA creates uncorrelated components.

Why this answer

Correct options: D and E. Variance Inflation Factor (VIF) (E) is a key metric for detecting multicollinearity by measuring how much the variance of a coefficient increases due to collinearity. PCA (D) addresses multicollinearity by transforming correlated features into orthogonal components.

Option A is incorrect because a correlation matrix only shows pairwise correlations and may miss higher-order multicollinearity. Option B is incorrect because Lasso regression performs feature selection by shrinking coefficients but does not directly identify multicollinearity. Option C is incorrect because Recursive Feature Elimination (RFE) is a feature selection method that does not detect multicollinearity.

1455
MCQmedium

A data scientist is training a text classification model using Amazon SageMaker. The dataset consists of 100,000 labeled documents. The data scientist notices that the model performs well on the training set but poorly on the validation set. Which regularization technique should the data scientist apply to reduce overfitting?

A.Dropout
B.Data augmentation
C.Batch normalization
D.Early stopping
AnswerA

Dropout randomly drops units during training, preventing co-adaptation and reducing overfitting.

Why this answer

Dropout is a regularization technique that randomly drops a fraction of neurons during training, which prevents the model from relying too heavily on any single feature and forces it to learn more robust representations. This directly addresses the overfitting symptom of high training accuracy and low validation accuracy by reducing the model's capacity to memorize noise in the training data.

Exam trap

The trap here is that candidates often confuse batch normalization with regularization, but batch normalization primarily addresses internal covariate shift and training stability, not overfitting, while dropout is the explicit regularization technique for neural networks.

How to eliminate wrong answers

Option B (Data augmentation) is wrong because it is primarily used for image or audio data to artificially expand the dataset by applying transformations, but for text classification, simple augmentation (e.g., synonym replacement) may not be as effective and is not a standard regularization technique for overfitting in this context. Option C (Batch normalization) is wrong because it normalizes layer inputs to stabilize and accelerate training, but it does not directly reduce overfitting; it can even have a slight regularizing effect but is not the primary technique for combating overfitting. Option D (Early stopping) is wrong because while it can prevent overfitting by halting training when validation performance plateaus, the question asks for a regularization technique, and early stopping is an optimization trick rather than a structural regularization method like dropout.

1456
MCQmedium

A data scientist is using Amazon SageMaker to train a model using a built-in algorithm. The training job fails with an error indicating that the algorithm expects the data to be in recordIO-protobuf format, but the input is CSV. What is the most efficient way to resolve this?

A.Change the inference data to recordIO-protobuf format.
B.Use a boto3 script to convert the CSV files locally and upload.
C.Use a SageMaker processing job to convert the CSV data to recordIO-protobuf format.
D.Switch to a different algorithm that accepts CSV format.
AnswerC

Processing jobs can efficiently transform data into the required format.

Why this answer

Using a SageMaker processing job to convert CSV data to recordIO-protobuf format is an efficient, scalable, and fully managed solution within the SageMaker ecosystem. Option A is incorrect because changing the inference data to recordIO-protobuf does not address the training data format issue. Option B is incorrect because using a boto3 script to convert locally is less efficient and not scalable compared to a managed processing job.

Option D is incorrect because switching algorithms may not be desirable and does not solve the underlying data format requirement.

1457
MCQhard

A data scientist runs a training job that fails. The CLI output is shown in the exhibit. What is the MOST likely cause of the failure?

A.The S3 bucket or prefix does not exist.
B.The channel name is misspelled.
C.The instance type ml.m5.large is too small.
D.The IAM role does not have s3:GetObject permission.
AnswerA

The error message explicitly says the S3 URI is not found.

Why this answer

The CLI output shows an error indicating that the S3 bucket or prefix does not exist. This is a common failure when the training job's input data path is incorrect, as SageMaker attempts to read from the specified S3 location and fails if the bucket or prefix is missing. The error message directly points to this issue, making it the most likely cause.

Exam trap

The trap here is that candidates may confuse S3 permission errors (403) with bucket-not-found errors (404), leading them to incorrectly select the IAM role permission option when the actual issue is a missing S3 path.

How to eliminate wrong answers

Option B is wrong because a misspelled channel name would typically result in a different error, such as 'Invalid channel name' or 'Channel not found', not an S3 access error. Option C is wrong because the instance type ml.m5.large is a valid and commonly used instance for training; if it were too small, the job would likely start but fail due to resource exhaustion, not an immediate S3-related error. Option D is wrong because an IAM role lacking s3:GetObject permission would produce an 'Access Denied' or '403 Forbidden' error, not a 'bucket or prefix does not exist' error.

1458
Multi-Selecteasy

Which TWO services can be used to orchestrate a machine learning pipeline?

Select 2 answers
A.Amazon SageMaker Pipelines
B.Amazon SageMaker Ground Truth
C.AWS Step Functions
D.Amazon Redshift
E.AWS Glue
AnswersA, C

SageMaker Pipelines is designed for ML pipeline orchestration.

Why this answer

Amazon SageMaker Pipelines is a purpose-built service for creating, automating, and managing end-to-end machine learning workflows. It provides direct integration with SageMaker's training, tuning, and deployment steps, allowing you to define a directed acyclic graph (DAG) of ML steps that can be triggered on a schedule or by events. AWS Step Functions is a serverless orchestration service that lets you coordinate multiple AWS services into flexible workflows.

It can orchestrate ML pipelines by integrating with SageMaker, Lambda, and other services, making it a viable alternative for complex, multi-step workflows that may span beyond SageMaker's native capabilities. Both services are capable of orchestrating ML pipelines.

Exam trap

The trap here is that candidates often confuse data preparation or storage services (like AWS Glue or Amazon Redshift) with orchestration services, or they incorrectly assume that a labeling service (Ground Truth) can manage pipeline steps, when in fact orchestration requires a service that can sequence and manage dependencies between distinct ML tasks.

1459
MCQmedium

A company is building a data lake on Amazon S3. Data arrives from multiple sources in different formats (CSV, JSON, Parquet). The engineering team wants to query this data using Amazon Athena with minimal transformation. Which approach minimizes query cost and improves performance?

A.Use Amazon Redshift Spectrum to query the data directly without transformation
B.Use AWS Glue to convert all data to Parquet format, partition by date, and store in a separate S3 bucket
C.Use Amazon EMR to convert data to CSV format and repartition
D.Store data as-is in S3 and create external tables in Athena for each format
AnswerB

This reduces data scanned, improves performance, and lowers cost.

Why this answer

Converting data to Parquet format (a columnar storage format) significantly reduces the amount of data scanned by Athena, which directly lowers query cost (Athena charges per TB scanned). Partitioning by date further limits scanned data by pruning irrelevant partitions. AWS Glue provides a serverless ETL service to perform this conversion efficiently, and storing the output in a separate S3 bucket avoids polluting the raw data lake.

Exam trap

The trap here is that candidates often choose Option D (store as-is) thinking Athena can handle any format efficiently, but they overlook that Athena’s pricing is based on data scanned, and raw CSV/JSON scans are far more expensive than columnar formats like Parquet.

How to eliminate wrong answers

Option A is wrong because Amazon Redshift Spectrum is a service for querying data in S3 from Redshift, not a direct Athena optimization; it still requires data to be in an efficient format and does not address the cost/performance issue of scanning raw CSV/JSON. Option C is wrong because converting to CSV format is not columnar and does not reduce scan size like Parquet; CSV is row-oriented and requires full scans, leading to higher Athena costs. Option D is wrong because storing data as-is in multiple formats forces Athena to scan entire files for each query, resulting in maximum data scanned and highest cost, with no partitioning or compression benefits.

1460
MCQeasy

A company uses Amazon Kinesis Data Firehose to deliver streaming data to Amazon S3. The data contains personally identifiable information (PII) that must be redacted before storage. Which AWS service can be integrated with Kinesis Data Firehose to transform the data in real time?

A.Amazon Athena
B.Amazon Kinesis Data Analytics
C.Amazon EMR
D.AWS Lambda
AnswerD

Lambda can be invoked by Firehose to transform records in real time.

Why this answer

AWS Lambda can be integrated as a data transformation function within a Kinesis Data Firehose delivery stream. When Firehose receives incoming records, it can invoke a Lambda function synchronously to process each batch of data, allowing you to redact PII fields in real time before the data is written to Amazon S3.

Exam trap

The trap here is that candidates often confuse Kinesis Data Analytics for transformation, but it is designed for real-time analytics and pattern detection, not for inline record-by-record data masking or redaction within a Firehose delivery stream.

How to eliminate wrong answers

Option A is wrong because Amazon Athena is an interactive query service for analyzing data in S3 using standard SQL; it cannot perform real-time transformations on streaming data within a Firehose delivery stream. Option B is wrong because Amazon Kinesis Data Analytics is used for real-time analytics and stream processing using SQL or Apache Flink, but it does not directly integrate as a Firehose transformation step for record-by-record redaction. Option C is wrong because Amazon EMR is a big data processing service that runs Hadoop/Spark clusters; while it can process streaming data, it cannot be used as an inline transformation function within a Kinesis Data Firehose delivery stream.

1461
MCQeasy

A data scientist is training a neural network on Amazon SageMaker and wants to automatically stop training if the validation loss does not improve for 5 consecutive epochs. Which feature should they use?

A.Implement early stopping in the training script
B.SageMaker Debugger
C.SageMaker Checkpointing
D.SageMaker Hyperparameter Tuning
AnswerA

Early stopping is implemented in the training code (e.g., Keras EarlyStopping callback).

Why this answer

Early stopping is a technique where training is halted when a monitored metric, such as validation loss, stops improving for a specified number of epochs (patience). In SageMaker, this is implemented within the training script itself, often using framework callbacks like Keras EarlyStopping or PyTorch's ReduceLROnPlateau with early stopping logic. SageMaker Debugger is used for monitoring and profiling but does not automatically stop training; it can emit alerts but requires custom rules or hooks to trigger stopping.

SageMaker Checkpointing saves model state periodically to resume training, not stop it. SageMaker Hyperparameter Tuning launches multiple training jobs to find optimal hyperparameters, not to stop a single job early. Therefore, option A is correct: the data scientist should implement early stopping in the training script.

1462
Multi-Selectmedium

A data scientist is exploring a dataset with 50 features. Which TWO EDA techniques are most effective for detecting multicollinearity?

Select 2 answers
A.Box plots of each feature
B.Variance Inflation Factor (VIF) analysis
C.Scatter plots of each feature pair
D.Histograms of each feature
E.Correlation matrix visualized as heatmap
AnswersC, E

Scatter plots of each pair of features allow visual inspection of linear relationships, making them effective for detecting multicollinearity.

Why this answer

Options C and E are the most effective EDA techniques for detecting multicollinearity. Scatter plots of each pair of features (C) allow visual inspection of linear relationships between features. A correlation matrix displayed as a heatmap (E) provides a quantitative measure of pairwise correlations, making it easy to spot high correlations indicative of multicollinearity.

Option A (box plots) shows univariate distributions and does not reveal relationships between features. Option B (VIF analysis) is a formal statistical test for multicollinearity, but it is not typically considered an EDA technique; EDA focuses on visual exploration. Option D (histograms) similarly only show univariate distributions.

1463
MCQmedium

A data scientist is exploring a dataset with 10 million rows and 500 features. The target variable is binary. The dataset is stored in an Amazon S3 bucket. The data scientist wants to quickly identify which features have the highest correlation with the target variable. Which approach is MOST efficient?

A.Use Amazon SageMaker Data Wrangler to import the dataset from S3 and generate a correlation matrix.
B.Use Amazon QuickSight to create scatter plots for each feature vs. target.
C.Use Amazon Athena with SQL queries to compute correlation coefficients.
D.Use AWS Glue ETL to compute pairwise correlations and output to Amazon Redshift.
AnswerA

Data Wrangler provides interactive data exploration and correlation analysis.

Why this answer

Amazon SageMaker Data Wrangler can directly import the dataset from S3 and generate a correlation matrix efficiently without needing to write custom code, making it the most efficient approach for identifying feature correlations with the target variable. Option B is incorrect because using Amazon QuickSight to create scatter plots for each of the 500 features would be time-consuming and not scalable. Option C is incorrect because Amazon Athena uses SQL queries which are not designed to compute correlation coefficients efficiently across a large number of features.

Option D is incorrect because AWS Glue ETL is intended for data transformation pipelines and is not suitable for quick interactive correlation analysis.

1464
MCQmedium

Refer to the exhibit. A data scientist is assigned an IAM policy to deploy a SageMaker model. When the scientist tries to create an endpoint, the action fails with an authorization error. What is the missing permission?

A.iam:PassRole
B.sagemaker:ListEndpoints
C.sagemaker:InvokeEndpoint
D.sagemaker:UpdateEndpoint
AnswerA

SageMaker needs iam:PassRole to assume a role for creating endpoints.

Why this answer

The error occurs because the IAM policy does not include the `iam:PassRole` permission. When creating a SageMaker endpoint, the service must assume an IAM role to access resources (e.g., S3 buckets, CloudWatch). The `iam:PassRole` permission allows the user to pass that role to SageMaker.

The other actions listed are either for inference (`InvokeEndpoint`), listing endpoints (`ListEndpoints`), or updating endpoints (`UpdateEndpoint`), which are not relevant to the creation process. Therefore, the missing permission is `iam:PassRole` (Option A).

1465
MCQmedium

A data scientist is using SageMaker to train a deep learning model with a large dataset stored in S3. The training is taking a long time. Which action would most likely reduce training time without sacrificing accuracy?

A.Increase the batch size
B.Use SageMaker Pipe Input mode
C.Use a smaller instance type
D.Reduce the number of epochs
AnswerB

Streams data from S3 directly to the algorithm, reducing I/O time.

Why this answer

SageMaker Pipe Input mode streams training data directly from S3 into the algorithm without first downloading it to the local EBS volume. This eliminates the I/O bottleneck caused by large dataset downloads, significantly reducing training time while preserving accuracy because the model sees the same data.

Exam trap

The trap here is that candidates confuse batch size adjustments (which affect convergence stability) with I/O optimization techniques, overlooking that SageMaker Pipe mode directly addresses the data loading bottleneck without altering the training algorithm.

How to eliminate wrong answers

Option A is wrong because increasing the batch size can reduce training time per epoch but may degrade model accuracy due to convergence to sharper minima or increased generalization error, especially in deep learning. Option C is wrong because using a smaller instance type reduces computational capacity, increasing training time rather than decreasing it. Option D is wrong because reducing the number of epochs directly reduces training time but sacrifices accuracy by underfitting the model.

1466
MCQhard

A data engineer is configuring an IAM policy to allow users to upload objects to an S3 bucket only if the objects are encrypted using SSE-S3. However, users are getting AccessDenied errors when uploading objects without specifying encryption. What is the most likely cause?

A.The condition should check for aws:SourceIp instead of encryption
B.The condition requires encryption to be specified, but the upload does not specify it
C.The policy is attached to the wrong IAM user
D.The bucket policy denies all PutObject without encryption
AnswerB

The condition requires s3:x-amz-server-side-encryption to be AES256, so without it, access is denied.

Why this answer

The policy allows PutObject only when encryption is AES256, but denies when no encryption is specified because the condition is not met. Option A is wrong because it's not a service control policy; Option C is wrong because the bucket policy is not shown; Option D is wrong because the condition checks for AES256, not KMS.

1467
MCQhard

A data scientist is using Amazon SageMaker to train a large language model with PyTorch. The training job is taking too long. The dataset is stored in S3 and the training script uses the SageMaker PyTorch container. Which change is MOST likely to reduce training time?

A.Use Pipe mode to stream data from S3 instead of downloading.
B.Increase the number of instances in the training job.
C.Change the optimizer to AdamW.
D.Switch to spot instances to reduce cost.
AnswerA

Pipe mode reduces data loading time.

Why this answer

SageMaker Pipe mode streams data directly from S3 to the training algorithm via a Unix FIFO (named pipe), eliminating the need to first download the entire dataset to the training instance's local storage. This reduces I/O wait time and disk usage, which is especially beneficial for large language models where dataset sizes can be in terabytes, thereby significantly cutting total training time.

Exam trap

The trap here is that candidates often confuse cost-saving measures (spot instances) or model-tuning changes (AdamW) with performance improvements, while the actual bottleneck in large-scale training is frequently data I/O, not compute or optimizer choice.

How to eliminate wrong answers

Option B is wrong because simply increasing the number of instances does not address the root cause of slow data loading; it may even introduce communication overhead and increase costs without proportional speedup if the bottleneck is I/O. Option C is wrong because changing the optimizer to AdamW affects convergence behavior and model accuracy, not the data ingestion speed or training job duration directly. Option D is wrong because switching to spot instances reduces cost but does not reduce training time; spot instances can actually increase training time if they are interrupted and require checkpointing and resumption.

1468
MCQmedium

An ML team deploys a real-time inference endpoint on Amazon SageMaker. Users report high latency. The model is a PyTorch model using a custom container. Which combination of changes should the team implement to reduce latency? (Choose the best answer.)

A.Switch to asynchronous inference endpoint.
B.Use SageMaker Elastic Inference to attach an accelerator.
C.Compile the model using SageMaker Neo.
D.Use SageMaker Inference Recommender to benchmark different instance families and select the best.
AnswerD

Inference Recommender automates benchmarking to find the optimal configuration for low latency.

Why this answer

SageMaker Inference Recommender runs load tests across multiple instance families and configurations, providing a benchmark that identifies the optimal instance type and model server settings to minimize latency for a given model and payload. This data-driven approach directly addresses the high-latency issue without requiring code changes or switching to a different inference paradigm.

Exam trap

The trap here is that candidates often assume compilation (Neo) or hardware acceleration (Elastic Inference) always reduces latency, but the question's context of high latency from a custom container on a real-time endpoint points to a misconfiguration or instance mismatch that only benchmarking can diagnose.

How to eliminate wrong answers

Option A is wrong because switching to asynchronous inference does not reduce latency for real-time requests; it introduces queuing and processing delays that are unsuitable for real-time inference. Option B is wrong because SageMaker Elastic Inference attaches a separate accelerator that adds network overhead and is deprecated, often increasing latency for PyTorch models compared to using a GPU instance directly. Option C is wrong because SageMaker Neo compiles models for optimized inference on specific hardware, but it does not address latency caused by suboptimal instance selection or resource contention; it may even introduce compatibility issues with custom containers.

1469
MCQhard

A company is using Amazon SageMaker to train a large language model with billions of parameters. The training job uses multiple GPU instances in a distributed fashion. The training is converging but the loss is not decreasing as expected. The data scientist suspects that the learning rate is too high. Which technique should the data scientist use to automatically adjust the learning rate during training?

A.Use a fixed learning rate and train for more epochs
B.Increase the batch size to reduce variance
C.Implement learning rate scheduling with a cosine annealing schedule
D.Use gradient clipping
AnswerC

Cosine annealing reduces the learning rate smoothly, helping convergence.

Why this answer

Learning rate scheduling, such as a cosine annealing schedule, can automatically reduce the learning rate over time. This helps the model converge better. SageMaker's built-in algorithms support learning rate scheduling, or the user can implement it in custom training scripts.

1470
MCQmedium

A data scientist is working with a dataset that contains a 'Price' column. After plotting a histogram, they observe that the distribution is right-skewed with many extreme high values. They plan to use a linear model that assumes normally distributed errors. Which of the following transformations should they apply to the 'Price' column to make it more normally distributed?

A.Apply log transformation (log(Price)).
B.Apply square transformation (Price^2).
C.Apply min-max scaling to the 'Price' column.
D.Bin the 'Price' values into equal-width intervals.
AnswerA

Log transformation compresses the tail and makes the distribution more symmetric.

Why this answer

Log transformation is commonly applied to right-skewed data to reduce skewness and make the distribution more normal, which is suitable for linear models assuming normally distributed errors. Option B (square transformation) exacerbates skewness, making it worse. Option C (min-max scaling) only rescales the data to a fixed range and does not change the shape of the distribution.

Option D (binning) discards information and does not transform the distribution to be normal.

1471
Multi-Selecthard

A company uses AWS Glue Data Catalog to manage metadata for its data lake on Amazon S3. The data lake contains terabytes of data in CSV format. The data engineering team wants to improve query performance in Amazon Athena and reduce costs. Which actions should the team take? (Select THREE.)

Select 3 answers
A.Create views in Athena to simplify queries.
B.Compress the data using Snappy or GZIP.
C.Partition the data by commonly filtered columns.
D.Convert the data to Parquet format.
E.Convert the data to JSON format.
AnswersB, C, D

Compression reduces storage and data scanned.

Why this answer

Compressing CSV data with Snappy or GZIP reduces the amount of data scanned by Athena, directly lowering query costs (Athena charges per TB scanned). Snappy offers faster decompression for better query performance, while GZIP provides higher compression ratios. Both formats are natively supported by Athena and reduce I/O from S3.

Exam trap

The trap here is that candidates may think simplifying queries (views) or switching to another text format (JSON) improves performance, but only compression, partitioning, and columnar formats reduce the amount of data scanned, which is the key to Athena cost and speed optimization.

1472
MCQeasy

A company is building a recommendation system using collaborative filtering. The dataset contains implicit feedback (clicks) from users on items. Which algorithm is best suited for this scenario?

A.Linear Regression
B.Alternating Least Squares (ALS)
C.K-means clustering
D.Singular Value Decomposition (SVD)
AnswerB

Alternating Least Squares (ALS) is specifically designed for implicit feedback datasets in collaborative filtering, making it the best choice.

Why this answer

Alternating Least Squares (ALS) is designed for implicit feedback datasets in collaborative filtering. Option A is wrong because Linear Regression is for supervised regression, not recommendation. Option C is wrong because K-means is clustering, not recommendation.

Option D is wrong because SVD is typically used for explicit ratings, while ALS is better suited for implicit feedback.

1473
MCQhard

A data scientist is analyzing a dataset with a target variable that is highly imbalanced (99% negative class, 1% positive class). The dataset has 10 million rows. The goal is to train a binary classifier. Which technique should be applied during exploratory data analysis to best address the imbalance?

A.Assign higher class weights to the minority class
B.Random undersampling of the majority class
C.Synthetic Minority Oversampling Technique (SMOTE)
D.Collect more data for the minority class
AnswerB

Feasible for large datasets and can balance classes.

Why this answer

Random undersampling of the majority class is a practical approach for large datasets like 10M rows to reduce class imbalance during EDA. Option A (assign higher class weights) is a modeling technique applied during training, not during EDA. Option C (SMOTE) generates synthetic samples but can be computationally expensive for 10M rows.

Option D (collect more data) does not guarantee a balanced distribution and may not be feasible.

1474
Multi-Selecteasy

A company wants to analyze streaming data from IoT devices in near-real-time. They need to store raw data in Amazon S3 and also run SQL queries on the streaming data. Which TWO services should they use?

Select 2 answers
A.AWS Glue
B.Amazon Kinesis Data Streams
C.Amazon Kinesis Data Analytics
D.Amazon Kinesis Data Firehose
E.AWS Lambda
AnswersC, D

Runs SQL on streaming data.

Why this answer

Amazon Kinesis Data Analytics is correct because it enables running SQL queries on streaming data in near-real-time, allowing the company to analyze IoT data as it arrives without needing to store it first. It integrates directly with Kinesis Data Streams or Firehose to process data streams using standard SQL, making it ideal for real-time analytics on streaming data.

Exam trap

The trap here is that candidates often confuse Kinesis Data Streams (which only ingests and stores data) with Kinesis Data Analytics (which provides SQL querying), or they mistakenly think AWS Glue can handle real-time streaming SQL when it is actually designed for batch processing.

1475
MCQmedium

A data scientist is working with a dataset that includes a 'timestamp' column. They want to create features that capture seasonality. Which feature engineering approach is most appropriate?

A.Bin timestamps into fixed intervals.
B.Convert timestamp to Unix epoch seconds.
C.Extract hour of day and apply sine/cosine transformation.
D.One-hot encode the timestamp column.
AnswerC

Sine/cosine encoding preserves cyclic nature.

Why this answer

Extracting hour of day and applying sine and cosine transformations captures the cyclic nature of time (e.g., midnight wrapping around to the next day). Option A (binning into fixed intervals) loses granularity and does not preserve cyclicity. Option B (converting to Unix epoch seconds) loses the cyclic pattern.

Option D (one-hot encoding) creates many sparse features and does not capture order or cycles.

1476
MCQhard

A retail company runs an e-commerce platform on AWS. They have a Data Engineering team that processes clickstream data using Amazon Kinesis Data Streams (KDS) with a shard count of 5. The data is consumed by an AWS Lambda function that transforms and loads the data into an Amazon S3 bucket partitioned by year/month/day/hour. Recently, the team has noticed that the Lambda function is experiencing throttling errors, and the KDS shard iterator age is increasing, indicating that the consumer cannot keep up with the incoming data rate. The team has already increased the Lambda reserved concurrency to 1000 and enabled batch window of 60 seconds. The metrics show that the Lambda function duration is well under the 5-minute timeout, and there are no errors in the transformation logic. The S3 write operations are not failing. Which course of action would MOST effectively resolve the issue without unnecessary cost or complexity?

A.Increase the number of shards in the Kinesis Data Stream to 20 to increase the parallelism of Lambda consumers.
B.Increase the Lambda reserved concurrency to 5000 to allow more parallel executions.
C.Increase the batch window to 300 seconds to accumulate more records per invocation and reduce the number of calls.
D.Switch to using Amazon Kinesis Data Analytics with a larger instance type to process the stream.
AnswerA

More shards allow more concurrent Lambda invocations, improving throughput and reducing iterator age.

Why this answer

The core issue is that the Lambda consumer cannot keep up with the incoming data rate, as evidenced by the increasing shard iterator age. Increasing the shard count from 5 to 20 directly increases the number of Kinesis Data Streams shards, which in turn increases the number of concurrent Lambda invocations (one per shard) and the overall throughput of the stream. This addresses the bottleneck at the source without adding unnecessary complexity or cost, as KDS pricing is based on shard hours and Lambda concurrency is already set to 1000.

Exam trap

The trap here is that candidates often assume increasing Lambda concurrency or batch window will solve throughput issues, but they fail to recognize that Kinesis shard count is the fundamental limiter of parallelism in the Lambda-Kinesis integration.

How to eliminate wrong answers

Option B is wrong because increasing Lambda reserved concurrency to 5000 does not help when the bottleneck is the number of Kinesis shards; Lambda can only process one shard per concurrent invocation, and with only 5 shards, the maximum parallelism is 5, so additional concurrency is unused. Option C is wrong because increasing the batch window to 300 seconds would increase latency and could cause the shard iterator age to grow further, as records would accumulate longer before being processed, worsening the backlog. Option D is wrong because switching to Kinesis Data Analytics introduces a different service (meant for real-time analytics with SQL or Flink) that adds complexity and cost, and does not directly address the consumer throughput limitation caused by insufficient shard parallelism.

1477
MCQeasy

A company wants to track and compare metrics from multiple machine learning experiments. Which Amazon SageMaker feature should be used?

A.SageMaker Experiments
B.SageMaker Ground Truth
C.SageMaker Model Monitor
D.SageMaker Debugger
AnswerA

Specifically designed for experiment tracking and comparison.

Why this answer

SageMaker Experiments is the correct choice for tracking and comparing metrics from multiple machine learning experiments. SageMaker Model Monitor is used to detect data drift, SageMaker Debugger is used to debug training jobs, and SageMaker Ground Truth is used for data labeling. Thus, only option A is correct.

1478
MCQhard

A data scientist is tuning a gradient boosting model using Amazon SageMaker Automatic Model Tuning. The objective metric is AUC. The training job converges quickly but the final model has low AUC on the validation set. Which hyperparameter should the data scientist adjust to improve validation AUC?

A.Increase the subsample ratio of training data
B.Decrease the learning rate and increase the number of rounds
C.Increase the learning rate
D.Increase the maximum depth of trees
AnswerB

Lower learning rate with more rounds typically improves generalization and AUC.

Why this answer

Decreasing the learning rate and increasing the number of rounds is the correct approach because a low learning rate forces the model to take smaller steps toward the optimum, reducing overfitting and allowing more trees to contribute to the ensemble. This combination often improves generalization and validation AUC when the training job converges too quickly, indicating that the model is overfitting or underfitting due to aggressive learning.

Exam trap

The trap here is that candidates mistakenly think increasing the learning rate will speed up convergence and improve AUC, but in reality it causes overfitting when the model already converges quickly, while decreasing the learning rate with more rounds is the standard remedy for underfitting or overfitting in gradient boosting.

How to eliminate wrong answers

Option A is wrong because increasing the subsample ratio (e.g., from 0.8 to 1.0) actually uses more training data per iteration, which can increase variance and overfitting, not improve validation AUC when the model already converges quickly. Option C is wrong because increasing the learning rate makes the model converge even faster, exacerbating overfitting and further reducing validation AUC. Option D is wrong because increasing the maximum depth of trees makes each tree more complex and prone to overfitting, which typically degrades validation AUC when the model already converges quickly.

1479
MCQhard

A company uses Amazon SageMaker to train a model using the built-in Linear Learner algorithm. The training data contains missing values in some features. What is the best practice for handling missing values with this algorithm?

A.Remove rows with missing values
B.Impute missing values using mean or median imputation
C.Set missing values to zero
D.Use the `handle_missing` parameter in the algorithm
AnswerB

Imputing missing values using mean or median imputation is recommended because it preserves data and avoids bias.

Why this answer

Linear Learner expects dense input; it cannot handle missing values. The best practice is to impute missing values before training, such as using mean or median imputation. Removing rows with missing values (Option A) may lose valuable data.

Setting missing values to zero (Option C) could bias the model. The algorithm does not have a built-in `handle_missing` parameter (Option D). Therefore, Option B (Impute missing values using mean or median imputation) is correct.

1480
MCQhard

A company uses AWS Lake Formation to manage permissions on a data lake stored in Amazon S3. A data analyst tries to query a table using Amazon Athena but receives an 'Access Denied' error. The analyst has SELECT permission on the table in Lake Formation. What is the most likely cause?

A.The S3 bucket is not registered with Lake Formation
B.The S3 bucket is encrypted with a KMS key that the analyst does not have access to
C.The table does not have any partitions defined
D.The IAM role used by Athena does not have lakeformation:GetDataAccess permission
AnswerA

If the bucket is not registered, Lake Formation cannot control access, and the default S3 permissions apply, which may deny access.

Why this answer

When Lake Formation manages permissions on a data lake, it requires that the underlying S3 bucket be registered with Lake Formation. If the bucket is not registered, Lake Formation cannot enforce its fine-grained access controls, and Athena will fail with an 'Access Denied' error even if the analyst has SELECT permission on the table in Lake Formation. Registering the bucket allows Lake Formation to integrate with S3 and apply its permission model.

Exam trap

The trap here is that candidates often assume 'Access Denied' errors are always due to missing IAM permissions or encryption issues, but in Lake Formation, the most common root cause is the S3 bucket not being registered, which prevents Lake Formation from enforcing its permissions.

How to eliminate wrong answers

Option B is wrong because while KMS key access issues can cause 'Access Denied' errors, the question states the analyst has SELECT permission on the table in Lake Formation, and the most likely cause given the scenario is the missing bucket registration, not encryption. Option C is wrong because a table without partitions can still be queried (though it may be inefficient); missing partitions do not cause 'Access Denied' errors. Option D is wrong because the IAM role used by Athena does not need lakeformation:GetDataAccess permission; instead, Athena assumes a role that must have permissions to call Lake Formation APIs, and the error is more commonly due to the bucket not being registered with Lake Formation.

1481
MCQeasy

A data engineering team needs to set up a data pipeline that ingests streaming data from an Apache Kafka cluster running on Amazon EKS into an S3 data lake. The data must be stored in Parquet format, partitioned by date and event type. The team wants a fully managed solution with minimal operational overhead. Which solution should they choose?

A.Use Amazon MSK (Managed Streaming for Apache Kafka) and configure an MSK Connect S3 sink connector.
B.Set up a Kinesis Data Firehose delivery stream that reads from Kafka and writes to S3.
C.Use AWS Glue ETL jobs to pull data from Kafka cluster periodically.
D.Create a Kinesis Data Analytics application to read from Kafka and write to S3.
AnswerA

MSK is fully managed Kafka, and MSK Connect can stream data to S3 in Parquet format.

Why this answer

Amazon MSK is a fully managed Apache Kafka service that integrates with MSK Connect, which provides a pre-built S3 sink connector. This connector can directly stream data from Kafka topics to S3 in Parquet format with partitioning by date and event type, requiring no custom code or infrastructure management. This minimizes operational overhead while meeting all requirements for a fully managed solution.

Exam trap

The trap here is that candidates often confuse Kinesis Data Firehose's ability to accept data from various sources with direct Kafka integration, but Firehose does not natively support Kafka as a source without additional services like Kinesis Data Streams or a custom producer.

How to eliminate wrong answers

Option B is wrong because Kinesis Data Firehose cannot directly read from a Kafka cluster; it requires a Kinesis Data Streams or other sources, not Kafka. Option C is wrong because AWS Glue ETL jobs are batch-oriented and not designed for real-time streaming ingestion with minimal overhead; they require periodic polling and manual orchestration. Option D is wrong because Kinesis Data Analytics is intended for real-time analytics using SQL or Flink, not for direct data ingestion to S3; it would require additional components to write to S3, increasing complexity.

1482
Multi-Selectmedium

A data scientist is exploring a dataset with many features and suspects that some features are highly correlated. Which TWO methods can the scientist use to detect and handle multicollinearity before building a linear regression model?

Select 2 answers
A.Apply Principal Component Analysis (PCA) and use all components.
B.Standardize all features to have zero mean and unit variance.
C.Compute Variance Inflation Factor (VIF) for each feature and remove features with VIF > 10.
D.Use stepwise feature selection.
E.Use Ridge regression (L2 regularization) to shrink coefficients.
AnswersC, E

VIF detects multicollinearity; removing high VIF features reduces it.

Why this answer

Options C and E are correct. Variance Inflation Factor (VIF) is a standard metric to detect multicollinearity; removing features with VIF > 10 reduces multicollinearity. Ridge regression (L2 regularization) can also handle multicollinearity by shrinking coefficients, which stabilizes estimates even when predictors are correlated.

Option A is incorrect because PCA reduces dimensionality but the resulting components are orthogonal, not the original features, and using all components does not address multicollinearity among the original predictors. Option B is incorrect because standardizing features only changes their scale, not their correlations. Option D is incorrect because stepwise selection does not directly detect or mitigate multicollinearity; it can even produce unstable models if collinearity is present.

1483
Multi-Selectmedium

A data engineering team is designing a data pipeline to process streaming data from social media feeds. The data must be deduplicated, enriched with customer information from a relational database, and stored in Amazon S3 in Parquet format. Which AWS services should the team use to build this pipeline? (Select TWO.)

Select 2 answers
A.AWS Glue
B.Amazon Kinesis Data Firehose
C.Amazon Athena
D.Amazon SageMaker
E.Amazon Kinesis Data Streams
AnswersA, E

Glue ETL can transform and enrich data from streams and databases.

Why this answer

AWS Glue is correct because it provides a serverless ETL service that can transform streaming data stored in Amazon S3 into Parquet format. It can also connect to a relational database via JDBC to enrich the data with customer information, and its built-in deduplication capabilities (e.g., using DropDuplicates in PySpark) handle the deduplication requirement.

Exam trap

AWS often tests the distinction between data ingestion services (Kinesis Data Firehose) and data processing/ETL services (AWS Glue), leading candidates to mistakenly select Firehose for deduplication and enrichment tasks that it cannot natively perform.

1484
MCQeasy

An ML engineer is using Amazon SageMaker to train a model on a dataset that contains personal identifiable information (PII). The data must be encrypted at rest and in transit. The company uses AWS KMS for key management. How should the engineer configure the SageMaker training job to meet these encryption requirements?

A.Enable S3 Server-Side Encryption (SSE-S3) on the input data bucket
B.Use a custom Docker image with built-in encryption and disable inter-container traffic encryption for performance
C.Use a VPC with an S3 VPC Endpoint and enable SSL for the endpoint
D.Specify a KMS key for the training job's VolumeKmsKeyId and enable inter-container traffic encryption
AnswerD

This encrypts the ML storage volume and inter-container traffic.

Why this answer

It addresses both encryption at rest and in transit for the SageMaker training job. Specifying a KMS key via VolumeKmsKeyId encrypts the ML storage volume (EBS) used by the training instances at rest, while enabling inter-container traffic encryption ensures data exchanged between distributed training containers is encrypted in transit using TLS. This combination meets the PII encryption requirements using AWS KMS.

Exam trap

The trap here is that candidates often focus only on S3 encryption or VPC endpoints, overlooking that SageMaker training jobs have separate encryption requirements for local storage and inter-container communication, which are explicitly controlled by VolumeKmsKeyId and inter-container traffic encryption settings.

How to eliminate wrong answers

Option A is wrong because S3 Server-Side Encryption (SSE-S3) encrypts data at rest in S3 but does not encrypt the SageMaker training job's local storage volumes or inter-container traffic; it also does not use AWS KMS as required. Option B is wrong because using a custom Docker image with built-in encryption is unnecessary and does not leverage AWS KMS; disabling inter-container traffic encryption violates the encryption-in-transit requirement. Option C is wrong because a VPC with an S3 VPC Endpoint and SSL only secures the data transfer between SageMaker and S3, but does not encrypt the training job's EBS volumes at rest or inter-container traffic within the job.

1485
MCQhard

A team is training a neural network for image classification using Amazon SageMaker. The training loss decreases rapidly but the validation loss starts increasing after a few epochs. Which action should the team take?

A.Reduce the batch size
B.Add more convolutional layers
C.Increase the learning rate
D.Implement early stopping based on validation loss
AnswerD

Early stopping prevents overfitting.

Why this answer

Early stopping halts training when the validation loss stops improving (or starts increasing), preventing overfitting. Option A is incorrect because reducing batch size does not directly address overfitting; it may add noise to gradients. Option B is incorrect because adding more convolutional layers increases model complexity, likely worsening overfitting.

Option C is incorrect because increasing the learning rate can cause the model to diverge or overshoot minima, not reduce overfitting.

1486
Multi-Selectmedium

A company is using SageMaker to deploy a model for real-time inference. The model requires GPU for low latency. Which THREE configurations should the company consider for high availability and cost optimization? (Choose three.)

Select 3 answers
A.Use Spot instances for the endpoint.
B.Use a multi-model endpoint to share GPU instances among multiple models.
C.Use SageMaker Batch Transform for inference.
D.Use multiple production variants with different instance types.
E.Enable automatic scaling based on invocation count.
AnswersB, D, E

Increases GPU utilization and reduces cost.

Why this answer

A multi-model endpoint allows multiple models to be hosted on the same GPU-backed instance, sharing the GPU resources and reducing idle time. This improves cost efficiency by maximizing GPU utilization while still providing low-latency inference for each model. It is a recommended pattern for serving many models with GPU requirements without provisioning separate endpoints.

Exam trap

The trap here is that candidates often confuse high availability with cost optimization, incorrectly assuming Spot instances (Option A) are suitable for real-time inference despite their interruption risk, or they overlook multi-model endpoints as a GPU-sharing strategy.

1487
MCQmedium

A machine learning engineer trains a binary classifier on an imbalanced dataset where the positive class represents 1% of the data. After training, the model achieves 99% accuracy but only 10% recall on the positive class. Which metric should the engineer focus on to evaluate the model's performance on the minority class?

A.F1 score
B.Accuracy
C.AUC-ROC
D.Precision
AnswerA

F1 score considers both precision and recall, giving a better measure for imbalanced data.

Why this answer

(F1 score) is the correct metric because it balances precision and recall, providing a single measure that is robust to class imbalance. With only 1% positive class, accuracy (Option B) is misleadingly high due to the majority class. AUC-ROC (Option C) can still be high even if recall is low, as it evaluates ranking rather than absolute performance.

Precision (Option D) only considers the proportion of correct positive predictions, ignoring false negatives, which is not suitable when recall is poor. The F1 score captures both aspects, making it the best choice for evaluating minority class performance in this scenario.

1488
MCQmedium

A data scientist is training a deep learning model using a large dataset stored in S3. The training job runs on a SageMaker training instance with a GPU. The data engineer notices that the GPU utilization is low, and the training is I/O bound. The data is read directly from S3 using the SageMaker SDK. Which change should the data engineer recommend to improve GPU utilization?

A.Increase the batch size in the training script to process more data per step.
B.Mount the S3 bucket to the training instance using Amazon Elastic File System (EFS).
C.Use SageMaker Pipe mode to stream data directly from S3 to the training container.
D.Copy the entire dataset to an Amazon EBS volume attached to the training instance.
AnswerC

Pipe mode eliminates disk I/O, allowing data to be streamed directly to the GPU.

Why this answer

SageMaker Pipe mode streams data directly from S3 to the training container, eliminating the need to download the entire dataset to disk. This reduces I/O latency and keeps the GPU fed with data, improving utilization. The current I/O bottleneck occurs because the SDK reads data from S3 as files, causing the GPU to wait for data.

Exam trap

The trap here is that candidates often confuse 'mounting S3' (which is not natively supported without third-party tools like s3fs-fuse) with SageMaker's built-in Pipe mode, or they incorrectly assume that increasing batch size will compensate for slow data loading.

How to eliminate wrong answers

Option A is wrong because increasing batch size does not address the I/O bottleneck; it may even worsen memory pressure and does not speed up data ingestion from S3. Option B is wrong because mounting an S3 bucket via EFS is not a supported or efficient approach; EFS is a separate NFS-based file system, not a direct S3 mount, and would introduce additional latency. Option D is wrong because copying the entire dataset to an EBS volume adds significant startup time and storage cost, and does not solve the streaming data issue; it still requires a full download before training begins.

1489
MCQeasy

A data scientist is training a Random Forest model on Amazon SageMaker. The model performs well on the training set but poorly on the test set. Which technique should the data scientist use to address this issue?

A.Increase the number of trees in the forest
B.Decrease the maximum depth of each tree
C.Increase the learning rate
D.Increase the maximum depth of each tree
AnswerB

Decreasing the maximum depth of each tree limits the complexity of individual trees, reducing overfitting by preventing them from memorizing noise. This is a standard regularization technique and directly addresses the overfitting issue.

Why this answer

The model is overfitting, as indicated by high training performance and poor test performance. Decreasing the maximum depth of each tree limits the complexity of individual trees, reducing overfitting by preventing them from memorizing noise in the training data. This is a standard regularization technique for Random Forest models in Amazon SageMaker.

Exam trap

AWS often tests the misconception that increasing model complexity (e.g., more trees or deeper trees) always improves performance, when in fact overfitting requires reducing complexity or applying regularization.

How to eliminate wrong answers

Option A is wrong because increasing the number of trees in the forest generally improves model stability and reduces variance without significantly increasing overfitting, but it does not address the root cause of overfitting from overly deep trees. Option C is wrong because learning rate is a hyperparameter for gradient boosting models, not for Random Forest; Random Forest does not use a learning rate. Option D is wrong because increasing the maximum depth of each tree would exacerbate overfitting by allowing trees to capture more noise and specific patterns in the training data, worsening test performance.

1490
MCQhard

A company has an AWS Glue ETL job that reads data from an Amazon RDS for MySQL table and writes to Amazon S3 in Parquet format. The job runs daily and processes 500 GB of data. Recently, the job has been failing with memory errors during the write phase. The data schema is wide (200 columns). Which change should a data engineer make to the Glue job to resolve the memory issue?

A.Increase the number of DPUs for the Glue job.
B.Change the output format from Parquet to CSV.
C.Use the JDBC connection with fetchSize parameter.
D.Configure the write operation with 'groupSize' to limit records per file.
AnswerD

Limiting records per file reduces the memory needed for buffering during writes.

Why this answer

The memory error occurs because the wide schema (200 columns) and large data volume (500 GB) cause the Spark executors to run out of memory when writing Parquet files, as each executor attempts to buffer entire partitions. Configuring 'groupSize' limits the number of records written per file, reducing the per-executor memory footprint and preventing out-of-memory errors during the write phase.

Exam trap

The trap here is that candidates often assume memory errors are solved by adding more resources (DPUs) or by changing the output format, when the actual fix is a write-tuning parameter that controls per-file record limits.

How to eliminate wrong answers

Option A is wrong because increasing DPUs adds more parallelism but does not reduce the per-executor memory pressure caused by wide rows and large partitions; it may even exacerbate memory issues by increasing shuffle overhead. Option B is wrong because changing to CSV would increase file size and I/O, and does not address the root cause of memory exhaustion during write buffering. Option C is wrong because the fetchSize parameter controls how many rows are fetched per JDBC round trip from MySQL, which affects read performance, not memory usage during the write phase to S3.

1491
MCQhard

A company is building a real-time fraud detection system using Amazon SageMaker. The model is a gradient boosting classifier trained on 500 GB of transactional data. The inference endpoint is deployed as a SageMaker real-time endpoint using an ml.c5.9xlarge instance. The model is serialized using the native format of the framework (XGBoost). The endpoint receives about 100 requests per second with an average payload size of 10 KB. The company observes that the endpoint's latency is around 200 ms, but they need under 100 ms. The data scientist profiles the endpoint and finds that the model inference time is 50 ms, but the remaining time is spent on data preprocessing and serialization/deserialization. The preprocessing involves converting JSON input to a NumPy array and then to a DMatrix. Which action is most likely to reduce latency to meet the requirement?

A.Use a more efficient serialization format such as Apache Arrow or Protocol Buffers for the input data
B.Switch to SageMaker Batch Transform to process requests in batches
C.Use a larger instance type such as ml.c5.18xlarge
D.Reduce the number of trees in the model
AnswerA

Reducing serialization/deserialization overhead directly addresses the bottleneck.

Why this answer

The bottleneck is data preprocessing and serialization/deserialization, not model inference. Using a more efficient serialization format like Apache Arrow or Protocol Buffers reduces the overhead of converting JSON to NumPy arrays and DMatrix, directly cutting the 150 ms spent outside inference. This targets the root cause without changing the model or infrastructure.

Exam trap

The trap here is that candidates often assume latency is due to model complexity or instance size, but the question explicitly states inference is only 50 ms, so the fix must address the preprocessing/serialization bottleneck, not the model or compute resources.

How to eliminate wrong answers

Option B is wrong because SageMaker Batch Transform is designed for offline, asynchronous processing of large datasets, not for real-time sub-100 ms latency requirements; it would increase latency due to queuing and batching delays. Option C is wrong because upgrading to a larger instance (ml.c5.18xlarge) primarily improves compute capacity for inference, but the bottleneck is preprocessing and serialization, not model compute; the inference time is already only 50 ms, so more CPU cores won't fix the serialization overhead. Option D is wrong because reducing the number of trees in the model would decrease inference accuracy and only marginally reduce the 50 ms inference time, leaving the dominant 150 ms preprocessing overhead untouched.

1492
MCQhard

A SageMaker training job log shows the exhibit. The training job fails immediately after starting. The training data is supposed to be provided via Pipe mode from S3. What is the most likely cause?

A.The input data channel is not properly configured
B.The instance type does not have enough memory
C.The S3 bucket has insufficient permissions
D.The training script is using File mode instead of Pipe mode
E.The hyperparameters are incorrectly specified
AnswerA

The training job is looking for data at /opt/ml/input/data/training, but Pipe mode should provide a pipe.

Why this answer

The training job fails immediately after starting, which is characteristic of a Pipe mode configuration issue. In Pipe mode, SageMaker streams data from S3 directly to the algorithm via a Unix FIFO pipe, and if the input data channel is not properly configured (e.g., missing or incorrect S3 path, wrong channel name, or mismatched content type), the training job will fail at launch without any data being read. The log exhibit likely shows an error such as 'Unable to read from pipe' or 'NoSuchKey', confirming the channel misconfiguration.

Exam trap

The key distinction is between immediate job failures (caused by infrastructure configuration like Pipe mode channels) versus runtime failures (caused by permissions, memory, or hyperparameters), leading candidates to mistakenly attribute the error to S3 permissions or script issues.

How to eliminate wrong answers

Option B is wrong because insufficient memory would cause an out-of-memory error during training, not an immediate failure at job start—SageMaker would still initialize the instance and load the script. Option C is wrong because insufficient S3 permissions would produce an AccessDenied error in the logs, but the question states the job fails immediately after starting, which aligns with a channel configuration issue, not a permissions error (permissions are checked at data access time, not at job launch). Option D is wrong because the training script's mode (File vs.

Pipe) is irrelevant—Pipe mode is configured in the channel definition in the SageMaker API or SDK, not in the script itself; the script simply reads from the pipe. Option E is wrong because incorrect hyperparameters would cause a runtime error during model training (e.g., invalid value), not an immediate failure at job start—the job would still begin execution.

1493
MCQhard

A data scientist is trying to list objects in an S3 bucket named 'my-bucket' using the AWS CLI command: `aws s3 ls s3://my-bucket/`. The command fails with an access denied error. The IAM policy attached to the scientist's role is shown in the exhibit. What is the most likely cause of the failure?

A.The condition on the ListBucket action requires all objects to have the tag 'data-type'='training', which may not be satisfied.
B.The IAM policy does not include the s3:ListBucket action.
C.The policy does not grant access to the bucket because it uses 'my-bucket' instead of the full ARN.
D.The condition should use 'StringLike' instead of 'StringEquals'.
AnswerA

The condition on ListBucket is problematic and may cause denial.

Why this answer

The IAM policy includes the s3:ListBucket action with a condition that uses s3:ExistingObjectTag to require each object to have the tag 'data-type' set to 'training'. However, the ListBucket operation lists all objects in the bucket, and the condition is evaluated against each object. If any object in the bucket does not have this tag, the request fails with an access denied error.

Option B is incorrect because the policy does include s3:ListBucket. Option C is incorrect because the bucket name 'my-bucket' is a valid resource identifier; the full ARN is not required. Option D is incorrect because the StringEquals operator is valid for this condition key; the issue is the condition's requirement, not the operator.

1494
MCQhard

A company has deployed a machine learning model on Amazon SageMaker for real-time inference. The endpoint uses a single ml.c5.xlarge instance. Recently, the traffic has increased, and the endpoint is returning HTTP 503 (Service Unavailable) errors during peak hours. The CloudWatch metrics show that the CPU utilization is consistently above 90% during peak times, and the Invocations metric shows that requests are being throttled. The data science team has already optimized the model to reduce inference time by 20%, but the errors persist. The company needs to resolve the issue without increasing costs significantly. Which course of action should be taken?

A.Change the instance type to a larger size, such as ml.c5.2xlarge
B.Switch to batch transform to process requests in batches
C.Use spot instances to reduce costs and add more instances
D.Configure auto-scaling for the endpoint to add instances based on CPU utilization
AnswerD

Auto-scaling adds instances only when needed, handling peak traffic and reducing costs during low traffic.

Why this answer

Configuring auto-scaling for the endpoint based on CPU utilization dynamically adjusts the number of instances to handle increased traffic, reducing HTTP 503 errors without incurring high costs during low traffic. Option A is wrong because upgrading to a larger instance type (e.g., ml.c5.2xlarge) would increase costs even during low-traffic periods, which does not align with the goal of minimizing cost increases. Option B is wrong because batch transform is designed for offline, asynchronous processing, not real-time inference as required here.

Option C is wrong because spot instances can be interrupted and reclaimed by AWS, leading to potential service disruptions, and merely adding more instances without scaling logic does not solve the capacity issue efficiently.

1495
MCQhard

A team is analyzing a dataset with many categorical features. They notice that one feature has 1,000 unique values but a long tail where most values appear only once. Which encoding method is most appropriate to avoid overfitting?

A.Target encoding
B.Label encoding
C.One-hot encoding
D.Count encoding
AnswerD

Count encoding replaces categories with their frequency, reducing dimensionality and handling rare values.

Why this answer

Count encoding uses the frequency of each category as its encoded value, which captures information for rare categories without increasing dimensionality. One-hot encoding (C) would create 1,000 columns, leading to high dimensionality and potential overfitting. Target encoding (A) uses the target variable mean, which can cause overfitting especially with rare categories.

Label encoding (B) imposes an arbitrary ordinal relationship, which is inappropriate for nominal categorical features.

Exam trap

Candidates may assume one-hot encoding is always safe, but with high cardinality it creates many dummy features, increasing the risk of overfitting on rare categories.

1496
MCQhard

A company is using Amazon SageMaker to host a model that performs real-time inference. The model receives around 100 requests per second with occasional spikes up to 500 requests per second. The current endpoint uses 2 ml.m5.large instances. During spikes, latency increases significantly, and some requests time out. What is the MOST cost-effective solution to handle the spikes without losing requests?

A.Replace the instances with a single larger instance type, such as ml.m5.4xlarge
B.Use an Amazon SQS queue to buffer incoming requests and process them asynchronously
C.Use AWS Lambda with a provisioned concurrency to handle the spikes
D.Configure SageMaker managed scaling with a target tracking policy and add a buffer based on the average spike duration
AnswerD

Managed scaling with a buffer allows proactive scaling to handle spikes.

Why this answer

SageMaker managed scaling with a target tracking policy automatically adjusts the number of instances based on a specified metric (e.g., invocation count or latency), and adding a buffer based on the average spike duration ensures that additional capacity is provisioned before the spike hits, preventing timeouts. This is the most cost-effective approach as it scales out during spikes and scales in during normal load, avoiding over-provisioning.

Exam trap

The trap here is that candidates often choose Option A (scaling up) thinking it simplifies management, but they overlook that vertical scaling (larger instance) does not inherently improve throughput under bursty traffic if the bottleneck is request handling concurrency, and it wastes cost during low load.

How to eliminate wrong answers

Option A is wrong because replacing two ml.m5.large instances with a single ml.m5.4xlarge (which has equivalent vCPU and memory) does not increase total capacity; it only consolidates resources, so the endpoint would still be unable to handle spikes up to 500 requests per second without increased latency and timeouts. Option B is wrong because using an SQS queue with asynchronous processing changes the architecture from real-time inference to batch processing, which violates the requirement for real-time inference and introduces unbounded latency for the client. Option C is wrong because AWS Lambda with provisioned concurrency is designed for stateless, short-lived functions, not for hosting a persistent SageMaker model; it would require significant re-architecture and does not natively integrate with SageMaker endpoints for real-time inference.

1497
MCQmedium

A data scientist is using SageMaker to train a deep learning model. The training script uses TensorFlow and runs on a single p3.2xlarge instance. The scientist wants to reduce training time by using multiple GPUs. What should the scientist do?

A.Increase the instance count to 4 without changing the script.
B.Modify the training script to use Horovod for distributed training.
C.Switch to PyTorch framework.
D.Use SageMaker Managed Spot Training.
AnswerB

Horovod enables multi-GPU and multi-instance distributed training.

Why this answer

Horovod is a distributed deep learning framework that integrates with TensorFlow to enable multi-GPU training across multiple instances. By modifying the training script to use Horovod's `hvd.DistributedOptimizer` and broadcasting initial variables, the data scientist can leverage multiple GPUs on a single p3.2xlarge instance (which has 1 GPU) or scale to multiple instances, directly reducing training time through data parallelism.

Exam trap

The trap here is that candidates assume increasing instance count or switching frameworks automatically enables multi-GPU training, but AWS tests the understanding that distributed training requires explicit code changes (e.g., Horovod or DDP) and that a single p3.2xlarge instance has only one GPU, so multi-GPU training requires a different instance type or multiple instances.

How to eliminate wrong answers

Option A is wrong because simply increasing the instance count to 4 without modifying the script does not enable distributed training; TensorFlow by default runs on a single device, so additional instances would remain idle or cause errors. Option C is wrong because switching to PyTorch does not automatically enable multi-GPU training; the script would still need to be modified to use PyTorch's distributed data parallel (DDP) or Horovod. Option D is wrong because SageMaker Managed Spot Training reduces cost by using spot instances, not training time; it does not provide multi-GPU parallelism.

1498
MCQmedium

During training of a deep learning model on a GPU instance in SageMaker, the training job fails with an insufficient memory error. Which step should be taken first to resolve this issue?

A.Add dropout layers
B.Use a smaller learning rate
C.Use gradient clipping
D.Reduce the batch size
AnswerD

Smaller batch size reduces GPU memory footprint.

Why this answer

The most direct cause of an out-of-memory (OOM) error during GPU training is that the combined size of the model parameters, activations, and gradients exceeds the GPU's VRAM. Reducing the batch size immediately decreases the memory footprint of activations stored for backpropagation, which is the largest and most tunable memory consumer. This is the first and simplest step to resolve the error without altering the model architecture or training dynamics.

Exam trap

The MLS-C01 exam often tests the misconception that hyperparameter tuning (learning rate) or regularization (dropout) can fix memory errors, when in fact only batch size or model size directly control VRAM usage.

How to eliminate wrong answers

Option A is wrong because adding dropout layers does not reduce memory usage; dropout only affects the forward pass by randomly zeroing activations, but the model's parameter count and activation storage remain the same. Option B is wrong because using a smaller learning rate does not affect memory consumption; it only changes the step size during optimization and has no impact on VRAM usage. Option C is wrong because gradient clipping limits the magnitude of gradients to prevent exploding gradients, but it does not reduce the memory required to store gradients or activations.

1499
MCQeasy

A data scientist is building a regression model to predict house prices. The dataset includes features such as square footage, number of bedrooms, year built, and location. After training a linear regression model, the data scientist notices that the residuals have a clear pattern when plotted against predicted values: they increase with predicted values. The model also has high RMSE. Which action should the data scientist take to improve the model?

A.Remove outliers from the dataset.
B.Use L1 regularization (Lasso) to reduce overfitting.
C.Apply a log transformation to the target variable.
D.Add interaction terms between features.
AnswerC

Log transformation can stabilize variance and linearize the relationship, reducing the residual pattern.

Why this answer

A pattern in residuals indicates non-linearity, and transforming the target variable (e.g., log transformation) can stabilize variance and linearize relationships. Option A is wrong because removing outliers does not address the underlying non-linearity or heteroscedasticity; it may even discard useful data. Option B is wrong because L1 regularization helps reduce overfitting by penalizing large coefficients, but it does not fix non-constant variance or non-linearity.

Option D is wrong because while interaction terms can model relationships between features, they do not directly address the pattern of increasing residuals (heteroscedasticity) and may not resolve the non-linearity in the target.

1500
MCQeasy

An engineer sees the error in the exhibit when trying to deploy a model from a model registry in SageMaker. What is the MOST likely cause?

A.The IAM role lacks permission to access the model registry
B.The model package version does not exist in the registry
C.The model package is still in 'Approved' status
D.The SageMaker endpoint is already deployed with the same model
AnswerB

The ARN includes a version number; the error says 'Could not find'.

Why this answer

The error in the exhibit indicates that the model package ARN does not exist in the registry. This occurs when the model package version has not been successfully created or registered, meaning it does not exist. Option B is therefore correct: the model package version does not exist.

Option A would result in an access denied error, not this ARN-not-found error. Option C is incorrect because an 'Approved' status is actually required for deployment, so it would not cause this error. Option D would produce a different error about an existing endpoint configuration or conflict, not a missing ARN.

Page 19

Page 20 of 23

Page 21