Courseiva

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

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

Page 10

Page 11 of 23

Page 12
751
Multi-Selecthard

A data scientist is tuning a gradient boosting model using Amazon SageMaker Automatic Model Tuning (AMT). Which THREE hyperparameters should the scientist consider tuning to reduce overfitting? (Select THREE.)

Select 3 answers
A.Subsample ratio
B.Learning rate (eta)
C.Minimum child weight (min_child_weight)
D.Gamma (minimum loss reduction)
E.Maximum depth (max_depth)
AnswersB, C, D

Lower learning rate reduces overfitting.

Why this answer

Learning rate (eta) controls the contribution of each tree to the ensemble. A lower learning rate forces the model to learn more slowly, requiring more trees but reducing the risk of overfitting by preventing any single tree from having too much influence on the final prediction.

Exam trap

The trap here is that candidates often assume all listed hyperparameters are equally effective for reducing overfitting, but the exam expects knowledge that subsample ratio and maximum depth are also valid regularization parameters, yet the question specifically selects min_child_weight, gamma, and learning rate as the three to focus on.

752
MCQeasy

Refer to the exhibit. An ML engineer creates a CloudFormation stack with this template. The stack creation succeeds, but when the engineer tries to invoke the endpoint, it returns a ModelError. The CloudWatch logs show that the container exited with error. What is the MOST likely cause?

A.The execution role does not have permissions to pull the Docker image from ECR.
B.The initial instance count is set to 2, which is insufficient for the model size.
C.The endpoint is not deployed in a VPC and cannot access the S3 bucket.
D.The EndpointConfig references the model but the model is not yet created.
AnswerA

The role must have ECR permissions to pull the image; if missing, the container fails to start.

Why this answer

The CloudFormation template likely does not grant the SageMaker execution role the necessary `ecr:GetDownloadUrlForLayer` and `ecr:BatchGetImage` permissions to pull the container image from Amazon ECR. Without these permissions, the SageMaker service cannot download the Docker image to the ML compute instances, causing the container to fail with a ModelError and exit error in CloudWatch logs.

Exam trap

The trap here is that candidates often assume a ModelError is always due to model artifacts or code issues, but in CloudFormation deployments, the most frequent cause is missing ECR permissions for the execution role, especially when the image is in a different account or the role is not explicitly granted pull access.

How to eliminate wrong answers

Option B is wrong because the initial instance count of 2 is not inherently insufficient; SageMaker can scale horizontally, and a ModelError with container exit is not caused by instance count but by the container failing to start. Option C is wrong because the endpoint does not need to be in a VPC to access S3; SageMaker endpoints can access S3 via the internet or VPC endpoints, and the error is a container exit, not a network timeout. Option D is wrong because CloudFormation creates resources in dependency order; the EndpointConfig references the Model, and if the Model were not created, the stack creation would fail, not succeed.

753
MCQeasy

A company needs to move 10 TB of data from an on-premises NAS to Amazon S3 over a 100 Mbps internet connection. The transfer must complete within 3 days. Which solution is the most appropriate?

A.Use AWS DataSync to transfer over the internet
B.Enable S3 Transfer Acceleration on the bucket
C.Use AWS CLI to copy data directly over the internet
D.Use AWS Snowball Edge to transfer the data
AnswerD

Snowball Edge provides physical transport, faster than internet for large data.

Why this answer

AWS Snowball Edge is a physical device that can transfer large data volumes much faster than over the internet. Option A is wrong: AWS DataSync over the internet at 100 Mbps would take approximately 10 days to transfer 10 TB, exceeding the 3-day requirement. Option B is wrong: S3 Transfer Acceleration optimizes the network path but still relies on internet bandwidth; even with a 200% speed improvement, it would take over 4.6 days.

Option C is wrong: using AWS CLI to copy directly over the internet has the same bandwidth limitation and would also take about 10 days.

754
Multi-Selecthard

A company is designing a data pipeline that ingests streaming data from social media feeds. The data must be processed in real-time to detect trending topics, and results must be stored in Amazon DynamoDB for low-latency access. Which services should the company use? (Choose TWO.)

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

Provides real-time analytics to detect trending topics.

Why this answer

Amazon Kinesis Data Analytics (D) is correct because it provides real-time SQL-based processing of streaming data, enabling the detection of trending topics from social media feeds without requiring custom code. It directly analyzes data from Kinesis Data Streams and can output results to DynamoDB via a Lambda function or Firehose, meeting the low-latency storage requirement.

Exam trap

The trap here is that candidates often confuse Kinesis Data Firehose (a delivery service) with Kinesis Data Analytics (a real-time processing service), or assume Lambda alone can handle streaming analytics, when in fact Kinesis Data Analytics is the only option that provides built-in SQL-based stream processing for real-time trend detection.

755
Multi-Selectmedium

A company is building a sentiment analysis model for customer reviews. The dataset is balanced with 10,000 positive and 10,000 negative reviews. The model achieves 95% accuracy on the test set but fails to generalize to new reviews from a different product category. Which TWO techniques can improve generalization?

Select 2 answers
A.Increase the training dataset size by collecting more reviews
B.Use stratified k-fold cross-validation during training
C.Apply L2 regularization to the model
D.Add more features like review length and word count
E.Use a more complex model with more layers
AnswersB, C

Cross-validation provides a more reliable estimate of generalization and helps tune hyperparameters.

Why this answer

Stratified k-fold cross-validation ensures that each fold maintains the same class distribution as the original dataset, which helps the model learn more robust patterns across different subsets of data. This technique reduces variance in the evaluation and improves generalization to unseen data from different product categories by preventing overfitting to idiosyncrasies of a single train-test split.

Exam trap

The trap here is that candidates often assume increasing data size or model complexity always improves generalization, but the question specifically tests the understanding that cross-validation techniques like stratified k-fold directly address overfitting and domain shift by providing a more reliable estimate of model performance across diverse data splits.

756
MCQhard

A data scientist is performing EDA on a dataset with 1 million rows. They suspect the dataset contains duplicate rows. Which approach is most efficient to identify duplicates in Amazon SageMaker Studio?

A.Write a Python script that loops through each row and compares to a set of seen rows.
B.Use pandas drop_duplicates and then check the length difference.
C.Use DuckDB SQL query: SELECT COUNT(*) - COUNT(DISTINCT *) FROM table.
D.Use Amazon Athena to query the S3 data with COUNT(DISTINCT *).
AnswerC

DuckDB efficiently processes large DataFrames in-memory.

Why this answer

DuckDB is an in-process SQL OLAP database that can run on a single machine and efficiently handle large datasets. Option A (Python loop) is slow; Option B (pandas drop_duplicates) may be memory-intensive; Option D (Athena) is serverless but incurs cost and latency.

757
Multi-Selectmedium

A data scientist is tuning a random forest model using SageMaker Hyperparameter Tuning. The objective metric is validation:accuracy. Which THREE hyperparameters are most commonly tuned for random forest? (Choose THREE.)

Select 3 answers
A.Learning rate
B.Minimum samples per leaf (min_samples_leaf)
C.Maximum depth (max_depth)
D.Number of trees (n_estimators)
E.Batch size
AnswersB, C, D

This parameter helps prevent overfitting.

Why this answer

Options B, C, and D are correct. Common tunable hyperparameters for random forest include number of trees (n_estimators), maximum depth (max_depth), and minimum samples per leaf (min_samples_leaf). Option A (learning rate) is for gradient boosting.

Option E (batch size) is for neural networks, not random forest.

758
MCQmedium

A company is streaming real-time sensor data from IoT devices to Amazon Kinesis Data Streams. The data is then consumed by an AWS Lambda function that enriches the records with metadata from an Amazon DynamoDB table and writes the results to an Amazon S3 bucket. Recently, the Lambda function has been failing with 'ProvisionedThroughputExceededException' errors from DynamoDB. The data volume is variable, with occasional bursts. Which solution should a data engineer implement to resolve this issue without losing data?

A.Increase the DynamoDB table's provisioned read capacity units to a high static value.
B.Use an Amazon SQS queue to buffer the Lambda requests before querying DynamoDB.
C.Enable DynamoDB auto scaling for the table to automatically adjust read capacity based on demand.
D.Configure an Amazon SNS topic to throttle the data stream before it reaches Lambda.
AnswerC

Auto scaling adjusts capacity dynamically to handle bursts without manual intervention.

Why this answer

DynamoDB auto scaling dynamically adjusts the table's provisioned read capacity based on actual traffic patterns, handling bursty sensor data without manual intervention. This prevents ProvisionedThroughputExceededExceptions while ensuring no data loss, as the Lambda function can retry failed operations. Auto scaling is the most cost-effective and operationally efficient solution for variable workloads.

Exam trap

The trap here is that candidates confuse buffering the Lambda invocation (Option B) with addressing the DynamoDB throttling error, but the error occurs inside the Lambda function after invocation, so an SQS queue does not solve the read capacity issue.

How to eliminate wrong answers

Option A is wrong because setting a high static read capacity is wasteful and costly, and it does not adapt to the variable bursty nature of the data, leading to either over-provisioning or continued throttling during unexpected spikes. Option B is wrong because an SQS queue buffers Lambda invocation requests, but the error occurs during DynamoDB queries within the Lambda function, not at the invocation layer; SQS does not address the read capacity limit on the DynamoDB table. Option D is wrong because an SNS topic is a pub/sub messaging service that does not throttle data streams; it would add latency and complexity without solving the DynamoDB throughput issue, and it could cause data loss if the topic is not configured for retries.

759
MCQhard

A data scientist is working with a dataset containing text reviews. The goal is to build a sentiment analysis model. Which EDA step is most critical before feature extraction?

A.Calculating the vocabulary size
B.Creating a word cloud
C.Removing stop words
D.Checking the distribution of sentiment labels
AnswerD

Class imbalance can significantly impact model performance.

Why this answer

Checking the distribution of sentiment labels is critical before feature extraction because it reveals class imbalance, which can bias the model towards the majority class and affect evaluation metrics. This EDA step enables informed decisions about resampling or weighting techniques. Option A (vocabulary size) is not a critical first step; option B (word cloud) is a visualization tool, not essential; option C (removing stop words) is a preprocessing step, not part of EDA.

Exam trap

A common pitfall is jumping directly into text preprocessing (stop word removal, tokenization) without first examining the label distribution, which can lead to biased models and misleading accuracy metrics.

760
MCQhard

A data scientist is exploring a dataset with 500 features and 100,000 observations for a regression problem. The scientist notices that many features are highly correlated with each other. Which technique should the scientist use to reduce multicollinearity and improve model interpretability during exploratory data analysis?

A.Compute mutual information between each feature and the target, and keep only the top 50 features.
B.Apply Principal Component Analysis (PCA) to reduce the feature space.
C.Use Lasso regression to select features with non-zero coefficients.
D.Calculate Variance Inflation Factor (VIF) for each feature and remove those with VIF > 10.
AnswerD

VIF quantifies how much a feature is explained by other features; high VIF indicates multicollinearity.

Why this answer

Variance Inflation Factor (VIF) is a measure of multicollinearity among features. Removing features with high VIF (e.g., > 10) reduces multicollinearity and retains interpretability. Option A is incorrect because mutual information measures dependency between feature and target, not multicollinearity.

Option B is incorrect because PCA creates new features that are linear combinations, reducing interpretability. Option C is incorrect because Lasso regression is a modeling technique, not typically used during exploratory data analysis, and it may not remove all correlated features.

761
Multi-Selectmedium

A data engineer is designing a data pipeline that uses Amazon S3 events to trigger an AWS Lambda function for processing. The pipeline must handle high throughput with low latency. Which TWO configurations should be applied?

Select 2 answers
A.Configure Lambda with reserved concurrency
B.Use an SQS queue between S3 and Lambda
C.Place Lambda in a VPC to reduce network latency
D.Use Amazon Kinesis Data Streams as an intermediary
E.Enable S3 Event Notifications to invoke Lambda directly
AnswersA, E

Ensures Lambda has enough capacity to handle bursts.

Why this answer

Reserved concurrency ensures that the Lambda function always has a guaranteed number of concurrent executions available, preventing it from being throttled by other functions in the same AWS account. This is critical for high-throughput, low-latency pipelines because S3 event notifications can burst many invocations simultaneously, and without reserved concurrency, the function might hit the account-level concurrency limit and drop events.

Exam trap

The trap here is that candidates often confuse 'reducing latency' with 'using a VPC' or 'adding a queue,' but for S3-triggered Lambda, direct invocation with reserved concurrency is the simplest and lowest-latency path, while VPCs and queues add overhead.

762
MCQmedium

A data scientist is analyzing a dataset with 500 features and 10,000 rows. The target variable is binary. After training a logistic regression model, the coefficients show many non-zero values but the model has low accuracy on the test set. Which EDA step should the data scientist perform next to improve model performance?

A.Apply Principal Component Analysis (PCA) to reduce dimensionality.
B.Collect more training data to improve generalization.
C.Normalize the features using StandardScaler.
D.Use correlation analysis or mutual information to select the most relevant features.
AnswerD

Feature selection removes irrelevant features, reducing noise and overfitting.

Why this answer

With 500 features and low accuracy, the model likely suffers from overfitting due to irrelevant or redundant features. Correlation analysis or mutual information helps select the most relevant features, reducing noise and improving generalization. Option A (PCA) reduces dimensionality but creates uninterpretable components and may lose feature relationships, not directly addressing irrelevant features.

Option B (collect more data) may help but does not solve the core issue of irrelevant features. Option C (normalization) only scales features, not reduce them, and logistic regression is not sensitive to scale if coefficients are interpreted carefully; overfitting is more likely due to too many features.

763
MCQmedium

A company is using Amazon SageMaker to train a deep learning model. The training job uses a script that reads data from Amazon S3 using the SageMaker SDK's `s3_input` method. The training job runs on a single ml.p3.2xlarge instance. The data scientist notices that the GPU utilization is very low during training, often below 20%. The training dataset is large, approximately 50 GB, stored as TFRecord files in S3. What is the MOST likely cause of low GPU utilization?

A.The training script is using a CPU-only version of TensorFlow.
B.The data loading pipeline is not optimized, causing the GPU to wait for data.
C.The batch size is too large, causing the GPU to run out of memory.
D.The instance type does not have enough GPU memory for the model.
AnswerB

Correct: Inefficient data loading leads to GPU starvation.

Why this answer

Low GPU utilization typically indicates that the GPU is waiting for data, which is a classic symptom of a data loading bottleneck. With a large 50 GB TFRecord dataset and a single ml.p3.2xlarge instance, the default SageMaker SDK's s3_input method may not be optimized for high throughput. To fully utilize the GPU, techniques such as using Pipe mode, prefetching, parallel data extraction, and using a data loader like TensorFlow's tf.data API with interleave and prefetch are recommended.

Option B correctly identifies this bottleneck. Option A is incorrect because a CPU-only version of TensorFlow would not run on a GPU at all. Option C is incorrect because a batch size that is too large causes out-of-memory errors, not low utilization.

Option D is incorrect because ml.p3.2xlarge has 8 GB of GPU memory, which is suitable for many models; low memory would cause failures rather than low utilization.

764
MCQmedium

A data scientist is analyzing a dataset with missing values in several features. The dataset is large (10 million rows) and stored in an S3 bucket as CSV files. The scientist wants to use AWS Glue to catalog the data and then use Amazon Athena to query it. However, the missing values are causing errors in downstream machine learning models. Which approach should the scientist take to handle missing values during exploratory data analysis?

A.Use Amazon SageMaker Data Wrangler to create a data flow that imputes missing values and export the transformed dataset to S3.
B.Use AWS Glue ETL jobs with a custom transformation script that uses the AWS Glue library to drop or impute missing values before writing to a new dataset.
C.Use Amazon Redshift Spectrum with an external table to query the data and use SQL COALESCE to handle missing values on the fly.
D.Use Amazon Athena to run SQL queries that impute missing values and write the results to a new table.
AnswerB

AWS Glue provides native transforms like DropNullFields and FillWithValue, and custom scripts allow handling missing values efficiently at scale.

Why this answer

AWS Glue ETL jobs can be used with custom scripts to handle missing values by either dropping rows or imputing values using built-in transforms or custom logic. This is ideal for large-scale datasets stored in S3 as CSV files. Glue integrates with the AWS Glue library for transforming data.

Option A (SageMaker Data Wrangler) is more suitable for interactive data preparation and visualization, but not for automated, large-scale ETL processing of 10 million rows.

Option C (Redshift Spectrum) is primarily a query engine that can query data in S3, but it does not provide built-in data cleaning capabilities for missing values; you would need to use SQL functions like COALESCE, but it's not the best approach for comprehensive ETL.

Option D (Athena) is also a query engine and cannot modify the underlying data; it can impute values in query results, but not write transformed data back to S3 as a cleaned dataset without additional steps.

765
MCQeasy

A data scientist is training a linear regression model on a dataset with 10 features. After training, the model has high variance on the test set. Which technique should the data scientist use to reduce variance without significantly increasing bias?

A.Use L2 regularization
B.Add more features
C.Use a simpler model
D.Use a deeper decision tree
AnswerA

L2 regularization penalizes large coefficients, reducing variance.

Why this answer

L2 regularization (Ridge regression) adds a penalty term proportional to the square of the magnitude of the coefficients, which shrinks them toward zero. This reduces model complexity and variance by preventing any single feature from having an overly large influence, without eliminating features entirely, thus keeping bias relatively low.

Exam trap

AWS often tests the distinction between L1 (Lasso) and L2 (Ridge) regularization, and the trap here is that candidates might think adding more features or using a simpler model is the only way to reduce variance, overlooking that L2 regularization can reduce variance without the drastic bias increase of feature elimination.

How to eliminate wrong answers

Option B is wrong because adding more features increases model complexity, which typically increases variance further, not reduces it. Option C is wrong because using a simpler model (e.g., reducing the number of features or using a less flexible algorithm) would reduce variance but at the cost of a significant increase in bias, violating the requirement to not significantly increase bias. Option D is wrong because a deeper decision tree increases model complexity and variance, which is the opposite of what is needed to address high variance.

766
MCQeasy

A data scientist is investigating an application that logs errors to Amazon CloudWatch Logs. The data scientist runs the CloudWatch Logs Insights query shown in the exhibit. The query returns no results, even though the data scientist knows errors have occurred. What is the most likely cause?

A.The stats count() function is misspelled.
B.The filter pattern is case-sensitive and the log messages use a different case for 'error'.
C.The query sorts by timestamp descending, which hides results.
D.The bin(5m) function is not supported in CloudWatch Logs Insights.
AnswerB

CloudWatch Logs Insights is case-sensitive; 'ERROR' will not match 'Error'.

Why this answer

CloudWatch Logs Insights queries are case-sensitive by default; the filter pattern 'ERROR' will not match log messages that use 'error' or 'Error'. Option A is incorrect because the stats count() function is spelled correctly in the query. Option C is incorrect because sorting by timestamp descending does not prevent results from being returned; it only affects the order.

Option D is incorrect because bin(5m) is a valid function in CloudWatch Logs Insights when there are logs within the time range.

767
MCQeasy

A company is using SageMaker to train a linear regression model on a dataset that fits into memory on a single instance. The training job is taking longer than expected. The data scientist wants to reduce training time without changing the algorithm. Which approach is most effective?

A.Disable automatic model tuning.
B.Use a larger instance type with more vCPUs.
C.Use SageMaker's distributed training with multiple instances.
D.Reduce the number of epochs.
AnswerC

Parallel processing reduces training time.

Why this answer

SageMaker's distributed training with multiple instances performs data parallelism, splitting the dataset across instances to train concurrently, which reduces training time for data that fits in memory. Option A is wrong because disabling automatic model tuning (hyperparameter tuning) does not speed up training; it only stops searching for optimal hyperparameters. Option B is wrong because while a larger instance with more vCPUs can help, distributed training scales better and is more cost-effective for this scenario.

Option D is wrong because reducing the number of epochs would likely underfit the model, hurting accuracy.

768
MCQhard

Refer to the exhibit. A CloudFormation template creates an S3 bucket. The data engineering team stores daily log files in this bucket and queries them using Amazon Athena. After 30 days, queries on logs older than 30 days start failing with 'Access Denied' errors. What is the MOST likely reason?

A.The lifecycle rule transitions objects to GLACIER after 30 days, making them inaccessible to Athena.
B.The bucket uses default encryption with SSE-S3, which Athena does not support.
C.The lifecycle rule deletes objects after 30 days.
D.The bucket policy denies access to objects older than 30 days.
AnswerA

Athena cannot query GLACIER objects; they must be restored first.

Why this answer

Amazon Athena reads data directly from S3 and does not support querying objects stored in the GLACIER storage class because GLACIER objects are not retrievable in real time. The lifecycle rule transitions objects to GLACIER after 30 days, so when Athena attempts to read those older objects, it receives 'Access Denied' errors because the objects are no longer in a queryable storage class.

Exam trap

The trap here is that candidates often confuse 'Access Denied' errors with permission issues (bucket policies or IAM) rather than recognizing that the error is caused by the storage class transition to GLACIER, which makes objects unreadable by Athena without restoration.

How to eliminate wrong answers

Option B is wrong because Athena fully supports SSE-S3 (default encryption with Amazon S3-managed keys) and can query objects encrypted with SSE-S3 without any issues. Option C is wrong because if objects were deleted after 30 days, Athena queries would return 'No data' or 'Zero records' rather than 'Access Denied' errors. Option D is wrong because a bucket policy denying access to objects older than 30 days would produce consistent 'Access Denied' errors for all operations on those objects, but the scenario describes queries failing only after 30 days, which aligns with a lifecycle transition to GLACIER, not a policy change.

769
Multi-Selecthard

Which THREE of the following are best practices for training a deep learning model on Amazon SageMaker?

Select 3 answers
A.Use Pipe mode for large datasets to reduce I/O overhead
B.Use SageMaker Debugger to automatically fix training errors
C.Set up automatic model tuning (hyperparameter optimization)
D.Use SageMaker Debugger to profile GPU utilization
E.Train on a single instance to avoid distributed training overhead
AnswersA, C, D

Pipe mode streams data directly, reducing disk I/O.

Why this answer

Profiling GPU utilization helps identify bottlenecks. Using Pipe mode for large datasets reduces I/O. Setting up automatic model tuning (hyperparameter optimization) is a best practice.

Training on a single instance is not a best practice for large models. Debugger is for monitoring, not for training acceleration.

770
MCQhard

A company deploys a SageMaker model for inference. After a few days, response times increase significantly. CloudWatch metrics show high CPU utilization and memory usage. The model is a large ensemble. What is the most cost-effective solution?

A.Configure SageMaker automatic scaling based on CPU utilization
B.Use CloudWatch alarms to notify the team, who manually launch additional endpoints
C.Migrate the model to AWS Lambda with provisioned concurrency
D.Replace the current instance type with a larger one
AnswerA

Auto scaling dynamically adjusts instance count to handle load cost-effectively.

Why this answer

SageMaker automatic scaling based on CPU utilization is the most cost-effective solution because it dynamically adjusts the number of inference instances in response to real-time demand, adding capacity only when CPU usage is high and removing it when demand drops. This avoids over-provisioning while maintaining performance for the large ensemble model, which is compute-intensive. Other options either introduce manual overhead, are unsuitable for large models, or incur unnecessary cost by permanently using larger instances.

Exam trap

The trap here is that candidates often choose manual scaling (Option B) or vertical scaling (Option D) because they seem simpler, but the exam tests the understanding that automatic horizontal scaling is the most cost-effective and operationally efficient approach for handling variable inference workloads in SageMaker.

How to eliminate wrong answers

Option B is wrong because manually launching additional endpoints via CloudWatch alarms introduces latency and operational overhead, failing to provide the automated, real-time scaling needed to address sudden increases in response times. Option C is wrong because AWS Lambda has a maximum execution timeout of 15 minutes and limited memory (up to 10 GB), making it unsuitable for hosting large ensemble models that require sustained compute and significant memory. Option D is wrong because replacing the current instance type with a larger one is a vertical scaling approach that does not adapt to fluctuating demand, leading to either underutilization during low traffic or continued high costs without addressing the root cause of scaling needs.

771
MCQeasy

A data scientist is trying to run a SageMaker training job that writes output to an S3 bucket 'my-bucket'. The IAM policy is shown. The training job fails with an AccessDenied error when trying to write to S3. What is the reason?

A.The S3 bucket is encrypted with AWS KMS and the policy does not include kms:GenerateDataKey
B.The policy does not allow s3:ListBucket
C.The policy does not allow s3:PutObject
D.The policy does not allow s3:PutObjectAcl
AnswerA

When KMS encryption is used, SageMaker needs kms:GenerateDataKey permission to write.

Why this answer

The training job fails with an AccessDenied error when writing to an S3 bucket that is encrypted with AWS KMS. The IAM policy shown must include the `kms:GenerateDataKey` permission to allow the SageMaker training job to generate a data key for encrypting the output objects. Without this KMS permission, the S3 PutObject operation is denied even if the policy allows `s3:PutObject`, as KMS encryption requires explicit authorization to use the customer master key (CMK).

Exam trap

The trap here is that candidates often focus only on S3 permissions (like `s3:PutObject`) and overlook the need for KMS permissions when the bucket uses SSE-KMS, leading them to incorrectly select Option C or D.

How to eliminate wrong answers

Option B is wrong because `s3:ListBucket` is not required for writing objects to S3; it is needed for listing bucket contents, not for PutObject operations. Option C is wrong because the policy likely includes `s3:PutObject` (as the question implies the policy allows writing), but the AccessDenied error stems from missing KMS permissions, not from a missing PutObject action. Option D is wrong because `s3:PutObjectAcl` is only required when explicitly setting object ACLs during upload, which is not a default behavior for SageMaker training jobs; the error is not related to ACL management.

772
MCQhard

A data scientist needs to run a hyperparameter tuning job for a deep learning model. Which SageMaker feature should they use?

A.SageMaker Hyperparameter Tuning Job
B.SageMaker Experiments
C.SageMaker Automatic Model Tuning
D.SageMaker Processing
AnswerA

This is the correct feature for hyperparameter optimization.

Why this answer

SageMaker Hyperparameter Tuning Job (option A) is the correct feature because it is the native SageMaker capability designed specifically to automate the search for optimal hyperparameters for a machine learning model. It launches multiple training jobs with different hyperparameter combinations, evaluates them against a specified objective metric, and uses strategies like Bayesian optimization or random search to converge on the best configuration. This directly matches the requirement to run a hyperparameter tuning job for a deep learning model.

Exam trap

AWS often tests the distinction between the official feature name 'SageMaker Hyperparameter Tuning Job' and the colloquial or older term 'SageMaker Automatic Model Tuning' to catch candidates who memorize synonyms rather than precise service names.

How to eliminate wrong answers

Option B (SageMaker Experiments) is wrong because it is designed for tracking, organizing, and comparing machine learning trials and their metadata, not for automatically searching hyperparameter values. Option C (SageMaker Automatic Model Tuning) is wrong because it is simply an alias or older marketing term for the same SageMaker Hyperparameter Tuning Job feature, not a separate service; the question asks for the feature name, and the official AWS documentation uses 'SageMaker Hyperparameter Tuning Job'. Option D (SageMaker Processing) is wrong because it is a managed service for running data preprocessing, postprocessing, or model evaluation scripts on ephemeral compute, not for hyperparameter optimization.

773
MCQmedium

A company is storing customer transaction data in Amazon S3 as CSV files. A data scientist uses AWS Glue to crawl the data and create a table in the AWS Glue Data Catalog. When querying the table with Amazon Athena, the data scientist notices that some columns have NULL values where data should exist. The data scientist examines the raw CSV files and confirms the data is present. What is the most likely cause of the NULL values?

A.The CSV files have different schemas (e.g., different columns) across partitions.
B.Athena is configured to skip corrupted records, causing NULLs.
C.The Glue crawler incorrectly inferred the data type of the columns.
D.The CSV files use a custom delimiter that the Glue crawler does not recognize.
AnswerA

Schema evolution causes missing columns to appear as NULL when queried.

Why this answer

The most likely cause is that the CSV files have different schemas across partitions. When AWS Glue crawler infers the schema, it samples a subset of files. If partitions have different columns or column order, the inferred schema may not include columns present only in later partitions.

When Athena queries the table, it uses the schema from the Data Catalog; columns missing from the schema appear as NULL. Option A is correct. Option B is incorrect because Athena does not skip corrupted records by default; it would fail on parse errors.

Option C is incorrect because data type inference errors would cause different issues, such as type mismatches, not NULLs for existing data. Option D is incorrect because the Glue crawler can handle custom delimiters if configured; the issue here is schema mismatch, not delimiter recognition.

774
MCQhard

A team is using Amazon SageMaker Autopilot to automatically build models. The dataset has 50 features and 1 million rows. After training, Autopilot generates multiple candidates. The team wants to deploy the model with the highest accuracy. What is the best practice to select and deploy the model?

A.Deploy all candidates behind a multi-model endpoint and route traffic based on request features
B.Select the model with the highest validation accuracy after performing additional hyperparameter tuning
C.Manually review each candidate's architecture and select the one with the simplest design
D.Deploy the candidate with the highest objective metric value from the Autopilot leaderboard
AnswerD

Autopilot ranks candidates by objective metric.

Why this answer

Amazon SageMaker Autopilot automatically generates a leaderboard ranking candidate models by their objective metric (e.g., accuracy, F1, AUC). The highest-ranked candidate represents the best-performing model based on the validation data, and deploying it directly is the recommended best practice. Autopilot handles preprocessing, algorithm selection, and hyperparameter tuning internally, so manual intervention is unnecessary.

Exam trap

The trap here is that candidates may overthink the process and assume manual review or additional tuning is required, when in fact Autopilot is designed to automate model selection and deployment based on the leaderboard.

How to eliminate wrong answers

Option A is wrong because deploying all candidates behind a multi-model endpoint and routing traffic based on request features is overly complex and not a standard practice for Autopilot; it would require custom routing logic and does not leverage Autopilot's built-in leaderboard. Option B is wrong because Autopilot already performs automated hyperparameter tuning for each candidate; additional manual tuning would duplicate effort and could lead to overfitting or unnecessary complexity. Option C is wrong because manually reviewing each candidate's architecture and selecting the simplest design ignores the objective metric; Autopilot optimizes for performance, not simplicity, and the simplest model may have lower accuracy.

775
MCQhard

A data scientist is using SageMaker to train a TensorFlow model. The training script uses tf.data.Dataset to load data from S3. Training is slow because of I/O bottleneck. Which change should the data scientist make to improve I/O performance?

A.Enable EBS optimization on the training instance.
B.Use Pipe input mode for the training channel.
C.Use SageMaker local mode for training.
D.Convert the dataset to RecordIO format.
AnswerB

Pipe input mode streams training data directly from S3 to the SageMaker training container without first downloading it to the local Amazon Elastic Block Store (EBS) volume, eliminating the I/O bottleneck caused by `tf.data.Dataset`’s default File input mode, which requires full dataset download before training begins. This satisfies the stem’s requirement to reduce latency from S3 reads during TensorFlow model training.

Why this answer

Pipe input mode streams data directly from S3 into the training algorithm without writing to disk, eliminating the I/O bottleneck caused by downloading entire files. This is particularly effective with tf.data.Dataset, as the pipeline can consume data incrementally, reducing latency and improving throughput for large datasets.

Exam trap

The trap here is that candidates often confuse EBS optimization (which improves local disk performance) with S3 data access optimization, or assume that RecordIO is a universal performance fix, ignoring that TensorFlow's native pipeline benefits more from streaming input modes.

How to eliminate wrong answers

Option A is wrong because EBS optimization improves network throughput for EBS volumes, but the training script loads data from S3, not from an EBS volume; the bottleneck is S3 I/O, not EBS. Option C is wrong because SageMaker local mode runs training on the local instance's file system, which does not address S3 I/O bottlenecks and may even exacerbate them if data must be downloaded first. Option D is wrong because converting to RecordIO format is beneficial for SageMaker's built-in algorithms (e.g., XGBoost) that natively support it, but TensorFlow's tf.data.Dataset works optimally with native formats like TFRecord; RecordIO does not improve S3 streaming performance and adds unnecessary conversion overhead.

776
Multi-Selecthard

A data scientist is evaluating feature engineering options for a dataset containing a categorical variable 'education_level' with values: High School, Bachelor, Master, PhD. The target variable is continuous. Which THREE encoding methods are appropriate for this ordinal categorical variable? (Choose 3)

Select 3 answers
A.One-hot encoding
B.Target encoding (mean of target per category)
C.Hash encoding (using feature hashing)
D.Label encoding (e.g., High School=0, Bachelor=1, Master=2, PhD=3)
E.Binary encoding (convert to binary representation)
AnswersA, B, D

One-hot encoding is a safe option that does not assume any order, though it increases dimensionality.

Why this answer

Options A, B, and D are correct: One-hot encoding (A) can be used for ordinal variables, though it ignores order, it is still valid. Target encoding (B) captures the relationship with the target and respects ordinality. Label encoding (D) preserves the ordinal nature.

Option C (hash encoding) is incorrect because it is typically used for high-cardinality nominal variables, not ordinal, and may lose interpretability. Option E (binary encoding) is also incorrect because it is designed for nominal categories and does not maintain order.

777
Multi-Selecteasy

A data scientist is performing hyperparameter optimization for a gradient boosting model using Amazon SageMaker Automatic Model Tuning. The objective metric is 'validation:logloss'. Which TWO strategies can help the tuning job converge faster? (Choose TWO.)

Select 2 answers
A.Use Bayesian optimization strategy
B.Increase the number of tuning jobs
C.Increase the resource limits for each training job
D.Use random search strategy
E.Use early stopping based on the objective metric
AnswersA, E

Bayesian optimization intelligently selects hyperparameters to converge faster.

Why this answer

Bayesian optimization is a hyperparameter tuning strategy that builds a probabilistic model of the objective function and uses it to select the most promising hyperparameter combinations to evaluate next. By focusing on regions of the hyperparameter space that are likely to yield better validation:logloss, it converges to an optimal configuration in fewer training jobs compared to uninformed search methods, thus speeding up the tuning process.

Exam trap

The trap here is that candidates often confuse 'increasing resources' (Option C) with improving convergence speed, but resource limits only affect individual training job speed, not the efficiency of the hyperparameter search itself.

778
MCQeasy

A data scientist wants to understand the statistical relationship between two categorical variables in a dataset. Which test is most appropriate?

A.Chi-squared test
B.Pearson correlation coefficient
C.Student's t-test
D.ANOVA test
AnswerA

Correct: Chi-squared test is used for association between categorical variables.

Why this answer

The chi-squared test is used to determine if there is a significant association between two categorical variables, which is exactly what the data scientist wants to understand. Option B (Pearson correlation coefficient) is incorrect because it measures linear relationship between two continuous variables. Option C (Student's t-test) is used to compare means of two groups, typically for continuous data.

Option D (ANOVA) is used to compare means across three or more groups, also for continuous data.

779
Multi-Selectmedium

A data scientist is training a binary classification model on an imbalanced dataset (95% negative class, 5% positive class). The model currently achieves 94% accuracy but a recall of only 0.10 on the positive class. Which TWO strategies should the data scientist consider to improve recall without significantly sacrificing precision? (Choose 2.)

Select 2 answers
A.Undersample the majority class to match the minority class size.
B.Increase the regularization strength to reduce overfitting.
C.Assign higher class weights to the positive class in the loss function.
D.Use a deeper neural network with more layers.
E.Oversample the minority class using SMOTE.
AnswersC, E

Higher weight for positive class penalizes false negatives, improving recall.

Why this answer

Assigning higher class weights to the positive class in the loss function (option C) penalizes misclassifications of the minority class more heavily, forcing the model to focus on positive examples. Oversampling the minority class using SMOTE (option E) generates synthetic positive samples, improving the model's ability to learn decision boundaries for the positive class. Both techniques directly address class imbalance without discarding data.

Option A (undersampling) may remove useful negative samples, harming overall performance. Option B (increasing regularization) reduces overfitting but does not specifically improve recall. Option D (using a deeper network) may increase overfitting and does not target recall directly.

780
MCQhard

A data engineer needs to build a pipeline that ingests CSV files from an S3 bucket, validates the schema, and loads the data into an Amazon Redshift cluster. The pipeline must handle schema evolution gracefully by adding new columns as they appear in the source files. Which combination of AWS services and configurations would meet these requirements with minimal operational overhead?

A.Use AWS Glue to create a crawler that updates the schema, then use Redshift Spectrum to query the data directly from S3
B.Use Amazon Kinesis Data Firehose to ingest the files and load into Redshift, with a Lambda function to detect schema changes
C.Use Amazon Athena to create external tables with schema-on-read, and insert results into Redshift using INSERT INTO
D.Use AWS Glue to create a crawler and an ETL job that writes to Redshift, with 'resolveChoice' to handle new columns
AnswerD

Glue handles schema evolution via DynamicFrame and resolveChoice, and loads into Redshift.

Why this answer

AWS Glue provides a fully managed ETL service that can automatically detect schema changes via crawlers and handle new columns in CSV files using the 'resolveChoice' transformation. The Glue ETL job can write directly to Amazon Redshift with minimal operational overhead, as it manages schema evolution without requiring manual intervention or additional infrastructure.

Exam trap

The trap here is that candidates often assume Redshift Spectrum or Athena can load data into Redshift, but they are query engines, not data loading services, and do not handle schema evolution for batch ingestion into a Redshift cluster.

How to eliminate wrong answers

Option A is wrong because Redshift Spectrum queries data directly from S3 without loading it into Redshift, which does not meet the requirement to load data into the Redshift cluster. Option B is wrong because Kinesis Data Firehose is designed for streaming data, not batch CSV file ingestion from S3, and using a Lambda function to detect schema changes adds operational overhead and complexity. Option C is wrong because Athena uses schema-on-read for external tables, but inserting results into Redshift with INSERT INTO is inefficient for large datasets and does not handle schema evolution automatically or gracefully.

781
MCQeasy

A company wants to build a real-time anomaly detection system for IoT sensor data. The data arrives as a stream of numerical values. The model should adapt to concept drift over time. Which approach is most suitable?

A.Train an online learning model, such as stochastic gradient descent (SGD) with a sliding window
B.Use a static deep learning model trained once on historical data
C.Use a stateful LSTM with fixed weights
D.Batch train a random forest model monthly
AnswerA

Online learning updates the model incrementally, allowing adaptation to concept drift.

Why this answer

Online learning with stochastic gradient descent (SGD) using a sliding window allows the model to continuously update its parameters as new IoT sensor data arrives, adapting to concept drift without retraining from scratch. The sliding window ensures that the model focuses on the most recent data distribution, discarding outdated patterns, which is essential for real-time anomaly detection in streaming environments.

Exam trap

AWS often tests the misconception that stateful recurrent models (like LSTMs) inherently adapt to concept drift, but without weight updates they remain static; the trap here is confusing 'statefulness' (which preserves temporal context across batches) with 'online learning' (which updates model parameters).

How to eliminate wrong answers

Option B is wrong because a static deep learning model trained once on historical data cannot adapt to concept drift; it will become stale as the data distribution changes over time, leading to degraded anomaly detection performance. Option C is wrong because a stateful LSTM with fixed weights does not update its parameters after deployment, so it cannot adapt to evolving patterns in the streaming data, and its statefulness alone does not enable learning from new data. Option D is wrong because batch training a random forest model monthly introduces a significant delay between data arrival and model update, which is unsuitable for real-time anomaly detection and cannot handle gradual or sudden concept drift between retraining intervals.

782
Multi-Selecthard

A data scientist is deploying a model on Amazon SageMaker for real-time inference. The model is a PyTorch model that requires custom inference code. The data scientist needs to handle variable-length inputs and optimize inference latency. Which TWO steps should the data scientist take? (Choose TWO.)

Select 2 answers
A.Enable SageMaker batch transform to process requests in batches.
B.Use the SageMaker PyTorch container without any modifications.
C.Set the endpoint to use multiple variants for A/B testing.
D.Use TorchScript to compile the model for optimized inference.
E.Provide a custom inference script (inference.py) that defines how to load the model and process requests.
AnswersD, E

Correct. TorchScript compiles PyTorch models for optimized inference, reducing execution time and efficiently handling variable-length inputs.

Why this answer

TorchScript compiles PyTorch models for optimized inference, reducing execution time and handling variable-length inputs efficiently. Option E is correct because a custom inference script (inference.py) is required to define preprocessing, prediction, and postprocessing logic for variable-length inputs. Option A is incorrect because SageMaker Batch Transform is designed for offline, asynchronous inference and cannot be used for real-time endpoints with sub-second latency.

Options B and C are also incorrect: using the PyTorch container without modifications would not support custom inference code, and multiple variants are for A/B testing, not latency optimization.

Exam trap

A common trap is assuming that batch transform can be used for real-time inference. However, SageMaker Batch Transform is meant for offline, asynchronous processing and cannot meet real-time latency requirements.

783
MCQmedium

A company is deploying a real-time inference endpoint using Amazon SageMaker. The model is a large deep learning model that requires GPU inference. The company wants to minimize latency and cost. Which instance type and deployment strategy should be used?

A.Use a serverless inference endpoint with a GPU instance.
B.Use a real-time endpoint with a GPU instance and enable multi-model endpoints.
C.Use a batch transform job with a GPU instance.
D.Use an asynchronous inference endpoint with a GPU instance.
AnswerB

Multi-model endpoints reduce cost by sharing GPU across models.

Why this answer

Using a real-time endpoint with a GPU instance and enabling multi-model endpoints allows the company to serve multiple models on a single GPU instance, reducing cost by sharing the GPU resource while maintaining low latency for real-time inference. Multi-model endpoints load and unload models on demand, minimizing idle GPU time and optimizing cost without sacrificing the low-latency requirement.

Exam trap

The trap here is that candidates often assume serverless inference (Option A) is always the cheapest and simplest option, but they overlook that serverless does not support GPU instances, making it unsuitable for GPU-required deep learning models.

How to eliminate wrong answers

Option A is wrong because SageMaker serverless inference does not support GPU instances; it only supports CPU instances, so it cannot run a large deep learning model that requires GPU inference. Option C is wrong because batch transform jobs are designed for offline, asynchronous processing of large datasets, not for real-time inference, and they do not provide a persistent endpoint with low latency. Option D is wrong because asynchronous inference endpoints are intended for requests with large payloads or long processing times and do not guarantee the low latency required for real-time inference; they also do not minimize cost as effectively as multi-model endpoints for GPU workloads.

784
MCQeasy

A company uses Amazon SageMaker to deploy a model for real-time inference. The model is a linear regression model that was trained using the SageMaker built-in Linear Learner algorithm. The endpoint is configured with an ml.m5.large instance. After deployment, the company notices that the endpoint returns incorrect predictions. The training data was normalized, but the inference requests send raw feature values without normalization. What should the company do to fix the issue?

A.Retrain the model using raw data without normalization.
B.Change the endpoint instance type to a GPU instance to handle the raw data.
C.Create a SageMaker inference pipeline that includes a preprocessing step to normalize the input data before passing it to the model.
D.Use a batch transform job to preprocess the data before sending it to the endpoint.
AnswerC

Correct: This ensures real-time raw data is normalized before inference.

Why this answer

The model was trained on normalized data, so it expects normalized input at inference time. Raw feature values will produce incorrect predictions because the model's coefficients are based on normalized data. The correct solution is to create a SageMaker inference pipeline that includes a preprocessing step (e.g., using a scikit-learn container) to normalize the input data before passing it to the model container.

Option A (retrain with raw data) would require retraining and might degrade performance if normalization was necessary for convergence. Option B (changing instance type) does not address the data mismatch. Option D (batch transform job) is for batch inference, not real-time inference via an endpoint.

785
MCQeasy

A data engineer needs to process streaming data from an IoT fleet and store the results in Amazon S3 for analysis. The solution must be serverless and handle data that arrives at irregular intervals. Which AWS service should be used to ingest the data?

A.Amazon S3
B.AWS IoT Core
C.Amazon Simple Queue Service (SQS)
D.Amazon Kinesis Data Streams
AnswerB

AWS IoT Core provides secure device connectivity, message routing, and integrates with serverless processing.

Why this answer

AWS IoT Core is the correct choice because it is a fully managed, serverless service designed specifically to ingest data from IoT devices at scale, handling irregular and high-frequency message arrivals via MQTT, HTTP, or LoRaWAN protocols. It can directly route data to Amazon S3 using IoT Rules, making it ideal for this streaming IoT fleet scenario without requiring any server management.

Exam trap

The trap here is that candidates often confuse Amazon Kinesis Data Streams as the default for streaming data, but for IoT-specific ingestion with irregular intervals and native MQTT support, AWS IoT Core is the correct serverless choice.

How to eliminate wrong answers

Option A is wrong because Amazon S3 is an object storage service, not a data ingestion service; it cannot natively receive streaming data from IoT devices without an intermediary like IoT Core or Kinesis. Option C is wrong because Amazon SQS is a message queue service that decouples application components but lacks native IoT protocol support (e.g., MQTT) and does not provide built-in rules for direct S3 storage of streaming IoT data. Option D is wrong because Amazon Kinesis Data Streams is a real-time data streaming service but is not serverless in the same sense (requires provisioning shards) and lacks native IoT protocol endpoints, making it less suitable for direct ingestion from an IoT fleet compared to IoT Core.

786
MCQhard

Refer to the exhibit. An ML engineer applies this bucket policy to an S3 bucket. The SageMaker execution role MySageMakerRole is used to train a model. The training data is located in s3://my-bucket/data/. The SageMaker training job fails with an access error. What is the most likely cause?

A.The policy allows GetObject only from the data/ prefix, but the training job uses a different prefix.
B.The role is not in the same AWS account as the bucket.
C.The Deny statement on s3:ListBucket prevents the role from listing objects in the bucket.
D.The bucket has default encryption enabled, causing a conflict.
AnswerC

SageMaker may need to list objects to iterate over files; the explicit deny blocks this.

Why this answer

The Deny statement on s3:ListBucket explicitly denies the s3:ListBucket action for the MySageMakerRole. SageMaker training jobs require the ability to list objects in the bucket to discover and read training data, even if the GetObject permission is granted. The explicit Deny overrides any Allow, causing the access error.

Exam trap

The trap here is that candidates assume GetObject alone is sufficient for reading data, but SageMaker training jobs also require ListBucket to enumerate objects in the prefix, and an explicit Deny on ListBucket overrides any Allow.

How to eliminate wrong answers

Option A is wrong because the policy allows GetObject from the data/ prefix, and the training data is located at s3://my-bucket/data/, so there is no prefix mismatch. Option B is wrong because the bucket policy does not include any condition restricting access based on AWS account, and SageMaker roles can be used cross-account if properly configured; the error is not due to account mismatch. Option D is wrong because default encryption on an S3 bucket does not cause access errors for SageMaker training jobs; SageMaker can read encrypted objects as long as the role has the necessary KMS permissions, which are not mentioned as missing.

787
MCQmedium

A company is using Amazon SageMaker to train machine learning models. The training data is stored in Amazon S3, but the data includes personally identifiable information (PII) that must be anonymized before training. What is the most efficient way to anonymize the data?

A.Use an AWS Glue ETL job to read from S3, apply anonymization, and write to another S3 bucket.
B.Use Amazon Athena to query the data and apply anonymization functions.
C.Use Amazon Redshift Spectrum to query and anonymize data in S3.
D.Use a SageMaker Processing job to read from S3 and apply anonymization.
AnswerA

Glue is a serverless ETL service that can efficiently transform large datasets.

Why this answer

AWS Glue ETL jobs are purpose-built for serverless data transformation at scale, making them the most efficient choice for anonymizing PII in S3 before training. Glue can read directly from S3, apply built-in or custom anonymization transforms (e.g., masking, hashing) using PySpark or Scala, and write the cleaned data to a separate S3 bucket without provisioning any infrastructure. This approach decouples the data preparation from SageMaker, avoids unnecessary compute costs during training, and scales automatically with data volume.

Exam trap

The trap here is that candidates often choose SageMaker Processing (Option D) because it is a SageMaker-native service, but the question asks for the 'most efficient' approach for standalone data anonymization, and AWS Glue is the correct serverless ETL service for this task, not a processing job tied to the training pipeline.

How to eliminate wrong answers

Option B is wrong because Amazon Athena is an interactive query service for ad-hoc SQL analysis, not a data transformation engine; it lacks built-in support for complex anonymization logic (e.g., regex-based masking, tokenization) and would require inefficient row-by-row processing with UDFs, making it unsuitable for large-scale ETL. Option C is wrong because Amazon Redshift Spectrum is designed for querying external data in S3 from Redshift, not for performing ETL transformations; it would require moving data through Redshift clusters, adding latency and cost, and does not natively support anonymization functions. Option D is wrong because a SageMaker Processing job is intended for data processing within the ML workflow (e.g., feature engineering, validation) but is less efficient for standalone anonymization as it requires spinning up SageMaker instances and managing lifecycle, whereas Glue is serverless and optimized for pure ETL tasks.

788
MCQmedium

A company is training a deep learning model on Amazon SageMaker using a large dataset stored in S3. The training job is failing with an error indicating insufficient memory. The model architecture and hyperparameters are fixed. Which change is MOST likely to resolve the issue without modifying the model code?

A.Enable SageMaker's distributed data parallelism.
B.Use managed Spot training to get cheaper compute.
C.Use a larger instance type with more memory.
D.Use Pipe mode for input data instead of File mode.
AnswerA

Distributed data parallelism splits the minibatch across multiple GPUs/instances, reducing per-device memory footprint.

Why this answer

Enable SageMaker's distributed data parallelism. Since the model architecture and hyperparameters are fixed, the insufficient memory error likely arises because the dataset is too large to fit into the memory of a single instance. Distributed data parallelism splits the training data across multiple instances, allowing each instance to process a smaller subset, thereby reducing per-instance memory usage without any code modifications.

Option B (managed Spot training) reduces cost but does not address memory. Option C (using a larger instance) could provide more memory but may be more expensive and does not directly solve the root cause of data size relative to fixed hyperparameters. Option D (Pipe mode) improves data streaming efficiency but does not reduce the memory required for model parameters or intermediate activations.

789
MCQeasy

A data scientist trains a linear regression model to predict house prices. The model has high bias (underfitting). Which action is most likely to reduce bias?

A.Reduce the number of features
B.Decrease the maximum depth of the tree
C.Increase model complexity
D.Add L1 regularization
AnswerC

More complex models can capture underlying patterns better, reducing bias.

Why this answer

Increasing model complexity (e.g., adding polynomial features or using a more flexible algorithm) can reduce bias. Adding L1 regularization increases bias, reducing features reduces complexity, and lowering max_depth for a tree also increases bias.

790
MCQmedium

A data scientist is using Amazon SageMaker built-in XGBoost algorithm to train a regression model. The training job completes successfully but the model performance on the test set is poor, with high bias. Which hyperparameter adjustment is most likely to help reduce bias?

A.Increase the max_depth parameter.
B.Reduce the num_round parameter.
C.Increase the gamma parameter.
D.Decrease the max_depth parameter.
AnswerA

Increasing max_depth allows trees to learn more complex patterns, reducing bias.

Why this answer

High bias (underfitting) can be reduced by increasing the model complexity. Increasing max_depth allows more complex trees. Decreasing max_depth would increase bias.

Increasing gamma increases regularization and bias. Reducing num_round (number of trees) reduces complexity.

791
Multi-Selecthard

A data scientist is analyzing a dataset with several categorical features and a binary target. The scientist wants to check for association between each categorical feature and the target. Which THREE statistical tests are appropriate?

Select 3 answers
A.ANOVA
B.Pearson correlation coefficient
C.Chi-square test of independence
D.Mutual information
E.Cramér's V
AnswersC, D, E

Tests association between two categorical variables.

Why this answer

Options C, D, and E are correct. The chi-square test of independence is used to test for association between two categorical variables, such as a categorical feature and a binary target. Cramér's V is a measure of association derived from chi-square, indicating the strength of association.

Mutual information is a non-parametric measure that captures dependency between variables, including non-linear relationships, and is suitable for categorical data. Option A (ANOVA) is used for comparing means across groups and is appropriate for a continuous dependent variable, not a binary target. Option B (Pearson correlation coefficient) measures linear correlation between two continuous variables and is not suitable for categorical data.

792
MCQhard

A data scientist is performing EDA on a dataset of customer churn. The dataset includes a categorical feature 'Region' with 100 unique values. What is the best way to encode this feature for a tree-based model?

A.Replace each category with its frequency in the dataset
B.Use the feature as a categorical variable directly in the tree-based model
C.Label encode the feature (assign integers 0-99)
D.One-hot encode the feature
AnswerB

Many tree-based models (e.g., LightGBM, CatBoost) handle high-cardinality categoricals efficiently.

Why this answer

Many tree-based model implementations (e.g., LightGBM, CatBoost) support categorical features natively, handling high cardinality without encoding. Option A is wrong because frequency encoding can introduce target leakage if applied without proper cross-validation. Option C is wrong because label encoding imposes an ordinal relationship that the tree might misinterpret.

Option D is wrong because one-hot encoding with 100 categories creates many sparse columns, leading to inefficiency and potential overfitting.

793
MCQeasy

A data scientist is training a binary classification model on a highly imbalanced dataset where the positive class represents only 1% of the data. Which metric should be used to evaluate model performance during training to ensure the model is learning to detect the positive class?

A.F1 score
B.Accuracy
C.Precision
D.Recall
AnswerA

F1 score balances precision and recall, making it a good single metric for imbalanced binary classification. It captures both false positives and false negatives.

Why this answer

Accuracy is misleading for imbalanced datasets because a model that predicts the majority class all the time can achieve 99% accuracy. F1 score balances precision and recall, making it suitable for imbalanced classification. Precision, recall, and AUC are also useful, but F1 is a common single metric for imbalanced binary classification.

Option A: F1 score correctly balances precision and recall. Option B: Accuracy is not suitable. Option C: Precision alone ignores recall.

Option D: Recall alone ignores precision.

794
MCQmedium

A data scientist is training a binary classification model on a dataset with 100,000 positive samples and 1,000 negative samples. The model achieves 99% accuracy on the test set but a very low F1 score. What is the most likely cause?

A.The test set contains only positive samples
B.The model is overfitting due to too many features
C.The model is underfitting due to insufficient training
D.The model predicts the majority class most of the time due to class imbalance
AnswerD

Class imbalance causes the model to be biased toward the majority class, leading to high accuracy but low F1.

Why this answer

The accuracy is high because the model predicts the majority class (positive) most of the time, but the F1 score is low because it fails to identify the minority class (negative) correctly. This is a classic symptom of class imbalance where the model is biased toward the majority class.

795
Multi-Selecteasy

Which TWO of the following are common techniques for detecting outliers in a dataset?

Select 2 answers
A.Z-score
B.Interquartile range (IQR) method
C.Principal Component Analysis (PCA)
D.K-means clustering
E.Standard scaling
AnswersA, B

Z-score measures how many standard deviations a point is from the mean; values beyond a threshold (e.g., 3) are outliers.

Why this answer

Z-score identifies outliers based on standard deviations from the mean. IQR method uses quartile ranges to flag points outside 1.5*IQR. Standard scaling, PCA, and K-means are not primarily outlier detection methods.

796
Multi-Selectmedium

A company is designing a data pipeline to analyze customer behavior. The pipeline must handle real-time streaming data and batch data. The data must be stored in a data lake on Amazon S3 and also made available for interactive queries. Which THREE services should be combined to build this pipeline? (Choose THREE.)

Select 3 answers
A.Amazon Kinesis Data Streams
B.AWS Glue
C.Amazon Redshift
D.Amazon DynamoDB Streams
E.Amazon Athena
AnswersA, B, E

Real-time data ingestion.

Why this answer

Amazon Kinesis Data Streams is correct because it is the primary AWS service for ingesting and processing real-time streaming data at scale. It can capture and store streaming data from sources like clickstreams or IoT devices, making it available for downstream consumers such as AWS Glue or Amazon Athena for analysis.

Exam trap

The trap here is that candidates often confuse Amazon Redshift as a query engine for S3 data, but Redshift requires data to be loaded into its cluster, whereas Athena queries data in place, making Athena the correct choice for interactive queries on the data lake.

797
MCQhard

An IAM policy is attached to a data scientist's role. The scientist is trying to list objects in the 'data-bucket' using Amazon Athena. The query fails with an access denied error. What is the MOST likely reason?

A.The policy does not allow s3:ListBucket on the bucket.
B.The policy has a syntax error.
C.The query is trying to read data from the 'sensitive/' prefix.
D.The s3:GetObject action is explicitly denied for all objects.
AnswerC

Deny overrides Allow for that prefix.

Why this answer

The IAM policy likely includes a Deny statement for the 'sensitive/' prefix, causing access denied when Athena attempts to read data from that location. Option A is incorrect because s3:ListBucket is typically required and allowed; the error is access denied rather than a forbidden error. Option B is incorrect because a syntax error would usually produce an invalid policy error, not an access denied error during query execution.

Option D is incorrect because if s3:GetObject were explicitly denied for all objects, the error would occur for all queries, but the issue is specific to the 'sensitive/' prefix.

798
MCQmedium

A data scientist is performing EDA on a dataset with a timestamp column. They want to detect seasonality. Which visualization is most appropriate?

A.Box plot of value grouped by month
B.Bar chart of average value per month
C.Line plot of value over time
D.Scatter plot of timestamp vs. value
AnswerC

Line plot of value over time directly visualizes the temporal trend, making seasonal patterns (e.g., repeating cycles) easily identifiable.

Why this answer

A line plot of value over time directly visualizes the temporal trend, making seasonal patterns (e.g., repeating cycles) easily identifiable. Option A (box plot of value grouped by month) shows the distribution per month but does not reveal the sequential order or cyclical pattern. Option B (bar chart of average value per month) averages out within-month variations and may obscure seasonality that occurs at finer granularity.

Option D (scatter plot of timestamp vs. value) can become cluttered with many points and does not connect observations in time, making it harder to detect seasonality.

799
MCQhard

A data scientist is training a deep learning model on Amazon SageMaker and notices that training is taking much longer than expected. The training job uses a single GPU instance. The model is a large transformer with millions of parameters. Which change would most likely reduce training time?

A.Reduce the batch size to fit in memory
B.Use a smaller instance type
C.Switch to a CPU instance
D.Use SageMaker's distributed data parallelism with multiple GPU instances
AnswerD

Data parallelism splits the mini-batch across GPUs, reducing training time.

Why this answer

Using data parallelism with multiple GPU instances can significantly reduce training time for large models by distributing the workload across multiple GPUs. Model parallelism is also possible but data parallelism is more common and easier to implement.

800
Multi-Selecteasy

A machine learning engineer is setting up a training job in Amazon SageMaker. Which THREE components are required to define a training job? (Choose three.)

Select 3 answers
A.VPC configuration for network isolation.
B.Hyperparameters for the algorithm.
C.Output data configuration (e.g., model artifact path).
D.An algorithm or custom container image.
E.Input data configuration (e.g., S3 path).
AnswersC, D, E

Specifies where to save output.

Why this answer

Output data configuration (e.g., model artifact path) is required because SageMaker needs to know where to save the trained model artifacts (e.g., the model.tar.gz file) in Amazon S3. Without this path, the training job cannot complete successfully as it has no destination for the output.

Exam trap

AWS commonly tests the distinction between required and optional parameters in SageMaker training jobs, and candidates mistakenly assume that hyperparameters or VPC settings are mandatory when they are actually optional.

801
Multi-Selecthard

A machine learning team is building a multi-class image classifier using a pre-trained ResNet-50 model in Amazon SageMaker. The dataset has 10 classes but is highly imbalanced, with one class representing 80% of the samples. The team wants to improve model performance on the minority classes. Which TWO of the following approaches are most likely to help? (Select TWO.)

Select 2 answers
A.Oversample the minority classes in the training data.
B.Reduce the batch size to increase the frequency of weight updates.
C.Increase the number of layers in the model.
D.Switch to a focal loss function.
E.Use class weighting in the loss function.
AnswersA, E

Oversampling increases representation of minority classes, balancing the training set.

Why this answer

Oversampling the minority classes (Option A) directly addresses class imbalance by replicating samples from underrepresented classes, giving the model more exposure to them during training. This is a standard data-level technique that helps the ResNet-50 model learn discriminative features for minority classes without altering the loss function or model architecture.

Exam trap

The trap here is that candidates may incorrectly select focal loss (Option D) as a standalone answer, but the question requires exactly two correct options, and class weighting (Option E) is a more straightforward loss-modification technique that is explicitly tested in the MLS-C01 exam as a standard approach for imbalanced classification.

802
Multi-Selecteasy

Which TWO AWS services can be used to transform data in a streaming fashion without using a persistent cluster? (Choose 2.)

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

Lambda can process streaming data from Kinesis or DynamoDB Streams serverlessly.

Why this answer

(Lambda) and Option D (Kinesis Data Analytics) are serverless streaming transformation services. Option A (Glue) is serverless but not low-latency streaming. Option B (EMR) requires a persistent cluster.

Option E (Data Pipeline) is for batch.

803
Multi-Selecteasy

Which TWO of the following are common techniques for detecting outliers in a numerical feature?

Select 2 answers
A.Chi-square test
B.Standard deviation
C.Interquartile Range (IQR)
D.Z-score
E.Principal Component Analysis (PCA)
AnswersC, D

Outliers are defined as points beyond 1.5*IQR from Q1 or Q3.

Why this answer

Z-score and IQR are standard outlier detection methods. PCA can detect outliers but is not a common direct method. Chi-square is for categorical association.

Standard deviation alone is not a method.

804
MCQhard

A financial services company needs to build a data lake on Amazon S3 that meets regulatory requirements for data retention and encryption. Data must be encrypted at rest and in transit, and access must be audited. The data lake will be queried by Amazon Athena and Amazon Redshift Spectrum. Which combination of actions should be taken?

A.Enable S3 default encryption with SSE-KMS and enable AWS CloudTrail for S3 data events.
B.Use IAM policies to control access and enable S3 server access logging.
C.Use SSL/TLS for all connections and enable S3 versioning.
D.Enable S3 default encryption with SSE-S3 and use S3 access logs.
AnswerA

SSE-KMS provides encryption with managed keys; CloudTrail logs data events for auditing.

Why this answer

S3 default encryption with SSE-KMS provides encryption at rest with customer-managed keys, and enabling AWS CloudTrail for S3 data events provides comprehensive auditing of access to the data lake. This combination meets the regulatory requirements for data retention, encryption, and audit. Option B is incorrect because SSL/TLS only ensures encryption in transit, and versioning does not provide encryption at rest or auditing.

Option C is incorrect because IAM policies control access but do not provide encryption. Option D is incorrect because SSE-S3 does not allow key management control, which may be required, and S3 access logs are less detailed than CloudTrail for auditing.

805
MCQmedium

A machine learning engineer is deploying a model using AWS Lambda for real-time inference. The model is a scikit-learn RandomForestClassifier with 100 trees, serialized as a pickle file of 150 MB. The Lambda function has 3 GB memory allocated. However, the inference requests are timing out after 30 seconds. What is the most likely cause?

A.scikit-learn is not compatible with AWS Lambda.
B.The Lambda function does not have enough memory to load the model.
C.The model is loaded from S3 on every invocation, causing high latency.
D.The Lambda function timeout is set too low; increase it to 5 minutes.
AnswerC

Lambda should load the model outside the handler to reuse across invocations, but even then, cold starts with a large model are slow.

Why this answer

The default behavior of loading a model from S3 on every Lambda invocation introduces significant latency. Each invocation must download the 150 MB pickle file from S3 over the network, deserialize it, and then run inference, which easily exceeds the 30-second timeout. The model should be loaded once outside the handler (in global scope) and reused across invocations to avoid this overhead.

Exam trap

The MLS-C01 exam often tests the misconception that Lambda timeouts are always the root cause of slow inference, when in fact the real issue is inefficient resource initialization (like loading large models from S3 on every call) that can be fixed by architectural changes rather than simply increasing the timeout.

How to eliminate wrong answers

Option A is wrong because scikit-learn is fully compatible with AWS Lambda when included in the deployment package or as a Lambda layer. Option B is wrong because 3 GB of memory is more than sufficient to load a 150 MB model; memory is not the bottleneck here. Option D is wrong because increasing the timeout to 5 minutes would mask the underlying issue of inefficient model loading, not solve it; the real problem is the per-invocation S3 download latency, not the timeout value itself.

806
MCQeasy

A data scientist is performing EDA on a dataset with 500,000 rows and 10 columns. The dataset is stored in an S3 bucket as CSV files. The scientist wants to generate summary statistics (mean, median, min, max) for all numeric columns. Which service allows the quickest ad-hoc analysis without provisioning any infrastructure?

A.AWS Glue ETL
B.Amazon Athena
C.Amazon SageMaker Data Wrangler
D.Amazon QuickSight
AnswerB

Amazon Athena can query data in S3 directly using SQL.

Why this answer

Amazon Athena can query data in S3 directly using SQL. Option A is wrong because AWS Glue ETL requires job setup. Option C is wrong because Amazon SageMaker Data Wrangler requires a notebook instance.

Option D is wrong because QuickSight is for visualization, not direct summary statistics.

807
MCQeasy

A company is using Amazon Kinesis Data Firehose to load streaming data into an S3 bucket. The data schema evolves over time, with new columns added. The data must be queryable using Amazon Athena. What is the BEST way to handle schema changes?

A.Manually update the Athena table definition each time a new column is added
B.Configure Firehose to convert the data to Apache JSON format
C.Use AWS Glue Crawlers to automatically detect schema changes and update the table metadata
D.Recreate the Athena table daily to pick up new columns
AnswerC

Glue Crawlers can run on a schedule to discover new columns and update the Data Catalog.

Why this answer

AWS Glue Crawlers can automatically detect schema changes in the data stored in S3 and update the AWS Glue Data Catalog metadata used by Athena. This allows Athena to query the evolving schema without manual intervention. Option A (manual update) is not the best because it requires manual effort and is error-prone.

Option B (converting to JSON) is not necessary; Athena can handle various formats including Parquet, ORC, etc., and schema evolution is better handled by Glue Crawlers. Option D (recreating the table daily) is disruptive and not the best practice.

808
MCQeasy

A startup is building a recommendation system for an e-commerce platform using collaborative filtering. They have a dataset of user-item interactions (ratings) with 1 million users and 100,000 items. The data is sparse (99% missing ratings). They need to train a model on Amazon SageMaker that can handle large-scale sparse data efficiently. Which approach should they use?

A.Use PCA to reduce dimensionality and then apply k-nearest neighbors
B.Use the built-in Factorization Machines algorithm in SageMaker
C.Use the built-in XGBoost algorithm with one-hot encoding for user and item IDs
D.Implement a neural network with dense layers using the built-in MXNet framework
AnswerB

Factorization Machines are designed for sparse data and scale well.

Why this answer

SageMaker's Factorization Machines handle sparse data efficiently and are designed for recommendation tasks.

809
MCQeasy

A data engineer needs to run a one-time ETL job to transform 500 GB of data from Amazon RDS to Amazon S3. The job should be cost-effective and require minimal infrastructure management. Which AWS service should be used?

A.AWS Glue
B.Amazon EMR
C.Amazon Athena
D.AWS Data Pipeline
AnswerA

Glue is serverless, cost-effective, and ideal for one-time ETL.

Why this answer

AWS Glue is the correct choice because it is a fully managed, serverless ETL service designed for one-time or scheduled data transformation jobs. It automatically provisions and scales the underlying Spark environment, requires no infrastructure management, and charges only for the resources consumed during job execution, making it highly cost-effective for a 500 GB ETL workload from RDS to S3.

Exam trap

The trap here is that candidates often choose Amazon EMR because they associate it with big data ETL, but they overlook that EMR requires cluster management and is not cost-effective for a one-time job, while AWS Glue's serverless, pay-per-use model is explicitly designed for such use cases.

How to eliminate wrong answers

Option B (Amazon EMR) is wrong because it requires manual cluster provisioning, configuration, and ongoing management, which increases operational overhead and cost for a one-time job, and is not the most cost-effective or minimal-management solution. Option C (Amazon Athena) is wrong because it is an interactive query service for analyzing data in S3 using SQL, not an ETL service; it cannot directly transform data from RDS and does not support complex ETL transformations or writing transformed data back to S3 in a single job. Option D (AWS Data Pipeline) is wrong because it is a workflow orchestration service that requires managing compute resources (e.g., EC2 instances) and is less suited for a one-time ETL job compared to Glue's serverless, pay-per-use model.

810
MCQeasy

A machine learning team is using SageMaker to build a model. They need to track hyperparameter tuning experiments, compare results, and visualize metrics. Which SageMaker feature should they use?

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

Experiments provides tracking, comparison, and visualization.

Why this answer

SageMaker Experiments is the correct answer because it provides experiment tracking, comparison, and visualization capabilities for hyperparameter tuning and other training runs. SageMaker Hyperparameter Tuning (option D) only automates the tuning process but does not track or compare experiments. SageMaker Debugger (option E) is used for debugging training issues, not for experiment tracking.

SageMaker Model Monitor (option C) monitors deployed models for data drift and quality, not for tracking tuning experiments. SageMaker Ground Truth (option B) is for data labeling. Therefore, only SageMaker Experiments meets all the requirements.

811
MCQmedium

A company is building a recommendation system using Amazon SageMaker. The training data includes user-item interactions stored in a DataFrame with over 100 million rows. The data scientist wants to perform feature engineering, including one-hot encoding of categorical features with high cardinality. Which approach is MOST cost-effective and scalable?

A.Use Amazon EMR with Spark and store the processed data in HDFS.
B.Use SageMaker Processing with a Spark container to distribute the encoding job.
C.Use a SageMaker notebook instance with scikit-learn to perform the encoding in memory.
D.Use AWS Glue ETL jobs to perform the encoding and store the result in S3.
AnswerB

SageMaker Processing with Spark provides distributed processing and is cost-effective for large datasets.

Why this answer

SageMaker Processing with a Spark container allows distributed execution of one-hot encoding on high-cardinality categorical features across a managed cluster, scaling horizontally to handle over 100 million rows without manual infrastructure management. This approach is cost-effective as you pay only for the processing time, and it integrates natively with SageMaker for seamless data pipeline orchestration.

Exam trap

The trap here is that candidates often choose AWS Glue (Option D) assuming it is the most scalable serverless option, but SageMaker Processing with Spark is more cost-effective and purpose-built for ML feature engineering within the SageMaker ecosystem, avoiding Glue's higher per-DPU costs and slower job startup times for large datasets.

How to eliminate wrong answers

Option A is wrong because Amazon EMR with Spark and HDFS introduces additional overhead for cluster management and HDFS storage, which is less cost-effective and scalable compared to SageMaker Processing's serverless-like model, and HDFS is not as durable or cost-efficient as S3 for processed data. Option C is wrong because a SageMaker notebook instance with scikit-learn cannot perform one-hot encoding in memory on over 100 million rows due to memory constraints, leading to out-of-memory errors or excessive costs from a large instance. Option D is wrong because AWS Glue ETL jobs, while serverless, are optimized for schema-on-read and transformations but can be slower and more expensive for large-scale one-hot encoding of high-cardinality features due to its Spark-based runtime overhead and lack of fine-grained control over distributed encoding compared to SageMaker Processing.

812
MCQmedium

A data scientist is training a binary classifier to predict customer churn. The dataset has 10,000 samples, with 500 churners (positive class). The scientist trains a logistic regression model and obtains an F1-score of 0.6. To improve the F1-score, which approach is MOST likely to be effective?

A.Increase the regularization strength (C)
B.Apply PCA to reduce feature dimensionality
C.Apply SMOTE to oversample the minority class
D.Use the original dataset without any modification
AnswerC

SMOTE generates synthetic samples for the minority class, balancing the dataset and often improving F1-score.

Why this answer

The dataset is highly imbalanced (500 churners out of 10,000 samples, a 5% positive rate). Logistic regression trained on such imbalance tends to bias toward the majority class, resulting in low recall for the minority class and a poor F1-score. SMOTE (Synthetic Minority Oversampling Technique) generates synthetic samples for the minority class by interpolating between existing minority instances, which balances the class distribution and allows the model to learn a better decision boundary, directly improving recall and F1-score.

Exam trap

The MLS-C01 exam often tests the misconception that regularization (Option A) or dimensionality reduction (Option B) can fix class imbalance, when in fact they address overfitting and noise, not skewed class priors.

How to eliminate wrong answers

Option A is wrong because increasing regularization strength (C) reduces model complexity and can lead to underfitting, which typically worsens performance on imbalanced data by pushing the decision boundary further toward the majority class. Option B is wrong because PCA reduces dimensionality by projecting data onto principal components that maximize variance, but it does not address class imbalance; it may even discard discriminative information for the minority class. Option D is wrong because using the original dataset without modification ignores the severe class imbalance, and the logistic regression model will continue to predict the majority class for most samples, yielding a low F1-score.

813
MCQmedium

A company is using Amazon Kinesis Data Streams to ingest real-time clickstream data. The data must be transformed before being stored in Amazon S3. The transformations include enrichment with reference data from Amazon DynamoDB. Which AWS service should be used to perform the transformation with minimal operational overhead?

A.Amazon Kinesis Data Firehose with data transformation
B.AWS Lambda functions invoked by Kinesis Data Streams
C.Amazon Kinesis Data Analytics for Apache Flink
D.Amazon EMR with Apache Spark Streaming
AnswerC

Managed Flink application can perform complex transformations and enrichments with low operational overhead.

Why this answer

Amazon Kinesis Data Analytics for Apache Flink (Option C) is the correct choice because it provides a fully managed, stateful stream processing engine that can read directly from Kinesis Data Streams, enrich records with reference data from DynamoDB via Flink's Async I/O or JDBC connectors, and write the transformed data to S3—all without provisioning or managing any infrastructure. This minimizes operational overhead compared to self-managed solutions like EMR or Lambda-based architectures that require custom checkpointing and scaling logic.

Exam trap

The trap here is that candidates often choose Kinesis Data Firehose (Option A) because it directly integrates with S3 and DynamoDB via Lambda, but they overlook that Firehose cannot perform stateful joins or handle reference data enrichment at scale without complex custom code, whereas Kinesis Data Analytics for Apache Flink is purpose-built for exactly this pattern with minimal operational overhead.

How to eliminate wrong answers

Option A is wrong because Kinesis Data Firehose with data transformation uses Lambda functions for per-record transformations, but it cannot natively perform stateful operations like joining with DynamoDB reference data; it is designed for simple, stateless transformations and direct S3 delivery, not complex enrichment. Option B is wrong because AWS Lambda functions invoked by Kinesis Data Streams can handle per-record enrichment, but they require manual management of batch sizes, retries, and scaling, and they lack built-in support for stateful operations like windowed joins or exactly-once semantics, leading to higher operational overhead for complex transformations. Option D is wrong because Amazon EMR with Apache Spark Streaming introduces significant operational overhead for cluster provisioning, tuning, and maintenance, and is overkill for a stream enrichment use case that can be handled by a fully managed service like Kinesis Data Analytics.

814
MCQeasy

A company wants to use Amazon SageMaker to automatically tune hyperparameters for a XGBoost model. Which built-in SageMaker feature should be used?

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

This is the service for hyperparameter tuning.

Why this answer

SageMaker Automatic Model Tuning performs hyperparameter optimization. Option A (SageMaker Debugger) monitors training. Option B (SageMaker Model Monitor) detects drift.

Option C (SageMaker Experiments) tracks trials. Option D (SageMaker Automatic Model Tuning) correctly performs hyperparameter tuning.

815
MCQhard

A company uses Amazon EMR to run Spark jobs on a large dataset stored in Amazon S3. The jobs are failing with 'OutOfMemoryError' in the executors. The data is not skewed. Which configuration change will most likely resolve the issue?

A.Enable Kryo serialization
B.Decrease the number of shuffle partitions
C.Increase the spark.executor.memoryOverhead setting
D.Increase the number of executor cores
AnswerC

Memory overhead handles JVM overhead and off-heap memory, preventing OOM errors.

Why this answer

When Spark executors run out of memory during shuffle operations, the `spark.executor.memoryOverhead` setting is often the culprit. This parameter allocates off-heap memory for JVM overhead, internal metadata, and shuffle buffers. Increasing it provides more room for these operations without reducing the executor heap, directly addressing OutOfMemoryError in non-skewed data scenarios.

Exam trap

The trap here is that candidates often confuse executor memory (heap) with memoryOverhead (off-heap), assuming that increasing heap or reducing partitions will fix all OutOfMemoryErrors, when in fact shuffle-heavy workloads require explicit off-heap tuning.

How to eliminate wrong answers

Option A is wrong because Kryo serialization reduces memory used for object serialization but does not increase the total memory available to executors; it cannot resolve an OutOfMemoryError caused by insufficient off-heap or shuffle memory. Option B is wrong because decreasing the number of shuffle partitions reduces parallelism and can actually increase the memory pressure per partition, potentially worsening the OutOfMemoryError. Option D is wrong because increasing executor cores increases the number of concurrent tasks per executor, which consumes more memory per core and can exacerbate memory exhaustion rather than resolve it.

816
MCQmedium

A data scientist is performing exploratory data analysis on a dataset with both numerical and categorical features. The scientist wants to visualize the pairwise relationships between numerical features and also see the distribution of each feature. Which type of plot should the scientist use?

A.Pair plot (scatter matrix) with histograms on the diagonal.
B.Box plot for each feature.
C.Heatmap of the correlation matrix.
D.Correlation matrix with numbers.
AnswerA

Correct. Pair plots display scatter plots for every pair of numerical features and histograms on the diagonal to show each feature's distribution.

Why this answer

A pair plot (scatter matrix) shows pairwise scatter plots for numerical features and histograms on the diagonal for distribution of each feature. Option B is incorrect because a box plot shows distribution of a single feature, not pairwise relationships. Option C is incorrect because a heatmap of the correlation matrix shows only correlation values, not distributions or actual data points.

Option D is incorrect because a correlation matrix with numbers only shows correlation coefficients, not individual feature distributions or pairwise scatter patterns.

817
MCQeasy

A data scientist needs to profile a large dataset in Amazon S3 to understand its schema, data types, and quality. Which AWS service can automatically generate a data profile with statistics and visualizations?

A.Amazon Athena
B.AWS Glue DataBrew
C.Amazon QuickSight
D.Amazon Redshift
AnswerB

DataBrew can profile data and generate statistics.

Why this answer

AWS Glue DataBrew provides data profiling capabilities, automatically generating a data profile with statistics and visualizations. Option A (Amazon Athena) is an interactive query service for analyzing data in S3 using standard SQL, but it does not generate data profiles. Option C (Amazon QuickSight) is a business analytics service for creating visualizations and dashboards, but it does not profile data automatically.

Option D (Amazon Redshift) is a data warehouse, not a data profiling service.

818
MCQeasy

A data scientist wants to visualize the correlation between a continuous feature and a binary target variable. Which plot is most appropriate?

A.Scatter plot with feature on x-axis and target on y-axis
B.Histogram of the feature
C.Box plot of the feature grouped by target class
D.Bar chart of target class counts
AnswerC

Box plot compares distributions across two groups.

Why this answer

A box plot displays the distribution of the continuous feature for each category of the binary target, allowing easy comparison of medians, spreads, and outliers. This reveals correlation: if the distributions differ notably between classes, the feature is likely correlated with the target. Option A is wrong because a scatter plot is typically used for two continuous variables, not a binary target.

Option B is wrong because a histogram shows the distribution of a single continuous variable, ignoring the target. Option D is wrong because a bar chart of target class counts only shows class frequency, not the relationship with the feature.

819
MCQmedium

A data scientist is working on a regression problem to predict house prices. The dataset has 80 features, including categorical variables with high cardinality (e.g., zip code with 10,000 unique values). The target variable is log-transformed. The data scientist trains a linear regression model and obtains an R² of 0.45 on the test set. To improve performance, the data scientist considers: A) Applying one-hot encoding to all categorical features and using Ridge regression. B) Using target encoding for high-cardinality features and using a tree-based model like XGBoost. C) Removing all categorical features and using polynomial features for numerical features. D) Using principal component analysis (PCA) on all features before training a linear model. Which approach is MOST likely to improve the model's performance?

A.Remove categorical features and use polynomial features
B.Target encoding + XGBoost
C.One-hot encoding + Ridge regression
D.PCA on all features before linear regression
AnswerB

Target encoding reduces dimensionality and XGBoost captures complex patterns.

Why this answer

Target encoding efficiently handles high-cardinality features, and tree-based models like XGBoost can capture non-linear relationships and interactions, likely improving R². One-hot encoding would create too many features, causing sparsity. Removing categories loses information.

PCA may discard important information.

820
Multi-Selecteasy

A data scientist is evaluating a binary classification model. The model's AUC-ROC is 0.95. Which TWO statements are true?

Select 2 answers
A.The model has no false positives
B.The model has excellent discriminative ability
C.The model's performance is independent of the decision threshold
D.The model is well-calibrated
E.The model's accuracy is at least 95%
AnswersB, C

AUC close to 1 indicates strong separation between classes.

Why this answer

AUC-ROC measures the model's ability to distinguish between classes across all thresholds. A high AUC (close to 1) indicates good performance. AUC-ROC is threshold-independent.

It does not directly indicate accuracy or calibration.

821
MCQmedium

A data engineering team is building a pipeline to process terabytes of log data daily using Amazon EMR with Spark. The data arrives in hourly batches and must be processed within 4 hours. The team needs to minimize cost. Which cluster configuration is MOST cost-effective?

A.Use a single large instance with multiple cores to avoid data shuffling.
B.Use a transient cluster with a mix of on-demand and spot instances, terminated after the job completes.
C.Use a long-running cluster of on-demand instances to avoid startup time.
D.Use Amazon EMR Serverless to automatically scale.
AnswerB

Transient clusters reduce idle cost, spot instances lower compute cost.

Why this answer

A transient cluster with a mix of on-demand and spot instances minimizes cost for batch workloads that have a defined lifecycle. Spot instances offer significant discounts (up to 90%) for fault-tolerant Spark jobs, and terminating the cluster after processing eliminates idle compute charges. This approach aligns with the 4-hour processing window and hourly batch arrival, as EMR can provision and tear down clusters quickly.

Exam trap

The trap here is that candidates overestimate the cost savings of EMR Serverless or long-running clusters, failing to recognize that transient spot-based clusters are the most cost-effective for fixed-window batch processing due to zero idle time and spot pricing discounts.

How to eliminate wrong answers

Option A is wrong because a single large instance creates a single point of failure and cannot horizontally scale to process terabytes of data within 4 hours; Spark relies on distributed parallelism across multiple nodes, and avoiding shuffles is not a cost optimization strategy. Option C is wrong because a long-running cluster of on-demand instances incurs continuous costs for idle time between hourly batches, wasting resources when no processing is needed. Option D is wrong because Amazon EMR Serverless, while autoscaling, typically incurs higher per-unit costs for sustained batch workloads compared to transient clusters with spot instances, and it lacks the fine-grained cost control of spot pricing.

822
Multi-Selectmedium

A data scientist is training a linear regression model on a dataset with 10 numerical features. After training, the model's R-squared value is 0.99 on the training set but only 0.60 on the test set. Which TWO of the following are appropriate actions to reduce overfitting? (Choose TWO.)

Select 2 answers
A.Normalize the features
B.Add more features to the model
C.Use a subset of the most important features
D.Increase the number of training epochs
E.Apply L2 regularization (Ridge regression)
AnswersC, E

Reducing the number of features reduces model complexity and overfitting.

Why this answer

Regularization (L1 or L2) penalizes large coefficients and reduces overfitting. Reducing model complexity by using fewer features or simplifying the model also helps. Adding more features would increase complexity and overfitting.

Increasing the number of epochs is not relevant for linear regression (which has a closed-form solution).

823
Multi-Selecteasy

Which TWO actions are valid ways to handle missing data in a dataset before training a machine learning model? (Select TWO.)

Select 2 answers
A.Delete rows with missing values
B.Remove all features that have any missing values
C.Replace missing values with the maximum value
D.Ignore missing values and train the model
E.Impute missing values with the mean
AnswersA, E

Row deletion is valid if missingness is random.

Why this answer

Deleting rows with missing values (listwise deletion) is a straightforward and valid approach when the missing data is random and the dataset is large enough that the loss of rows does not significantly reduce statistical power or introduce bias. This method avoids the need to estimate missing values and is commonly used in practice when the proportion of missing data is low.

Exam trap

The MLS-C01 exam often tests the misconception that 'ignoring missing values' is acceptable because some algorithms like tree-based models can technically handle missing values internally, but the exam expects explicit data preprocessing steps as part of the modeling pipeline.

824
MCQmedium

A company is preparing a dataset for training a binary classification model. The dataset has a severe class imbalance (1% positive class). The data scientist wants to understand the impact of this imbalance on model performance before sampling. Which exploratory analysis step is MOST critical?

A.Compute the correlation matrix of all features with the target variable.
B.Check for missing values and outliers in the dataset.
C.Perform PCA and visualize the first two principal components colored by class.
D.Plot the distribution of each feature separately for the positive and negative classes.
AnswerD

Overlapping distributions indicate difficulty in classification.

Why this answer

The most critical step because plotting the distribution of each feature separately for the positive and negative classes allows the data scientist to visually assess class separability, overlap, and feature behavior under severe imbalance. This insight directly informs the impact of imbalance on model performance before any sampling. Options A, B, and C are less critical at this stage: correlation with the target (A) does not reveal class-level distributions; missing values and outliers (B) are important but not specific to understanding imbalance impact; PCA (C) is a dimensionality reduction technique that may obscure per-feature patterns and is not necessary for initial exploratory analysis of class distributions.

825
MCQmedium

A company uses Amazon SageMaker to train a time-series forecasting model using the built-in DeepAR algorithm. The training data consists of daily sales for 1000 products over 2 years. The model performs well on most products, but for a few products with intermittent demand (sporadic sales), the predictions are poor. Which action should the data scientist take to improve predictions for these products?

A.Create a separate forecasting model specifically for intermittent demand products, using a model designed for such patterns (e.g., Croston's method).
B.Use a linear regression model for all products.
C.Increase the context length of the DeepAR model to capture longer history.
D.Add more training data by including additional product categories.
AnswerA

Intermittent demand requires specialized models like Croston's method or TSB.

Why this answer

Intermittent demand patterns (sporadic sales) require specialized models like Croston's method, which are designed to handle non-continuous demand. Option B is wrong because a simple linear regression model cannot capture the irregular spikes of intermittent demand; such models assume continuous, steady patterns. Option C is wrong because increasing the context length of DeepAR, which is built for regular time series, does not address the fundamental issue of sporadic demand—the model still expects continuous values.

Option D is wrong because adding unrelated product categories introduces noise and does not help the model learn the specific intermittent pattern of the target products.

Page 10

Page 11 of 23

Page 12