Courseiva

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

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

Page 18

Page 19 of 23

Page 20
1351
MCQhard

A company uses AWS Glue ETL jobs to transform CSV data from an S3 bucket into Parquet. The jobs often fail with memory errors when processing large datasets. They want to minimize cost and improve reliability. What should they do?

A.Use G.1X or G.2X worker types and increase the number of DPUs per worker.
B.Use Amazon Athena with CTAS queries to convert the data to Parquet.
C.Switch to S3 Batch Operations with AWS Lambda to process the files individually.
D.Increase the number of workers in the Glue job configuration.
AnswerA

G.1X workers provide more memory and vCPU per worker, reducing OOM errors for memory-intensive transformations.

Why this answer

The G.1X and G.2X worker types provide more memory per worker (16 GB and 32 GB, respectively) compared to the standard G.0X worker (4 GB). By using these worker types and increasing the number of DPUs per worker, you allocate more memory to each task, reducing out-of-memory errors when processing large datasets. This approach also optimizes cost by using fewer, more powerful workers instead of many underpowered ones, improving reliability without unnecessary scaling.

Exam trap

The trap here is that candidates often assume increasing the number of workers (Option D) is the universal fix for performance issues, but in Glue, memory errors are typically caused by insufficient per-worker memory, not a lack of parallelism.

How to eliminate wrong answers

Option B is wrong because Amazon Athena with CTAS queries is a serverless query service, not a data transformation engine; it cannot handle the complex ETL logic (e.g., custom transforms, joins) that Glue jobs perform, and it incurs costs per query scanned, which can be higher for large datasets. Option C is wrong because S3 Batch Operations with AWS Lambda processes files individually, which lacks the distributed, parallel processing capabilities of Glue; it would be slower and more error-prone for large datasets, and Lambda has a 15-minute timeout and limited memory (up to 10 GB), making it unsuitable for memory-intensive transformations. Option D is wrong because simply increasing the number of workers does not address the root cause of memory errors; it adds more parallel tasks but each worker still has the same limited memory (4 GB for G.0X), so tasks can still fail if individual partitions exceed that memory.

1352
MCQhard

A data scientist is using Amazon SageMaker to train a custom TensorFlow model. The training job is failing with the error: 'OutOfRangeError: End of sequence'. The input data is stored in TFRecord format in S3. What is the most likely cause?

A.The TFRecord files are corrupted.
B.The number of training steps or epochs specified exceeds the dataset size.
C.The instance type does not have enough memory.
D.The shuffle buffer size is too large.
AnswerB

The training loop continues beyond available data, causing the error.

Why this answer

The 'OutOfRangeError: End of sequence' error in TensorFlow occurs when the training loop attempts to read more data than is available in the dataset. This typically happens when the number of training steps or epochs specified exceeds the total number of records in the TFRecord files, causing the iterator to reach the end of the dataset prematurely.

Exam trap

The trap here is that candidates often confuse 'OutOfRangeError' with data corruption or memory issues, but the error specifically indicates the dataset has been fully iterated, not that the data is damaged or resources are insufficient.

How to eliminate wrong answers

Option A is wrong because corrupted TFRecord files would typically cause parsing errors (e.g., 'DataLossError' or 'InvalidArgumentError'), not an 'End of sequence' error which indicates the iterator has exhausted valid data. Option C is wrong because insufficient memory would manifest as an 'OutOfMemoryError' or a resource exhaustion error, not a dataset iteration boundary error. Option D is wrong because a large shuffle buffer size may increase memory usage but does not cause an 'End of sequence' error; it only affects the randomness of data ordering within the available dataset.

1353
MCQhard

A company wants to automate the retraining of a model weekly using new data. The training script is in a SageMaker notebook. Which implementation is most maintainable?

A.Set up a cron job on an EC2 instance to run the training script
B.Schedule the notebook to run via a SageMaker Lifecycle Configuration script
C.Convert the notebook to a Python script, create a Docker container, and use SageMaker Pipelines with a schedule
D.Use AWS CloudFormation to provision a training job on a schedule
AnswerC

Pipelines provide a robust, scheduled workflow for training.

Why this answer

It transforms the notebook into a production-grade, containerized training pipeline that can be scheduled natively via SageMaker Pipelines. This approach decouples the training logic from the notebook environment, ensures reproducibility through Docker, and leverages SageMaker's managed infrastructure for automated retraining without manual intervention.

Exam trap

The trap here is that candidates may confuse Lifecycle Configurations (which are for one-time setup actions on notebook instances) with a scheduling mechanism, or assume that CloudFormation alone can handle recurring job scheduling without additional services.

How to eliminate wrong answers

Option A is wrong because running a cron job on an EC2 instance introduces operational overhead for patching, scaling, and monitoring, and does not integrate with SageMaker's managed training infrastructure, making it less maintainable. Option B is wrong because SageMaker Lifecycle Configuration scripts run only during notebook instance startup or termination, not on a recurring schedule, and are intended for environment setup, not for executing training jobs periodically. Option D is wrong because AWS CloudFormation is an Infrastructure as Code (IaC) tool for provisioning resources, not a scheduler for recurring training jobs; it would require additional services like Amazon EventBridge or AWS Lambda to trigger the training job on a schedule, adding complexity.

1354
Multi-Selecthard

A data scientist is using Amazon SageMaker to train a deep learning model. The training job is taking too long. Which THREE actions can reduce training time?

Select 3 answers
A.Use incremental training to continue from a previous model
B.Use Spot Instances to reduce cost
C.Use Pipe input mode to stream data directly from Amazon S3
D.Decrease the batch size to reduce memory usage
E.Use a GPU instance type for faster computation
AnswersA, C, E

Incremental training starts from an existing model, requiring fewer epochs.

Why this answer

Incremental training allows you to start from a previously trained model, which reduces training time because the model does not need to learn from scratch. SageMaker's incremental training loads the existing model artifacts and continues training on new data, significantly cutting down the time required to converge compared to full retraining.

Exam trap

The trap here is that candidates often confuse cost-saving techniques (like Spot Instances) with performance-improving techniques, or they mistakenly think decreasing batch size always speeds up training, when in fact it can slow it down due to increased overhead.

1355
MCQmedium

A company is building a data pipeline to process streaming data from IoT devices. The data is ingested via Amazon Kinesis Data Streams. Each record is about 1 KB. The company wants to use AWS Lambda for real-time transformations and then store the results in Amazon DynamoDB. The expected throughput is 10,000 records per second. The Lambda function currently runs in about 200 ms. The company is concerned about Lambda concurrency limits and wants to ensure there are no throttling errors. The default concurrency limit for Lambda is 1,000. Which approach should the team take to handle the expected throughput without throttling?

A.Increase the Lambda function memory to 3,000 MB to reduce the execution time below 100 ms.
B.Use Amazon Kinesis Data Firehose instead of Lambda to load data directly into DynamoDB.
C.Reduce the Lambda batch size to 10 so that each invocation processes fewer records, reducing the time per invocation.
D.Increase the number of shards in the Kinesis Data Stream to 10 and set the Lambda batch size to 100.
AnswerD

With 10 shards and batch size 100, at most 10 concurrent Lambda invocations, well within limits.

Why this answer

Increasing the number of shards to 10 ensures that the Kinesis stream can support up to 10 concurrent Lambda invocations (one per shard). With a batch size of 100, each invocation processes 100 records, resulting in 100 invocations per second (10,000 records / 100 per batch). At 200 ms per invocation, the required concurrency is 100 * 0.2 = 20, well within the default 1,000 concurrency limit.

Option A is incorrect because reducing the batch size to 10 would increase invocations to 1,000 per second, requiring 200 concurrent executions, which still fits but is less efficient; the main issue is that reducing batch size does not reduce throttling risk as it increases invocation rate. Option B is incorrect because Kinesis Data Firehose does not natively support Lambda for per-record transformations before writing to DynamoDB; it primarily targets S3, Redshift, or Elasticsearch. Option C is incorrect because increasing Lambda memory typically reduces execution time but does not lower concurrency requirements; moreover, 3,000 MB may not reduce time below 100 ms enough to avoid throttling at high throughput.

1356
Multi-Selectmedium

A data scientist is building a deep learning model using Amazon SageMaker. The model is overfitting the training data. Which THREE actions can help reduce overfitting?

Select 3 answers
A.Add L2 regularization to the loss function.
B.Use data augmentation to increase the training dataset size.
C.Increase the number of layers in the network.
D.Reduce the learning rate.
E.Use dropout layers in the network.
AnswersA, B, E

L2 regularization penalizes large weights, reducing overfitting.

Why this answer

Overfitting can be reduced by regularization techniques such as L2 regularization (Option A) which penalizes large weights, by dropout (Option E) which randomly ignores neurons during training, and by data augmentation (Option B) which increases the effective size of the training dataset by creating modified copies. Increasing model complexity by adding layers (Option C) would worsen overfitting, and reducing the learning rate (Option D) does not directly address overfitting—it affects convergence speed.

1357
MCQeasy

A data scientist is visualizing the distribution of a numerical feature that is heavily right-skewed. Which visualization technique is most appropriate?

A.Histogram with linear scale
B.Scatter plot
C.Box plot with log scale
D.Q-Q plot
AnswerC

Box plot with log scale handles skewness and shows outliers.

Why this answer

A box plot with log scale is effective for skewed data as it shows outliers and distribution shape after transformation. Histogram with log scale also works. KDE is similar to histogram.

Q-Q plot checks normality. Scatter plot is for two variables.

1358
MCQmedium

A team is deploying a SageMaker endpoint for a model that was trained with scikit-learn. The endpoint receives spikes in traffic during business hours. The team wants to minimize cost while ensuring availability during spikes. Which endpoint configuration is MOST appropriate?

A.Use SageMaker Serverless Inference
B.Use a production variant endpoint with auto-scaling based on CPU utilization
C.Use a multi-model endpoint with a single instance type
D.Deploy a single large instance that can handle peak load
AnswerB

Auto-scaling handles traffic spikes efficiently.

Why this answer

A production variant endpoint with auto-scaling based on CPU utilization allows the SageMaker endpoint to dynamically adjust the number of instances in response to traffic spikes, ensuring availability during business hours while minimizing cost by scaling down during off-peak periods. This approach is ideal for a scikit-learn model, which is CPU-bound, making CPU utilization a relevant and effective scaling metric.

Exam trap

The trap here is that candidates often confuse serverless inference with cost optimization for predictable spikes, overlooking that auto-scaling with a relevant metric like CPU utilization provides both cost efficiency and availability for scheduled traffic patterns.

How to eliminate wrong answers

Option A is wrong because SageMaker Serverless Inference is designed for intermittent or unpredictable traffic patterns with low latency requirements, but it can incur cold start latency and is not optimal for consistent daily spikes during business hours, potentially leading to higher costs or performance issues. Option C is wrong because a multi-model endpoint with a single instance type does not provide auto-scaling; it hosts multiple models on a single instance, which cannot handle traffic spikes by itself and would still require scaling mechanisms to ensure availability. Option D is wrong because deploying a single large instance that can handle peak load results in over-provisioning and higher costs during off-peak hours, as the instance remains fully running regardless of actual traffic, contradicting the goal of minimizing cost.

1359
Multi-Selecteasy

Which TWO of the following are examples of unsupervised learning tasks?

Select 2 answers
A.Classifying emails as spam or not spam
B.Dimensionality reduction using PCA
C.Sentiment analysis of product reviews
D.Clustering customer segments
E.Predicting house prices
AnswersB, D

PCA reduces features without labels.

Why this answer

Principal Component Analysis (PCA) is an unsupervised learning technique used for dimensionality reduction. It works by identifying the directions (principal components) that maximize variance in the data, without requiring any labeled target variable. This makes it a classic example of unsupervised learning, as the algorithm learns patterns solely from the input features.

Exam trap

The MLS-C01 exam often tests the distinction between supervised and unsupervised learning by presenting tasks that seem intuitive (like clustering) but pairing them with tasks that require labeled outputs (like classification or regression), so candidates must recognize that any task involving a target variable is supervised.

1360
MCQmedium

A company is building a recommender system using matrix factorization. The dataset contains user-item interactions. The model is trained on a large dataset, but the recommendations for new users are poor. Which approach would MOST effectively address this cold-start problem?

A.Incorporate user demographic features as side information
B.Switch to item-based collaborative filtering only
C.Increase the number of latent factors in the model
D.Use only implicit feedback signals for training
AnswerA

Side information helps generalize to new users by leveraging metadata.

Why this answer

Matrix factorization models learn latent factors only from user-item interactions. For new users with no history, the model cannot compute a meaningful latent vector, leading to poor recommendations. Incorporating user demographic features as side information allows the model to initialize or infer latent factors for new users based on their attributes, directly addressing the cold-start problem.

Exam trap

The trap here is that candidates may think increasing latent factors or switching to implicit feedback improves generalization, but neither addresses the fundamental lack of user interaction data for new users.

How to eliminate wrong answers

Option B is wrong because switching to item-based collaborative filtering still relies on user-item interactions and does not solve the cold-start problem for new users with no history. Option C is wrong because increasing the number of latent factors may improve model capacity but does not provide any information about new users, so it cannot mitigate the cold-start issue. Option D is wrong because using only implicit feedback signals does not introduce any new user attributes; it still requires historical interactions to generate recommendations, leaving the cold-start problem unresolved.

1361
MCQmedium

A data scientist is training a neural network on image data using TensorFlow with GPU instances on SageMaker. The training is slow because the GPU utilization is low. The data pipeline uses tf.data with a large number of preprocessing operations. Which action would most likely increase GPU utilization?

A.Increase the learning rate to converge faster.
B.Increase the prefetch buffer size in the tf.data pipeline.
C.Reduce the batch size to speed up each step.
D.Increase the number of CPU instances in the training job.
E.Use smaller image sizes to reduce computation.
AnswerB

Prefetching overlaps CPU data preparation with GPU computation, improving GPU utilization.

Why this answer

Increasing the prefetch buffer size in the tf.data pipeline allows the CPU to prepare batches in advance while the GPU is computing, reducing idle time and improving GPU utilization. Option A (increase learning rate) does not affect data throughput. Option C (reduce batch size) can decrease utilization as it reduces the amount of work per GPU step.

Option D (increase number of CPU instances) addresses CPU capacity but the bottleneck is often data pipeline, not CPU count; increasing instances may not help. Option E (use smaller images) reduces computation per image but may not improve utilization percentage if the pipeline is the bottleneck.

1362
MCQeasy

A data scientist runs a SQL query on an Amazon Athena table and notices that the query scans a large amount of data. Which approach would reduce the amount of data scanned without changing the SQL logic?

A.Partition the table on a column that is frequently used in WHERE clauses.
B.Convert the data from CSV to JSON format.
C.Store the data in Parquet format without partitioning.
D.Use GZIP compression on the data files.
AnswerA

Partitioning prunes data and reduces scanned bytes.

Why this answer

Partitioning the table on a column that is frequently used in WHERE clauses allows Athena to prune partitions and only scan the relevant data, reducing the amount of data scanned. Option B (JSON) does not reduce scan because it is not columnar. Option C (Parquet without partitioning) is columnar and can reduce scan through column pruning, but without partitioning it still scans entire columns.

Option D (GZIP) compresses data but Athena decompresses and scans the full file size, so no reduction in scanned data.

1363
MCQhard

A machine learning engineer is analyzing a dataset with high cardinality categorical features. They want to reduce the number of categories by grouping rare categories into an 'Other' category. Which Amazon SageMaker processing job capability is best suited for this task?

A.Amazon SageMaker Processing
B.Amazon SageMaker Data Wrangler
C.AWS Glue Studio
D.Amazon SageMaker Autopilot
AnswerA

Processing jobs allow custom scripts for flexible data transformation.

Why this answer

Amazon SageMaker Processing allows you to run custom data processing scripts (e.g., using pandas) that can handle grouping rare categories into 'Other' based on frequency thresholds. Option B (Data Wrangler) is a visual tool that may not offer the same level of customization for complex grouping logic. Option C (AWS Glue Studio) is a visual ETL tool but lacks tight integration with SageMaker and may be less efficient for this specific task.

Option D (Autopilot) is designed for automated model building, not custom data processing.

1364
MCQhard

A company is using SageMaker to host a model that makes predictions on streaming data from Amazon Kinesis. The model must provide predictions with sub-second latency. Which approach should the company use?

A.Use SageMaker asynchronous inference with a Kinesis trigger
B.Use a SageMaker real-time endpoint and invoke it from an AWS Lambda function that is triggered by Kinesis
C.Use Amazon Kinesis Data Analytics with a built-in ML model
D.Use SageMaker batch transform to process batches of records from Kinesis
AnswerB

Real-time endpoint plus Lambda provides sub-second latency.

Why this answer

A SageMaker real-time endpoint provides sub-second latency for individual predictions, and invoking it from an AWS Lambda function triggered by Kinesis allows each streaming record to be processed synchronously with low overhead. This architecture meets the requirement for low-latency predictions on streaming data.

Exam trap

The trap here is that candidates confuse asynchronous inference with real-time inference, assuming that any serverless trigger (like Kinesis) automatically provides low latency, but asynchronous inference is designed for batch-like, non-real-time workloads.

How to eliminate wrong answers

Option A is wrong because SageMaker asynchronous inference is designed for large payloads or long-running inference (latency in seconds to minutes), not sub-second latency, and a Kinesis trigger would queue records, adding delay. Option C is wrong because Amazon Kinesis Data Analytics with a built-in ML model (e.g., Random Cut Forest) is limited to anomaly detection and does not support custom models or sub-second predictions for arbitrary ML models. Option D is wrong because SageMaker batch transform processes records in batches offline, not in real time, and cannot handle streaming data from Kinesis with sub-second latency.

1365
Multi-Selecteasy

A data engineer is designing a data pipeline that uses Amazon Kinesis Data Streams to ingest sensor data. The data must be processed in real-time, and the results must be stored in Amazon DynamoDB. Which TWO AWS services can be used together to achieve this? (Choose TWO.)

Select 2 answers
A.Amazon Athena
B.Amazon Kinesis Data Analytics
C.AWS Glue
D.Amazon S3
E.AWS Lambda
AnswersB, E

Kinesis Data Analytics can process streaming data in real-time.

Why this answer

Amazon Kinesis Data Analytics (B) can process streaming data from Kinesis Data Streams in real-time using SQL or Apache Flink, and AWS Lambda (E) can be used as a consumer to write the processed results to DynamoDB. This combination provides a fully managed, serverless pipeline for real-time ingestion, processing, and storage.

Exam trap

The trap here is that candidates often select Amazon Athena or AWS Glue thinking they can handle real-time streaming, but both are batch-oriented services and cannot meet the sub-second latency requirement of Kinesis Data Streams processing.

1366
MCQmedium

A company is deploying a model to an Amazon SageMaker endpoint for real-time inference. The model requires a GPU for low-latency predictions. Which instance type should be chosen?

A.ml.c5.xlarge
B.ml.r5.2xlarge
C.ml.g4dn.xlarge
D.ml.m5.large
AnswerC

GPU instance suitable for inference.

Why this answer

The ml.g4dn.xlarge instance is correct because it includes an NVIDIA T4 GPU, which is required for low-latency real-time inference with deep learning models. GPU instances accelerate matrix operations and parallel processing, reducing inference latency compared to CPU-only instances.

Exam trap

The trap here is that candidates often confuse instance families (e.g., thinking compute-optimized or memory-optimized instances can substitute for GPU instances) or overlook the explicit GPU requirement stated in the question, leading them to select a CPU-based instance like ml.c5.xlarge or ml.m5.large.

How to eliminate wrong answers

Option A is wrong because ml.c5.xlarge is a compute-optimized CPU instance without a GPU, so it cannot meet the GPU requirement for low-latency predictions. Option B is wrong because ml.r5.2xlarge is a memory-optimized CPU instance, lacking a GPU and thus unsuitable for GPU-accelerated inference. Option D is wrong because ml.m5.large is a general-purpose CPU instance with no GPU, failing to provide the necessary hardware acceleration for low-latency model inference.

1367
MCQeasy

Refer to the exhibit. A data scientist lists files in an S3 bucket. The dataset is split into train, test, and validation sets. What is the most likely issue with this data split?

A.The files are not partitioned by date.
B.The training file is missing a header row.
C.The training set is smaller than the test set, which is unusual.
D.The test file should be in JSON format.
AnswerC

Typically training set is largest.

Why this answer

The training set (1024 bytes) is smaller than the test set (2048 bytes), which is unusual. Typically training set should be larger. Option A (missing header) cannot be inferred; Option B (CSV format) is fine; Option D (partitioning) is not evident.

1368
MCQmedium

A data scientist is analyzing a dataset containing customer reviews. The data scientist wants to understand the most common words used in positive and negative reviews. Which AWS service is most suitable for this task?

A.Amazon Rekognition
B.Amazon Comprehend
C.Amazon Polly
D.Amazon Transcribe
AnswerB

Comprehend provides sentiment analysis and key phrase extraction.

Why this answer

Amazon Comprehend can perform sentiment analysis and extract key phrases. Option A is wrong because Amazon Rekognition is for image/video analysis. Option C is wrong because Amazon Polly is a text-to-speech service.

Option D is wrong because Amazon Transcribe is for speech-to-text.

1369
MCQmedium

A data scientist is analyzing a dataset with a target variable that is highly imbalanced (only 1% positive class). The goal is to build a binary classifier. During exploratory data analysis, which metric is MOST appropriate to evaluate the performance of different sampling strategies before model training?

A.Root Mean Squared Error (RMSE)
B.Area Under the Receiver Operating Characteristic Curve (AUC ROC)
C.F1 score
D.Accuracy
AnswerB

AUC ROC is threshold-independent and robust to class imbalance.

Why this answer

The most appropriate metric during exploratory data analysis for evaluating sampling strategies with imbalanced data is AUC ROC, as it is independent of the class distribution and measures the model's ability to distinguish between positive and negative classes regardless of the threshold. Option A (RMSE) is used for regression tasks, not classification. Option C (F1 score) depends on a specific threshold and can be affected by sampling changes.

Option D (Accuracy) is misleading for imbalanced datasets because a high accuracy can be achieved by predicting the majority class.

1370
MCQmedium

Refer to the exhibit. A data scientist is using Amazon SageMaker Ground Truth to label a dataset. The output manifest file references S3 objects with metadata. The scientist notices that a training job using the labeled data yields poor accuracy. What is the most likely issue?

A.The labeled dataset has missing labels for some records.
B.The training data is in an incorrect format for the algorithm.
C.The IAM role used for training does not have permissions to read the manifest file.
D.The data distribution differs significantly between the training set and the real-world inference data.
AnswerB

If the data format does not match the algorithm's expectations, training may complete but produce poor results.

Why this answer

The poor accuracy is most likely due to the training data being in an incorrect format for the algorithm. Amazon SageMaker Ground Truth outputs a manifest file with metadata, but the source S3 objects may be in a format (e.g., raw images, text files) that is not directly compatible with the chosen built-in algorithm or custom model. For example, if the algorithm expects RecordIO-encoded data or a specific CSV structure, but the manifest points to raw JPEG images, the training job will still run (no failure) but produce poor results.

Other options: missing labels or IAM issues would typically cause job failures, not just poor accuracy; data distribution shift is possible but less directly indicated by the exhibit.

1371
Multi-Selecthard

A data engineering team is migrating on-premises Hadoop workloads to AWS. The workloads include batch processing using Apache Spark and interactive SQL queries. The data is stored in HDFS. Which TWO AWS services should be used to replace HDFS and provide a scalable, durable storage layer? (Choose TWO.)

Select 2 answers
A.Amazon EMR with EMRFS
B.Amazon S3
C.Amazon EBS
D.Amazon FSx for Lustre
E.Amazon RDS
AnswersA, B

EMRFS allows EMR to use S3 as a replacement for HDFS.

Why this answer

Amazon S3 provides a highly durable (99.999999999% durability), scalable, and cost-effective object storage layer that replaces HDFS for Hadoop workloads. Amazon EMR with EMRFS allows Spark and Hive to read and write data directly from S3, treating it as a native filesystem with features like consistent view and read-after-write consistency, making it the ideal compute layer for batch processing and interactive SQL queries.

Exam trap

The trap here is that candidates often confuse Amazon EBS or FSx for Lustre as viable HDFS replacements, not realizing that HDFS is a distributed filesystem designed for shared access across many nodes, whereas S3 with EMRFS provides the same semantics with superior durability and scalability.

1372
MCQhard

A data scientist is training a neural network for a multi-class classification problem with 100 classes. The model uses a softmax output layer and cross-entropy loss. During training, the loss decreases steadily but the accuracy on the validation set plateaus early. Which of the following is the most likely cause?

A.Batch size is too large
B.The model is overfitting the training data
C.Number of epochs is too small
D.Learning rate is too high
AnswerB

Overfitting occurs when the model learns training data noise, causing training loss to keep decreasing while validation performance stagnates.

Why this answer

When the validation accuracy plateaus early while training loss continues to decrease, it indicates that the model is memorizing the training data rather than learning generalizable patterns. This is classic overfitting, where the softmax output layer produces high-confidence predictions for training samples but fails to generalize to unseen validation data, causing cross-entropy loss to drop on the training set while validation accuracy stagnates.

Exam trap

AWS often tests the distinction between overfitting and underfitting by pairing a decreasing training loss with a plateauing validation metric, tricking candidates into choosing learning rate or epoch issues when the real problem is memorization.

How to eliminate wrong answers

Option A is wrong because a batch size that is too large typically leads to slower convergence or poorer generalization, not a plateau in validation accuracy while training loss decreases; it would more likely cause both losses to be high or unstable. Option C is wrong because too few epochs would cause both training and validation accuracy to be low and still improving, not a plateau in validation accuracy alone. Option D is wrong because a learning rate that is too high usually causes the loss to diverge or oscillate, not a steady decrease in training loss with a plateau in validation accuracy.

1373
Multi-Selecteasy

Which TWO AWS services can be used to schedule and orchestrate a data pipeline that includes multiple steps such as data extraction, transformation, and loading? (Choose 2.)

Select 2 answers
A.AWS Lambda
B.AWS Glue
C.Amazon Managed Workflows for Apache Airflow (MWAA)
D.AWS Step Functions
E.Amazon CloudWatch Events
AnswersC, D

MWAA is a managed orchestration service for data pipelines.

Why this answer

Amazon Managed Workflows for Apache Airflow (MWAA) and AWS Step Functions are both designed for orchestrating multi-step workflows, including data pipelines with extraction, transformation, and loading (ETL) steps. MWAA provides managed Apache Airflow, allowing you to define complex workflows as Directed Acyclic Graphs (DAGs) with scheduling, dependency management, and monitoring. Step Functions offers state machines with visual workflow design, conditional logic, error handling, and integration with over 200 AWS services.

In contrast, AWS Lambda is ideal for serverless function execution but not for orchestrating multi-step processes with dependencies; AWS Glue is primarily an ETL service with basic job triggers and crawlers, lacking native DAG-based orchestration with conditions; Amazon CloudWatch Events (now Amazon EventBridge) is for event-driven scheduling and does not support complex workflow orchestration with multiple steps and dependencies.

Exam trap

The trap here is that candidates often confuse AWS Glue's built-in job triggers and crawlers as sufficient for orchestration, but Glue lacks native DAG-based workflow management with conditional logic and dependency resolution, which is why MWAA and Step Functions are the correct choices for multi-step pipeline orchestration.

1374
MCQeasy

A DevOps engineer created a SageMaker notebook instance using the Terraform configuration shown. The notebook instance is in a VPC with a public subnet. However, the notebook instance cannot access the internet. What is the most likely cause?

A.The role_arn is incorrect or missing permissions.
B.The instance type ml.t2.medium does not support internet access.
C.The subnet does not have a route to an internet gateway.
D.The direct_internet_access parameter is set to 'Enabled' but should be 'Disabled'.
AnswerC

Without a route to an internet gateway, the notebook cannot access the internet despite the setting.

Why this answer

A SageMaker notebook instance in a VPC with a public subnet requires a route to an internet gateway (IGW) in the subnet's route table to access the internet. Without that route, traffic from the notebook cannot reach the internet, even if `direct_internet_access` is enabled. The Terraform configuration likely omitted the route to the IGW, causing the connectivity failure.

Exam trap

The trap here is that candidates often confuse `direct_internet_access` with the actual network routing requirement, assuming the parameter alone controls internet access, when in reality it only controls whether the notebook uses a public or private subnet, and the subnet must still have proper routing to the internet gateway.

How to eliminate wrong answers

Option A is wrong because the `role_arn` being incorrect or missing permissions would cause API failures (e.g., unable to create the notebook or access SageMaker resources), not a lack of internet connectivity from the notebook instance itself. Option B is wrong because the instance type `ml.t2.medium` fully supports internet access; SageMaker notebook instances of any type can reach the internet when properly configured. Option D is wrong because setting `direct_internet_access` to 'Enabled' is the correct setting for allowing internet access; setting it to 'Disabled' would intentionally block internet access, which is the opposite of what is needed.

1375
MCQhard

A machine learning engineer is deploying a model that predicts loan defaults. The model uses features like income, credit score, and debt-to-income ratio. After deployment, the model's performance degrades over time. Which concept best describes this phenomenon?

A.Data drift
B.Concept drift
C.Overfitting
D.Model drift
AnswerD

Model drift is the degradation of model performance over time.

Why this answer

Model drift is the correct answer because it is the general term for degradation in model performance over time, often caused by changes in data distributions or relationships between features and the target. This phenomenon includes both data drift (changes in input distribution) and concept drift (changes in the relationship between inputs and the target). Option A (Data drift) is a specific type of model drift focusing on input features, not the overall degradation.

Option B (Concept drift) is another specific type concerning the target relationship. Option C (Overfitting) is a training-time issue where the model fits noise, not a time-dependent degradation after deployment.

1376
MCQeasy

A company is using Amazon SageMaker to train a linear regression model. The data scientist notices that the training loss is decreasing but the validation loss has started to increase after a few epochs. What is the most likely cause?

A.The model is underfitting the training data.
B.There is data leakage from the validation set into the training set.
C.The model is overfitting the training data.
D.The learning rate is too high.
AnswerC

Decreasing training loss with increasing validation loss is a classic sign of overfitting.

Why this answer

When training loss decreases but validation loss increases, the model is overfitting to the training data. This is a classic sign of overfitting. Underfitting would show both losses high.

Learning rate too high would cause divergence. Data leakage would cause both losses to be artificially low.

1377
MCQeasy

A data engineer needs to schedule an AWS Glue ETL job to run every hour. Which service should they use for scheduling?

A.AWS Lambda
B.Amazon CloudWatch Events
C.Amazon Simple Queue Service (SQS)
D.AWS Step Functions
AnswerB

CloudWatch Events can trigger Glue jobs on a schedule.

Why this answer

Amazon CloudWatch Events (now part of Amazon EventBridge) can trigger an AWS Glue ETL job on a schedule using a cron or rate expression. This is the native, serverless scheduling service for running jobs at fixed intervals, such as every hour, without needing to manage any infrastructure.

Exam trap

The trap here is that candidates may confuse AWS Lambda as a scheduler because it can be used to run code on a schedule via CloudWatch Events, but the question asks for the service used for scheduling, not for executing the scheduled action.

How to eliminate wrong answers

Option A is wrong because AWS Lambda is a compute service for running code in response to events, not a scheduling service; while Lambda can be used to trigger Glue jobs via custom code, it requires additional setup and is not the direct scheduling mechanism. Option C is wrong because Amazon SQS is a message queue service for decoupling application components, not a scheduler; it cannot natively trigger Glue jobs on a time-based schedule. Option D is wrong because AWS Step Functions is a workflow orchestration service that can coordinate multiple AWS services, but it is not designed for simple time-based scheduling; using it solely for hourly triggers would be over-engineering and incur unnecessary complexity and cost.

1378
MCQmedium

Refer to the exhibit. A data scientist plans to read this CSV file into memory for exploratory data analysis using pandas. The instance has 8 GB of RAM. What is the MOST likely issue the scientist will encounter?

A.The file contains too many rows for pandas to handle
B.The file is too large to load into memory on this instance
C.The file is not in CSV format despite the ContentType
D.The file is not accessible because of insufficient permissions
AnswerB

1 GB CSV file may require >8 GB RAM when loading into pandas.

Why this answer

The file size is approximately 1 GB (1073741824 bytes = 1 GB), and pandas typically requires 3-5x the file size in memory for CSV parsing, which would exceed the 8 GB RAM. Option A is wrong because pandas can handle 10 million rows; the issue is memory, not row count. Option C is wrong because the ContentType is text/csv, so it is indeed CSV format.

Option D is wrong because there is no indication of permission issues (HTTP 200).

1379
MCQmedium

Refer to the exhibit. An IAM policy is attached to a data engineering role. The role is used by an AWS Glue ETL job that reads from 'raw/' and writes to 'processed/'. The job fails with an access denied error when trying to write to 'processed/'. What is the likely cause?

A.The Deny statement on s3:DeleteObject prevents overwriting objects.
B.The role is not correctly attached to the Glue job.
C.The policy does not allow both s3:GetObject and s3:PutObject on the same resource.
D.The policy specifies incorrect ARN for the 'processed' folder.
AnswerA

If the job tries to overwrite an existing object, it needs DeleteObject permission.

Why this answer

The Deny statement on s3:DeleteObject explicitly denies the permission required to overwrite an existing object in S3. When an AWS Glue job writes to 'processed/' and attempts to overwrite an existing object, S3 requires both s3:PutObject and s3:DeleteObject permissions (since overwrite involves delete then put). The Deny on DeleteObject causes the access denied error.

Option B is incorrect because the role is presumed to be attached correctly per the scenario. Option C is incorrect because the policy allows both GetObject and PutObject on the same resource, as is typical. Option D is incorrect because the ARN for the 'processed' folder is correctly specified; the error is due to the Deny, not incorrect ARN.

1380
MCQeasy

A team has a dataset with 500 features and wants to reduce dimensionality. During EDA, they compute the variance of each feature. Which finding would most likely lead to feature removal?

A.Some features have high correlation with each other
B.Some features have negative covariance with the target
C.Some features have very high variance
D.Some features have near-zero variance
AnswerD

Near-zero variance means the feature has very little variation across samples, providing almost no discriminative power. Removing such features reduces dimensionality without significant loss of information.

Why this answer

Features with near-zero variance have little to no information content and are often redundant for modeling. Removing them reduces dimensionality without significant loss. Option A is incorrect: high correlation between features suggests multicollinearity, but variance is not the direct measure; correlation is addressed by other techniques like PCA.

Option B is incorrect: negative covariance with the target indicates an inverse relationship, which can be informative. Option C is incorrect: high variance often indicates useful information, though it may warrant scaling; it is not a reason for removal.

1381
MCQhard

A company uses Amazon SageMaker to host a model for real-time inference. The model is a large ensemble that takes 2 seconds to load into memory. To reduce cold start latency, the data scientist uses SageMaker's managed warm pools. However, they notice that during a sudden traffic spike, new instances still experience high latency. What is the BEST way to ensure consistently low latency for all requests?

A.Use a larger instance type to reduce model loading time.
B.Configure auto scaling based on the number of active invocations to maintain a buffer of warmed instances.
C.Reduce the number of instances to minimize cold start frequency.
D.Switch to SageMaker Serverless Inference.
AnswerB

Auto scaling with a buffer ensures that new instances are provisioned ahead of demand, reducing cold start impact.

Why this answer

Configuring auto scaling based on the number of active invocations maintains a buffer of warmed instances. This ensures that when traffic spikes occur, new instances are already loaded and ready to serve requests, avoiding cold start latency. Option A is wrong because using a larger instance type does not eliminate cold starts; the model still needs to load into memory.

Option C is wrong because reducing instances increases the frequency of cold starts. Option D is wrong because SageMaker Serverless Inference has its own cold start overhead and is not suitable for workloads requiring consistently low latency.

1382
MCQmedium

A data scientist runs the above AWS CLI command. What does the command do?

A.It lists objects larger than 1,000,000 bytes under the data/ prefix.
B.It counts the number of objects larger than 1 MB.
C.It lists objects created after January 2023.
D.It lists objects larger than 1 MB in size.
AnswerA

The --query filters Size > '1000000', which is 1,000,000 bytes.

Why this answer

The AWS CLI command `aws s3api list-objects --bucket your-bucket --prefix data/ --query 'Contents[?Size > `1000000`].[Key]'` lists the keys (names) of objects in the bucket under the 'data/' prefix whose size is greater than 1,000,000 bytes. The `--query` uses JMESPath to filter objects where Size > 1000000 and then projects the Key field. Option B is incorrect because it states 'counts', but the command returns keys, not a count.

Option C is incorrect because it filters by size, not by date. Option D is incorrect because 1,000,000 bytes is not exactly 1 MB (which is 1,048,576 bytes), so the description 'larger than 1 MB' is inaccurate; the command uses bytes, not MB.

1383
MCQeasy

A retail company uses Amazon SageMaker to train a model for product demand forecasting. The dataset contains daily sales data for 10,000 products over 3 years. The data includes features like price, promotions, holidays, and seasonality. The data scientist uses a linear regression model and gets an RMSE of 50 units. However, the business requires more accurate forecasts, especially for products with high variability. The scientist notices that the residuals show a pattern: the model underestimates demand during promotional periods. Which approach should the scientist take to improve the model?

A.Add interaction features between promotion and other variables.
B.Collect more historical data for training.
C.Use a deep learning model like LSTM.
D.Remove promotion features to simplify the model.
AnswerA

Interaction terms capture combined effects.

Why this answer

Adding interaction features between promotion and other variables allows the model to capture the specific effect of promotions on demand, which the linear regression currently underestimates. Option B (more data) may help but won't directly address the structural bias; Option C (LSTM) might be overkill and not directly solve the underestimation during promotions; Option D (removing promotion features) would worsen the problem by discarding valuable information.

1384
MCQeasy

A data scientist is training a binary classification model on a highly imbalanced dataset (99% negative class, 1% positive class). The model currently achieves 99% accuracy but only identifies 0.5% of true positives. Which metric should the data scientist focus on to improve model performance?

A.Precision
B.Root Mean Squared Error (RMSE)
C.Recall
D.Accuracy
AnswerC

Recall measures the ability to find all positive samples, which is crucial for imbalanced data.

Why this answer

Recall (sensitivity) measures the proportion of actual positives correctly identified, which is critical when the dataset is highly imbalanced (99% negative, 1% positive) and the model fails to detect most positives (only 0.5% true positives). Improving recall directly addresses the model's inability to capture the minority class, even if it reduces precision or accuracy. In binary classification with severe class imbalance, accuracy is misleading because a model can achieve 99% accuracy by simply predicting the majority class, as seen here.

Exam trap

The trap here is that candidates see 99% accuracy and assume the model is performing well, failing to recognize that accuracy is a deceptive metric in imbalanced datasets, while recall directly measures the model's ability to find the rare positive class.

How to eliminate wrong answers

Option A is wrong because precision focuses on the proportion of predicted positives that are actually positive, which does not address the low true positive rate (0.5%); improving precision could even further reduce recall by making the model more conservative. Option B is wrong because Root Mean Squared Error (RMSE) is a regression metric that measures the average magnitude of errors in continuous predictions, not applicable to binary classification outcomes like true positive identification. Option D is wrong because accuracy is already 99% and is a poor metric for imbalanced datasets; optimizing for accuracy encourages the model to predict the majority class (negative) for all instances, which is exactly why only 0.5% of positives are found.

1385
MCQeasy

A data scientist is reviewing a dataset and notices that the distribution of a numerical feature is heavily right-skewed with a long tail. Which visualization is most appropriate to assess the distribution?

A.Box plot
B.Line chart
C.Scatter plot
D.Histogram with a logarithmic scale on the x-axis
AnswerD

Log scale helps visualize skewed distributions.

Why this answer

A histogram with a logarithmic scale on the x-axis can effectively display the distribution of a heavily right-skewed numerical feature by compressing the long tail and making the shape more interpretable. Option A (box plot) is less suitable because it shows quartiles and outliers but not the full distribution shape. Option B (line chart) is used for time series or trends, not for distribution assessment.

Option C (scatter plot) is for visualizing relationships between two variables, not a single variable's distribution.

1386
MCQhard

An ML engineer is performing EDA on a dataset of customer transactions. The dataset has 1 million rows and 20 columns, including a 'transaction_amount' column. The engineer notices that 5% of the transaction amounts are negative, which are data entry errors. The rest are positive. Which approach is most appropriate for handling these negative values during EDA?

A.Impute the negative values with the median of positive transaction amounts.
B.Remove rows with negative transaction amounts from the dataset.
C.Take the absolute value of the negative transaction amounts.
D.Cap the negative values at zero.
AnswerB

Removing erroneous data points cleans the dataset without introducing bias.

Why this answer

Removing rows with negative transaction amounts is the most appropriate approach during EDA. The negative values are data entry errors, not legitimate transactions. Removing them cleans the dataset without introducing bias from imputation or transformation.

Option A is incorrect because imputing negative values with the median would treat the errors as missing data, but they are not missing; they are erroneous. This could distort the distribution. Option C is incorrect because taking absolute values would convert errors into positive values, adding noise and misrepresenting the data (e.g., a negative $100 error becomes a legitimate $100 transaction).

Option D is incorrect because capping negative values at zero would create a spike at zero and distort the distribution, treating errors as valid zero amounts. Therefore, removal is the cleanest approach for erroneous data.

1387
MCQhard

A data scientist is setting up a SageMaker training job and has attached this IAM policy to the execution role. The training job fails with an access denied error when trying to write to the output path 's3://my-bucket/output/model.tar.gz'. What additional permission is needed?

A.s3:ListBucket
B.s3:GetObject for the output path
C.s3:DeleteObject
D.iam:PassRole on the role itself
AnswerA

SageMaker requires ListBucket permission to access the bucket.

Why this answer

The training job fails because SageMaker needs to verify that the output S3 bucket exists before writing to it. The s3:ListBucket permission is required to list the contents of the bucket (or confirm its existence) as part of the write operation. Without this permission, the service cannot validate the bucket, resulting in an access denied error even if s3:PutObject is allowed.

Exam trap

The trap here is that candidates assume only s3:PutObject is needed for writing to S3, but AWS services like SageMaker often require s3:ListBucket to verify the bucket exists before performing write operations.

How to eliminate wrong answers

Option B is wrong because s3:GetObject is a read permission used for retrieving objects, not for writing output; the training job needs write access (s3:PutObject) to create the model artifact. Option C is wrong because s3:DeleteObject is unrelated to writing output; it is used for removing objects, and the training job does not need to delete anything. Option D is wrong because iam:PassRole is required to pass the execution role to the SageMaker service, but the question states the role is already attached to the training job, so this permission is not missing; the error occurs specifically at the S3 write step.

1388
MCQhard

A data scientist is trying to upload a CSV file to an S3 bucket using the AWS CLI without specifying server-side encryption. The upload fails with an AccessDenied error. Based on the bucket policy exhibit, what is the most likely cause?

A.The upload request did not specify the required server-side encryption.
B.The bucket does not exist.
C.The data scientist does not have any permissions to the bucket.
D.The data scientist used the wrong AWS region.
AnswerA

The condition requires s3:x-amz-server-side-encryption to be AES256.

Why this answer

The bucket policy requires that all PutObject requests include the x-amz-server-side-encryption header with value 'AES256'. Since the data scientist did not specify any encryption, the request was denied with AccessDenied. Option B is wrong because the error is AccessDenied, not NoSuchBucket.

Option C is wrong because the data scientist may have permissions but the condition on encryption is not met. Option D is wrong because region mismatch would give a different error.

1389
MCQeasy

A machine learning engineer is using Amazon SageMaker to deploy a model for real-time inference. The model must respond within 100 milliseconds. The initial deployment uses a single ml.m5.large instance, but latency is too high. Which change should the engineer make to reduce latency?

A.Switch to a compute-optimized instance like ml.c5.2xlarge.
B.Use batch transform instead of real-time endpoint.
C.Deploy to a single ml.t2.medium instance to reduce cost.
D.Deploy the model on a multi-model endpoint.
AnswerA

Compute-optimized instances provide higher CPU performance, reducing prediction latency.

Why this answer

A compute-optimized instance like ml.c5.2xlarge provides more CPU and memory, reducing inference latency. Option B is wrong because batch transform is for offline predictions, not real-time; it does not reduce latency for real-time inference. Option C is wrong because using a smaller instance (ml.t2.medium) reduces resources and would likely increase latency, not reduce it.

Option D is wrong because multi-model endpoints share resources among models and can lead to contention, potentially increasing latency.

1390
MCQmedium

A company is building a binary classifier to detect fraudulent transactions. The dataset is highly imbalanced (99% legitimate, 1% fraudulent). Which metric is most appropriate for evaluating the model?

A.Accuracy
B.Mean Squared Error
C.F1-score
D.Area Under the ROC Curve (AUC-ROC)
AnswerC

F1-score considers both precision and recall, suitable for imbalanced data.

Why this answer

Precision and recall (or F1-score) are more informative for imbalanced datasets than accuracy, because a model predicting all legitimate would achieve 99% accuracy but be useless. F1-score balances precision and recall.

1391
Multi-Selecteasy

A company is using Amazon SageMaker to train a model. Which TWO metrics should be used to evaluate a binary classification model?

Select 2 answers
A.Accuracy
B.Perplexity
C.AUC
D.F1 score
E.Mean Absolute Error
AnswersC, D

AUC is a standard metric for binary classification.

Why this answer

AUC (Area Under the ROC Curve) is a threshold-independent metric that measures the model's ability to distinguish between positive and negative classes across all classification thresholds. For binary classification in SageMaker, AUC is robust to class imbalance and provides a single scalar value representing overall model performance, making it a standard evaluation metric.

Exam trap

The trap here is that candidates often pick Accuracy (A) as a default metric without considering class imbalance, or confuse regression metrics like MAE (E) with classification evaluation, while perplexity (B) is a distractor from NLP contexts.

1392
MCQeasy

A machine learning engineer is deploying a model to Amazon SageMaker for real-time inference. The model requires low latency and must handle variable traffic patterns. Which SageMaker feature should the engineer use to automatically scale the number of instances based on demand?

A.SageMaker automatic scaling
B.Amazon EC2 Auto Scaling
C.Elastic Inference
D.SageMaker Batch Transform
AnswerA

SageMaker integrates with Application Auto Scaling to scale the number of instances based on demand.

Why this answer

SageMaker automatic scaling (Application Auto Scaling) is the correct feature because it allows the engineer to define scaling policies (e.g., based on CPU utilization or request latency) that automatically adjust the number of instances behind a SageMaker endpoint in response to real-time traffic patterns. This ensures low latency by maintaining sufficient capacity during spikes and reducing costs during lulls, without manual intervention.

Exam trap

The trap here is that candidates confuse Amazon EC2 Auto Scaling (which scales EC2 instances in an Auto Scaling group) with SageMaker automatic scaling (which scales SageMaker endpoint instances via Application Auto Scaling), leading them to pick B even though it does not directly apply to SageMaker endpoints.

How to eliminate wrong answers

Option B (Amazon EC2 Auto Scaling) is wrong because it operates at the EC2 instance level, not at the SageMaker endpoint level; SageMaker endpoints are managed services that require Application Auto Scaling with a specific SageMaker scalable target (e.g., variant.DesiredInstanceCount). Option C (Elastic Inference) is wrong because it accelerates inference by attaching a GPU accelerator to an instance, but it does not handle scaling of instances based on demand—it only reduces latency for deep learning models. Option D (SageMaker Batch Transform) is wrong because it is designed for offline, asynchronous batch predictions on large datasets, not for real-time inference with variable traffic patterns.

1393
MCQhard

A company uses Amazon SageMaker to train and deploy machine learning models. The training data is stored in Amazon S3 (Parquet format, 10 TB). The data scientists have been running training jobs using the File mode input, but the jobs are taking too long due to data download time. They want to reduce the training start-up time and overall training time. Which solution is MOST cost-effective and efficient?

A.Configure the SageMaker training job to use Pipe mode, which streams data directly from S3 without downloading to the instance's local storage.
B.Use S3 Transfer Acceleration to speed up the data transfer from S3 to the training instance.
C.Use larger EC2 instances with more vCPUs and memory to speed up the training process.
D.Enable Elastic Fabric Adapter (EFA) on the training instances to improve network throughput.
AnswerA

Pipe mode reduces start-up time by streaming data, and it is cost-effective as it avoids EBS volume costs associated with File mode.

Why this answer

Pipe mode in SageMaker streams training data directly from Amazon S3 to the training algorithm without first downloading it to the instance's local storage. This eliminates the data download step, significantly reducing startup time and overall training time for large datasets like 10 TB. It is the most cost-effective because it avoids the need for larger instances or additional data transfer acceleration services.

Exam trap

The trap here is that candidates often confuse Pipe mode with File mode, assuming both require downloading data, or they over-engineer the solution by choosing expensive network accelerators or larger instances when the simplest streaming approach is both faster and cheaper.

How to eliminate wrong answers

Option B is wrong because S3 Transfer Acceleration is designed to speed up uploads to S3 over long distances, not downloads from S3 to SageMaker training instances, and it incurs additional costs without addressing the core issue of download time. Option C is wrong because using larger EC2 instances with more vCPUs and memory does not reduce the data download time; it only increases compute capacity, which may not help if the bottleneck is I/O from downloading data. Option D is wrong because Elastic Fabric Adapter (EFA) improves inter-node network communication for distributed training, but it does not accelerate data transfer from S3 to the instance, which is the primary bottleneck here.

1394
Multi-Selectmedium

Which TWO AWS services can be used to move data from an on-premises database to Amazon S3 on a recurring schedule without writing custom code? (Choose 2.)

Select 2 answers
A.AWS Glue
B.AWS Snowball Edge
C.AWS Database Migration Service (AWS DMS)
D.Amazon Athena
E.Amazon Kinesis Data Firehose
AnswersA, C

Glue can run scheduled ETL jobs from JDBC sources to S3.

Why this answer

AWS Glue is correct because it provides a fully managed ETL service that can run crawlers and jobs on a recurring schedule to extract data from on-premises databases (via JDBC connections) and write it to Amazon S3 without requiring any custom code. AWS DMS is correct because it supports continuous replication or scheduled tasks to migrate data from on-premises databases to S3 as a target, using built-in transformation capabilities and no custom scripting.

Exam trap

The trap here is that candidates often confuse AWS DMS with a one-time migration tool, overlooking its built-in scheduling and CDC capabilities, or they mistakenly think Kinesis Data Firehose can pull from on-premises databases via JDBC when it only accepts streaming data from AWS sources or custom producers.

1395
MCQhard

Refer to the exhibit. An ML engineer attaches this IAM policy to a user. The user wants to invoke the SageMaker endpoint my-endpoint from an EC2 instance with public IP 52.1.1.1. What will happen?

A.The invocation fails because the user does not have permission to create an endpoint.
B.The invocation is denied because the Deny statement applies to all resources.
C.The invocation is allowed because the source IP is not in the denied ranges.
D.The invocation is denied because the user is not in a VPC.
AnswerC

The Deny condition does not match the public IP, so Allow prevails.

Why this answer

The IAM policy explicitly allows the `sagemaker:InvokeEndpoint` action, and the `Deny` statement only denies requests from IP addresses in the ranges 10.0.0.0/8 or 192.168.0.0/16. Since the EC2 instance has a public IP of 52.1.1.1, which is not within those denied ranges, the invocation is allowed. The policy does not require the user to be in a VPC or to have endpoint creation permissions for invoking an existing endpoint.

Exam trap

AWS often tests the misconception that a Deny statement with a condition applies to all requests regardless of the condition, or that invoking an endpoint requires additional permissions like creating the endpoint, leading candidates to incorrectly choose options A or B.

How to eliminate wrong answers

Option A is wrong because the user does not need permission to create an endpoint; the invocation action is `sagemaker:InvokeEndpoint`, which is explicitly allowed, and creating an endpoint is a separate action (`sagemaker:CreateEndpoint`) not required for invoking an existing endpoint. Option B is wrong because the Deny statement does not apply to all resources; it applies only to requests originating from the specified IP ranges (10.0.0.0/8 and 192.168.0.0/16), and the source IP 52.1.1.1 is not in those ranges. Option D is wrong because the IAM policy does not require the user to be in a VPC; SageMaker endpoint invocation can be made from any internet-connected client as long as the endpoint is publicly accessible and the IAM permissions allow it.

1396
Multi-Selectmedium

A company uses AWS Glue to run ETL jobs. The data engineer wants to monitor job performance and troubleshoot failures. Which THREE AWS services or features should they use together? (Choose three.)

Select 3 answers
A.AWS Glue job bookmarks
B.Amazon S3 Event Notifications
C.Amazon Athena
D.Amazon CloudWatch Logs
E.Amazon CloudWatch metrics
AnswersA, D, E

Job bookmarks track processed data and help identify failures.

Why this answer

Correct options: A, D, E. AWS Glue job bookmarks track processed data to avoid reprocessing, Amazon CloudWatch Logs stores Glue job logs for troubleshooting failures, and Amazon CloudWatch metrics provide performance monitoring metrics. Option B (Amazon S3 Event Notifications) can trigger jobs but not monitor performance or troubleshoot.

Option C (Amazon Athena) is used for querying data, not for monitoring Glue jobs.

1397
Matchingmedium

Match each SageMaker optimization technique to its description.

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

Concepts
Matches

Train across multiple GPUs or instances

Hyperparameter optimization with Bayesian search

Use spot instances for cost savings

Stream data directly from S3 for faster training

Monitor training and detect issues

Why these pairings

Managed Spot Training reduces cost via spot instances; Data Parallelism speeds training by distributing data; Automatic Model Tuning finds optimal hyperparameters; Compilation (Neo) optimizes for inference hardware. Common confusions include swapping definitions between these techniques.

1398
Multi-Selecthard

You are deploying a custom Docker container for a SageMaker model that requires a specific NVIDIA CUDA version. Which THREE steps must you take to ensure the container runs correctly on SageMaker?

Select 3 answers
A.Define a health check endpoint
B.Use SageMaker Batch Transform
C.Include the SageMaker inference toolkit in the container
D.Choose a GPU instance type for the endpoint
E.Set the container's entry point to the inference script
AnswersC, D, E

Required for SageMaker to interface with the container.

Why this answer

The SageMaker inference toolkit provides the necessary SageMaker-compatible HTTP server and lifecycle management (e.g., model loading, serving, and health checks) that SageMaker expects from a custom container. Without it, the container would not properly integrate with SageMaker's invocation and scaling mechanisms, even if the CUDA dependencies are correct.

Exam trap

The trap here is that candidates confuse optional best practices (like defining a custom health check) with mandatory requirements, or they mistakenly think Batch Transform is a deployment step rather than a separate inference mode, when the core requirement is integrating the container with SageMaker's inference toolkit.

1399
Multi-Selectmedium

Which TWO of the following are valid ways to reduce query costs in Amazon Athena? (Choose 2)

Select 2 answers
A.Use UNLOAD to export query results to S3
B.Partition the data in S3
C.Increase the query timeout limit
D.Use columnar storage formats like Parquet
E.Enable encryption at rest on S3
AnswersB, D

Partitioning limits data scanned per query.

Why this answer

(partitioning data) and Option D (using columnar formats like Parquet) are correct because both reduce the amount of data scanned by Athena queries, directly lowering costs. Option A (UNLOAD) exports results but does not reduce query costs. Option C (increasing query timeout) does not affect data scanned.

Option E (encryption at rest) does not reduce costs.

1400
Multi-Selecthard

A company is deploying a machine learning model using Amazon SageMaker. The model requires GPUs for inference. Which THREE configurations can the company use to meet this requirement? (Choose THREE.)

Select 3 answers
A.SageMaker Serverless Inference
B.Real-time endpoints with ml.p3 instance types
C.SageMaker Batch Transform with ml.p3 instances
D.SageMaker Studio
E.SageMaker Elastic Inference (EI)
AnswersB, C, E

Real-time endpoints with ml.p3 instance types provide full GPU support for inference.

Why this answer

Real-time endpoints (option B) support GPU instances like ml.p3. Batch Transform (option C) also supports GPU instances. Elastic Inference (option E) provides GPU acceleration without a full GPU instance.

Option A (SageMaker Serverless Inference) does not support GPU. Option D (SageMaker Studio) is an IDE, not an inference option.

1401
MCQhard

Refer to the exhibit. The training job 'my-job' failed with the error 'Unable to pull image from ECR'. What is the most likely cause?

A.The IAM role does not have permission to pull images from the ECR repository.
B.The instance type ml.m5.large does not support custom images.
C.The S3 bucket for training data is in a different account.
D.The role ARN is incorrect.
AnswerA

Without ecr:GetDownloadUrlForLayer and BatchGetImage, the pull fails.

Why this answer

The error 'Unable to pull image from ECR' indicates that the SageMaker training job could not retrieve the custom Docker image stored in Amazon ECR. The most likely cause is that the IAM role associated with the training job lacks the `ecr:GetDownloadUrlForLayer` and `ecr:BatchGetImage` permissions required to pull images from the ECR repository. Without these permissions, SageMaker cannot authenticate and download the container image, even if the repository and image exist.

Exam trap

The MLS-C01 exam often tests the misconception that any IAM role with basic SageMaker permissions can pull images from ECR, but the trap here is that the role must have explicit ECR permissions (not just SageMaker permissions) to download the container image, and candidates may incorrectly blame the instance type or S3 bucket location instead.

How to eliminate wrong answers

Option B is wrong because the instance type ml.m5.large fully supports custom images; SageMaker allows custom Docker images on any supported instance type, including ml.m5.large, as long as the image is compatible with the instance architecture. Option C is wrong because the S3 bucket being in a different account would cause a different error (e.g., 'Access Denied' or 'Bucket not found') and would not affect the ability to pull an image from ECR, which is a separate service. Option D is wrong because an incorrect role ARN would result in a validation error when submitting the job (e.g., 'Invalid IAM Role ARN'), not a runtime error during image pull; the job would fail to start, not fail mid-execution with an ECR pull error.

1402
MCQhard

Refer to the exhibit. A data scientist is training a PyTorch model on a SageMaker ml.p3.2xlarge instance (16 GB GPU memory). The training fails with the shown error. Which change should the scientist make to resolve the error?

A.Reduce the batch size in the training script.
B.Increase the number of instances to 2.
C.Use SageMaker Managed Spot Training.
D.Increase the number of epochs.
AnswerA

Smaller batch size reduces GPU memory consumption.

Why this answer

The error is an out-of-memory (OOM) condition on the GPU. Reducing the batch size directly decreases the memory footprint per training step, allowing the model to fit within the 16 GB GPU memory of the ml.p3.2xlarge instance. This is the most immediate and effective fix for a GPU memory exhaustion error in PyTorch.

Exam trap

The trap here is that candidates may confuse distributed training (more instances) with reducing per-instance memory pressure, or assume cost-saving features like Spot Training address resource exhaustion, when in fact only reducing batch size directly lowers GPU memory usage.

How to eliminate wrong answers

Option B is wrong because increasing the number of instances does not reduce per-instance GPU memory usage; it distributes data across instances but each still requires the same batch size and model to fit in its own GPU memory. Option C is wrong because Managed Spot Training reduces cost by using preemptible instances but does not change the memory requirements of the model or batch size. Option D is wrong because increasing the number of epochs only increases training duration, not memory consumption per step, so it would not resolve an OOM error.

1403
Multi-Selecthard

A company uses a SageMaker endpoint for real-time inference. They need to ensure high availability during deployment updates. Which THREE steps achieve this? (Choose 3)

Select 3 answers
A.Use a single instance to save costs
B.Use blue/green deployment with a new endpoint configuration
C.Configure multiple instances behind the endpoint
D.Delete the old endpoint before creating the new one
E.Use Canary or Linear traffic shifting in SageMaker
AnswersB, C, E

Blue/green allows traffic switch after new version is healthy.

Why this answer

Blue/green deployment, multiple instances, and traffic shifting are standard practices for zero-downtime updates.

1404
Multi-Selectmedium

Which THREE evaluation metrics are appropriate for a multi-class classification problem? (Choose 3.)

Select 3 answers
A.Confusion matrix.
B.Accuracy.
C.Mean squared error.
D.Precision-recall curve.
E.F1 score (macro/micro).
AnswersA, B, E

Confusion matrix provides per-class performance.

Why this answer

Confusion matrix (A) is appropriate because it provides per-class performance metrics (TP, FP, FN, TN) for each class, which is essential for multi-class evaluation. Accuracy (B) is appropriate as it measures overall correctness across all classes, a common and intuitive metric for multi-class problems. F1 score with macro or micro averaging (E) is appropriate because macro averaging computes F1 per class and averages them equally, while micro averaging aggregates contributions across all classes, both suitable for multi-class.

Mean squared error (C) is incorrect; it is a regression metric not used for classification. Precision-recall curve (D) is typically used for binary classification, not standard for multi-class without extensions.

1405
MCQhard

A data scientist is performing exploratory data analysis on a high-dimensional dataset with 500 features. The scientist wants to visualize the data in 2D to check for clusters. Which dimensionality reduction technique should the scientist use that preserves global structure and is computationally efficient for large datasets?

A.t-SNE
B.Linear Discriminant Analysis (LDA)
C.PCA
D.UMAP
AnswerC

PCA is linear, fast, and preserves global variance.

Why this answer

PCA is a linear dimensionality reduction technique that preserves global structure (variance) and is computationally efficient for large datasets. Option A is wrong because t-SNE is non-linear, slower, and focuses on preserving local structure, not global. Option B is wrong because LDA is a supervised technique that requires class labels, and it is not typically used for unsupervised exploration of clusters.

Option D is wrong because UMAP is non-linear and can be slower than PCA; while it preserves both local and global structure to some extent, it is not as computationally efficient as PCA for very large datasets.

1406
MCQmedium

A data scientist is deploying a SageMaker model using CloudFormation. The stack creation fails with the above error. What is the MOST likely cause?

A.The Docker image has not been pushed to the ECR repository
B.The IAM role does not have permissions to access ECR
C.The model name is incorrect
D.The instance type specified in the endpoint configuration is not available
AnswerA

The error clearly states the image does not exist in ECR.

Why this answer

The error indicates that SageMaker cannot find the Docker image specified in the `PrimaryContainer` of the model definition. CloudFormation creates the SageMaker model by referencing an ECR image URI; if that image has not been pushed to the specified ECR repository, the model creation fails immediately. This is the most common cause when the stack creation fails with an error about a missing or inaccessible image.

Exam trap

The trap here is that candidates confuse a missing image (resource not found) with an IAM permissions error, but the error message for a missing image is distinct and occurs at a different stage of the API call.

How to eliminate wrong answers

Option B is wrong because an IAM role lacking ECR permissions would produce an access denied or authorization error, not a 'not found' error for the image. Option C is wrong because an incorrect model name would cause a different error (e.g., 'Model not found') only when referencing an existing model, not during creation. Option D is wrong because an unavailable instance type would cause a resource allocation failure at the endpoint creation step, not during model creation.

1407
MCQhard

A data scientist is training a model using Amazon SageMaker with a custom Docker container. The training job fails with an error: 'Resource exhausted: Out of memory'. The training data is stored in S3. What should the data scientist do to resolve this issue?

A.Increase the instance memory by selecting a larger instance type.
B.Increase the EBS volume size attached to the training instance.
C.Use Pipe mode for data loading instead of File mode.
D.Reduce the batch size in the training script.
AnswerA

Larger instance provides more memory.

Why this answer

The 'Resource exhausted: Out of memory' error indicates that the training instance's RAM is insufficient for the workload. Selecting a larger instance type with more memory directly addresses the OOM condition by providing additional physical RAM for model parameters, data batches, and intermediate computations. In SageMaker, instance types like ml.p3.2xlarge (61 GB RAM) vs. ml.p3.8xlarge (244 GB RAM) offer different memory capacities, and upgrading resolves memory exhaustion without altering the training logic.

Exam trap

The trap here is that candidates confuse memory (RAM) with storage (EBS volume) or data loading modes, mistakenly thinking that increasing disk space or changing data ingestion methods will fix an out-of-memory error, when the root cause is insufficient RAM on the compute instance.

How to eliminate wrong answers

Option B is wrong because increasing the EBS volume size provides more disk storage, not RAM; the OOM error is a memory issue, not a disk space issue. Option C is wrong because Pipe mode streams data directly from S3 to the training algorithm without writing to disk, which reduces disk I/O but does not increase available RAM; the memory exhaustion occurs in the compute layer, not the data ingestion layer. Option D is wrong because reducing the batch size can lower memory usage per step, but it may not resolve the OOM if the model itself or other memory allocations (e.g., gradient accumulation, intermediate tensors) exceed the instance's total RAM; it is a workaround, not a definitive fix, and the question asks for a resolution, not a mitigation.

1408
Multi-Selecthard

A company is deploying a machine learning model on Amazon SageMaker. The model needs to be updated frequently with new versions. The team wants to minimize downtime and test the new model version before routing all traffic to it. Which TWO strategies should be used together?

Select 2 answers
A.Use a rolling update strategy.
B.Use a multi-model endpoint.
C.Use Amazon SageMaker A/B testing.
D.Use Amazon SageMaker canary deployment.
E.Use Amazon SageMaker blue/green deployment.
AnswersD, E

Canary deployment sends a small percentage of traffic to the new version.

Why this answer

The correct answers are D (canary deployment) and E (blue/green deployment). In Amazon SageMaker, blue/green deployment allows you to deploy a new model version alongside the existing one (blue) and then shift traffic gradually. Canary deployment is a feature of SageMaker that routes a small percentage of traffic to the new version for testing before shifting more.

Together, these strategies minimize downtime and allow testing. Option A (rolling update) is not directly supported in SageMaker for endpoints; SageMaker uses deployment variants. Option B (multi-model endpoint) is for hosting multiple models on the same endpoint but does not provide traffic shifting for updates.

Option C (A/B testing) in SageMaker is typically achieved using production variants with traffic weights, but the specific feature for gradual traffic shifting is called canary deployment, so option C is incorrect as stated.

1409
MCQeasy

A CloudFormation stack creation failed. The SageMaker endpoint resource shows CREATE_FAILED. What is the most likely issue?

A.The IAM role used by CloudFormation lacks permissions to create endpoints.
B.The S3 bucket 'my-bucket' does not contain the object 'model.tar.gz'.
C.The SageMaker endpoint configuration is invalid.
D.The instance type specified for the endpoint is not available in the region.
AnswerB

The error states the model data is not accessible, likely because the object does not exist.

Why this answer

A CREATE_FAILED status on a SageMaker endpoint resource during CloudFormation stack creation most commonly indicates that the model artifact specified in the Model definition cannot be located. SageMaker requires the S3 bucket and object path (e.g., 's3://my-bucket/model.tar.gz') to exist and be accessible at the time of model creation. If the object is missing, the model resource fails, cascading to the endpoint creation failure.

Exam trap

The trap here is that candidates often assume endpoint failures are always due to configuration or permissions, but the most common root cause in CloudFormation deployments is a missing S3 artifact, which is a prerequisite that is easy to overlook.

How to eliminate wrong answers

Option A is wrong because if the IAM role lacked permissions, CloudFormation would typically fail with an access denied error on the role itself, not specifically on the endpoint resource with CREATE_FAILED; the role is validated before resource creation. Option C is wrong because an invalid endpoint configuration would produce a validation error during stack creation, but the question states the endpoint resource shows CREATE_FAILED, which implies the configuration was accepted but the underlying model or instance caused failure. Option D is wrong because an unavailable instance type would result in a resource creation error with a specific message about insufficient capacity or unavailability, not a generic CREATE_FAILED on the endpoint; CloudFormation would report a different error code.

1410
Multi-Selecteasy

A company wants to centralize logging from multiple AWS accounts and on-premises servers. The logs must be stored cost-effectively and be searchable. Which TWO services should be used? (Choose TWO.)

Select 2 answers
A.Amazon CloudWatch Logs
B.Amazon Redshift
C.Amazon Athena
D.Amazon Kinesis Data Streams
E.Amazon S3
AnswersC, E

Athena can query logs directly on S3.

Why this answer

Amazon S3 (option E) provides a cost-effective, durable storage layer for centralized logs, while Amazon Athena (option C) enables serverless SQL-based searching directly on the log data stored in S3 without needing to load it into a separate database. Together, they allow you to store logs cheaply and query them on demand, meeting the requirements of cost-effectiveness and searchability.

Exam trap

The trap here is that candidates often confuse Amazon CloudWatch Logs with a centralized log storage solution, but it is actually a real-time monitoring service with high storage costs, not a cost-effective long-term archive; similarly, Kinesis Data Streams is mistaken for a storage service when it is purely a streaming ingestion layer.

1411
MCQeasy

A machine learning team is using Amazon SageMaker to train a linear regression model. The team notices that the training loss decreases rapidly initially but then plateaus at a high value. What is the MOST likely cause?

A.The model uses batch normalization
B.The learning rate is set too low
C.The model is over-regularized with L2 regularization
D.The learning rate is set too high
AnswerD

A high learning rate can cause the loss to fluctuate or plateau after an initial drop.

Why this answer

A learning rate set too high causes the optimizer to take excessively large steps, overshooting the minimum of the loss function. This results in rapid initial decrease as the model makes large corrections, but then the loss plateaus at a high value because the parameters oscillate around the optimum without converging. In SageMaker's linear regression (typically using stochastic gradient descent), a high learning rate prevents fine-grained convergence, leading to a high plateau.

Exam trap

The trap here is that candidates often associate a plateau in loss with a learning rate that is too low (underfitting), but the rapid initial decrease followed by a high plateau is a classic sign of a learning rate that is too high, causing divergence or oscillation.

How to eliminate wrong answers

Option A is wrong because batch normalization is not typically used in linear regression models; it is a technique for deep neural networks to stabilize training by normalizing layer inputs, and it would not cause a high plateau. Option B is wrong because a learning rate set too low would cause the loss to decrease very slowly from the start, not rapidly initially and then plateau at a high value. Option C is wrong because over-regularization with L2 regularization would cause the loss to be high from the beginning due to large penalty terms, and the loss would not decrease rapidly initially; it would remain high throughout training.

1412
MCQeasy

A data scientist wants to use Amazon SageMaker to train a deep learning model on a large dataset stored in S3. The training job is expected to take several hours. Which storage option should be used to minimize data loading time and cost?

A.Attach an Amazon EBS volume with the dataset pre-loaded
B.Use File mode to copy data to the training instance's local storage
C.Use Pipe mode to stream data directly from S3 during training
D.Mount an Amazon EFS file system to the training instance
AnswerC

Pipe mode streams data on the fly, reducing startup time and cost.

Why this answer

Pipe mode is the correct choice because it streams data directly from S3 into the training algorithm without writing to disk, eliminating the time and cost of copying large datasets to the instance's local storage. This minimizes data loading time (streaming starts immediately) and cost (no EBS volume or additional storage charges), making it ideal for large datasets that take hours to train.

Exam trap

The trap here is that candidates often confuse File mode (which copies data to local disk) with Pipe mode (which streams data), assuming that copying to local storage is always faster or more reliable, but for large datasets, streaming avoids the upfront download time and reduces cost by not requiring additional storage volumes.

How to eliminate wrong answers

Option A is wrong because attaching an EBS volume with pre-loaded data incurs additional storage costs and requires manual data transfer, which does not minimize cost or loading time compared to streaming. Option B is wrong because File mode copies the entire dataset from S3 to the instance's local storage before training begins, adding significant data loading time and requiring sufficient local disk space, which is inefficient for large datasets. Option D is wrong because mounting an EFS file system introduces network latency and additional cost for the file system, and it is not optimized for the high-throughput, low-latency streaming needed during training.

1413
MCQhard

A company is deploying a model that predicts customer churn. The model's recall for the churn class is 0.9, but precision is 0.4. The business cost of false positives is high. Which strategy would MOST likely improve precision without significantly harming recall?

A.Collect more data for the churn class
B.Use a different algorithm such as Random Forest
C.Decrease the decision threshold for the churn class
D.Increase the decision threshold for the churn class
AnswerD

Higher threshold reduces false positives, improving precision, though recall may drop slightly.

Why this answer

Adjusting the decision threshold to require a higher probability before predicting churn can reduce false positives (increase precision) but may lower recall. The goal is to find a threshold that balances both. Using more aggressive regularization or different algorithms may not directly control the trade-off.

1414
Multi-Selecthard

A company is using Amazon Kinesis Data Streams with a Lambda consumer. The Lambda function writes results to an S3 bucket. The team wants to ensure that each record is processed exactly once and in order. Which TWO configurations should the team implement? (Choose 2.)

Select 2 answers
A.Set the batch size to 1
B.Increase the Lambda function's reserved concurrency
C.Set the parallelization factor to 1
D.Configure a dead-letter queue for failed records
E.Enable S3 bucket versioning to track duplicates
AnswersC, E

This ensures a single Lambda instance processes each shard, maintaining order.

Why this answer

Setting the parallelization factor to 1 ensures that each shard of the Kinesis Data Stream is processed by only one Lambda instance at a time, preserving the order of records within that shard. Option E is correct because enabling S3 bucket versioning helps track duplicates: if the same record is written multiple times, S3 versioning creates multiple versions, allowing the system to detect and handle duplicates, contributing to exactly-once processing semantics.

Exam trap

The trap here is that candidates often confuse batch size with concurrency control, mistakenly believing that setting batch size to 1 alone is sufficient for ordered processing, while ignoring the parallelization factor that governs how many concurrent invocations can process records from the same shard. Additionally, versioning is key for duplicate detection, not just batch size adjustments.

1415
MCQhard

A company runs a streaming data pipeline using Amazon Kinesis Data Streams with 10 shards. The pipeline ingests sensor data from thousands of devices. Each device sends a JSON payload every 5 seconds. The payload size is approximately 2 KB. The data is consumed by a fleet of EC2 instances running a custom Java application that uses the Kinesis Client Library (KCL). Over the past week, the company has observed that the consumer application is experiencing increased latency, and the Kinesis stream's 'GetRecords.IteratorAgeMilliseconds' CloudWatch metric is consistently above 10 seconds. The company has verified that the EC2 instances have sufficient CPU and memory resources. The KCL application is configured with 10 workers, one per shard. The application processes each record by performing a simple transformation and writing to Amazon DynamoDB. The DynamoDB table has sufficient write capacity and is not throttling. The company wants to reduce the iterator age to under 2 seconds. Which action should the company take?

A.Replace Kinesis Data Streams with Amazon Kinesis Data Firehose
B.Increase the write capacity of the DynamoDB table
C.Increase the number of shards in the Kinesis stream to 20
D.Increase the number of KCL workers to 20
AnswerC

More shards increase the number of concurrent consumers and reduce iterator age.

Why this answer

The observed high iterator age indicates that the consumer is falling behind. Since the EC2 instances have sufficient resources and DynamoDB is not throttling, the bottleneck is the number of shards. Each shard provides a fixed amount of read throughput (up to 2 MB/s and 5 reads/s).

With 10 shards, the consumer's aggregate read throughput is limited. Increasing the number of shards to 20 doubles the read capacity, allowing the KCL workers to fetch records faster and reduce the iterator age to under 2 seconds. Option A is incorrect because Kinesis Data Firehose is a delivery service that buffers and writes to destinations like S3 or Redshift; it does not support custom transformations with a Java application.

Option B is incorrect because the DynamoDB table has sufficient write capacity and is not throttling, so increasing it would not address the read-side bottleneck. Option D is incorrect because KCL enforces one worker per shard; adding more workers than shards does not increase parallelism. The workers would sit idle or conflict, since each shard can only be processed by a single worker at a time.

1416
MCQeasy

A company uses SageMaker to train a model, but the training job fails due to insufficient memory. What is the most cost-effective way to resolve this?

A.Use a larger instance type with more memory
B.Use Spot Instances to reduce cost
C.Reduce the batch size in the training script
D.Switch to distributed training across multiple instances
AnswerA

Using a larger instance type with more memory directly resolves insufficient memory.

Why this answer

Increasing instance memory directly addresses the memory issue. Option B is wrong because Spot Instances do not provide additional memory; they are a pricing model. Option C is wrong because reducing batch size may not solve memory issues if the model itself is large, and it can affect training dynamics.

Option D is wrong because distributed training adds complexity and cost, and may be overkill.

1417
MCQhard

A financial services company uses Amazon SageMaker to train a fraud detection model. The training data is stored in an S3 bucket encrypted with AWS KMS. The SageMaker training job is configured to use a custom Docker container that reads data from S3 and writes model artifacts back to S3. The training job fails with the error: 'Unable to write model artifact to s3://my-bucket/output/model.tar.gz. Access Denied.' The IAM role used by the training job has the following permissions: s3:GetObject and s3:PutObject on the bucket, and kms:Decrypt on the KMS key. The training job is not using a VPC. What is the MOST likely cause of the failure?

A.The S3 bucket is in a different region than the training job
B.The IAM role does not have kms:GenerateDataKey permission on the KMS key
C.The S3 bucket requires S3 Batch Operations for writing artifacts
D.The IAM role does not have s3:PutObject permission on the output bucket
AnswerB

Correct because when writing to an encrypted S3 bucket, the IAM role needs kms:GenerateDataKey in addition to kms:Decrypt to create the data key for encryption.

Why this answer

The training job needs kms:GenerateDataKey permission to write objects encrypted with the KMS key. The provided IAM role has s3:GetObject, s3:PutObject, and kms:Decrypt, but lacks kms:GenerateDataKey, causing the Access Denied error when writing. Option A is incorrect because a region mismatch would not necessarily cause an Access Denied error if cross-region access is allowed, and the error indicates a permissions issue.

Option C is incorrect because S3 Batch Operations is not required for writing artifacts. Option D is incorrect because the role already includes s3:PutObject.

1418
Multi-Selecthard

A data scientist is analyzing a large dataset of images stored in Amazon S3. The dataset is used to train a computer vision model. Which THREE EDA steps are appropriate for this image dataset?

Select 3 answers
A.Compute the distribution of image dimensions (height and width).
B.Check for corrupted or unreadable image files.
C.Decompose the time series of image timestamps to detect seasonality.
D.Visualize a sample of images from each class to verify labels.
E.Perform tokenization and stop word removal on image filenames.
AnswersA, B, D

Computing the distribution of image dimensions (height and width) helps identify variations in input size, which is important for resizing or padding decisions.

Why this answer

The appropriate EDA steps for an image dataset include analyzing image dimensions (A) to understand size variability and potential resizing needs, checking for corrupted or unreadable files (B) to ensure data integrity, and visualizing sample images per class (D) to verify label accuracy and detect labeling errors. Option C (time series decomposition) is irrelevant because timestamps, while possibly present, are not a primary focus of standard image EDA; it would be relevant for time-series data. Option E (tokenization and stop word removal) applies to text data, not images.

1419
MCQmedium

Refer to the exhibit. A SageMaker training job uses an IAM role with this policy. The training job writes output to s3://my-bucket/output/. Which statement about the policy is true?

A.The Allow statement allows all PutObject requests regardless of encryption
B.The training job can write output objects only if server-side encryption with SSE-S3 is used
C.The Deny statement blocks all PutObject requests
D.The GetObject permission requires the object to be encrypted with SSE-S3
AnswerB

Deny requires AES256 encryption.

Why this answer

The policy includes a Deny statement that explicitly denies PutObject requests unless the request includes the `x-amz-server-side-encryption` header set to `AES256`, which corresponds to SSE-S3. The Allow statement grants PutObject permission, but the Deny statement overrides it for any request that does not meet the encryption condition. Therefore, the training job can only write output objects if server-side encryption with SSE-S3 is used.

Exam trap

The trap here is that candidates often overlook the Deny statement's condition and assume the Allow statement alone grants full PutObject access, or they misinterpret the Deny as blocking all PutObject requests, failing to see that it only blocks those without the required encryption header.

How to eliminate wrong answers

Option A is wrong because the Allow statement does not allow all PutObject requests regardless of encryption; the Deny statement explicitly blocks PutObject requests that do not use SSE-S3 encryption. Option C is wrong because the Deny statement does not block all PutObject requests; it only blocks those that lack the required SSE-S3 encryption header, so requests with `x-amz-server-side-encryption: AES256` are allowed. Option D is wrong because the GetObject permission in the Allow statement does not require the object to be encrypted with SSE-S3; it only requires that the request uses HTTPS (condition `aws:SecureTransport`: true), and the Deny statement does not apply to GetObject at all.

1420
MCQhard

A data scientist is building a multi-class classification model with 10 classes. The dataset has 100,000 samples. After training a random forest with 100 trees, the model achieves 85% accuracy on the test set. However, the data scientist notices that for one rare class (1% of data), recall is only 5%. Which technique is MOST likely to improve recall for the rare class without significantly reducing overall accuracy?

A.Increase the number of trees to 500
B.Apply SMOTE to oversample the rare class in the training data
C.Use stratified sampling only for the test set
D.Reduce the decision threshold for the rare class to 0.1
AnswerB

SMOTE creates synthetic samples for the minority class.

Why this answer

SMOTE (Synthetic Minority Oversampling Technique) generates synthetic samples for the rare class by interpolating between existing minority instances, which directly addresses the class imbalance. This increases the model's exposure to the rare class during training, improving recall without discarding data or significantly altering the overall class distribution, thus preserving overall accuracy.

Exam trap

The MLS-C01 exam often tests the misconception that increasing model complexity (more trees) or adjusting thresholds post-training can fix class imbalance, when in fact the root cause is the skewed training data distribution, which requires a data-level technique like SMOTE.

How to eliminate wrong answers

Option A is wrong because increasing the number of trees in a random forest primarily reduces variance and improves generalization, but it does not address class imbalance; recall for a rare class will remain low if the training data is skewed. Option C is wrong because stratified sampling on the test set only ensures the test set reflects the original class distribution, which does nothing to improve the model's ability to learn the rare class during training. Option D is wrong because reducing the decision threshold for the rare class to 0.1 would increase recall but at the cost of dramatically increasing false positives, which would significantly reduce overall accuracy, especially since the rare class is only 1% of the data.

1421
MCQeasy

A data scientist is building a binary classification model to predict whether a customer will subscribe to a service. The dataset contains 20 features, including categorical variables with high cardinality (e.g., zip code with 10,000 unique values). The scientist uses a logistic regression model and obtains a training AUC of 0.85 and a test AUC of 0.60. The scientist suspects overfitting due to high cardinality features. Which approach should the scientist use to address this issue?

A.Apply label encoding to the zip code feature
B.Remove the zip code feature entirely
C.Apply target encoding with smoothing to the zip code feature
D.Apply one-hot encoding to the zip code feature
AnswerC

Target encoding reduces cardinality and can improve generalization.

Why this answer

(target encoding with smoothing) reduces cardinality while preserving predictive power. Option A (label encoding) may introduce ordinality issues. Option B (remove zip code) may lose important information.

Option D (one-hot encoding) increases dimensionality drastically.

1422
MCQeasy

A machine learning team is reviewing a dataset for a regression problem. They notice that the target variable has a right-skewed distribution. Which transformation should they consider applying to the target variable to improve model performance?

A.Apply StandardScaler to the target variable.
B.Apply MinMaxScaler to the target variable.
C.Apply log transformation to the target variable.
D.Apply one-hot encoding to the target variable.
AnswerC

Log transformation reduces right skewness.

Why this answer

Log transformation is commonly applied to right-skewed data to make it more normally distributed, which can improve model performance. Option A (StandardScaler) is for scaling, not skewness. Option B (MinMaxScaler) also doesn't address skewness.

Option D (One-hot encoding) is for categorical variables.

1423
MCQeasy

A data scientist is using a decision tree algorithm for a classification task. The tree is very deep and achieves 100% accuracy on the training set but performs poorly on the test set. Which technique should the data scientist use to improve generalization?

A.Add more features to the dataset.
B.Reduce the number of training samples.
C.Prune the decision tree.
D.Increase the maximum depth of the tree.
AnswerC

Pruning reduces tree complexity and improves generalization.

Why this answer

A deep decision tree that achieves 100% training accuracy but poor test accuracy is overfitting the training data. Pruning the tree removes branches that have little statistical power, reducing complexity and improving generalization to unseen data.

Exam trap

The trap here is that candidates may confuse overfitting with underfitting and choose to increase model complexity (Option D) or add features (Option A), when the correct remedy for overfitting is to reduce complexity through pruning.

How to eliminate wrong answers

Option A is wrong because adding more features typically increases the risk of overfitting by giving the tree more opportunities to memorize noise. Option B is wrong because reducing the number of training samples exacerbates overfitting by providing less data for the tree to learn generalizable patterns. Option D is wrong because increasing the maximum depth would make the tree even deeper and more complex, worsening overfitting rather than improving generalization.

1424
MCQeasy

A data scientist is using Amazon SageMaker to train a linear regression model. The training data contains missing values. Which preprocessing step should be applied before training?

A.Ignore missing values; linear regression can handle them.
B.Impute missing values with the mean of the column.
C.Replace missing values with zeros.
D.Remove all rows containing missing values.
AnswerB

Imputation is a common technique to handle missing data.

Why this answer

Linear regression models in Amazon SageMaker cannot handle missing values natively; they require complete numerical input. Imputing missing values with the column mean is a standard preprocessing technique that preserves the overall distribution and avoids introducing bias, ensuring the SageMaker built-in Linear Learner algorithm can train without errors.

Exam trap

The trap here is that candidates may assume linear regression can inherently handle missing values (Option A) due to its statistical robustness, but AWS SageMaker's implementation requires complete data, and ignoring missing values will cause runtime errors or silent model degradation.

How to eliminate wrong answers

Option A is wrong because linear regression algorithms, including SageMaker's Linear Learner, do not accept missing values in the training data; they will either fail or produce incorrect results if missing values are present. Option C is wrong because replacing missing values with zeros can significantly distort the data distribution and model coefficients, especially if the missingness is not random, leading to biased estimates. Option D is wrong because removing all rows with missing values can drastically reduce the dataset size, potentially discarding valuable information and introducing selection bias, which is particularly problematic in small or imbalanced datasets.

1425
Multi-Selecthard

During EDA of a dataset for a regression problem, a data scientist notices that the target variable has a right-skewed distribution. Which THREE transformations are appropriate to address this skewness? (Choose THREE.)

Select 3 answers
A.Log transformation
B.StandardScaler (z-score normalization)
C.Box-Cox transformation
D.Yeo-Johnson transformation
E.Min-Max scaling
AnswersA, C, D

Log transformation compresses large values, reducing right skew.

Why this answer

Options A, C, and D are correct. Log transformation, Box-Cox transformation, and Yeo-Johnson transformation are effective methods for reducing right skewness in the target variable. Option B (StandardScaler) standardizes features to have zero mean and unit variance, but does not reduce skewness.

Option E (Min-Max scaling) scales features to a fixed range, but does not affect the shape of the distribution.

Page 18

Page 19 of 23

Page 20