Courseiva

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

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

Page 21

Page 22 of 23

Page 23
1576
MCQmedium

A data scientist is exploring log files stored in S3. They ran the above AWS CLI command. What does the output indicate about the data, and what EDA step should be taken next?

A.All log files are about 150KB-200KB in size.
B.There are 3 objects in the bucket under the prefix.
C.There are 3 log files larger than 100KB in the specified prefix.
D.The prefix 'logs/2023/' contains exactly 3 objects.
AnswerC

The command filters by size >100000 bytes and returns keys and sizes.

Why this answer

The command `aws s3api list-objects-v2 --bucket <bucket> --prefix logs/2023/ --query 'Contents[?Size > `100000`].[Key,Size]' --output text` lists objects under the specified prefix with a size greater than 100000 bytes (≈100 KB). The output shows three objects, indicating there are three log files larger than 100 KB. Option A is incorrect because the output does not provide exact size ranges (e.g., 150KB-200KB); it only indicates files exceeding 100 KB.

Option B is incorrect because the command filters by size, so it does not count all objects in the bucket under the prefix. Option D is incorrect because it states the prefix contains exactly three objects, but the command only returns objects larger than the threshold; there may be additional smaller objects not shown.

1577
MCQmedium

A data science team is using Amazon SageMaker to train a deep learning model for object detection using the built-in SSD algorithm. The dataset consists of 100,000 labeled images stored in a SageMaker Pipe Mode input. The training job uses a single ml.p3.2xlarge instance. After 2 hours, the training job fails with the error 'ResourceLimitExceeded: The account-level service limit for ml.p3.2xlarge for training job usage is 1. Contact AWS Support to request a limit increase'. However, the team has already submitted a limit increase request and it was approved for 5 instances. What is the most likely cause of the error?

A.The instance is running out of GPU memory
B.The built-in SSD algorithm requires a GPU instance type with at least 16 GB of GPU memory
C.The service limit increase has not yet been applied to the account in the current region
D.The IAM role does not have permission to access the S3 bucket for model artifacts
AnswerC

The limit increase may not have been applied yet in the region, causing the 'ResourceLimitExceeded' error even though the increase was approved.

Why this answer

The error 'ResourceLimitExceeded' indicates that the account's service limit for ml.p3.2xlarge training instances has been exceeded. Even though the team requested and received approval for a limit increase to 5 instances, the increase may not have taken effect yet in the current region. AWS service limit increases are applied per region, and there can be a propagation delay after approval.

Option A (GPU memory) would cause a different error such as 'OutOfMemory'. Option B (algorithm requirement) is unrelated because the SSD algorithm does run on the chosen instance. Option D (S3 permissions) would result in an 'AccessDenied' error, not a limit error.

Therefore, option C is the correct answer.

1578
MCQmedium

A data scientist is using Amazon SageMaker to train a deep learning model on a large dataset stored in S3. The training job is taking too long. The data scientist wants to reduce training time without changing the model architecture. Which action should they take?

A.Use Pipe mode for data input
B.Use a smaller instance type
C.Increase the number of epochs
D.Decrease the batch size
AnswerA

Pipe mode streams data, reducing download time.

Why this answer

Using Pipe mode streams training data directly from S3 without first downloading it to the instance's local storage, significantly reducing I/O time and therefore overall training time. Option A is correct. Option B is incorrect because using a smaller instance type reduces compute capacity, which would likely increase training time.

Option C is incorrect because increasing the number of epochs would increase training time, not decrease it. Option D is incorrect because decreasing the batch size typically results in more gradient updates per epoch, which can increase training time.

1579
MCQmedium

A training job fails with the error shown. The training script expects a file named 'train.csv' in the 'training' channel. What is the most likely cause?

A.The 'train.csv' file is located inside a subfolder within 's3://my-bucket/data/', and the script expects it directly in the channel path.
B.The S3 bucket policy denies access to the 'train.csv' file.
C.The channel name in the input data configuration does not match the script's expected channel name.
D.The training script has a bug that prevents it from reading the file.
AnswerA

SageMaker downloads the entire S3 prefix; if the file is nested, it may not be at the expected location.

Why this answer

The error indicates that the training script cannot find 'train.csv' in the expected location. When SageMaker copies data from an S3 channel path (e.g., 's3://my-bucket/data/') to the training instance, it places the contents of that S3 prefix directly into the channel directory (e.g., '/opt/ml/input/data/training/'). If the CSV file is inside a subfolder (e.g., 's3://my-bucket/data/subfolder/train.csv'), the script will not find it at the top level of the channel path, causing a 'file not found' error.

Exam trap

The MLS-C01 exam often tests the distinction between S3 prefix behavior and file location expectations, trapping candidates who assume SageMaker automatically searches subdirectories or flattens the S3 structure.

How to eliminate wrong answers

Option B is wrong because an S3 bucket policy denying access would produce a different error (e.g., 'AccessDenied' or '403 Forbidden'), not a 'file not found' error from the training script. Option C is wrong because the error message does not mention a channel name mismatch; such a mismatch would cause SageMaker to fail to mount the channel, resulting in a different error during the job setup phase. Option D is wrong because the error is specifically about a missing file, not a runtime bug in the script's reading logic; a bug would typically produce a Python traceback or parsing error, not a 'file not found' error.

1580
Multi-Selecteasy

A company needs to move 50 TB of data from an on-premises data center to Amazon S3. The company has a limited internet bandwidth of 100 Mbps. The data transfer must be completed within 10 days. Which TWO services should the company use together to meet these requirements?

Select 2 answers
A.Amazon S3 as the destination
B.AWS Direct Connect
C.AWS Site-to-Site VPN
D.AWS Snowball Edge
E.AWS DataSync over the internet
AnswersA, D

Data is ultimately stored in S3.

Why this answer

The correct answers are A (Amazon S3 as the destination) and D (AWS Snowball Edge). The company needs to transfer 50 TB within 10 days, but with only 100 Mbps bandwidth, only about 10.8 TB can be transferred over the internet in that time. Therefore, a physical transfer solution like AWS Snowball Edge is required to move the data offline to S3.

Option B (AWS Direct Connect) is incorrect because even though it provides a dedicated connection, it still requires time to provision and would not be able to transfer 50 TB within 10 days if the bandwidth is limited to 100 Mbps (or even higher, Snowball is more practical for such large data). Option C (AWS Site-to-Site VPN) is incorrect because it also uses the internet and is subject to the same bandwidth limitations. Option E (AWS DataSync over the internet) is incorrect because it is also limited by the 100 Mbps bandwidth and cannot complete the transfer within 10 days.

1581
MCQmedium

A company is using Amazon SageMaker to deploy a model for real-time inference. The model has a latency requirement of less than 100 milliseconds. During testing, the latency is around 150 milliseconds. Which action can most likely reduce the latency to meet the requirement?

A.Reduce the batch size for inference.
B.Enable data capture for the endpoint.
C.Increase the initial variant weight for the production variant.
D.Use a larger instance type for the endpoint.
AnswerD

A larger instance type provides more compute resources, reducing inference latency.

Why this answer

Enabling data capture adds overhead and increases latency. Using a larger instance type would provide more compute and reduce latency, but may increase cost. Reducing the batch size for inference (if batching is used) can reduce latency because the model processes fewer requests at once.

However, the question implies a real-time endpoint which typically processes one request at a time; batch size might be 1. Increasing the variant weight for the production variant is for traffic routing, not latency. The most direct is to use a more powerful instance type.

But also consider that increasing batch size (if using multi-record) increases latency. Reducing batch size reduces latency. However, for a real-time endpoint, the instance type is key.

I'll go with using a larger instance type.

1582
MCQhard

A company is deploying a machine learning model for real-time fraud detection. The model must have low latency (under 100 ms) and high throughput. The data scientist trains a gradient boosting model and deploys it to a SageMaker endpoint with a single ml.c5.xlarge instance. During load testing, the endpoint exceeds the latency threshold. Which change is MOST likely to reduce latency?

A.Replace the model with a simpler model, such as logistic regression
B.Use a larger instance type, such as ml.c5.4xlarge
C.Switch to batch transform for inference
D.Enable automatic scaling on the endpoint
AnswerA

A simpler model has lower inference latency, meeting the 100 ms requirement.

Why this answer

Replacing the gradient boosting model with a simpler model like logistic regression reduces the computational complexity per inference. Gradient boosting involves traversing many decision trees, each requiring multiple conditional checks and arithmetic operations, while logistic regression is a single linear transformation. This directly lowers CPU utilization per request, reducing latency under the same instance resources.

Exam trap

The trap here is that candidates often assume scaling up instance size or adding automatic scaling will fix latency, but latency is a per-request metric that depends on model complexity, not just infrastructure parallelism or throughput.

How to eliminate wrong answers

Option B is wrong because using a larger instance type (ml.c5.4xlarge) increases available vCPUs and memory, but the bottleneck is likely per-request computation time, not parallelism; a larger instance may improve throughput but does not guarantee per-request latency drops below 100 ms if the model itself is computationally heavy. Option C is wrong because batch transform is designed for offline, asynchronous inference on large datasets, not real-time low-latency serving; switching to batch transform would increase latency dramatically (minutes vs milliseconds) and violate the real-time requirement. Option D is wrong because automatic scaling adjusts the number of instances based on traffic, which helps with throughput under varying load but does not reduce the per-request latency of a single inference; scaling adds more endpoints but each individual request still faces the same model computation time.

1583
MCQhard

A company is using Amazon Redshift for data warehousing. The data engineering team notices that queries are slow and the system is frequently writing to disk due to insufficient memory. Which type of workload management (WLM) configuration change would help reduce disk writes?

A.Increase the number of query concurrency slots.
B.Increase the memory percentage allocated to the WLM queue.
C.Enable query monitoring rules to abort queries that spill to disk.
D.Enable short query acceleration (SQA).
AnswerB

More memory per query reduces disk spill.

Why this answer

When queries spill to disk in Amazon Redshift, it indicates that the memory allocated to the WLM queue is insufficient for the workload. Increasing the memory percentage for the queue allows more queries to be processed in memory, reducing the need to write intermediate results to disk and improving query performance.

Exam trap

The trap here is that candidates often confuse increasing concurrency (Option A) with improving performance, not realizing that higher concurrency reduces per-query memory and increases disk spills, making the problem worse.

How to eliminate wrong answers

Option A is wrong because increasing the number of query concurrency slots actually reduces the memory available per slot, which can increase disk spills and worsen performance. Option C is wrong because query monitoring rules that abort queries spilling to disk do not reduce disk writes; they simply terminate the queries, which is a reactive measure and does not address the underlying memory shortage. Option D is wrong because short query acceleration (SQA) prioritizes short-running queries but does not increase memory allocation or directly reduce disk spills for memory-intensive queries.

1584
MCQeasy

A data scientist needs to evaluate a binary classification model. The dataset is balanced. Which metric is most appropriate to compare model performance?

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

For balanced classes, accuracy is a straightforward metric.

Why this answer

For a balanced binary classification dataset, accuracy is the most appropriate metric because it directly measures the proportion of correct predictions (true positives and true negatives) out of all predictions. Since the class distribution is equal, accuracy is not misleadingly high due to class imbalance, making it a reliable and straightforward measure of overall model performance.

Exam trap

AWS often tests the misconception that F1 score or precision-recall metrics are always superior, but for balanced datasets, accuracy is the simplest and most appropriate metric, and candidates may overlook this by defaulting to imbalance-focused metrics.

How to eliminate wrong answers

Option A is wrong because recall focuses only on true positives relative to actual positives, ignoring true negatives and thus not capturing overall performance on a balanced dataset. Option B is wrong because the F1 score is the harmonic mean of precision and recall, which is more useful when there is class imbalance; for a balanced dataset, accuracy is simpler and equally informative. Option C is wrong because precision only considers true positives relative to predicted positives, neglecting true negatives and overall correctness, which is insufficient for balanced data.

1585
MCQmedium

A data engineer needs to design a data pipeline that ingests CSV files from an SFTP server daily, transforms them, and loads them into Amazon Redshift. The files are typically 2-3 GB. Which combination of AWS services is MOST appropriate?

A.Use AWS Glue ETL with a JDBC connection to the SFTP server to read files directly.
B.Use AWS Lambda to download the files from SFTP, transform them in memory, and write to Redshift using the Data API.
C.Use AWS Transfer Family to automate SFTP file retrieval to S3, then use Redshift COPY to load data.
D.Use Amazon Kinesis Data Firehose with an HTTP endpoint source to receive files from SFTP.
AnswerC

Transfer Family handles SFTP natively, and COPY loads data efficiently into Redshift.

Why this answer

The most appropriate because AWS Transfer Family provides a fully managed, serverless solution for automating SFTP file retrieval directly into Amazon S3. Once the CSV files are in S3, the Redshift COPY command can efficiently load the 2-3 GB files using parallel processing, which is far more performant and cost-effective than alternatives like Lambda or Glue for large file sizes.

Exam trap

The trap here is that candidates may assume AWS Glue or Lambda can handle SFTP directly, but they lack native SFTP support and are not designed for large file transfers, while AWS Transfer Family is purpose-built for this exact use case.

How to eliminate wrong answers

Option A is wrong because AWS Glue ETL with a JDBC connection to an SFTP server is not a supported pattern; JDBC is for relational databases, not file transfer protocols like SFTP (which uses SSH). Option B is wrong because AWS Lambda has a maximum execution timeout of 15 minutes and a 10 GB memory limit, making it unsuitable for transforming 2-3 GB files in memory, and the Redshift Data API is designed for small queries, not bulk data loading. Option D is wrong because Amazon Kinesis Data Firehose with an HTTP endpoint source expects streaming data via HTTP POST, not batch file retrieval from an SFTP server, and it cannot natively connect to SFTP.

1586
MCQmedium

A company is deploying a real-time inference endpoint using Amazon SageMaker. The model is a large deep learning model that requires low latency. The team is concerned about cost. Which SageMaker hosting option should the team use?

A.Use a SageMaker batch transform job.
B.Use a SageMaker Serverless Inference endpoint.
C.Use a single-instance endpoint with a large instance type.
D.Use a SageMaker multi-model endpoint.
AnswerD

Multi-model endpoints share resources and reduce cost per model.

Why this answer

A SageMaker multi-model endpoint allows you to host multiple models on a single endpoint behind the same serving container, sharing resources and reducing costs while still providing low-latency real-time inference. This is ideal for a large deep learning model that needs low latency but must be cost-effective, as it avoids the expense of dedicated instances for each model.

Exam trap

The trap here is that candidates often confuse 'low latency' with 'dedicated resources' and choose a single-instance endpoint (Option C), overlooking that multi-model endpoints can achieve low latency through caching and shared infrastructure while significantly reducing cost.

How to eliminate wrong answers

Option A is wrong because SageMaker batch transform jobs are designed for offline, asynchronous inference on large datasets, not for real-time inference with low latency. Option B is wrong because SageMaker Serverless Inference endpoints automatically scale to zero when idle, but they can introduce cold start latency that violates the low-latency requirement for a large deep learning model. Option C is wrong because using a single-instance endpoint with a large instance type may provide low latency but is not cost-effective, as it dedicates expensive resources to a single model without sharing, leading to higher costs.

1587
MCQeasy

An ML team wants to perform batch inference on a large dataset stored in Amazon S3 using a pre-trained model. The team needs to process the data in parallel across multiple instances to reduce processing time. Which approach should they use?

A.Use SageMaker Processing to run a custom inference script.
B.Use SageMaker Batch Transform with multiple instances.
C.Use SageMaker Training to run inference as a training job.
D.Use SageMaker Ground Truth to process the data.
AnswerB

Batch Transform splits the input data and runs inference in parallel.

Why this answer

SageMaker Batch Transform is designed specifically for batch inference on large datasets stored in Amazon S3. It automatically distributes the data across multiple instances, processes them in parallel, and writes the results back to S3, making it the optimal choice for reducing processing time.

Exam trap

The trap here is that candidates often confuse SageMaker Processing (which sounds like it could handle inference) with Batch Transform, but Processing is strictly for data transformation, not model inference.

How to eliminate wrong answers

Option A is wrong because SageMaker Processing is intended for data preprocessing, feature engineering, and validation tasks, not for running inference with a pre-trained model. Option C is wrong because SageMaker Training is designed for model training, not inference; using it for inference would be inefficient and misuse the service. Option D is wrong because SageMaker Ground Truth is a data labeling service for creating training datasets, not for batch inference.

1588
Multi-Selectmedium

Which TWO options are best practices for training machine learning models using SageMaker? (Choose TWO.)

Select 2 answers
A.Train the final model on the combined training and test sets to maximize data usage
B.Use incremental training when you have new data that is similar to the original training data
C.Use SageMaker Managed Spot Training to reduce training costs
D.Always use the largest possible instance type to minimize training time
E.Always enable checkpointing to save the model after every epoch
AnswersB, C

Incremental training saves time by starting from an existing model.

Why this answer

SageMaker's incremental training allows you to continue training an existing model with new data that shares the same schema and feature space, without retraining from scratch. This is a best practice when you have a steady stream of similar data, as it saves time and compute resources while preserving previously learned patterns.

Exam trap

The MLS-C01 exam often tests the misconception that 'more data is always better' (Option A) or that 'bigger instances are always faster' (Option D), when in reality best practices prioritize data integrity, cost efficiency, and appropriate resource scaling.

1589
MCQmedium

A team uses SageMaker to train a deep learning model. They notice the training job is using only a fraction of the GPU memory. Which configuration change would most improve GPU utilization?

A.Increase the batch size in the training script
B.Decrease the batch size to reduce memory fragmentation
C.Use a single GPU instead of multiple GPUs
D.Enable SageMaker Managed Spot Training
AnswerA

Larger batch sizes consume more GPU memory and improve utilization.

Why this answer

Increasing the batch size allows each training step to process more data samples simultaneously, which increases the computational load per step and better saturates the GPU's parallel processing units. This directly improves GPU memory utilization because larger batches keep more tensors resident in memory and increase the arithmetic intensity of matrix operations, reducing idle time.

Exam trap

The trap here is that candidates confuse memory fragmentation (which is a memory allocation issue) with overall utilization, and incorrectly assume reducing batch size will fix fragmentation when the real problem is underutilization due to insufficient computational load.

How to eliminate wrong answers

Option B is wrong because decreasing the batch size reduces the amount of data processed per step, which actually lowers GPU utilization by leaving memory underfilled and increasing the frequency of kernel launches relative to computation. Option C is wrong because using a single GPU instead of multiple GPUs does not address low per-GPU memory utilization; it may even worsen the problem by removing the opportunity to distribute batches across devices. Option D is wrong because SageMaker Managed Spot Training only affects cost and instance availability by using preemptible EC2 Spot instances; it has no impact on GPU memory utilization or training script configuration.

1590
MCQmedium

A company is using Amazon SageMaker to train a model. The training job is using a large dataset stored in S3. The data scientist notices that the training job is spending a significant amount of time reading data from S3. Which approach would BEST reduce data loading time?

A.Use the Pipe mode input for the training data
B.Use the File mode input with a larger instance
C.Use a larger training instance with more CPU
D.Increase the batch size to reduce the number of batches
AnswerA

Pipe mode streams data directly from S3 into the training container without first downloading it to the local disk, eliminating the I/O bottleneck caused by reading large datasets into memory before training begins. This satisfies the stem’s constraint of reducing the significant time spent on data loading, as the model processes data on-the-fly rather than waiting for full file downloads.

Why this answer

Pipe mode streams data directly from S3 into the training algorithm without first downloading it to the training instance's local storage. This eliminates the I/O bottleneck of writing large datasets to disk, significantly reducing data loading time compared to File mode, which downloads the entire dataset before training begins.

Exam trap

The trap here is that candidates often confuse 'batch size' with data loading performance, or assume that more CPU/instance size will speed up S3 reads, when in fact the bottleneck is the network and disk I/O, not compute.

How to eliminate wrong answers

Option B is wrong because File mode requires the entire dataset to be downloaded to the instance's local disk before training starts, which adds significant latency and does not address the root cause of slow S3 reads. Option C is wrong because a larger instance with more CPU does not reduce the time spent reading data from S3; the bottleneck is network I/O and S3 request latency, not compute capacity. Option D is wrong because increasing batch size only affects the number of forward/backward passes per epoch, not the time spent loading data from S3; the data must still be read in its entirety.

1591
MCQhard

A data scientist is using SageMaker to train an XGBoost model for regression. The training data contains categorical features with high cardinality (e.g., zip code with over 10,000 unique values). Which feature engineering approach is MOST appropriate to avoid overfitting while preserving predictive power?

A.Use target encoding with smoothing
B.One-hot encode the categorical features
C.Apply frequency encoding based on category occurrence
D.Label encode the categorical features
AnswerA

Target encoding captures category-target relationship with regularization to avoid overfitting.

Why this answer

Target encoding with smoothing is the most appropriate approach because it replaces each high-cardinality category with the mean of the target variable for that category, regularized by a smoothing factor that pulls estimates toward the global mean. This preserves predictive power by capturing the relationship between the category and the target while preventing overfitting on rare categories that have few samples. In SageMaker XGBoost, this avoids the curse of dimensionality from one-hot encoding and the arbitrary ordering from label encoding.

Exam trap

The trap here is that candidates often default to one-hot encoding for categorical features, not realizing that high cardinality makes it computationally infeasible and prone to overfitting, while target encoding with smoothing offers a compact and powerful alternative.

How to eliminate wrong answers

Option B is wrong because one-hot encoding a feature with over 10,000 unique values would create over 10,000 binary columns, drastically increasing dimensionality and memory usage, which leads to overfitting and poor generalization in tree-based models like XGBoost. Option C is wrong because frequency encoding replaces categories with their occurrence counts, which loses the relationship between the category and the target variable, often reducing predictive power and introducing bias toward frequent categories. Option D is wrong because label encoding assigns arbitrary integer labels to categories, which implies an ordinal relationship that does not exist, misleading the XGBoost model into treating the feature as ordered and potentially causing poor splits.

1592
MCQhard

A machine learning engineer is deploying a model for real-time inference using Amazon SageMaker. The model is a large ensemble that requires 8 GB of memory and 4 vCPUs. The expected traffic is 100 requests per second with a 200 ms latency requirement. Which instance configuration should they choose?

A.ml.t2.medium (2 vCPU, 4 GB)
B.ml.c5.2xlarge (8 vCPU, 16 GB)
C.ml.p3.2xlarge (8 vCPU, 61 GB GPU)
D.ml.m5.large (2 vCPU, 8 GB)
AnswerB

Adequate memory and vCPUs for the workload.

Why this answer

(ml.c5.2xlarge) is correct because it offers 8 vCPUs and 16 GB memory, meeting both the compute and memory requirements while being cost-effective for CPU-based inference. Option A (ml.t2.medium) is wrong because it has only 2 vCPUs and 4 GB, insufficient for the 8 GB memory need. Option C (ml.p3.2xlarge) is wrong because it includes a GPU, which is unnecessary and overkill for this CPU-bound workload, and costs more.

Option D (ml.m5.large) is wrong because it has only 2 vCPUs and 8 GB memory, lacking the required vCPUs and barely meeting memory.

1593
Multi-Selecthard

Which THREE techniques are commonly used to detect multicollinearity in a dataset during exploratory data analysis?

Select 3 answers
A.Heatmap of missing values
B.Eigenvalue analysis from PCA
C.Correlation matrix
D.Variance Inflation Factor (VIF)
E.Scatter matrix of all features
AnswersB, C, D

Near-zero eigenvalues indicate linear dependencies.

Why this answer

Options B, C, and D are correct. B: Eigenvalue analysis from PCA can detect multicollinearity; if some eigenvalues are near zero, it indicates high multicollinearity. C: Correlation matrix shows pairwise correlations between features; high correlation coefficients (e.g., >0.8) indicate collinearity.

D: Variance Inflation Factor (VIF) quantifies how much a feature's variance is inflated due to multicollinearity; VIF >10 is often considered problematic. Option A is incorrect because a heatmap of missing values visualizes missing data, not relationships between features. Option E is incorrect because a scatter matrix shows pairwise scatter plots, which can reveal linear relationships but is not a quantitative measure for multicollinearity.

1594
MCQhard

A machine learning engineer is training a model using Amazon SageMaker. The training data is stored in S3 and is 10 TB. The engineer wants to use Pipe input mode to stream data from S3. Which algorithms support Pipe mode? (Select all that apply)

A.Amazon SageMaker Linear Learner
B.Amazon SageMaker K-Means
C.Amazon SageMaker XGBoost
D.Amazon SageMaker PCA
AnswerA, B, C, D

Amazon SageMaker Linear Learner supports Pipe mode for streaming training data.

Why this answer

Amazon SageMaker's built-in algorithms, including Linear Learner, K-Means, XGBoost, and PCA, all support Pipe mode for streaming training data from S3. Therefore, all the listed options (A, B, C, D) are correct.

1595
Multi-Selecthard

A company uses Amazon SageMaker to train a deep learning model using TensorFlow. The training job is failing with an 'OutOfMemory' error. The instance type is ml.p3.2xlarge with 16 GB GPU memory. The model has 10 million parameters. Which THREE actions should be taken to resolve the memory issue? (Choose THREE.)

Select 3 answers
A.Reduce the batch size
B.Increase the number of epochs
C.Enable mixed precision training
D.Increase the batch size
E.Use gradient accumulation
AnswersA, C, E

Smaller batch size directly reduces memory usage.

Why this answer

Reducing the batch size directly decreases the memory footprint per training step because fewer samples are loaded into GPU memory simultaneously. With 10 million parameters and 16 GB GPU memory, the default batch size may exceed available memory for activations and gradients. This is the most straightforward fix for an OutOfMemory error in TensorFlow on SageMaker.

Exam trap

The trap here is that candidates may confuse 'increasing epochs' with reducing memory load, or think that increasing batch size helps convergence, when in fact it exacerbates the memory issue.

1596
MCQeasy

A data scientist needs to run a one-time SQL query on a large dataset in S3 to create a training dataset. The query involves aggregations and joins. Which service is most suitable?

A.AWS Glue ETL job
B.Amazon Athena
C.Amazon EMR with Spark SQL
D.Amazon RDS with data loaded into it
AnswerB

Amazon Athena is serverless and optimized for querying data in S3 using standard SQL, making it suitable for this use case.

Why this answer

Amazon Athena is the correct choice because it is a serverless service that allows running SQL queries directly on data stored in S3, ideal for one-time ad-hoc queries with aggregations and joins. Option A (AWS Glue ETL) is designed for scheduled ETL jobs, not ad-hoc queries. Option C (Amazon EMR with Spark SQL) provides powerful processing but is overkill and requires cluster management.

Option D (Amazon RDS) would require moving data into a database, which is inefficient.

1597
MCQmedium

A data scientist uses SageMaker to train a model. The training job takes 10 hours, but the team needs to reduce costs. Which approach is MOST cost-effective?

A.Enable Managed Spot Training
B.Use SageMaker Automatic Model Tuning
C.Use a larger instance type to finish faster
D.Use SageMaker Distributed Training with more instances
AnswerA

Spot instances offer significant discounts, reducing cost.

Why this answer

Managed Spot Training leverages Amazon EC2 Spot Instances, which offer spare compute capacity at up to 90% discount compared to On-Demand instances. This makes it the most cost-effective approach for reducing training costs. Option A is correct.

Option B (using Automatic Model Tuning) is designed for hyperparameter optimization, not cost reduction, and may increase cost due to additional training jobs. Option C (using a larger instance type) finishes faster but at a higher per-hour cost, potentially increasing total cost. Option D (using Distributed Training with more instances) increases resource usage and cost, though it may reduce training time.

1598
MCQeasy

A team is using Amazon SageMaker to train a linear regression model on a dataset with 10 features. After training, they notice the model has high bias. Which action is MOST likely to reduce bias?

A.Increase the regularization parameter lambda
B.Add L2 regularization
C.Use a smaller training dataset
D.Add polynomial features to capture non-linear relationships
AnswerD

Adding features increases model complexity, reducing bias.

Why this answer

High bias indicates underfitting, which can be reduced by adding more features or increasing model complexity. Option A reduces risk of overfitting, not bias. Option B increases regularization, which increases bias.

Option C reduces data, potentially increasing bias.

1599
MCQhard

An e-commerce company uses Amazon DynamoDB as the primary data store for user sessions. They want to run analytics on historical session data using Amazon Athena. What is the recommended approach to export DynamoDB data to S3 in a format optimized for Athena?

A.Use AWS Data Pipeline to copy data to S3 as CSV
B.Use Amazon Kinesis Data Firehose to stream data from DynamoDB to S3
C.Use DynamoDB Streams with AWS Lambda to write to S3 as JSON
D.Use AWS Glue ETL to read from DynamoDB and write to S3 as Parquet
AnswerD

Glue can efficiently export data and convert to columnar format.

Why this answer

AWS Glue ETL can read from DynamoDB and write to S3 in Parquet format, which is optimized for Athena due to its columnar storage and compression. Option A (AWS Data Pipeline) can copy data to S3 as CSV, but CSV is less efficient for Athena and Data Pipeline is a legacy service. Option B (Amazon Kinesis Data Firehose) is designed for streaming data, not for exporting existing DynamoDB tables.

Option C (DynamoDB Streams with Lambda) writes to S3 as JSON, which is less performant than Parquet for Athena queries and adds operational complexity.

1600
Multi-Selectmedium

A machine learning engineer is training a deep learning model on Amazon SageMaker. The training job is taking a long time. Which THREE actions can reduce training time? (Choose 3.)

Select 3 answers
A.Use SageMaker managed spot training
B.Use SageMaker managed warm pools to reuse the training environment
C.Use SageMaker distributed training (data parallelism)
D.Use a smaller batch size
E.Use SageMaker hyperparameter tuning jobs
AnswersA, B, C

Spot instances can reduce cost and training time if interruptions are tolerated.

Why this answer

A is correct because SageMaker managed spot training leverages spare AWS EC2 capacity at a significantly lower cost, but more importantly, it can reduce training time by allowing you to use larger or more instances for the same budget. Spot instances can be interrupted, but SageMaker automatically resumes training from the last checkpoint, making this a viable speed-up strategy for fault-tolerant deep learning jobs.

Exam trap

The trap here is that candidates often confuse hyperparameter tuning (which runs many jobs) with a technique that speeds up a single training job, or they mistakenly think reducing batch size always improves speed, ignoring the negative impact on convergence and hardware utilization.

1601
MCQmedium

A machine learning engineer is exploring a dataset with 50 features. Some features are highly correlated. Which technique should the engineer use to reduce dimensionality while preserving variance?

A.Principal Component Analysis (PCA)
B.Factor Analysis
C.t-Distributed Stochastic Neighbor Embedding (t-SNE)
D.Linear Discriminant Analysis (LDA)
AnswerA

PCA reduces dimensionality by finding components that maximize variance.

Why this answer

PCA (Principal Component Analysis) is the standard technique for dimensionality reduction by projecting data onto principal components that capture maximum variance. LDA is supervised and aims to separate classes. t-SNE is for visualization. Autoencoders can reduce dimensionality but are more complex.

Factor analysis assumes latent factors.

1602
MCQhard

A company is using SageMaker Ground Truth to label images for a computer vision model. After launching the labeling job, they notice that the labeling throughput is lower than expected. What should they do to increase throughput?

A.Use a private workforce with more workers.
B.Change the labeling task to use a single annotator per image.
C.Reduce the number of workers assigned to each task.
D.Increase the time allowed for each labeling task.
AnswerA

More workers increase labeling parallelism and throughput.

Why this answer

SageMaker Ground Truth labeling throughput is primarily limited by the number of workers available to process tasks. Using a private workforce allows you to directly control and scale the number of workers, which increases parallelism and overall throughput. Public or vendor workforces have fixed capacity and may not scale as quickly, so adding more private workers is the most effective way to boost throughput.

Exam trap

The trap here is that candidates confuse throughput with quality or accuracy, thinking that reducing workers or increasing time will improve speed, when in fact throughput is a direct function of parallel worker capacity.

How to eliminate wrong answers

Option B is wrong because using a single annotator per image reduces parallelism and can actually decrease throughput, as each image must wait for one worker to complete it before moving to the next. Option C is wrong because reducing the number of workers assigned to each task decreases parallelism, which lowers throughput rather than increasing it. Option D is wrong because increasing the time allowed for each labeling task does not change the rate at which tasks are completed; it only extends the deadline, which can reduce throughput by allowing workers to take longer per task.

1603
Multi-Selecthard

Which THREE are valid reasons to perform feature scaling during exploratory data analysis?

Select 3 answers
A.To improve performance of distance-based algorithms like KNN.
B.To change the shape of the feature distribution.
C.To increase the number of features.
D.To ensure features have zero mean and unit variance.
E.To reduce the effect of outliers by clipping values.
AnswersA, D, E

Distance algorithms are sensitive to scale.

1604
MCQeasy

A data scientist is analyzing a dataset and notices that the distribution of a continuous feature is heavily right-skewed. Which transformation is most likely to make the distribution more symmetric?

A.Log transformation (natural log)
B.Min-Max scaling
C.One-hot encoding
D.Square transformation
AnswerA

Log transformation compresses high values, reducing right skew.

Why this answer

Log transformation is commonly used to reduce right skewness by compressing the range of large values. Option B is wrong because Min-Max scaling only rescales the data to a fixed range and does not alter the distribution shape, so it cannot reduce skewness. Option C is wrong because one-hot encoding is designed for categorical features and does not apply to continuous features.

Option D is wrong because a square transformation (power >1) amplifies larger values more than smaller ones, which would increase right skewness rather than reduce it.

1605
MCQhard

A company is building a recommendation system using Amazon SageMaker Factorization Machines. The dataset includes user IDs, item IDs, and implicit feedback (clicks). The data is sparse with millions of users and items. The model needs to capture interactions between users and items. Which hyperparameter tuning strategy should be used to improve model performance?

A.Increase L2 regularization to prevent overfitting.
B.Increase the batch size to speed up training.
C.Decrease the learning rate to improve convergence.
D.Change the activation function to ReLU.
E.Increase the number of factors (num_factors) to capture more latent features.
AnswerE

More factors increase model capacity to learn interactions.

Why this answer

(increase number of factors) is correct because increasing num_factors increases the dimensionality of the latent feature vectors, allowing the model to capture more complex interactions between users and items. Option A (L2 regularization) helps prevent overfitting but does not increase the model's capacity to capture interactions. Option B (batch size) affects training speed and stability, not the expressiveness of the model.

Option C (learning rate) influences convergence but not the complexity of interactions. Option D (activation function) is not applicable since Factorization Machines are linear models and do not use activation functions like ReLU.

1606
MCQeasy

A data scientist wants to understand the relationship between a categorical feature with 3 levels and a continuous target variable. Which visualization is most appropriate?

A.Correlation matrix
B.Line chart
C.Box plot grouped by category
D.Scatter plot
AnswerC

Box plots compare distributions across categories.

Why this answer

A box plot grouped by category (Option C) is the most appropriate visualization because it directly compares the distribution of a continuous target variable across the three levels of a categorical feature. It displays median, quartiles, and potential outliers for each group, making it ideal for understanding central tendency, spread, and skewness in a side-by-side comparison.

Exam trap

The trap here is that candidates often confuse the purpose of a scatter plot (for two continuous variables) with the need to compare a continuous variable across categories, leading them to choose Option D instead of recognizing that a grouped box plot is the standard tool for this task.

How to eliminate wrong answers

Option A is wrong because a correlation matrix is used to quantify linear relationships between continuous variables, not between a categorical feature and a continuous target. Option B is wrong because a line chart is designed to show trends over a continuous or time-ordered axis, not to compare distributions across discrete categories. Option D is wrong because a scatter plot visualizes the relationship between two continuous variables; it cannot effectively display a categorical feature with only three levels without overplotting or requiring jittering, and it does not summarize distributional properties like median or quartiles.

1607
MCQmedium

A team is training a large language model using PyTorch on multiple GPUs. The training is taking too long due to inefficient data loading. Which AWS service can help accelerate data loading by caching data close to the GPU instances?

A.Amazon FSx for Lustre
B.Amazon EBS Snapshots for fast restore
C.Amazon S3 Transfer Acceleration
D.Amazon CloudFront
AnswerA

High-performance file system with sub-millisecond latency.

Why this answer

Amazon FSx for Lustre is a high-performance file system optimized for machine learning workloads. It provides sub-millisecond latencies and high throughput by caching training data on local NVMe SSDs attached to the Lustre servers, which are co-located with GPU instances in the same AWS Availability Zone. This eliminates the I/O bottleneck from remote object storage, directly accelerating data loading for PyTorch DataLoader workers.

Exam trap

The trap here is that candidates confuse 'caching data close to compute' with general-purpose CDN or acceleration services, failing to recognize that Amazon FSx for Lustre is the only option designed for high-throughput, low-latency file system access in a GPU cluster environment on AWS.

How to eliminate wrong answers

Option B is wrong because Amazon EBS Snapshots for fast restore is a feature for restoring EBS volumes from snapshots with reduced latency, not a caching layer for active training data; it does not accelerate data loading during training. Option C is wrong because Amazon S3 Transfer Acceleration speeds up uploads to S3 over long distances using edge locations, but it does not cache data near GPU instances for repeated reads during training. Option D is wrong because Amazon CloudFront is a content delivery network (CDN) for caching static web content at edge locations, not for low-latency file access in a GPU cluster; it is designed for HTTP-based delivery, not POSIX-compliant file I/O required by PyTorch.

1608
MCQeasy

A company wants to use Amazon Rekognition to detect objects in images stored in an S3 bucket. The images are uploaded by users. Which IAM policy statement is necessary to allow Rekognition to read from the bucket?

A.s3:PutObject
B.s3:DeleteObject
C.s3:GetObject
D.s3:ListBucket
AnswerC

GetObject allows Rekognition to read images.

Why this answer

Amazon Rekognition needs to read the image files from the S3 bucket to perform object detection. The s3:GetObject permission grants read access to the objects stored in the bucket, which is the minimum required action for Rekognition to retrieve and analyze the images.

Exam trap

The trap here is that candidates often confuse s3:ListBucket with read access, but listing only returns object keys, not the actual data, so Rekognition cannot analyze the image without s3:GetObject.

How to eliminate wrong answers

Option A is wrong because s3:PutObject allows writing (uploading) objects to the bucket, not reading them; Rekognition does not need to write images. Option B is wrong because s3:DeleteObject allows deleting objects, which is irrelevant for reading and analyzing images. Option D is wrong because s3:ListBucket allows listing the objects in the bucket but does not grant permission to read the actual object content; Rekognition must retrieve the object data, not just enumerate keys.

1609
MCQhard

A company uses Amazon SageMaker to train machine learning models. The data science team has developed a training script that uses TensorFlow. They want to run the training job on a GPU instance (ml.p3.2xlarge) and store the model artifact in Amazon S3. The training job completes successfully, but the model artifact is not saved to S3. The team has confirmed that the S3 bucket policy allows write access from the SageMaker execution role. The training script uses the TensorFlow estimator with the following configuration: ``` tensorflow_estimator = TensorFlow( entry_point='train.py', role='arn:aws:iam::123456789012:role/SageMakerExecutionRole', instance_count=1, instance_type='ml.p3.2xlarge', output_path='s3://my-bucket/output', framework_version='2.3', py_version='py37', ) ``` The train.py script saves the model using `model.save('/opt/ml/model')`. What is the MOST likely reason the model artifact is not being saved to S3?

A.The training script must save the model to /opt/ml/model/saved_model instead of /opt/ml/model.
B.The SageMaker execution role does not have the s3:PutObject permission for the S3 bucket.
C.The output_path parameter is incorrectly formatted; it should include a trailing slash.
D.The TensorFlow estimator requires the model_dir parameter to be set to the S3 output path.
AnswerB

Correct: The role needs s3:PutObject to write to S3.

Why this answer

The training script correctly saves the model to /opt/ml/model, which is the default directory that SageMaker automatically uploads to the S3 output path at the end of training. Since the job completes successfully, the script ran without errors. The most likely cause is that the SageMaker execution role lacks the s3:PutObject permission on the S3 bucket.

Although the bucket policy allows write access from the role, the role itself must have the appropriate IAM permission. Option B is correct. Option A is incorrect because saving to /opt/ml/model is correct.

Option C is incorrect because output_path does not require a trailing slash and is correctly formatted. Option D is incorrect because TensorFlow estimator does not have a model_dir parameter that overrides the default; the default is /opt/ml/model.

1610
MCQhard

Refer to the exhibit. A data engineer has attached this IAM policy to an IAM role used by an AWS Glue ETL job. The job reads from an S3 bucket (data-bucket) that is encrypted with SSE-KMS using the key arn:aws:kms:us-east-1:123456789012:key/abc123, transforms the data, and writes the result to a different S3 bucket (output-bucket) encrypted with a different KMS key (arn:aws:kms:us-east-1:123456789012:key/xyz789). When the job runs, it fails with an access denied error. What is the cause?

A.The policy does not include s3:GetObject permission for the output bucket.
B.The policy does not include glue:CreateTable permission.
C.The policy does not include s3:PutObject permission for the output bucket.
D.The policy does not grant kms:Encrypt permission for the output bucket's KMS key.
AnswerD

To write to an SSE-KMS encrypted bucket, the role needs kms:Encrypt or kms:GenerateDataKey for that key.

Why this answer

The job fails because the IAM policy grants kms:Decrypt and kms:GenerateDataKey for the input bucket's KMS key (abc123) but does not grant kms:Encrypt or kms:GenerateDataKey for the output bucket's KMS key (xyz789). To write encrypted data to the output bucket, the AWS Glue job must have permission to encrypt using the output KMS key. Option D is correct because the missing kms:Encrypt permission causes the access denied error.

Option A is incorrect because the policy includes s3:GetObject for the input bucket. Option B is incorrect because Glue catalog permissions are not relevant to the encryption error. Option C is incorrect because the error is due to missing KMS permissions for the output bucket, not because the policy does not include s3:PutObject.

1611
Multi-Selectmedium

A data scientist is training a deep learning model on SageMaker using a custom container. The training job fails with an 'OutOfMemory' error. Which THREE actions could resolve this issue? (Choose 3.)

Select 3 answers
A.Use gradient accumulation to simulate larger batch sizes.
B.Reduce the number of training epochs.
C.Reduce the batch size.
D.Use an instance type with more memory, such as ml.p3.16xlarge.
E.Increase the learning rate.
AnswersA, C, D

Gradient accumulation divides the desired batch into micro-batches, performing a forward pass on each and accumulating gradients, then updating weights once. This simulates a larger batch without increasing memory per step.

Why this answer

An OutOfMemory error occurs when the model and data exceed the GPU memory. Reducing batch size (C) directly lowers memory per iteration. Gradient accumulation (A) allows using a larger effective batch size without increasing memory by splitting it into micro-batches.

Using an instance with more memory (D) provides additional capacity. Reducing epochs (B) does not affect per-batch memory; it only shortens training. Increasing learning rate (E) can cause instability but does not reduce memory usage.

1612
MCQhard

A team wants to automate the retraining of a model weekly using new data that arrives in S3. Which combination of services should they use?

A.AWS Lambda and S3 events
B.Amazon SageMaker Processing jobs
C.AWS Step Functions and AWS Glue
D.Amazon SageMaker Pipelines and S3 events
AnswerD

SageMaker Pipelines is designed for ML workflows and can be triggered by S3 events.

Why this answer

Amazon SageMaker Pipelines natively supports automated retraining workflows triggered by S3 events. When new data arrives in S3, an event notification can invoke a Lambda function that starts a pipeline execution, which includes steps for data processing, training, evaluation, and model registration. This provides a fully managed, repeatable, and auditable MLOps pipeline without custom orchestration code.

Exam trap

The trap here is that candidates often confuse event-driven triggers (Lambda + S3 events) with the need for a full MLOps pipeline, overlooking that SageMaker Pipelines provides the orchestration, model registry integration, and step-level caching that Lambda alone cannot offer.

How to eliminate wrong answers

Option A is wrong because AWS Lambda and S3 events alone can trigger a function on new data, but they lack built-in orchestration for multi-step retraining workflows like data validation, hyperparameter tuning, and model registration. Option B is wrong because Amazon SageMaker Processing jobs are single-step data processing tasks; they do not provide end-to-end pipeline orchestration or event-driven scheduling for weekly retraining. Option C is wrong because AWS Step Functions and AWS Glue can orchestrate workflows, but Glue is primarily for ETL and not optimized for SageMaker training jobs; this combination requires custom integration and lacks the native SageMaker pipeline capabilities for model versioning and deployment.

1613
MCQmedium

A data engineering team needs to move 10 TB of historical data from an on-premises Hadoop cluster to Amazon S3. The data is currently stored in HDFS. Which service should they use for an efficient transfer?

A.AWS DataSync
B.S3 Transfer Acceleration
C.Amazon Kinesis Data Streams
D.AWS Snowball Edge
AnswerA

DataSync can transfer data from HDFS to S3.

Why this answer

AWS DataSync is the correct choice because it is designed to efficiently transfer large volumes of data from on-premises storage systems, including HDFS, to AWS services like Amazon S3. It uses a purpose-built network protocol and parallel multi-threading to optimize transfer speed over the internet or AWS Direct Connect, and it can handle the 10 TB volume without requiring physical appliances or complex streaming setups.

Exam trap

Candidates often mistakenly choose S3 Transfer Acceleration thinking it is for general data migration, but it only speeds up uploads to S3 and lacks HDFS integration and management features provided by AWS DataSync.

How to eliminate wrong answers

Option B is wrong because S3 Transfer Acceleration only speeds up uploads to S3 over the internet by using AWS edge locations, but it does not integrate with or understand HDFS, so it cannot directly read data from an on-premises Hadoop cluster. Option C is wrong because Amazon Kinesis Data Streams is a real-time streaming service for ingesting small records (up to 1 MB per record) and is not designed for batch transfer of 10 TB of historical data from HDFS. Option D is wrong because AWS Snowball Edge is a physical device for offline data transfer, which is unnecessary when the network bandwidth is sufficient for a 10 TB transfer; DataSync is more efficient for online transfers.

1614
MCQmedium

A data scientist is troubleshooting access to an S3 bucket. The following IAM policy is attached to their role. What is the likely result when they try to list objects in the 'confidential' folder? ```json { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": "s3:ListBucket", "Resource": "arn:aws:s3:::example-bucket" }, { "Effect": "Deny", "Action": "s3:*", "Resource": "arn:aws:s3:::example-bucket/confidential/*", "Condition": { "StringNotEquals": { "aws:SourceVpce": "vpce-12345678" } } } ] } ```

A.Access is allowed because the Allow statement grants s3:ListBucket.
B.Access is denied unconditionally.
C.Access is allowed only if the request uses HTTPS.
D.Access is denied if the request does not originate from the specified VPC endpoint.
AnswerD

The condition requires the request to come from vpce-12345678 to allow access.

Why this answer

The Deny statement explicitly denies s3:* actions on the `confidential` folder unless the request originates from the specified VPC endpoint (using the `aws:SourceVpce` condition). If the request does not come from that VPC endpoint, it will be denied. Option A is wrong because the Deny overrides the Allow.

Option B is wrong because the Deny is conditional, not unconditional. Option C is wrong because the condition is about the VPC endpoint, not the use of HTTPS.

1615
Multi-Selectmedium

A data scientist is training a model using Amazon SageMaker and wants to reduce the training time. The training job uses a single GPU instance. Which THREE actions can reduce training time?

Select 3 answers
A.Use distributed training across multiple GPU instances.
B.Use Pipe input mode instead of File input mode.
C.Use a larger instance type with more GPU memory and compute.
D.Increase the amount of training data.
E.Reduce the batch size.
AnswersA, B, C

Distributed training parallelizes the workload.

Why this answer

Options A, B, and C are correct. Distributed training across multiple GPU instances (A) leverages parallelism to reduce training time. Pipe input mode (B) streams data directly from S3, reducing I/O wait time compared to File mode which downloads data first.

Using a larger instance type with more GPU memory and compute (C) provides more processing power, allowing faster training. Option D is incorrect because increasing the amount of training data typically increases training time, not reduces it. Option E is incorrect because reducing batch size can lead to more iterations and longer training time, though it may sometimes affect convergence.

1616
MCQmedium

Refer to the exhibit. A company is using an IAM role with the attached policy to deploy a SageMaker model. The data scientist can create training jobs and models, but when trying to create an endpoint, they receive an access denied error. What is the missing permission?

A.cloudwatch:PutMetricData
B.iam:PassRole
C.ec2:CreateNetworkInterface
D.sagemaker:InvokeEndpoint
E.kms:Decrypt
AnswerC

SageMaker creates an ENI in the VPC for the endpoint.

Why this answer

When SageMaker creates an endpoint, it provisions a network interface in the customer's VPC to route traffic to the endpoint instances. The IAM role must have the ec2:CreateNetworkInterface permission to allow SageMaker to create this ENI; without it, the endpoint creation fails with an access denied error.

Exam trap

The trap here is that candidates confuse the permissions needed for training jobs (which often require iam:PassRole) with those needed for endpoints, overlooking the VPC networking requirement that is specific to endpoint creation.

How to eliminate wrong answers

Option A is wrong because cloudwatch:PutMetricData is used to publish custom metrics to CloudWatch, but SageMaker automatically sends endpoint metrics without requiring this permission in the role. Option B is wrong because iam:PassRole is needed to allow SageMaker to assume a role, but the question states the role is already attached and training jobs work, so PassRole is not the missing permission. Option D is wrong because sagemaker:InvokeEndpoint is an action for invoking a deployed endpoint for inference, not for creating the endpoint itself.

Option E is wrong because kms:Decrypt is only relevant if the endpoint uses customer-managed KMS keys for encryption, and the error occurs even without KMS encryption configured.

1617
MCQhard

Refer to the exhibit. A custom training job using Pipe input mode fails. The logs indicate the algorithm cannot read the data. What is the most likely issue?

A.The algorithm expects File mode but Pipe mode is specified
B.The instance type is too small for the data
C.The training data is compressed
D.The training image is not accessible
AnswerA

Pipe mode sends data via pipe; algorithms expecting files will fail.

Why this answer

Pipe mode streams data from S3 via stdin, but the algorithm must be designed to read from a pipe rather than a file. Many custom algorithms expect file input, causing a failure. Option A is correct because Pipe mode is incompatible with algorithms expecting File mode.

Option B is incorrect because instance size does not affect data reading. Option C is incorrect because the data is not compressed. Option D is incorrect because the training image is accessible.

1618
MCQhard

A data scientist is performing EDA on a dataset with 1,000 features and 10,000 rows. The target variable is binary. After checking for multicollinearity, the scientist finds many pairs of features with correlation > 0.95. Which action should be taken to prepare the data for modeling?

A.Apply PCA to all features to decorrelate them.
B.Standardize all features using StandardScaler.
C.For each highly correlated pair, remove one feature based on domain knowledge or higher correlation with target.
D.Randomly drop half of the correlated features.
AnswerC

This reduces redundancy while retaining predictive power.

Why this answer

When features are highly correlated (e.g., > 0.95), they introduce multicollinearity, which can destabilize coefficient estimates in linear models and reduce interpretability. Removing one feature from each correlated pair based on domain knowledge or its correlation with the target variable preserves predictive power while reducing redundancy. This approach is more targeted than PCA, which transforms features into uncorrelated components but sacrifices interpretability and may not align with the binary target.

Exam trap

The MLS-C01 exam often tests the misconception that PCA is the default solution for multicollinearity, but the trap here is that PCA transforms features into uninterpretable components, whereas removing correlated features directly preserves the original feature space and domain relevance.

How to eliminate wrong answers

Option A is wrong because PCA decorrelates features by projecting them onto orthogonal components, but it does not remove features—it creates new synthetic features that are linear combinations of the originals, losing interpretability and potentially discarding target-specific information. Option B is wrong because standardizing features (e.g., using StandardScaler) only scales them to zero mean and unit variance, which does not address multicollinearity; it is a preprocessing step for algorithms sensitive to feature scales, not a remedy for correlated features. Option D is wrong because randomly dropping half of the correlated features ignores the relationship between features and the target variable, which can discard informative predictors and degrade model performance; a principled selection based on domain knowledge or target correlation is required.

1619
MCQmedium

A company wants to use Amazon SageMaker to train a model using a custom algorithm packaged in a Docker container. Which approach should they use?

A.Use SageMaker Ground Truth
B.Use SageMaker Autopilot
C.Use the SageMaker SDK to create an Estimator with the image URI of the custom container
D.Select one of the built-in algorithms in SageMaker
AnswerC

The Estimator can accept a custom Docker image for training.

Why this answer

The correct approach is to use the SageMaker SDK to create an Estimator with the image URI of the custom container, as SageMaker supports bring-your-own-container for custom algorithms. Option A is incorrect because SageMaker Ground Truth is a labeling service, not for training custom algorithms. Option B is incorrect because SageMaker Autopilot automates model selection and tuning, but it does not support custom containers.

Option D is incorrect because built-in algorithms are predefined and do not allow custom code.

1620
MCQmedium

A company is deploying a fraud detection model using Amazon SageMaker. The model is a linear learner trained on 100 GB of data. For inference, the model receives individual transactions and must return a prediction within 100 ms. Which endpoint configuration should the team use to meet the latency requirement?

A.Use a multi-model endpoint with CPU instances.
B.Deploy a single model endpoint using a GPU instance and enable autoscaling.
C.Use a batch transform job scheduled every minute.
D.Deploy using SageMaker Serverless Inference.
AnswerB

GPU instance can process individual transactions fast, autoscaling handles traffic.

Why this answer

A single-model endpoint on a GPU instance provides the low-latency, high-throughput inference required for real-time fraud detection. GPU instances accelerate linear learner inference by parallelizing matrix operations, enabling sub-100 ms predictions for individual transactions. Autoscaling ensures the endpoint can handle traffic spikes without degrading latency.

Exam trap

The trap here is that candidates often choose multi-model endpoints (Option A) thinking they reduce cost, but they overlook the cold-start latency penalty for large models, which violates the strict 100 ms requirement.

How to eliminate wrong answers

Option A is wrong because multi-model endpoints share a single container and load models on demand, which adds cold-start latency that can exceed 100 ms for individual transactions, especially with a 100 GB model. Option C is wrong because batch transform jobs are designed for offline, asynchronous processing of large datasets, not real-time inference with a 100 ms latency requirement. Option D is wrong because SageMaker Serverless Inference has a maximum concurrency limit and cold-start latency that can exceed 100 ms, making it unsuitable for sub-100 ms real-time predictions.

1621
Multi-Selectmedium

A data science team is deploying a machine learning model using Amazon SageMaker. The model requires GPU inference and must handle variable traffic with low latency. Which TWO options should the team implement to meet these requirements? (Choose TWO.)

Select 2 answers
A.Use a SageMaker multi-model endpoint with a GPU instance to serve multiple models.
B.Deploy to a SageMaker real-time endpoint using a CPU instance and attach an Elastic Inference accelerator.
C.Use AWS Lambda with an attached GPU function for inference.
D.Host the model on a SageMaker batch transform job with GPU instances.
E.Deploy the model to a SageMaker real-time endpoint using a GPU instance type.
AnswersA, E

Correct: Multi-model endpoint on GPU provides GPU inference and efficient resource utilization for variable traffic.

Why this answer

A is correct because a SageMaker multi-model endpoint with a GPU instance allows you to host multiple models on a single endpoint, dynamically loading and unloading them based on traffic, while providing GPU acceleration for low-latency inference. This approach efficiently handles variable traffic patterns by scaling the endpoint and leveraging GPU compute for deep learning models.

Exam trap

The trap here is that candidates may confuse multi-model endpoints with batch transform jobs or think that Elastic Inference can substitute for a full GPU instance, but the question specifically requires GPU inference and low latency, which only GPU instances or multi-model endpoints with GPU instances can reliably provide.

1622
MCQeasy

A healthcare company needs to predict patient readmission risk using clinical notes. Which AWS service can be used to preprocess the text data into numerical features for a machine learning model?

A.Amazon SageMaker Ground Truth
B.Amazon Comprehend
C.Amazon Translate
D.Amazon Rekognition
AnswerB

Comprehend provides NLP capabilities for text feature extraction.

Why this answer

Amazon Comprehend is a natural language processing (NLP) service that can extract entities, key phrases, and sentiment. It is suitable for preprocessing clinical notes into features. SageMaker Ground Truth is for data labeling.

Rekognition is for images. Translate is for translation.

1623
Multi-Selectmedium

Which TWO of the following are valid approaches to handle missing values in a dataset for a machine learning model?

Select 2 answers
A.Use a neural network to predict missing values
B.Impute missing values with the mean of the column
C.Remove rows with missing values
D.Standardize the features to handle missing values
E.Apply one-hot encoding to convert missing values
AnswersB, C

Mean imputation is a standard technique for numerical features.

Why this answer

Removing rows with missing values is a valid approach (listwise deletion). Imputing with the mean is also valid. Using a neural network to predict missing values is possible but not standard.

Standardization does not handle missing values. One-hot encoding is for categorical variables.

1624
Drag & Dropmedium

Drag and drop the steps to perform hyperparameter tuning using SageMaker Automatic Model Tuning in the correct order.

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

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

Why this order

Tuning involves defining search space, creating a tuning job, setting limits, executing, and selecting best model.

1625
MCQmedium

A data scientist is using Amazon SageMaker to train a model on a large dataset (10 TB) stored in S3 in Parquet format. The training job uses an ml.p3.16xlarge instance with multiple GPUs. The data scientist notices that the GPU utilization is low (around 30%) and the training is slow. The dataset consists of hundreds of thousands of small Parquet files. The data scientist suspects that the I/O is bottlenecked. What should the data scientist do to improve GPU utilization and training speed?

A.Increase the batch size
B.Consolidate the small Parquet files into larger files (e.g., 1 GB each)
C.Use a smaller instance type to reduce cost
D.Use Pipe input mode to stream data directly
AnswerB

Larger files reduce I/O overhead.

Why this answer

Consolidating small Parquet files into larger files (e.g., 1 GB each) reduces the overhead of reading many small files from S3, improving I/O throughput and keeping GPUs busy. Option A (increase batch size) may help GPU utilization but does not address the I/O bottleneck. Option C (use a smaller instance) would not improve speed and may worsen the situation.

Option D (Pipe input mode) can help with streaming but does not solve the small file issue; the data still comes from many small files.

1626
MCQeasy

A data engineer is building a data pipeline to process user clickstream data. The data arrives as JSON files in an S3 bucket. The pipeline must transform the JSON into Parquet format and partition by date and event type, then make the data available for Amazon Athena queries. The engineer needs a fully managed, serverless solution with minimal operational overhead. Which combination of AWS services should the engineer use?

A.Use Amazon EMR with Spark to read JSON, convert to Parquet, and partition, then query with Athena.
B.Use AWS Glue ETL jobs to read JSON from S3, transform to Parquet, and write to a partitioned S3 location, then use Athena.
C.Use S3 Event Notifications to trigger an AWS Lambda function that converts the JSON to Parquet and writes to a partitioned S3 location, then query with Athena.
D.Use Amazon Kinesis Firehose to ingest data and convert to Parquet, then write to S3, and query with Athena.
AnswerC

Lambda is serverless, cost-effective for per-file processing, and can partition output easily.

Why this answer

AWS Lambda triggered by S3 Event Notifications provides a fully serverless, event-driven architecture with minimal operational overhead for converting JSON to Parquet and partitioning by date and event type. Lambda can process each new JSON file as it arrives, perform the transformation in memory (using libraries like PyArrow or Pandas), and write the Parquet output to a partitioned S3 path, which Athena can then query directly. This approach avoids managing any clusters or job scheduling, aligning with the requirement for a fully managed, serverless solution.

Exam trap

The MLS-C01 exam often tests the misconception that AWS Glue is the only serverless ETL option, but the trap here is that Lambda with S3 Event Notifications is a simpler, fully serverless alternative for file-based transformations when the workload fits within Lambda's constraints.

How to eliminate wrong answers

Option A is wrong because Amazon EMR with Spark requires provisioning and managing a cluster (even if ephemeral), incurring operational overhead and not being fully serverless; it also introduces complexity for a simple transformation task. Option B is wrong because AWS Glue ETL jobs, while serverless, involve job scheduling, startup latency, and cost for each job run, and are overkill for a real-time, event-driven pipeline where Lambda can handle the transformation more efficiently with lower latency and cost. Option D is wrong because Amazon Kinesis Firehose is designed for streaming data ingestion, not for batch processing of existing JSON files in S3; it cannot be triggered by S3 events to process files already stored, and its Parquet conversion is limited to the Firehose delivery stream, not arbitrary file transformations.

1627
MCQmedium

A machine learning engineer is using Amazon SageMaker to train a model. The training data is stored in an S3 bucket encrypted with AWS KMS. The SageMaker training job fails with an AccessDenied error when trying to read the data. Which IAM policy addition should resolve the issue?

A.Add kms:Decrypt permission for the KMS key.
B.Add s3:GetObject permission for the bucket.
C.Add kms:GenerateDataKey permission for the key.
D.Attach the AmazonSageMakerFullAccess policy.
AnswerA

Decrypt is required to read encrypted objects.

Why this answer

When an S3 bucket is encrypted with AWS KMS, the SageMaker training job's execution role must have the `kms:Decrypt` permission for the specific KMS key to read the encrypted objects. Without this permission, the job fails with an AccessDenied error, even if `s3:GetObject` is granted, because SageMaker must decrypt the data before reading it.

Exam trap

The trap here is that candidates often assume `s3:GetObject` is sufficient for reading encrypted objects, overlooking that KMS-encrypted S3 data requires explicit `kms:Decrypt` permissions on the execution role.

How to eliminate wrong answers

Option B is wrong because `s3:GetObject` alone is insufficient; the error occurs specifically due to KMS encryption, so the missing permission is for KMS decryption, not S3 read access. Option C is wrong because `kms:GenerateDataKey` is used for creating new data keys for encryption, not for decrypting existing objects; the required permission for reading encrypted data is `kms:Decrypt`. Option D is wrong because attaching the `AmazonSageMakerFullAccess` managed policy does not automatically grant permissions for customer-managed KMS keys; it only provides basic SageMaker permissions, and explicit KMS key permissions must be added to the role.

1628
MCQeasy

A data scientist is performing EDA on a dataset with both numerical and categorical features. Which technique is best for detecting multicollinearity among numerical features?

A.Chi-square test of independence
B.Box plots for each numerical feature
C.Correlation matrix with heatmap
D.Pair plot
AnswerC

Correlation matrix shows pairwise linear correlations, indicating multicollinearity.

Why this answer

A correlation matrix quantifies linear relationships between numerical features, and a heatmap visualizes these correlations, making it effective for detecting multicollinearity. Option A is wrong because the chi-square test of independence is used for categorical variables, not numerical features. Option B is wrong because box plots show distributions and outliers, not relationships between features.

Option D is wrong because pair plots provide a visual scatter plot matrix but do not offer a quantitative measure of multicollinearity like a correlation matrix does.

1629
Multi-Selectmedium

A data engineering team is designing a data pipeline that processes streaming data from Amazon Kinesis Data Streams using AWS Lambda. The team notices that some records are being processed multiple times (duplicates). Which TWO steps should the team take to ensure exactly-once processing?

Select 2 answers
A.Design the Lambda function to be idempotent.
B.Use a unique record identifier and store processed IDs in an external store like DynamoDB.
C.Increase the batch size to reduce the number of invocations.
D.Use Kinesis Producer Library (KPL) to guarantee exactly-once delivery.
E.Disable retries on the Lambda function.
AnswersA, B

Idempotency ensures repeated processing produces same result.

Why this answer

Options A and B are correct. Making the Lambda function idempotent ensures that processing the same record multiple times does not cause duplicates downstream. Using a unique identifier per record and storing processed IDs in an external store like DynamoDB allows deduplication by checking if a record has already been processed.

Option C is incorrect because increasing batch size does not prevent duplicates and may increase the chance of processing failures. Option D is incorrect because KPL provides exactly-once delivery to Kinesis Data Streams, not from the stream to Lambda, so deduplication is still needed. Option E is incorrect because disabling retries can lead to data loss without guaranteeing exactly-once processing.

1630
MCQmedium

A company is building a data lake on Amazon S3 and wants to use AWS Glue to catalog the data. The data includes CSV, Parquet, and JSON files. The team wants to ensure that the Glue crawler can infer the schema correctly and update the Data Catalog when new partitions are added. Which crawler configuration should be used?

A.Create separate crawlers for each file format and schedule them at different times.
B.Use a crawler that only catalogs Parquet files because they are more efficient.
C.Use a crawler with 'Update all new and existing partitions' disabled to avoid schema conflicts.
D.Create a single crawler that includes all file extensions and set the 'Update all new and existing partitions' option.
AnswerD

Correct: Single crawler with partition updates ensures comprehensive cataloging.

Why this answer

A single AWS Glue crawler can handle multiple file formats (CSV, Parquet, JSON) in a data lake on Amazon S3, and enabling 'Update all new and existing partitions' ensures the Data Catalog is refreshed with both new partitions and any schema changes in existing partitions. This configuration maintains a consistent and up-to-date catalog without manual intervention, which is essential for downstream analytics and machine learning workloads.

Exam trap

The trap here is that candidates mistakenly think disabling partition updates prevents schema conflicts, but in reality, it causes stale metadata for existing partitions, while a single crawler with updates enabled correctly handles schema evolution across all file formats.

How to eliminate wrong answers

Option A is wrong because creating separate crawlers for each file format introduces unnecessary complexity and overhead; a single crawler can efficiently catalog multiple formats, and scheduling them at different times may cause catalog inconsistencies. Option B is wrong because restricting the crawler to only Parquet files ignores CSV and JSON data, leading to incomplete cataloging and missing data for downstream processing. Option C is wrong because disabling 'Update all new and existing partitions' prevents the crawler from detecting schema changes in existing partitions, which can result in stale or incorrect metadata in the Data Catalog.

1631
MCQeasy

A company uses Amazon Kinesis Data Streams to ingest clickstream data from a website. The data is consumed by a custom application that runs on Amazon EC2 instances. The company notices that the consumer application is falling behind the producer, causing data to be throttled. Which action should the company take to improve the consumer's throughput?

A.Reduce the data retention period of the stream
B.Increase the number of shards in the Kinesis data stream
C.Increase the maximum concurrency of the AWS Lambda function that processes the stream
D.Use Amazon Kinesis Data Firehose to deliver data to Amazon S3
AnswerB

More shards increase the stream's read and write capacity.

Why this answer

Increasing the number of shards increases the stream's read capacity, allowing more consumers to read in parallel and improving throughput. Option A is wrong because reducing the data retention period does not increase read throughput; it only affects how long data is stored. Option C is wrong because Lambda concurrency is applicable only to Lambda functions, not to the custom EC2 application consuming the stream.

Option D is wrong because Amazon Kinesis Data Firehose is a different service for delivering streaming data to destinations like S3, and it does not improve the throughput of the existing EC2 consumer.

1632
Multi-Selecthard

A data scientist is analyzing a dataset with a continuous target variable and suspects that the relationship between a predictor and the target is non-linear. Which THREE techniques can the scientist use to explore and model this non-linearity?

Select 3 answers
A.Apply logistic regression to binarize the target.
B.Compute the Pearson correlation coefficient between the predictor and target.
C.Add polynomial features (e.g., x^2, x^3) and check if model performance improves.
D.Fit a decision tree regressor and examine feature importance.
E.Create a scatter plot and overlay a LOESS (local regression) smooth curve.
AnswersC, D, E

Polynomial features capture non-linearity in linear models.

Why this answer

Options C, D, and E are correct. Adding polynomial features (e.g., x^2, x^3) allows a linear model to capture non-linear relationships. Decision tree regressors naturally model non-linear interactions between predictors and the target.

A scatter plot with a LOESS smooth curve visually reveals non-linear patterns in the data. Option A (logistic regression) is incorrect because it is for binary classification, not for exploring non-linearity with a continuous target. Option B (Pearson correlation) only measures linear relationships, so it is not suitable for detecting non-linearity.

1633
MCQeasy

A machine learning team is analyzing a dataset with numerical features. They compute the pairwise correlation matrix and find that two features, 'X1' and 'X2', have a correlation coefficient of 0.98. The team plans to train a linear regression model. Which of the following actions should the team take to avoid multicollinearity issues?

A.Perform PCA on the dataset to reduce dimensionality.
B.Add an interaction term between X1 and X2 to the model.
C.Standardize both features using Z-score normalization.
D.Remove one of the two highly correlated features.
AnswerD

This directly addresses multicollinearity by eliminating redundancy.

Why this answer

Removing one of the highly correlated features reduces multicollinearity. Option A is wrong because PCA creates new uncorrelated features but is not necessary for just two correlated features. Option B is wrong because adding an interaction term between X1 and X2 would actually increase multicollinearity.

Option C is wrong because standard scaling does not address correlation between features.

1634
MCQmedium

A data scientist is training a binary classifier on an imbalanced dataset where the positive class represents 1% of the data. The model currently achieves 99% accuracy but a recall of only 10% on the positive class. Which metric combination should the data scientist prioritize to evaluate model improvements?

A.F1 score and AUC-ROC
B.Precision and recall at 90% precision
C.Accuracy and RMSE
D.Precision and RMSE
AnswerA

F1 score balances precision and recall; AUC-ROC is robust to imbalance.

Why this answer

With a highly imbalanced dataset (1% positive class), 99% accuracy is misleading because the model can achieve it by simply predicting the majority class. The low recall (10%) indicates the model fails to identify most positive instances. The F1 score balances precision and recall, providing a single metric for minority class performance, while AUC-ROC evaluates the model's ability to distinguish between classes across all thresholds, making it robust to class imbalance.

Exam trap

The trap here is that candidates see 99% accuracy and assume the model is good, failing to recognize that accuracy is a poor metric for imbalanced datasets, and that metrics like RMSE are for regression, not classification.

How to eliminate wrong answers

Option B is wrong because 'precision and recall at 90% precision' is not a standard metric combination; it fixes precision arbitrarily, which may not be achievable or relevant for evaluating overall model improvements, and it ignores the trade-off with recall. Option C is wrong because accuracy is misleading on imbalanced data (as shown) and RMSE is a regression metric, not suitable for binary classification evaluation. Option D is wrong because RMSE is inappropriate for classification tasks; it measures continuous error, not classification performance, and precision alone does not capture recall or threshold behavior.

1635
MCQeasy

A data scientist is using AWS Glue to prepare training data. The job reads from an S3 bucket, performs transformations, and writes to another S3 bucket. The job is failing due to insufficient memory. Which solution should the data scientist use to fix this?

A.Use AWS Glue's job bookmark feature.
B.Increase the number of DPU (Data Processing Units) for the job.
C.Use Amazon Athena instead of AWS Glue.
D.Use a columnar file format like Parquet.
AnswerB

More workers provide more memory.

Why this answer

The job is failing due to insufficient memory, which is a resource constraint. Increasing the number of DPU (Data Processing Units) allocates more memory and compute capacity to the AWS Glue job, directly addressing the out-of-memory error. This is the standard approach to scale Glue ETL jobs when they hit memory limits.

Exam trap

The trap here is that candidates confuse performance optimization techniques (like using columnar formats or job bookmarks) with resource scaling, assuming any 'best practice' will fix a memory error, when the direct solution is to increase compute/memory allocation via DPUs.

How to eliminate wrong answers

Option A is wrong because AWS Glue job bookmarks are used for incremental processing and tracking previously processed data, not for resolving memory or resource constraints. Option C is wrong because Amazon Athena is a serverless query service for ad-hoc SQL analysis, not a replacement for Glue ETL jobs that require custom transformations and writing to S3; switching to Athena would not fix a memory issue in a Glue job. Option D is wrong because using a columnar file format like Parquet can improve compression and query performance, but it does not increase the memory available to the Glue job; the job still runs with the same DPU allocation.

1636
MCQmedium

Refer to the exhibit. A data scientist creates a SageMaker model using the configuration above. When deploying the model to an endpoint, the endpoint status remains 'Creating' for a long time and then fails. What is the most likely cause?

A.The S3 model artifact does not exist
B.The environment variable SAGEMAKER_REGION is incorrect
C.The model name is already in use
D.The IAM role lacks permission to pull the Docker image from ECR
AnswerD

The image is in a different account; the role needs ecr:GetDownloadUrlForLayer and BatchGetImage permissions.

Why this answer

The image URI points to an ECR repository in account 382416733822, which is not the customer's account. SageMaker expects the image to be in the same account or accessible via cross-account permissions. This URI is likely the AWS account for built-in algorithms, but if the region or repository is incorrect, it may fail.

The most likely issue is that the image does not exist in that account or the role lacks permissions to pull it.

1637
MCQeasy

A data scientist needs to implement a recommendation system for an e-commerce website. Which Amazon service is specifically designed for building and deploying recommendation models?

A.Amazon SageMaker
B.Amazon Rekognition
C.Amazon Forecast
D.Amazon Personalize
AnswerD

Personalize is specifically for building and deploying recommendation models.

Why this answer

Amazon Personalize is a fully managed machine learning service that provides real-time personalized recommendations. It is purpose-built for recommendation systems. SageMaker is a general-purpose ML platform, but Personalize is specialized for recommendations.

1638
MCQhard

A company runs an e-commerce platform that generates clickstream data in real-time. The data is ingested into Amazon Kinesis Data Streams (100 shards) and processed by AWS Lambda functions, which aggregate data in 1-minute windows and write the results to Amazon S3. The Lambda functions are triggered by the Kinesis stream using the event source mapping. Recently, the company noticed that some records are being processed multiple times, leading to duplicate data in S3. The Lambda function is idempotent, but the duplicates are causing downstream issues. The Lambda function's concurrency limit is 1000, and the batch size is 100. The average processing time per record is 200 ms. What is the most likely cause of the duplicates, and how should it be fixed?

A.Increase the Lambda concurrency limit to 2000 to handle the load.
B.Ensure the Lambda function is idempotent and uses the sequence number to deduplicate records.
C.Decrease the batch size to 10 to reduce the impact of failures.
D.Use Amazon SQS FIFO queue as a buffer between Kinesis and Lambda to guarantee exactly-once processing.
AnswerB

If the function fails and retries, using sequence numbers allows it to skip already processed records, preventing duplicates.

Why this answer

Lambda functions process records from Kinesis in batches. If the function fails (e.g., due to timeout or error), the entire batch is retried, causing duplicates if some records were already partially processed. To avoid duplicates, the function should be idempotent and should not commit partial results.

Option A is wrong because the concurrency is sufficient. Option C is wrong because increasing batch size increases the risk of partial failure. Option D is wrong because a FIFO queue does not integrate with Kinesis.

1639
MCQmedium

A company is building a classification model and discovers that the target variable is imbalanced: 95% of samples belong to class A and 5% to class B. The data scientist needs to understand the distribution of numeric features for each class. Which approach is most appropriate?

A.Run a t-test for each feature to determine statistical significance between classes.
B.Generate box plots for each feature using Amazon QuickSight.
C.Use Amazon SageMaker Data Wrangler to create histograms for each feature, grouped by class label.
D.Compute the correlation matrix between features and the target.
AnswerC

Histograms grouped by class provide a clear view of feature distributions across classes.

Why this answer

The most appropriate approach for understanding the distribution of numeric features for each class is to use histograms grouped by the class label. Amazon SageMaker Data Wrangler (option C) can generate these histograms, providing a clear visual comparison of how each numeric feature is distributed across class A and class B. This is especially useful with imbalanced data (95% vs 5%) because it reveals differences in shape, central tendency, and spread without being influenced by class frequencies.

Option A (t-test) tests for statistical significance but does not visualize the distribution. Option B (box plots) can show summary statistics but not the full distribution shape as effectively as histograms. Option D (correlation matrix) measures linear relationships with the target but does not show per-class feature distributions.

1640
MCQhard

An organization is migrating its on-premises Hadoop cluster to AWS. The cluster runs Spark jobs that process 50 TB of data daily. The data is stored in HDFS with 3x replication. Which storage option on AWS provides the best price-performance for this workload?

A.Use AWS Glue to run Spark jobs with data stored in S3
B.Use Amazon EMR with S3 as the data store via EMRFS
C.Use Amazon Redshift Spectrum to query the data directly in S3
D.Use Amazon EMR with HDFS on EBS volumes
AnswerB

S3 provides 11 9's durability and is cheaper than EBS. EMRFS seamlessly integrates with Spark.

Why this answer

Amazon EMR with S3 as the data store via EMRFS provides the best price-performance for this workload because it eliminates the need for 3x replication (S3 is inherently durable and replicated across multiple AZs), reduces storage costs, and allows compute and storage to scale independently. EMRFS enables Spark jobs to read/write directly to S3 with consistency guarantees, matching the throughput requirements of 50 TB daily processing without the overhead of managing HDFS on EBS volumes.

Exam trap

The trap here is that candidates assume HDFS replication is necessary for durability on AWS, overlooking that S3 provides built-in replication and durability, making EMRFS with S3 the cost-effective and performant choice for Spark workloads.

How to eliminate wrong answers

Option A is wrong because AWS Glue is a serverless Spark runtime that is not optimized for processing 50 TB daily at the same price-performance as EMR; it lacks fine-grained tuning and incurs higher costs for large-scale, predictable workloads. Option C is wrong because Redshift Spectrum is designed for SQL-based querying of data in S3, not for running Spark jobs; it cannot execute Spark transformations or leverage the Spark execution engine. Option D is wrong because using HDFS on EBS volumes replicates the on-premises 3x replication model, incurring high storage costs and operational overhead without leveraging S3's durability or elasticity, leading to worse price-performance.

1641
MCQmedium

A data scientist is using Amazon SageMaker to train a linear regression model. The training data has 10 features and 100,000 observations. The model's training loss is decreasing, but the validation loss starts increasing after a few epochs. Which step should the data scientist take first to address this issue?

A.Add more features to the model
B.Reduce the learning rate
C.Increase the batch size
D.Increase the number of epochs
AnswerB

Reducing the learning rate can help the model converge more stably and reduce overfitting.

Why this answer

The increasing validation loss while training loss decreases is a classic sign of overfitting. Reducing the learning rate (Option B) is the first step to stabilize training by allowing the optimizer to take smaller, more controlled steps, which can help the model converge to a better local minimum and reduce validation loss. In SageMaker, this is typically adjusted via the `learning_rate` hyperparameter in the estimator.

Exam trap

The trap here is that candidates often confuse overfitting with underfitting and incorrectly choose to add more features or increase epochs, not realizing that the validation loss increase is a direct sign of overfitting that requires reducing model capacity or learning rate.

How to eliminate wrong answers

Option A is wrong because adding more features increases model complexity, which typically worsens overfitting by giving the model more capacity to memorize noise. Option C is wrong because increasing batch size provides a more accurate gradient estimate but does not directly address overfitting; it may even lead to sharper minima and worse generalization. Option D is wrong because increasing the number of epochs gives the model more iterations to overfit, which will further increase validation loss.

1642
MCQmedium

A data scientist has this IAM policy attached to their IAM role. They are trying to run a SageMaker training job that reads data from 'my-bucket' and writes output to 'my-bucket'. The job fails. What is the most likely reason?

A.The sagemaker:CreateTrainingJob action is not allowed on specific resources
B.Missing s3:ListBucket permission on the bucket
C.Missing iam:PassRole permission
D.The training job requires permissions to write to CloudWatch Logs
AnswerC

SageMaker needs permission to pass the execution role to the training job.

Why this answer

The most likely reason the SageMaker training job fails is that the IAM role lacks the `iam:PassRole` permission. When SageMaker creates a training job, it must assume the execution role specified in the request; without `iam:PassRole`, the service cannot pass the role to itself, causing the API call to fail. This is a common prerequisite for any SageMaker job that requires an execution role.

Exam trap

The trap here is that candidates often focus on S3 permissions (like ListBucket) or assume the training job needs CloudWatch Logs, but the real blocker is the missing `iam:PassRole` permission, which is a common oversight when configuring IAM policies for SageMaker.

How to eliminate wrong answers

Option A is wrong because the policy explicitly allows `sagemaker:CreateTrainingJob` on all resources (`"*"`), so there is no resource-level restriction. Option B is wrong because the policy includes `s3:GetObject` and `s3:PutObject` on `my-bucket`, and while `s3:ListBucket` is missing, SageMaker training jobs do not require ListBucket permission to read or write objects; they only need GetObject and PutObject. Option D is wrong because the policy does not include CloudWatch Logs permissions, but the question states the job fails when reading/writing to S3, and CloudWatch Logs permissions are not required for S3 access; the failure is more directly tied to the missing PassRole.

1643
MCQhard

A Glue job fails with an AccessDenied error when trying to write to the S3 bucket my-data-lake. The IAM policy attached to the job role is shown in the exhibit. What is the MOST likely reason for the failure?

A.The s3:ListBucket action is missing on the bucket level
B.The job role does not have permissions to decrypt the KMS key used for server-side encryption
C.The s3:PutObject action is not sufficient; the job needs s3:PutObjectAcl
D.The resource ARN for s3:PutObject should include a specific prefix
AnswerB

SSE-KMS requires kms:Decrypt and kms:GenerateDataKey permissions, which are missing.

Why this answer

The policy allows s3:PutObject on the bucket, so write access seems granted. However, if the bucket is encrypted with SSE-KMS, the job also needs kms:Decrypt and kms:GenerateDataKey permissions. The policy does not include KMS actions.

The bucket policy might also deny, but the most common issue is KMS encryption.

1644
MCQhard

A data scientist is analyzing a dataset with missing values. The missing data mechanism is missing at random (MAR). Which imputation method is most appropriate to preserve relationships between variables?

A.Remove all rows with any missing values.
B.Use k-nearest neighbors imputation.
C.Use multiple imputation by chained equations (MICE).
D.Replace missing values with the mean of the column.
AnswerC

MICE models each variable with missing values conditional on others, suitable for MAR.

Why this answer

Multiple imputation by chained equations (MICE) is well-suited for missing at random (MAR) data as it models each variable with missing values conditional on other variables, preserving relationships. Option A (removing rows) reduces sample size and can introduce bias if data are not MCAR. Option B (KNN) assumes data are missing completely at random (MCAR) and may not handle MAR well.

Option D (mean imputation) reduces variance and distorts relationships.

1645
MCQhard

Refer to the exhibit. A data scientist runs the above AWS CLI command to create a SageMaker training job using the built-in Linear Learner algorithm. The training job fails with an error. What is the most likely cause?

A.The S3 data type is AugmentedManifestFile, but Linear Learner requires RecordIO or CSV
B.The IAM role does not have sufficient permissions
C.The instance type ml.m5.large does not support the Linear Learner algorithm
D.The MaxRuntimeInSeconds is too short
AnswerA

Linear Learner does not support augmented manifest.

Why this answer

The command uses `S3DataType` as `AugmentedManifestFile`, but the Linear Learner algorithm only supports `RecordIO` or `CSV` as the S3 data type. AugmentedManifestFile is used for algorithms like object detection that require additional labels. The content type `application/x-recordio` is correct for RecordIO, but since the data type is set to AugmentedManifestFile, the training job fails.

The IAM role, instance type, and MaxRuntimeInSeconds are all valid and would not cause this specific error. Therefore, the most likely cause is the incorrect S3 data type, which corresponds to option A.

1646
MCQeasy

A team stores raw data in S3 and uses a Glue Data Catalog for metadata. They want to allow data scientists to query the data with Amazon Athena using their existing IAM roles. What is the MINIMUM set of permissions required?

A.Grant the IAM role permissions for Athena, Glue, and S3 (read and write).
B.Grant the IAM role permissions for Athena actions, Glue Data Catalog actions, and S3 read access.
C.Grant the IAM role permissions for Athena and Amazon Redshift Spectrum.
D.Grant the IAM role permissions for Athena and Amazon Kinesis.
AnswerB

Athena requires GetTable, GetDatabase, etc. from Glue, and GetObject from S3.

Why this answer

Athena requires read access to S3 for querying data, permissions to the Glue Data Catalog for schema/metadata resolution, and Athena-specific actions to run queries. Write access to S3 is not required for querying, making B the minimum set.

Exam trap

The trap here is that candidates often assume Athena requires full S3 read/write access, but only read is needed for querying; write is only needed if the query outputs results to S3, which is not part of the minimum set for querying.

How to eliminate wrong answers

Option A is wrong because it includes S3 write access, which is unnecessary for querying and violates the principle of least privilege. Option C is wrong because Amazon Redshift Spectrum is a separate service for querying data in Redshift, not Athena, and is not required for Athena queries. Option D is wrong because Amazon Kinesis is a streaming data service unrelated to Athena query execution.

1647
MCQeasy

A data engineer needs to transfer 50 TB of historical data from an on-premises Hadoop cluster to Amazon S3. The company has a 100 Mbps internet connection and a tight deadline of two weeks. Which AWS service should the engineer use to transfer the data most efficiently?

A.AWS Storage Gateway (Volume Gateway)
B.AWS Snowball Edge
C.Amazon S3 Transfer Acceleration
D.AWS DataSync over the internet
AnswerB

Snowball Edge provides physical shipping, bypassing bandwidth limitations.

Why this answer

B is correct because transferring 50 TB over a 100 Mbps connection would take approximately 48 days (50 TB * 8 / 100 Mbps / 86400 seconds/day), far exceeding the two-week deadline. AWS Snowball Edge is a physical data transport device that can securely transfer petabytes of data offline, bypassing network bandwidth constraints entirely. For large datasets and tight deadlines, Snowball Edge is the most efficient AWS service.

Exam trap

The trap here is that candidates may overestimate the effectiveness of network optimization services like S3 Transfer Acceleration or DataSync, failing to calculate that even with perfect efficiency, a 100 Mbps link cannot transfer 50 TB in two weeks due to the fundamental bandwidth limitation.

How to eliminate wrong answers

Option A is wrong because AWS Storage Gateway (Volume Gateway) provides hybrid cloud storage with low-latency access via iSCSI or NFS, but it still relies on the internet connection for data transfer, which cannot meet the two-week deadline for 50 TB over 100 Mbps. Option C is wrong because Amazon S3 Transfer Acceleration uses AWS edge locations to optimize TCP transfers over the internet, but it does not increase the available bandwidth; the theoretical minimum transfer time for 50 TB at 100 Mbps is ~48 days, so acceleration cannot reduce it to two weeks. Option D is wrong because AWS DataSync over the internet uses the public internet or AWS Direct Connect, but even with optimization (e.g., parallel streams), the 100 Mbps bottleneck makes it impossible to transfer 50 TB within two weeks.

1648
MCQmedium

A company is streaming data from IoT devices to Amazon Kinesis Data Firehose, which writes to an Amazon S3 bucket. The data is then processed by an AWS Glue ETL job and loaded into Amazon Redshift. The team notices that some records are missing in Redshift. They suspect data loss during the Firehose delivery. Which configuration parameter should be checked first?

A.The AWS KMS key used for encryption.
B.The CloudWatch error logging configuration.
C.The buffer interval (e.g., 60 seconds) and buffer size.
D.The compression format (GZIP, Snappy, etc.).
AnswerC

Correct: If the buffer interval is too long and the stream is stopped, buffered data may be lost if not flushed properly.

Why this answer

Firehose can buffer data before writing to S3. If the buffer interval is too long and the stream ends, data may be lost if the buffer is not flushed. Option C (buffer interval) is the most likely cause.

Option A (compression) does not cause loss. Option B (KMS key) is for encryption. Option D (error logging) only logs errors, does not prevent loss.

1649
Multi-Selecteasy

A machine learning engineer is deploying a model using Amazon SageMaker. The model requires preprocessing steps (e.g., scaling, encoding) that were applied during training. Which TWO options can ensure the same preprocessing is applied at inference?

Select 2 answers
A.Implement preprocessing as an AWS Lambda function invoked before inference.
B.Deploy a separate preprocessing endpoint and call it before the model endpoint.
C.Retrain the model in each inference request with the preprocessing applied.
D.Create a Scikit-learn pipeline that includes preprocessing and the model, then deploy it.
E.Use SageMaker Inference Pipeline to chain a preprocessing container with the model container.
AnswersD, E

The pipeline ensures consistent transformation during training and inference.

Why this answer

Options D and E are correct. A Scikit-learn pipeline bundles preprocessing and the model into a single object, ensuring consistent preprocessing during training and inference. SageMaker Inference Pipeline chains a preprocessing container with the model container, allowing separate preprocessing steps to be applied consistently at inference time.

Option A is wrong because using a Lambda function can introduce inconsistencies if not carefully managed, and it adds latency. Option B is wrong because a separate preprocessing endpoint adds complexity and may not guarantee identical preprocessing logic. Option C is wrong because retraining the model per inference request is impractical and computationally expensive.

1650
Multi-Selecteasy

Which TWO of the following are true about the bias-variance tradeoff?

Select 2 answers
A.Ensemble methods like bagging increase variance
B.Simple models tend to have high variance
C.High variance can cause overfitting
D.High bias can cause underfitting
E.High variance models are typically too simple
AnswersC, D

High variance means the model is very sensitive to training data, leading to overfitting.

Why this answer

The bias-variance tradeoff describes the balance between underfitting (high bias) and overfitting (high variance). Simple models have high bias and low variance, leading to underfitting. Complex models have low bias and high variance, leading to overfitting. Ensemble methods like bagging reduce variance by averaging multiple models. Therefore:

A is false: Bagging reduces variance, not increases.

B is false: Simple models have low variance, not high.

C is true: High variance causes the model to fit noise, i.e., overfitting.

D is true: High bias causes the model to miss relevant patterns, i.e., underfitting.

E is false: High variance models are typically too complex, not too simple.

Page 21

Page 22 of 23

Page 23