Courseiva

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

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

Page 13

Page 14 of 23

Page 15
976
MCQhard

A data scientist is trying to create a training job named 'test-model' using an IAM role with the attached policy. The creation fails with an AccessDenied error. What is the most likely cause?

A.The Resource is set to '*' and should be specific.
B.The Deny statement uses 'StringNotEquals' which should be 'StringEquals'.
C.The IAM role does not have permission to assume the SageMaker execution role.
D.The Deny statement uses a wildcard '*' in the condition value, which is not supported for StringNotEquals.
AnswerD

Wildcards are not supported in StringNotEquals conditions, causing unexpected denial.

Why this answer

The Deny statement uses 'StringNotEquals' with a wildcard '*' in the condition value, which is not supported for the 'StringNotEquals' condition operator in IAM policies. The 'StringNotEquals' operator requires exact string matching and does not support wildcards; using '*' will cause the condition to never match, effectively making the Deny statement non-functional or causing unexpected behavior. This mismatch leads to an AccessDenied error because the policy evaluation fails to properly deny or allow the action.

Exam trap

The trap here is that candidates may assume 'StringNotEquals' supports wildcards like 'StringNotLike' does, or they may focus on the Resource wildcard (Option A) as the obvious cause, missing the subtle condition operator mismatch.

How to eliminate wrong answers

Option A is wrong because setting the Resource to '*' is generally acceptable for service-linked roles or broad permissions, and the error is specifically about an AccessDenied due to a policy condition issue, not resource specificity. Option B is wrong because 'StringNotEquals' is a valid condition operator; the issue is not the operator itself but the use of a wildcard in its value, which is unsupported. Option C is wrong because the IAM role's ability to assume the SageMaker execution role is a separate permission (sts:AssumeRole) and not directly related to the training job creation failure caused by the Deny statement's condition syntax.

977
MCQmedium

A data engineer needs to transfer 50 TB of historical data from an on-premises Hadoop cluster to Amazon S3. The on-premises network has a 100 Mbps connection to AWS. The transfer must be completed within one week. Which approach should the engineer use?

A.Use AWS Snowball Edge device to physically transfer the data.
B.Use Amazon S3 Transfer Acceleration.
C.Use AWS DataSync to transfer the data over the network.
D.Use multiple concurrent AWS CLI copy commands over VPN.
AnswerA

Snowball Edge can handle large data volumes without network limitations.

Why this answer

The on-premises network has a 100 Mbps connection, which yields a theoretical maximum transfer of about 1.08 TB per day (100 Mbps * 86400 seconds / 8 bits per byte / 1024^4 bytes per TB). To transfer 50 TB within 7 days, the required throughput is approximately 7.14 TB per day, far exceeding the available bandwidth. AWS Snowball Edge provides a physical shipping method that bypasses network constraints entirely, making it the only viable option for this volume and timeline.

Exam trap

The trap here is that candidates may overestimate the effectiveness of acceleration or parallelization techniques, failing to calculate that a 100 Mbps link can only transfer approximately 1.08 TB per day, making any network-based option mathematically impossible for 50 TB in one week.

How to eliminate wrong answers

Option B is wrong because Amazon S3 Transfer Acceleration optimizes network paths using AWS edge locations but does not increase the available bandwidth of the 100 Mbps link; the maximum transfer rate is still capped by the on-premises connection, making it impossible to transfer 50 TB in one week. Option C is wrong because AWS DataSync is a network-based transfer service that also depends on the 100 Mbps bandwidth; even with compression and parallelization, the total transfer time would exceed the one-week deadline. Option D is wrong because multiple concurrent AWS CLI copy commands over VPN still share the same 100 Mbps network bottleneck; while parallelism can improve utilization, it cannot overcome the fundamental bandwidth limitation, and the VPN overhead further reduces effective throughput.

978
MCQhard

A machine learning engineer is tuning a gradient boosting model using SageMaker Hyperparameter Tuning. The objective is to minimize MAE. The tuning job uses 20 training jobs. After 10 jobs, the best objective value is 5.2. Which action should the engineer take to potentially improve the result?

A.Set early stopping to avoid overfitting.
B.Change the objective metric to RMSE.
C.Increase the total number of training jobs to 50.
D.Switch the tuning strategy from Bayesian to Random search.
AnswerC

More jobs allow broader exploration and may find a better configuration.

Why this answer

Increasing the total number of training jobs from 20 to 50 gives the Bayesian optimization algorithm more opportunities to explore the hyperparameter space and exploit promising regions. With only 10 jobs completed, the tuning job may not have converged to the global minimum of MAE, and additional jobs can refine the search, especially since Bayesian search builds a probabilistic model that improves with more observations.

Exam trap

The trap here is that candidates mistakenly think early stopping (Option A) applies to the tuning job itself rather than to individual training jobs, or they assume changing the metric (Option B) will indirectly improve MAE, when in fact the tuning job's objective must directly match the business metric.

How to eliminate wrong answers

Option A is wrong because early stopping is a technique to halt training of a single model when validation performance stops improving, not a mechanism to improve the tuning job's best objective value; it prevents overfitting per job but does not help the hyperparameter search find a better configuration. Option B is wrong because changing the objective metric to RMSE would optimize for a different loss function, which contradicts the stated goal of minimizing MAE and could lead to a model that performs worse on the actual target metric. Option D is wrong because switching from Bayesian to Random search would discard the information already gathered from the first 10 jobs, likely reducing sample efficiency and making it harder to find a better result within the remaining budget.

979
Multi-Selectmedium

A data scientist is training a random forest model for a binary classification task. The dataset has 100,000 samples and 500 features. The model is overfitting. Which TWO actions are MOST likely to reduce overfitting?

Select 2 answers
A.Increase the number of trees in the forest
B.Reduce the maximum depth of each tree
C.Increase the number of features considered at each split
D.Use all features for each tree
E.Increase the minimum number of samples required to split an internal node
AnswersB, E

Shorter trees are simpler and less likely to overfit.

Why this answer

Reducing the maximum depth of each tree limits the complexity of individual trees, preventing them from memorizing noise and specific patterns in the training data. This is a standard regularization technique for random forests that directly combats overfitting by controlling the variance of the model.

Exam trap

AWS often tests the misconception that adding more trees always reduces overfitting, but the trap here is that without controlling tree complexity (depth or split criteria), more trees can still produce an overfit ensemble, especially when individual trees are allowed to grow unchecked.

980
MCQeasy

A machine learning engineer is deploying a model that was trained on a large dataset stored in Amazon S3. The model needs to be retrained daily with new data. Which approach is the MOST cost-effective for storing the training data while allowing quick access for retraining?

A.Store all data in S3 Standard
B.Use S3 Glacier Deep Archive
C.Use S3 Intelligent-Tiering
D.Use S3 One Zone-IA
AnswerC

Intelligent-Tiering automatically optimizes costs for data with changing access patterns.

Why this answer

S3 Intelligent-Tiering is the most cost-effective choice because it automatically moves data between access tiers (frequent, infrequent, and archive instant access) based on changing access patterns. Since the model is retrained daily, the training data will be accessed frequently during retraining but may have low access at other times, and Intelligent-Tiering optimizes storage costs without performance impact by charging a small monitoring fee per object.

Exam trap

The trap here is that candidates often choose S3 Standard assuming daily access justifies it, but they overlook that Intelligent-Tiering provides the same low-latency access for frequently used data while automatically reducing costs for data that becomes less active over time.

How to eliminate wrong answers

Option A is wrong because S3 Standard is designed for frequently accessed data and would be more expensive for data that is not accessed daily outside of retraining windows, leading to higher storage costs over time. Option B is wrong because S3 Glacier Deep Archive is intended for long-term archival with retrieval times of 12 hours or more, making it unsuitable for daily retraining that requires quick access. Option D is wrong because S3 One Zone-IA stores data in a single Availability Zone, which risks data loss if that zone fails, and it incurs retrieval costs that can add up with daily access, making it less cost-effective than Intelligent-Tiering for this mixed access pattern.

981
Multi-Selectmedium

A data scientist is using Amazon SageMaker to train a model and wants to track experiments, including parameters and metrics. Which THREE actions should be taken? (Choose three.)

Select 3 answers
A.Use SageMaker Studio to manually record experiments.
B.Use Amazon CloudWatch Logs to store experiment data.
C.Create an experiment in SageMaker Experiments.
D.Use the SageMaker SDK to log parameters and metrics in the training script.
E.Use the SageMaker SDK to create a trial and trial component.
AnswersC, D, E

Experiments organize runs.

Why this answer

SageMaker Experiments is the native service for organizing, tracking, and comparing machine learning training runs. It provides a structured way to create experiments, trials, and trial components, enabling systematic tracking of parameters and metrics without manual overhead.

Exam trap

The trap here is that candidates confuse logging to CloudWatch (which is for raw logs) with structured experiment tracking, or assume SageMaker Studio provides a manual recording interface, when in fact all experiment tracking must be done programmatically via the SDK or console API.

982
MCQhard

A machine learning team is using SageMaker Processing jobs to run feature engineering on large datasets. The job takes a long time to complete. Which change would most likely reduce the processing time?

A.Increase the number of instances in the processing cluster
B.Switch to local mode to avoid network overhead
C.Change the processing script from Python to PySpark
D.Use a larger instance type, e.g., from r5.xlarge to r5.24xlarge
AnswerA

More instances allow parallel processing, reducing overall time.

Why this answer

Increasing the number of instances in the processing cluster enables SageMaker Processing to distribute the workload across multiple nodes, leveraging parallel processing to reduce the overall execution time. SageMaker Processing uses a distributed computing model where each instance processes a subset of the data, so adding more instances directly increases parallelism and throughput for embarrassingly parallel tasks like feature engineering.

Exam trap

The trap here is that candidates often confuse scaling up (larger instance type) with scaling out (more instances), assuming that a bigger instance always yields faster processing, but for distributed data processing, horizontal scaling is usually more effective for large datasets.

How to eliminate wrong answers

Option B is wrong because local mode runs the job on a single local machine, which eliminates network overhead but does not scale; it would likely increase processing time for large datasets due to limited compute resources. Option C is wrong because simply changing the script from Python to PySpark does not inherently reduce processing time unless the job is already configured to run on a distributed cluster; PySpark requires a Spark runtime and cluster setup, and without that, it may even add overhead. Option D is wrong because using a larger instance type (e.g., r5.xlarge to r5.24xlarge) provides more vCPUs and memory per instance but does not increase parallelism beyond a single node; for large datasets, the bottleneck is often I/O and data shuffling, which a single larger instance cannot address as effectively as multiple instances.

983
MCQmedium

A data scientist is using Amazon SageMaker to train a linear regression model. The training job fails with the error: 'AlgorithmError: Input data has NaN values'. Which step should the data scientist take to resolve this issue?

A.Convert the data to a sparse format
B.Switch to a different algorithm that handles missing values
C.Impute missing values or remove rows with NaN values
D.Increase the number of training instances
AnswerC

Handling missing values by imputation or removal resolves the NaN error.

Why this answer

The error 'AlgorithmError: Input data has NaN values' indicates missing values in the dataset. Linear regression cannot handle NaN values. The appropriate action is to either impute missing values (e.g., using mean/median) or remove rows with NaN values.

Option A (convert to sparse format) is used for handling zero values, not missing values, and will not resolve NaN errors. Option B (switch to a different algorithm) is unnecessary because data preprocessing can fix the issue; moreover, many algorithms also cannot handle NaN. Option C is correct.

Option D (increase training instances) only adds more compute resources and does not fix data quality issues.

984
MCQmedium

A company uses SageMaker to host a model for real-time predictions. The model is updated weekly. To minimize downtime during model updates, what should the company do?

A.Create a new endpoint configuration with the new model and update the endpoint to use the new configuration
B.Create a second endpoint with the new model and use an Application Load Balancer to route traffic
C.Update the existing endpoint configuration with the new model URL
D.Delete the existing endpoint and create a new one with the updated model
AnswerA

SageMaker supports blue/green deployment by updating endpoint to new configuration, minimizing downtime.

Why this answer

SageMaker allows you to create a new endpoint configuration with the updated model and then update the existing endpoint to use this new configuration. This triggers a rolling update where SageMaker gradually shifts traffic from the old model to the new one, ensuring zero downtime during the transition. The endpoint remains available throughout the process, and you can roll back quickly if needed by reverting to the previous configuration.

Exam trap

The trap here is that candidates often assume that updating the endpoint configuration directly (Option C) is sufficient, but they miss that SageMaker requires a new endpoint configuration object to trigger a safe, rolling update rather than an in-place replacement that can cause downtime.

How to eliminate wrong answers

Option B is wrong because using a second endpoint with an Application Load Balancer introduces unnecessary complexity and cost, and SageMaker does not natively integrate with ALB for endpoint traffic routing; instead, SageMaker’s built-in endpoint update mechanism already handles zero-downtime deployments. Option C is wrong because updating the existing endpoint configuration with a new model URL does not trigger a rolling update; it immediately replaces the model behind the endpoint, which can cause downtime or errors during the transition. Option D is wrong because deleting the existing endpoint and creating a new one results in a period where the endpoint is unavailable, causing downtime until the new endpoint is fully provisioned and traffic is redirected.

985
MCQhard

A data scientist is training a deep learning model on a large dataset using Amazon SageMaker. The training job is taking too long. The scientist notices that GPU utilization is low and data loading is the bottleneck. Which action should the scientist take to improve training performance?

A.Increase the number of training instances
B.Use Pipe mode for the training data channel
C.Change the instance type to a CPU instance
D.Reduce the batch size
AnswerB

Pipe mode streams data directly from S3, reducing I/O overhead and allowing the GPU to receive data faster, thus improving utilization and training performance.

Why this answer

Low GPU utilization with a data loading bottleneck indicates that the CPU cannot feed data to the GPU quickly enough. SageMaker's Pipe mode streams training data directly from S3 without first downloading it to the instance's local storage, reducing I/O overhead and improving data throughput. Option A: Increasing the number of training instances does not address the per-instance data loading bottleneck; each GPU would still be underutilized.

Option C: Changing to a CPU instance would be slower because CPUs are less efficient for deep learning training. Option D: Reducing the batch size would decrease GPU utilization further, exacerbating the underutilization problem.

986
MCQmedium

A data scientist is training a deep learning model using TensorFlow on Amazon SageMaker. The training job uses a single GPU instance but the GPU utilization is low. Which action is MOST likely to improve GPU utilization?

A.Increase the batch size
B.Use a smaller instance type
C.Add more features
D.Decrease the number of epochs
AnswerA

Larger batch size better utilizes GPU.

Why this answer

Increasing the batch size allows the GPU to process more data in parallel per training step, which keeps the GPU compute units busier and reduces idle time. In TensorFlow on SageMaker, a small batch size can cause the GPU to finish computation quickly and then wait for the next batch to be loaded, leading to low utilization. This is the most direct way to improve GPU throughput without changing the instance or model architecture.

Exam trap

The trap here is that candidates confuse low GPU utilization with overfitting or model complexity, leading them to choose options like adding features or reducing epochs, when the real issue is underutilization of parallel compute resources due to insufficient batch size.

How to eliminate wrong answers

Option B is wrong because using a smaller instance type would reduce GPU compute capacity, likely worsening utilization and increasing training time. Option C is wrong because adding more features increases the input dimensionality, which may increase computation per sample but does not address the root cause of low GPU utilization (insufficient parallelism). Option D is wrong because decreasing the number of epochs reduces total training time but does not affect how efficiently the GPU is used during each step; utilization per step remains unchanged.

987
Multi-Selectmedium

A company is using Amazon Kinesis Data Streams with 10 shards to ingest clickstream data. Each record is approximately 50 KB. The data is consumed by a Lambda function that writes to DynamoDB. The Lambda function is experiencing throttling errors. Which TWO actions should the data engineer take to resolve the issue? (Choose TWO.)

Select 2 answers
A.Increase the record size to 1 MB to reduce the number of records
B.Switch to Kinesis Data Firehose instead of Data Streams
C.Request a limit increase for the Lambda function's concurrent execution limit
D.Increase the number of shards in the Kinesis stream
E.Increase the batch size in the Lambda event source mapping
AnswersC, E

This directly alleviates throttling by allowing more concurrent executions.

Why this answer

The Lambda function is experiencing throttling errors because it is being invoked too frequently. To resolve this, the data engineer should increase the Lambda function's concurrent execution limit (option C) to allow more simultaneous executions, and increase the batch size in the Lambda event source mapping (option E) to process more records per invocation, reducing the number of invocations. Option A (increase record size) is irrelevant as it would increase data volume.

Option B (switch to Kinesis Data Firehose) changes the architecture and does not directly address Lambda throttling. Option D (increase the number of shards) would increase throughput but also potentially increase concurrency without solving the throttling issue. Therefore, the correct answers are C and E.

988
MCQhard

A company is using Amazon SageMaker Ground Truth to create a labeled dataset for object detection. The labeling job is taking longer than expected. The team notices that many workers are spending a lot of time on images with no objects. Which labeling strategy should they use to reduce costs and time?

A.Use a private workforce instead of public.
B.Create a pre-labeling task where workers only identify if an object exists, then send only positive images for full labeling.
C.Use automated data labeling with a pre-trained model to filter empty images.
D.Increase the number of workers per dataset object.
AnswerB

This two-stage approach reduces work on empty images.

Why this answer

It introduces a two-stage labeling workflow: first, workers perform a quick binary classification to identify images containing objects, and only those positive images proceed to the expensive, time-consuming bounding box annotation. This directly reduces the cost and time spent on empty images, which is the root cause of the delay.

Exam trap

The trap here is that candidates may assume 'automated data labeling' (Option C) is the fastest solution, but they overlook that it requires a pre-trained model and labeled data to start, making it impractical for a new labeling project where the goal is to create the initial labeled dataset.

How to eliminate wrong answers

Option A is wrong because switching to a private workforce does not address the core issue of workers wasting time on empty images; it only changes the pool of workers, potentially increasing cost without improving efficiency. Option C is wrong because automated data labeling with a pre-trained model requires a labeled dataset to train or fine-tune, which is the very problem the team is trying to solve, and it may introduce bias or errors in filtering empty images without ground truth validation. Option D is wrong because increasing the number of workers per dataset object (using annotation consolidation) does not reduce the time spent on empty images; it only adds redundancy and cost, as each empty image would still be labeled by multiple workers.

989
Multi-Selectmedium

Which TWO actions can reduce inference latency for a SageMaker real-time endpoint? (Choose 2.)

Select 2 answers
A.Choose a larger instance type with more compute capacity.
B.Add more instances behind the endpoint.
C.Use batch transform instead.
D.Compile the model using SageMaker Neo.
E.Switch to asynchronous inference.
AnswersA, D

More compute reduces per-request latency.

Why this answer

Choosing a larger instance type with more compute capacity (Option A) reduces inference latency because it provides more CPU/GPU and memory resources, enabling the model to process each request faster. This directly decreases the time per inference, which is the primary driver of latency for real-time endpoints.

Exam trap

A common trap in AWS exams is the distinction between scaling for throughput (adding instances) vs. scaling for latency (increasing instance size or optimizing the model). Candidates mistakenly choose 'add more instances' thinking it reduces per-request latency.

990
MCQhard

A data scientist is training a deep learning model on Amazon SageMaker using a large dataset stored in S3. The training job is taking too long due to high I/O latency waiting for data to be downloaded from S3. Which action would MOST effectively reduce the I/O latency?

A.Use File mode for the training channel
B.Increase the number of training instances
C.Use Pipe mode for the training channel
D.Use Amazon SageMaker Elastic Inference
AnswerC

Pipe mode streams data directly from S3, reducing disk I/O and latency.

Why this answer

Pipe mode streams data directly from S3 into the training algorithm without writing to disk, eliminating the I/O latency caused by downloading files to the local storage. This is the most effective solution because the bottleneck is data transfer from S3, and Pipe mode reduces it to near-zero latency by feeding data on the fly.

Exam trap

The trap here is that candidates confuse File mode (which downloads fully) with Pipe mode (which streams), or mistakenly think adding more instances (Option B) solves a per-instance I/O bottleneck, when in fact it does not address the root cause of S3 download latency.

How to eliminate wrong answers

Option A is wrong because File mode downloads the entire dataset to the training instance's local disk before training starts, which actually increases I/O latency due to the full download overhead. Option B is wrong because increasing the number of training instances does not reduce per-instance I/O latency; it distributes the workload but each instance still suffers from the same S3 download bottleneck. Option D is wrong because Amazon SageMaker Elastic Inference accelerates model inference, not training data loading, so it has no effect on I/O latency during training.

991
MCQmedium

A company is building a recommendation system using Amazon SageMaker. The data is stored in a large S3 bucket with millions of small CSV files. The team wants to train a factorization machines model. Which data ingestion strategy will be MOST efficient?

A.Use a SageMaker Processing job with a Spark container to read the files and write a single RecordIO file.
B.Use Amazon Athena to query the data and output to a single CSV.
C.Point the training job directly to the S3 bucket containing the CSV files.
D.Use SageMaker Data Wrangler to create a data flow and export to a training dataset.
AnswerA

Spark can efficiently combine many small files into a single format optimized for training.

Why this answer

SageMaker's factorization machines algorithm requires data in RecordIO-wrapped protobuf format for optimal performance, especially with high-dimensional sparse data. Using a SageMaker Processing job with Spark efficiently reads millions of small CSV files from S3, coalesces them into a single or few large RecordIO files, and avoids the overhead of many small S3 GET requests during training, which would otherwise cause severe I/O bottlenecks.

Exam trap

The trap here is that candidates often assume SageMaker can efficiently handle any data format directly from S3, overlooking that factorization machines specifically require RecordIO-wrapped protobuf input for optimal performance with sparse, high-dimensional data.

How to eliminate wrong answers

Option B is wrong because Amazon Athena outputs query results as a single CSV file, which does not convert the data into the RecordIO-wrapped protobuf format required by SageMaker's factorization machines, and the single CSV file still suffers from inefficient row-based parsing during training. Option C is wrong because pointing the training job directly to the S3 bucket with millions of small CSV files causes excessive S3 GET requests and network overhead, leading to poor training performance and potential throttling, and the CSV format is not optimized for the sparse, high-dimensional data typical of factorization machines. Option D is wrong because SageMaker Data Wrangler is designed for data preparation and feature engineering, not for converting data into the specific RecordIO protobuf format required by factorization machines, and it does not natively output to that format.

992
MCQeasy

A company wants to serve predictions from a model using a REST API with low latency. Which SageMaker deployment option is most appropriate?

A.SageMaker Notebook instance
B.SageMaker real-time endpoint
C.SageMaker Processing job
D.SageMaker Batch Transform
AnswerB

Real-time endpoints provide low-latency REST API.

Why this answer

SageMaker real-time endpoints are designed for low-latency inference, deploying the model behind an HTTPS endpoint that autoscales to handle request traffic. This directly meets the requirement for serving predictions via a REST API with minimal latency, as the endpoint keeps the model loaded and ready to respond to individual requests in milliseconds.

Exam trap

The trap here is that candidates confuse batch inference (Batch Transform) with real-time inference, or mistakenly think a Notebook instance can serve as a production API, when only the real-time endpoint provides the persistent, low-latency REST API required.

How to eliminate wrong answers

Option A is wrong because a SageMaker Notebook instance is an interactive development environment for building and testing models, not a deployment option for serving predictions via an API. Option C is wrong because a SageMaker Processing job is a transient compute resource for data processing or model evaluation, not for hosting a persistent REST API with low-latency inference. Option D is wrong because SageMaker Batch Transform is designed for asynchronous, batch predictions on large datasets, not for real-time, low-latency serving of individual requests via a REST API.

993
MCQmedium

A data engineer needs to automate the transformation of CSV files to Parquet format as soon as they are uploaded to an S3 bucket. The transformed files should be stored in another S3 bucket. Which solution is the most cost-effective and requires the least maintenance?

A.Configure an S3 event notification to invoke a Lambda function.
B.Configure an S3 event notification to invoke an AWS Glue job.
C.Run an Amazon EMR cluster continuously to watch for new files.
D.Set up an EC2 instance with a cron job to poll the S3 bucket.
AnswerA

Lambda is serverless, pay-per-execution, ideal for this use case.

Why this answer

AWS Lambda, triggered by S3 event notifications, provides a serverless, event-driven architecture that automatically converts CSV to Parquet upon file upload. This approach is cost-effective because you pay only for compute time during execution, and it requires minimal maintenance as AWS manages the infrastructure, scaling, and fault tolerance.

Exam trap

The trap here is that candidates often over-engineer the solution by choosing AWS Glue or EMR for a simple file format conversion, failing to recognize that Lambda is the most cost-effective and low-maintenance option for lightweight, event-driven transformations.

How to eliminate wrong answers

Option B is wrong because invoking an AWS Glue job via S3 event notification incurs higher costs and longer startup times (Glue job startup overhead) compared to Lambda, and Glue is designed for complex ETL pipelines, not simple file-by-file conversions. Option C is wrong because running an Amazon EMR cluster continuously to watch for new files is expensive (cluster running 24/7) and requires ongoing maintenance of cluster configuration, scaling, and monitoring. Option D is wrong because setting up an EC2 instance with a cron job to poll the S3 bucket introduces ongoing costs for the running instance, manual maintenance of the OS and cron scripts, and potential latency from polling intervals.

994
MCQmedium

A company is building a recommendation system for an e-commerce platform. The system needs to suggest products to users based on past purchases and browsing history. Which approach would be most appropriate for this use case?

A.Content-based filtering using product descriptions
B.K-means clustering of users based on demographics
C.Collaborative filtering using past user-item interactions
D.Matrix factorization on user-item ratings
AnswerC

Collaborative filtering leverages user behavior patterns to make recommendations.

Why this answer

Collaborative filtering is the most appropriate approach because it leverages past user-item interactions (e.g., purchases, clicks) to identify patterns and recommend items that similar users have liked. This method directly captures user behavior and preferences without requiring explicit product metadata, making it ideal for e-commerce recommendation systems where implicit feedback is abundant.

Exam trap

AWS often tests the distinction between collaborative filtering and matrix factorization, where candidates mistakenly choose matrix factorization (Option D) because it is a popular technique, but the question's emphasis on 'past purchases and browsing history' (implicit feedback) makes collaborative filtering the more direct and practical choice, as matrix factorization typically requires explicit ratings or careful adaptation for implicit data.

How to eliminate wrong answers

Option A is wrong because content-based filtering relies solely on product descriptions or features, which ignores the collaborative signal from other users' behavior and fails to capture serendipitous recommendations or cross-category preferences. Option B is wrong because K-means clustering based on demographics groups users by static attributes (e.g., age, location), which does not model dynamic purchase behavior or item preferences, leading to poor recommendation accuracy. Option D is wrong because matrix factorization on user-item ratings assumes explicit numerical ratings (e.g., 1-5 stars), which are often sparse or unavailable in e-commerce; it also requires a dense rating matrix and cannot directly handle implicit feedback like browsing history without additional preprocessing.

995
MCQhard

A financial services company is deploying a machine learning model for credit risk assessment. The model must have an inference latency under 200ms and must be able to handle up to 1000 transactions per second (TPS). The company wants to minimize costs. The model is a gradient boosting model implemented in XGBoost. Which SageMaker deployment option should the team choose?

A.Use SageMaker Batch Transform to process transactions in batches.
B.Use SageMaker asynchronous inference for queued requests.
C.Deploy the model on a SageMaker real-time endpoint with multiple instances behind a load balancer.
D.Use SageMaker Serverless Inference for automatic scaling.
AnswerC

Real-time endpoints provide sub-second latency and can scale to 1000 TPS.

Why this answer

A SageMaker real-time endpoint with multiple instances behind a load balancer provides the sub-200ms inference latency and 1000 TPS throughput required for synchronous, low-latency predictions. XGBoost models are well-suited for real-time endpoints, and horizontal scaling with multiple instances ensures high availability and cost efficiency by matching capacity to demand.

Exam trap

The trap here is that candidates often choose Serverless Inference (Option D) thinking it automatically scales to any load, but they overlook the cold start latency and concurrency limits that prevent it from meeting strict sub-200ms latency and 1000 TPS requirements.

How to eliminate wrong answers

Option A is wrong because SageMaker Batch Transform is designed for offline, asynchronous processing of large datasets and does not meet the sub-200ms latency requirement for real-time transactions. Option B is wrong because SageMaker asynchronous inference is intended for requests with larger payloads or longer processing times (typically seconds to minutes), not for sub-200ms latency or high TPS synchronous workloads. Option D is wrong because SageMaker Serverless Inference auto-scales from zero but incurs cold start latency (often >1 second) and has a maximum concurrency limit (default 200) that cannot guarantee 1000 TPS with sub-200ms latency, making it unsuitable for this throughput and latency requirement.

996
Multi-Selecthard

A data scientist is performing EDA on a dataset with 10 million rows. The dataset has a column 'income' with outliers. The data scientist wants to detect and handle outliers. Which THREE approaches are appropriate?

Select 3 answers
A.Calculate z-scores and flag values beyond 3 standard deviations
B.Apply min-max scaling to the column
C.Convert the column to one-hot encoding
D.Visualize the distribution with box plots
E.Use the interquartile range (IQR) to identify outliers
AnswersA, D, E

Z-score is a common method.

Why this answer

The correct approaches for detecting outliers in a dataset with 10 million rows are calculating z-scores (A), using IQR (E), and visualization with box plots (D). Z-scores flag values beyond 3 standard deviations, IQR identifies outliers as points below Q1-1.5*IQR or above Q3+1.5*IQR, and box plots provide a visual summary of the distribution. Min-max scaling (B) only transforms the data range and does not detect outliers.

One-hot encoding (C) is for categorical variables, not outlier detection. Thus options A, D, and E are correct.

997
Multi-Selectmedium

A data scientist is training a binary classifier using a large dataset with class imbalance (90% negative, 10% positive). After training a logistic regression model, the F1 score is low but accuracy is high. Which TWO actions should the data scientist take to improve model performance? (Choose 2.)

Select 2 answers
A.Switch to evaluation metrics such as F1 score or AUC-ROC instead of accuracy.
B.Apply feature scaling to ensure all features contribute equally.
C.Add more features to the model to improve its capacity.
D.Resample the training data using techniques like SMOTE to balance the classes.
E.Increase the regularization parameter to reduce overfitting.
AnswersA, D

Correct: Metrics like F1 are robust to class imbalance.

Why this answer

(switch to evaluation metrics like F1 or AUC-ROC) is correct because accuracy is misleading for imbalanced datasets. Option D (resample using SMOTE) is correct because it balances the classes and helps the model learn the minority class better. Option B (feature scaling) is a general preprocessing step but does not directly address class imbalance.

Option C (add more features) may not help if the model is already biased toward the majority class. Option E (increase regularization) might reduce overfitting but does not target the imbalance issue.

998
MCQhard

A machine learning engineer is analyzing a dataset that contains a categorical feature 'country' with 200 unique values. The target variable is binary. The engineer wants to use this feature in a linear model. Which encoding method should be applied during EDA to prepare the data for modeling, considering the high cardinality?

A.Target encoding with cross-validation
B.Label encoding
C.Frequency encoding
D.One-hot encoding
AnswerA

Target encoding captures the relationship with the target, and cross-validation prevents data leakage.

Why this answer

Target encoding with cross-validation (Option A) is the correct choice for this scenario because it replaces each category in the high-cardinality feature 'country' with the mean of the target variable, effectively capturing the relationship with the target while avoiding the curse of dimensionality. Cross-validation is essential to prevent overfitting by computing the target means on out-of-fold data. One-hot encoding (Option D) would create 199 dummy variables, leading to high dimensionality and potential overfitting, making it unsuitable for linear models with limited data.

Label encoding (Option B) imposes an arbitrary ordinal relationship that the linear model would misinterpret. Frequency encoding (Option C) may not capture the relationship with the target and could lose predictive power.

999
Multi-Selectmedium

A data scientist is building a recommender system using Amazon SageMaker. The dataset contains user-item interactions with implicit feedback (clicks). Which THREE evaluation metrics are appropriate for this use case?

Select 3 answers
A.Root Mean Squared Error (RMSE)
B.Precision@k
C.Mean Average Precision (MAP)
D.Recall@k
E.Area Under the ROC Curve (AUC-ROC)
AnswersB, C, D

Precision@k measures relevance of top-k recommendations.

Why this answer

For implicit feedback (e.g., clicks) in recommender systems, evaluation metrics should focus on ranking quality without requiring explicit negative labels. Precision@k measures the proportion of relevant items among top-k recommendations, Recall@k measures the proportion of relevant items retrieved in top-k, and Mean Average Precision (MAP) averages precision across multiple recall levels, all suitable for top-k recommendation tasks. RMSE is for explicit rating prediction and requires ground truth ratings, not applicable to implicit feedback.

AUC-ROC is for binary classification with both positive and negative samples, but implicit feedback lacks explicit negatives, making it unsuitable.

Exam trap

The trap here is that candidates often confuse regression metrics (RMSE) or binary classification metrics (AUC-ROC) as applicable to implicit feedback, not realizing that recommender systems with implicit feedback require ranking-based metrics that handle only positive observations and no explicit negative labels.

1000
MCQeasy

A company wants to perform real-time analytics on streaming data from clickstreams. The data needs to be ingested, processed, and made available for querying within seconds. Which AWS service should be used for the processing step?

A.AWS Glue
B.Amazon Redshift
C.Amazon Kinesis Data Analytics
D.Amazon Athena
AnswerC

Kinesis Data Analytics processes streaming data in real-time.

Why this answer

Amazon Kinesis Data Analytics is the correct choice because it enables real-time processing and analysis of streaming data using SQL or Apache Flink. It can ingest data from Kinesis Data Streams or Kinesis Data Firehose, process it with sub-second latency, and output results to destinations like Kinesis Data Streams or Firehose for further querying, meeting the requirement for analytics within seconds.

Exam trap

The trap here is that candidates often confuse AWS Glue's streaming ETL capability (which still relies on Spark Structured Streaming with higher latency) with Kinesis Data Analytics' native real-time processing, or they assume Athena can query streaming data directly when it only queries data at rest in S3.

How to eliminate wrong answers

Option A is wrong because AWS Glue is a serverless ETL service designed for batch processing and data cataloging, not for real-time stream processing with sub-second latency. Option B is wrong because Amazon Redshift is a data warehouse optimized for analytical queries on large datasets, but it is not designed for real-time stream processing; it ingests data in batches or via streaming ingestion with higher latency. Option D is wrong because Amazon Athena is an interactive query service for analyzing data in Amazon S3 using SQL, but it operates on data at rest and cannot process streaming data in real time.

1001
MCQmedium

A data scientist is training a classification model on an imbalanced dataset where the positive class represents only 5% of the data. Which technique would BEST address the class imbalance without discarding data?

A.Use SMOTE to generate synthetic samples for the minority class
B.Randomly undersample the majority class
C.Adjust the decision threshold to 0.95
D.Randomly oversample the minority class with replacement
AnswerA

SMOTE creates synthetic samples, balancing the dataset without data loss.

Why this answer

SMOTE (Synthetic Minority Oversampling Technique) is the best choice because it generates synthetic samples for the minority class by interpolating between existing minority instances, effectively balancing the dataset without discarding any data. This avoids the information loss of undersampling and the overfitting risk of simple random oversampling, making it ideal for a 5% positive class scenario.

Exam trap

The MLS-C01 exam often tests the distinction between data-level techniques (like SMOTE) and post-hoc adjustments (like threshold tuning), trapping candidates who think changing the threshold alone solves the imbalance without addressing the underlying data distribution.

How to eliminate wrong answers

Option B is wrong because randomly undersampling the majority class discards data, which can lead to loss of valuable information and reduced model performance, especially when the majority class contains important patterns. Option C is wrong because adjusting the decision threshold to 0.95 does not address class imbalance at the data level; it only changes the classification cutoff, which may improve recall but does not fix the underlying skewed distribution and can harm precision. Option D is wrong because randomly oversampling the minority class with replacement duplicates existing samples, which can cause overfitting to the minority class and does not introduce new, diverse examples like SMOTE does.

1002
Multi-Selecthard

Which THREE factors should be considered when choosing between Amazon Kinesis Data Streams and Amazon Kinesis Data Firehose for a real-time data ingestion pipeline? (Choose three.)

Select 3 answers
A.The need for built-in data transformation and analytics.
B.The need for custom real-time processing logic using consumer applications.
C.The required end-to-end latency (seconds vs. minutes).
D.The need to manually manage shard capacity and scaling.
E.The requirement for exactly-once delivery semantics.
AnswersB, C, D

Correct: Data Streams supports custom consumers; Firehose does not.

Why this answer

Kinesis Data Streams supports custom real-time processing via consumer applications using the Kinesis Client Library (KCL) or AWS Lambda, enabling fine-grained control over record processing, checkpointing, and custom logic. This is a key differentiator from Kinesis Data Firehose, which only supports built-in transformations via Lambda and does not allow direct consumer access to the stream.

Exam trap

The trap here is that candidates often confuse Kinesis Data Firehose's built-in Lambda transformations with the custom real-time processing capabilities of Kinesis Data Streams, overlooking that Firehose does not allow direct consumer applications or sub-second latency.

1003
Matchingmedium

Match each SageMaker feature to its description.

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

Concepts
Matches

Managed compute to train a model

Host a model for real-time inference

Run inference on a batch of data

Jupyter notebook for exploration

Run data processing scripts

Why these pairings

The correct matches are: Ground Truth for dataset labeling, Neo for model optimization, Debugger for training monitoring, and Autopilot for automated model building. Common confusions include swapping Ground Truth and Neo, or mixing Debugger with Autopilot.

1004
MCQmedium

A data scientist is performing exploratory data analysis on a dataset with missing values. The dataset contains a column 'income' with 20% missing values. The income distribution is right-skewed. Which imputation method is most appropriate to preserve the skewness?

A.Impute with the mean income
B.Impute with the median income
C.Drop rows with missing income
D.Impute with the mode income
AnswerB

Median is robust to skewness and preserves the distribution shape.

Why this answer

The median is robust to the right-skewed distribution of income. Imputing with the median preserves the skewness and central tendency without being influenced by outliers, unlike the mean which would pull the imputed values toward the tail and reduce skewness. Option A is wrong because the mean is sensitive to outliers and would distort the distribution.

Option C is wrong because dropping rows reduces sample size and may bias the dataset. Option D is wrong because the mode is typically used for categorical data and is not meaningful for continuous skewed data.

1005
MCQmedium

A company is building a data lake on Amazon S3. Raw data is ingested from multiple sources in different formats (CSV, JSON, Parquet). The data must be cataloged and made queryable using Amazon Athena. The data schema may evolve over time. Which approach minimizes manual effort and supports schema evolution?

A.Use Athena only, without a catalog, by directly querying files
B.Use Amazon EMR to process data and write to a Hive metastore
C.Use AWS Glue Crawlers to automatically create and update the Glue Data Catalog
D.Manually create tables in Athena using DDL statements
AnswerC

Crawlers automatically detect schema changes and update the catalog.

Why this answer

AWS Glue Crawlers automatically infer schema from data in S3, create and update the Glue Data Catalog tables, and handle schema evolution by detecting changes such as new columns or partitions. This minimizes manual effort because the crawler runs on a schedule or trigger, and the catalog is natively integrated with Athena for querying without any additional setup.

Exam trap

The trap here is that candidates may think Athena can query files directly without a catalog (Option A), but Athena relies on the Glue Data Catalog (or an external Hive metastore) to map file locations and schemas, making a catalog mandatory for querying.

How to eliminate wrong answers

Option A is wrong because Athena requires a catalog (the Glue Data Catalog or an external Hive metastore) to query data; directly querying files without a catalog is not supported. Option B is wrong because while EMR can write to a Hive metastore, this adds operational overhead for managing EMR clusters and does not automatically catalog data from multiple sources or handle schema evolution as seamlessly as Glue Crawlers. Option D is wrong because manually creating tables with DDL statements requires ongoing manual effort to update schemas as data evolves, and it does not scale well for multiple sources and frequent schema changes.

1006
MCQmedium

A company is using Amazon SageMaker to host a real-time inference endpoint for a natural language processing model. The endpoint is configured with an ml.m5.large instance. After deployment, the company observes that the inference latency is higher than expected, and the endpoint is experiencing CPU utilization near 100% during peak hours. The model is a PyTorch model that uses a transformer architecture. The company wants to reduce latency without increasing cost significantly. Which approach should the company take?

A.Configure the endpoint with Auto Scaling to add more instances during peak hours.
B.Switch to batch transform for inference.
C.Attach an Elastic Inference accelerator to the existing instance.
D.Change the endpoint instance type to ml.g4dn.xlarge to use GPU acceleration.
AnswerD

Correct: GPU instances accelerate transformer inference, reducing latency.

Why this answer

The issue is high CPU utilization causing latency for a PyTorch transformer model. GPU instances like ml.g4dn.xlarge can significantly accelerate inference through parallel processing, reducing latency. Option D is correct.

Elastic Inference (C) may provide some acceleration but is less effective for transformer models and adds complexity. Auto Scaling (A) helps with traffic spikes but does not reduce per-request latency. Batch Transform (B) is for offline inference, not real-time.

1007
Multi-Selecteasy

A data analyst is exploring a dataset with a binary target variable. Which TWO visualizations are most useful for understanding the relationship between a numerical feature and the target?

Select 2 answers
A.Pie chart of the feature
B.Bar chart of the feature
C.Histogram with overlaid target classes
D.Box plot grouped by target class
E.Scatter plot of the feature versus target
AnswersC, D

Shows how the feature distribution differs by class.

Why this answer

Options C and D are correct. A histogram with overlaid target classes (C) allows viewing the distribution of the feature for each class, highlighting separability. A box plot grouped by target class (D) shows median, spread, and outliers per class, useful for comparing distributions.

Option A (pie chart) is inappropriate for numerical features and binary targets. Option B (bar chart) is for categorical features, not numerical. Option E (scatter plot) requires two numerical variables; here the target is binary, so it would produce overlapping points and is less informative.

1008
MCQmedium

A company is building a recommendation system using matrix factorization. The training data contains user-item interactions. The model performs well on the training set but poorly on the test set. Which regularization technique should be applied to improve generalization?

A.Add L1 regularization to the user and item latent factors
B.Add L2 regularization to the user and item latent factors
C.Apply dropout to the latent factors during training
D.Use batch normalization on the factors
AnswerB

L2 regularization penalizes large factor values, reducing overfitting.

Why this answer

L2 regularization (weight decay) penalizes large values in the user and item latent factor matrices, which helps prevent overfitting by encouraging the model to learn smoother, more generalizable representations. This is the standard regularization technique used in matrix factorization for collaborative filtering, as it directly controls the magnitude of the latent vectors without inducing sparsity.

Exam trap

The MLS-C01 exam often tests the distinction between L1 and L2 regularization in the context of matrix factorization, where candidates mistakenly choose L1 because they associate it with feature selection, but the correct choice for controlling latent factor magnitude and preventing overfitting is L2 regularization.

How to eliminate wrong answers

Option A is wrong because L1 regularization induces sparsity in the latent factors, which is not typically desired in matrix factorization—sparse factors can lose the dense, low-rank structure needed for capturing collaborative signals. Option C is wrong because dropout is a regularization technique designed for neural networks, not for standard matrix factorization models, and applying it to latent factors would disrupt the multiplicative interaction that defines the prediction. Option D is wrong because batch normalization normalizes activations within mini-batches to stabilize training in deep networks, but matrix factorization has no notion of mini-batch activations and batch normalization does not address overfitting from latent factor magnitudes.

1009
MCQhard

A machine learning engineer is deploying a model to an Amazon SageMaker endpoint. The model is a PyTorch model that requires a custom inference script. The engineer notices that the endpoint is returning 500 errors after deployment. Which step should the engineer take to debug the issue?

A.Redeploy the endpoint with a different instance type.
B.Check the CloudWatch metrics for the endpoint.
C.Modify the inference script and update the endpoint.
D.View the CloudWatch Logs for the endpoint.
AnswerD

Logs contain stack traces and error messages.

Why this answer

When a SageMaker endpoint returns 500 errors, it typically indicates an application-level failure in the inference container, such as an unhandled exception in the custom inference script. CloudWatch Logs capture the stdout and stderr of the container, including Python tracebacks, which directly reveal the root cause. Option D is correct because viewing these logs is the first and most effective step to diagnose the specific error.

Exam trap

The trap here is that candidates confuse CloudWatch Metrics (aggregate data) with CloudWatch Logs (detailed output), and mistakenly choose metrics thinking they will show error details, when in fact only logs contain the actual error messages and stack traces.

How to eliminate wrong answers

Option A is wrong because changing the instance type addresses resource constraints (e.g., memory or CPU), not application logic errors that cause 500 errors. Option B is wrong because CloudWatch metrics (e.g., Invocations, ModelLatency) show aggregate performance and error counts but do not provide the detailed error messages or stack traces needed to debug a custom inference script. Option C is wrong because modifying the inference script without first understanding the error is speculative; the engineer must first view the logs to identify the specific failure before making changes.

1010
MCQmedium

A company uses SageMaker to train a large language model. The training job is taking too long. The data scientist wants to use distributed training with data parallelism. Which SageMaker feature should be used?

A.SageMaker distributed training libraries
B.SageMaker Neo
C.SageMaker Processing
D.SageMaker Debugger
AnswerA

SageMaker distributed training libraries provide built-in algorithms and utilities for data parallelism and model parallelism.

Why this answer

SageMaker's distributed training libraries support data parallelism, which allows training large models faster by splitting data across multiple GPUs. Option B (SageMaker Neo) is for model optimization and compilation, not for distributed training. Option C (SageMaker Processing) is for data preprocessing and postprocessing, not for training.

Option D (SageMaker Debugger) is for monitoring and debugging training jobs, not for distributing training.

1011
MCQmedium

A company is using Amazon SageMaker to train a model on a large dataset stored in S3. The training job is taking a long time due to slow data loading. Which action can the data scientist take to reduce data loading time?

A.Use Pipe mode to stream data from S3.
B.Use File mode and copy data to Amazon EBS.
C.Use a larger instance type with more memory.
D.Enable data augmentation during training.
AnswerA

Pipe mode streams data directly, reducing load time.

Why this answer

Pipe mode streams data directly from S3 into the training algorithm without first downloading it to the local storage, eliminating the bottleneck of disk I/O and reducing data loading time. This is especially effective for large datasets where the time to copy data to EBS (File mode) dominates the training job duration.

Exam trap

The MLS-C01 exam often tests the misconception that increasing instance size (Option C) solves all performance issues, but the trap here is that data loading latency is I/O-bound, not compute-bound, so Pipe mode directly mitigates the bottleneck by streaming instead of downloading.

How to eliminate wrong answers

Option B is wrong because File mode copies the entire dataset from S3 to the Amazon EBS volume attached to the training instance, which adds significant data transfer time before training can start, making it slower than Pipe mode for large datasets. Option C is wrong because using a larger instance type with more memory does not address the data loading bottleneck; it only speeds up computation after data is loaded, and the data transfer from S3 remains the limiting factor. Option D is wrong because data augmentation is a technique to artificially expand the training dataset by applying transformations, which would increase the data loading time and not reduce it.

1012
MCQmedium

A team is using SageMaker to train a model using the built-in XGBoost algorithm. The training job is taking longer than expected. The team suspects that the data is not being loaded efficiently. Which data format should they use to minimize training time?

A.Pipe mode with CSV
B.File mode with Parquet
C.Pipe mode with RecordIO-Protobuf
D.File mode with CSV
AnswerC

Streaming with efficient binary format.

Why this answer

Pipe mode with RecordIO-Protobuf is correct because it streams data directly from Amazon S3 to the training container without writing to disk, reducing I/O overhead. RecordIO-Protobuf also stores data in a binary, columnar format that XGBoost can parse more efficiently than CSV, especially for large datasets, leading to faster training times.

Exam trap

The trap here is that candidates often assume CSV is universally efficient due to its simplicity, overlooking that binary formats like RecordIO-Protobuf combined with streaming (Pipe mode) drastically reduce I/O latency and parsing overhead in SageMaker's distributed training environment.

How to eliminate wrong answers

Option A is wrong because Pipe mode with CSV still requires parsing text-based CSV records on the fly, which is slower than binary formats due to string-to-numeric conversion overhead. Option B is wrong because File mode downloads the entire dataset to the training instance's local storage before training begins, causing significant startup delays for large datasets. Option D is wrong because File mode with CSV combines the worst of both: full data download and slow text parsing, making it the least efficient choice for minimizing training time.

1013
MCQmedium

A data scientist is training a deep learning model for image classification using Amazon SageMaker. The training job is taking too long. The data scientist notices that GPU utilization is low (around 30%). Which action is most likely to improve GPU utilization and reduce training time?

A.Increase the batch size
B.Use a smaller instance type
C.Increase the learning rate
D.Reduce the batch size
AnswerA

Larger batch size keeps GPU busy, improving utilization and reducing total training time if the data pipeline can keep up.

Why this answer

Low GPU utilization (around 30%) indicates that the GPU is spending too much time idle while waiting for data batches to be processed. Increasing the batch size allows each training step to process more samples per forward/backward pass, which increases computational load on the GPU and improves hardware utilization. This directly reduces the number of steps needed per epoch, thereby decreasing overall training time.

Exam trap

The trap here is that candidates often confuse low GPU utilization with a need to reduce batch size (thinking smaller batches speed up training), when in fact increasing batch size is the standard remedy to saturate GPU compute and reduce wall-clock time.

How to eliminate wrong answers

Option B is wrong because using a smaller instance type would reduce available GPU compute resources, likely further lowering utilization and increasing training time. Option C is wrong because increasing the learning rate does not directly affect GPU utilization; it changes the optimization dynamics and may cause divergence or instability without addressing the underutilization bottleneck. Option D is wrong because reducing the batch size would decrease the amount of work per GPU step, further lowering utilization and increasing the number of steps, which would worsen training time.

1014
MCQhard

Refer to the exhibit. A SageMaker training job using the built-in Linear Learner algorithm fails with 'Loss function returned NaN'. Which hyperparameter change is MOST likely to resolve this issue?

A.Increase the learning rate to 0.5
B.Increase mini_batch_size to 2000
C.Decrease epochs to 5
D.Reduce learning_rate to 0.01
AnswerD

Lower learning rate helps convergence.

Why this answer

The 'Loss function returned NaN' error in SageMaker's built-in Linear Learner algorithm typically occurs when the learning rate is too high, causing gradient updates to overshoot optimal parameters and diverge. Reducing the learning rate to 0.01 stabilizes training by ensuring smaller, more controlled weight updates, preventing numerical instability that leads to NaN loss.

Exam trap

AWS often tests the misconception that increasing the learning rate speeds up convergence, but the trap here is that a high learning rate causes divergence and NaN loss, so the correct fix is to reduce it, not increase it.

How to eliminate wrong answers

Option A is wrong because increasing the learning rate to 0.5 would exacerbate the instability, making NaN loss more likely rather than resolving it. Option B is wrong because increasing mini_batch_size to 2000 does not directly address the learning rate-induced divergence; while larger batches can reduce gradient variance, they do not fix the fundamental issue of an overly aggressive step size. Option C is wrong because decreasing epochs to 5 would simply truncate training without addressing the root cause—the loss would still be NaN from the first few iterations if the learning rate is too high.

1015
MCQmedium

A data scientist is building a recommendation system using collaborative filtering. The dataset contains user-item interactions in a sparse matrix. The model will be trained on Amazon SageMaker using the built-in Factorization Machines algorithm. Which data format should the scientist use for the training data?

A.CSV format with all features as columns
B.JSON format with nested arrays
C.RecordIO-protobuf format with sparse features
D.Parquet format
AnswerC

RecordIO-protobuf is the recommended format for sparse data for Factorization Machines.

Why this answer

Amazon SageMaker's Factorization Machines algorithm expects input in the 'application/x-recordio-protobuf' format for sparse data, or in CSV format for dense data. For sparse data, Protobuf is recommended for performance.

1016
MCQeasy

A data scientist wants to understand the distribution of a categorical feature with 100 unique values. Which visualization is most appropriate?

A.Histogram
B.Bar chart
C.Scatter plot
D.Pie chart
AnswerB

Bar charts are ideal for displaying categorical frequencies.

Why this answer

A bar chart is the most appropriate visualization for displaying the distribution of a categorical feature with 100 unique values because it uses discrete bars to represent the frequency or proportion of each category. Unlike a histogram, which requires continuous numeric bins, a bar chart preserves the distinct categories and allows clear comparison of counts across all 100 levels.

Exam trap

The MLS-C01 exam often tests the distinction between histograms (for continuous data) and bar charts (for categorical data), and candidates mistakenly choose histogram because they confuse 'distribution' with 'numeric distribution' without recognizing the categorical nature of the feature.

How to eliminate wrong answers

Option A is wrong because a histogram is designed for continuous numeric data and groups values into bins, which is inappropriate for categorical features and would obscure the distinct categories. Option C is wrong because a scatter plot is used to visualize the relationship between two continuous variables, not the distribution of a single categorical feature. Option D is wrong because a pie chart, while usable for categorical data, becomes unreadable and misleading with 100 unique values due to overlapping small slices and difficulty comparing proportions; bar charts are far superior for many categories.

1017
Multi-Selecteasy

Which TWO of the following are benefits of feature scaling for machine learning algorithms?

Select 2 answers
A.Eliminates the effect of outliers
B.Reduces the need for feature selection
C.Improves performance of decision tree algorithms
D.Faster convergence of gradient descent
E.Prevents features with larger magnitudes from dominating distance-based algorithms
AnswersD, E

Scaling ensures all features contribute equally to the gradient.

Why this answer

Feature scaling, typically via standardization (z-score) or min-max normalization, ensures that gradient descent converges faster. Without scaling, features with larger numerical ranges dominate the gradient updates, causing the algorithm to oscillate and require more iterations to reach the optimum. Scaling produces a more spherical contour of the loss function, allowing gradient descent to take more direct steps toward the minimum.

Exam trap

The trap here is that candidates often assume feature scaling universally improves all algorithms, but The MLS-C01 exam specifically tests that tree-based models (like decision trees) are scale-invariant, making option C a common distractor.

1018
MCQhard

A company is building a binary classification model to predict customer churn. The dataset is highly imbalanced (95% non-churn, 5% churn). The data scientist uses SMOTE to oversample the minority class. After training a logistic regression model, the recall for the churn class is 0.80, but the precision is only 0.10. Which action would MOST likely improve precision without significantly harming recall?

A.Use random oversampling instead of SMOTE
B.Reduce the number of features in the model
C.Increase the classification threshold for the positive class
D.Decrease the classification threshold for the positive class
AnswerC

A higher threshold reduces false positives, improving precision, while likely still capturing many true positives.

Why this answer

Increasing the classification threshold for the positive class makes the model more conservative in predicting churn, which reduces false positives and improves precision. While this may slightly decrease recall (true positives), the trade-off is acceptable given the very low precision. Option A is wrong because random oversampling can lead to overfitting and does not directly address the low precision caused by threshold issues.

Option B is wrong because reducing features could discard important information, potentially harming recall without necessarily improving precision. Option D is wrong because decreasing the threshold would further increase false positives, lowering precision even more.

1019
MCQhard

A data engineer is investigating a slow Athena query on a partitioned table. The table is partitioned by year, month, and day, and the data is stored in S3 with the prefix pattern 'raw/YYYY/MM/DD/'. The engineer runs the above CLI command and sees that there are many small files. Which action would most improve query performance?

A.Convert the data to columnar format like Parquet or ORC.
B.Use S3DistCp to coalesce files into fewer, larger files.
C.Increase the number of partitions in the Athena DDL.
D.Add more partitions to reduce the amount of data scanned per query.
AnswerB

Coalescing reduces the number of files, improving query performance.

Why this answer

The core issue is that the Athena query is slow due to many small files, which increases the overhead of S3 LIST operations and task scheduling in the Presto/Trino engine underlying Athena. Coalescing these small files into fewer, larger files with S3DistCp reduces the number of S3 GET requests and minimizes the scheduling overhead, directly improving query throughput. This is a classic small-files problem, not a data format or partitioning issue.

Exam trap

The trap here is that candidates often confuse the small-files problem with data format optimization, choosing Parquet/ORC (Option A) because they know columnar formats are faster, but they miss that the primary bottleneck is file count, not encoding.

How to eliminate wrong answers

Option A is wrong because while columnar formats like Parquet or ORC improve compression and reduce I/O, they do not address the root cause of many small files; converting to columnar without coalescing still leaves the small-file overhead. Option C is wrong because increasing the number of partitions would create even more small files, worsening the problem and increasing metadata overhead. Option D is wrong because adding more partitions does not reduce the amount of data scanned per query if the query already filters on existing partitions; it would actually increase the number of files and metadata operations, making performance worse.

1020
Multi-Selecteasy

A company has a large number of small CSV files (hundreds of thousands) in an S3 bucket. A data engineer needs to run a SQL query on this data using Amazon Athena. The queries are currently slow and expensive. Which two actions will improve query performance and reduce cost?

Select 2 answers
A.Increase the S3 request rate per prefix to improve read throughput.
B.Compress the CSV files using gzip.
C.Partition the data by a commonly filtered column (e.g., date).
D.Increase the number of partitions by splitting files into smaller ones.
E.Convert the data to Parquet or ORC columnar format.
AnswersC, E

Partitioning limits the data scanned per query, improving performance and reducing cost.

Why this answer

The correct answers are C and E. Partitioning the data by a commonly filtered column (e.g., date) reduces the amount of data scanned by Athena, improving performance and cost. Converting the data to Parquet or ORC columnar format further reduces the data scanned and improves compression and query speed.

Option B (gzip compression) helps reduce storage and scan volume but is less impactful than partitioning and columnar format. Option A (increasing S3 request rate) does not directly improve Athena query performance. Option D (splitting into smaller files) can increase the overhead of reading many small files, potentially hurting performance.

1021
Multi-Selecthard

A company is deploying a machine learning model to an Amazon SageMaker endpoint. The model receives requests with sensitive data that must be encrypted in transit and at rest. Additionally, the company needs to control access to the endpoint using AWS IAM. Which THREE steps should the company take to meet these requirements? (Choose THREE.)

Select 3 answers
A.Enable HTTPS for the endpoint
B.Configure the endpoint to use a VPC
C.Store the model artifacts in Amazon S3 with SSE-S3 encryption
D.Enable encryption at rest for the endpoint's ML storage volume
E.Attach an IAM policy to the endpoint to allow only authorized principals
AnswersA, D, E

HTTPS encrypts data in transit.

Why this answer

Enabling HTTPS for the SageMaker endpoint encrypts data in transit using TLS/SSL. SageMaker endpoints support HTTPS by default when using the InvokeEndpoint API, and you can enforce HTTPS by configuring a custom VPC and security group to only allow HTTPS traffic. Option D is correct because encryption at rest for the endpoint's ML storage volume can be enabled by specifying an AWS KMS key when creating the endpoint configuration.

This encrypts the temporary storage used during inference. Option E is correct by attaching a resource-based IAM policy to the endpoint to control which IAM principals (users, roles) can invoke the endpoint, meeting access control requirements. Option B is incorrect because using a VPC is not required for encryption or access control; it provides network isolation but does not directly enforce HTTPS or IAM access.

Option C is incorrect because SSE-S3 encrypts model artifacts in S3, not the endpoint's ML storage volume; encryption at rest for the endpoint must be configured at the endpoint level.

Exam trap

The trap here is that candidates often confuse encryption at rest for model artifacts in S3 (Option C) with encryption at rest for the endpoint's ML storage volume, which is a separate requirement; the exam tests whether you know that the endpoint's storage volume encryption is configured at the endpoint level, not via S3 SSE-S3.

1022
MCQhard

A data scientist is training a deep learning model on Amazon SageMaker using a PyTorch estimator. The training job runs on a single ml.p3.2xlarge instance but is taking too long. The scientist wants to reduce training time by using distributed data parallelism across multiple GPUs. Which change to the training script and SageMaker estimator is required?

A.Add the SageMaker distributed data parallelism configuration in the estimator and modify the script to use the SageMaker distributed library.
B.Change the framework to TensorFlow and use tf.distribute.MirroredStrategy with instance_count=2.
C.Modify the script to use torch.nn.parallel.DistributedDataParallel and set instance_count to 2 in the estimator.
D.Modify the script to use torch.nn.DataParallel and keep instance_count as 1.
AnswerC

DDP is efficient for multi-node training.

Why this answer

To achieve distributed data parallelism across multiple GPUs on multiple instances with PyTorch, you must modify the training script to use `torch.nn.parallel.DistributedDataParallel` (DDP), which handles gradient synchronization across nodes. Additionally, you must set `instance_count` to 2 (or more) in the SageMaker PyTorch estimator to launch multiple instances, each with its own GPU, enabling true multi-node distributed training.

Exam trap

The MLS-C01 exam often tests the distinction between `DataParallel` (single-node, multi-GPU) and `DistributedDataParallel` (multi-node, multi-GPU), leading candidates to incorrectly choose `DataParallel` because they overlook the requirement for multiple instances.

How to eliminate wrong answers

Option A is wrong because the SageMaker distributed data parallelism library is a separate framework (SMDDP) that is not required for PyTorch DDP; using it would add unnecessary complexity and is not the standard approach for PyTorch users. Option B is wrong because switching to TensorFlow is unnecessary and introduces a framework change; the question specifies PyTorch, and `tf.distribute.MirroredStrategy` is for TensorFlow, not PyTorch. Option D is wrong because `torch.nn.DataParallel` only parallelizes within a single node (single instance) and does not support multi-instance distributed training; it also does not scale across multiple GPUs on different instances, so it would not reduce training time when using multiple instances.

1023
Multi-Selectmedium

A data scientist is training a gradient boosting model using SageMaker. The model is overfitting to the training data. Which TWO actions can help reduce overfitting? (Choose 2)

Select 2 answers
A.Increase the number of boosting rounds
B.Increase the learning rate
C.Increase the minimum child weight
D.Reduce the maximum depth of trees
E.Use a larger training dataset
AnswersC, D

Higher min_child weight requires more data to split, reducing overfitting.

Why this answer

Increasing the learning rate actually worsens overfitting; increasing max_depth increases model complexity. Reducing max_depth and increasing min_child_weight both regularize the model.

1024
MCQeasy

A company is deploying a PyTorch model on a SageMaker endpoint for real-time inference. The model is stored as a .pth file in an S3 bucket. The data scientist wants to use the SageMaker PyTorch inference toolkit. Which file is REQUIRED in the model artifacts to serve the model?

A.A file named model.tar.gz that contains the model and any dependencies.
B.A file named inference.py that defines the model loading and prediction logic.
C.A file named model.pth containing the model state dictionary.
D.A file named requirements.txt listing the dependencies.
AnswerC

The PyTorch inference toolkit loads model.pth by default.

Why this answer

The SageMaker PyTorch inference toolkit expects the model artifact to be a single file named model.pth containing the model's state dictionary. When using the default inference handler, the toolkit automatically loads this file into the PyTorch model for serving. No additional inference script is required if the default behavior is sufficient.

Exam trap

The trap here is that candidates often assume a custom inference script (inference.py) is always required, but the SageMaker PyTorch inference toolkit provides a default handler that works with a simple model.pth file, making inference.py optional for basic use cases.

How to eliminate wrong answers

Option A is wrong because model.tar.gz is the standard SageMaker model artifact format for frameworks like XGBoost or Scikit-learn, but the PyTorch inference toolkit specifically expects a .pth file, not a tarball. Option B is wrong because inference.py is only required if you need custom inference logic; the PyTorch inference toolkit provides a default handler that loads model.pth automatically, so inference.py is optional, not required. Option D is wrong because requirements.txt is used to install additional dependencies during deployment, but it is not mandatory for serving the model; the PyTorch inference toolkit already includes PyTorch and its dependencies.

1025
MCQhard

A data scientist is building a regression model to predict house prices. The dataset contains features like number of bedrooms, square footage, and location. After training, the model has high variance. Which technique should the data scientist use to reduce variance without significantly increasing bias?

A.Use bagging
B.Increase the number of features
C.Apply L2 regularization
D.Use fewer training examples
AnswerC

L2 regularization penalizes large coefficients, reducing variance.

Why this answer

L2 regularization (Ridge) penalizes large coefficients, effectively shrinking them and reducing model complexity, which lowers variance without substantially increasing bias. Option A (bagging) also reduces variance, but the question asks for a technique that reduces variance without significantly increasing bias; regularization is a more direct and common approach for high variance in regression. Option B (increasing features) would increase model complexity and variance, worsening the problem.

Option D (fewer training examples) would increase bias and potentially variance due to less data.

1026
MCQhard

Refer to the exhibit. A data scientist runs the AWS CLI command shown and gets the output. The scientist wants to create an Athena table over all log files in the 'logs/2023/' prefix, including files smaller than 1000 bytes. Which approach achieves this?

A.Create the table using LOCATION 's3://my-bucket/logs/2023/' which includes all files under that prefix.
B.Create the table and add a WHERE clause to include small files.
C.Ask the S3 team to remove the size restriction on the bucket.
D.Modify the CLI command to remove the size filter and re-run it before creating the table.
AnswerA

The table location covers all files regardless of size.

Why this answer

Creating an Athena table with the LOCATION pointing to 's3://my-bucket/logs/2023/' will include all objects under that prefix, regardless of size. The CLI command's --query parameter only filters the output of the list-objects command, but does not impose any restriction on the data or the bucket. Option B is incorrect because a WHERE clause in Athena can only filter rows after the table is defined; it cannot include or exclude files from being read.

Option C is incorrect because S3 does not have a built-in size restriction on a bucket; the CLI command is just a client-side query. Option D is incorrect because the CLI command is independent; the table can be created directly without needing to modify the CLI command.

1027
MCQeasy

A data scientist wants to query a dataset stored in Amazon S3 using standard SQL without provisioning any servers. The dataset is in CSV format and is updated daily. Which AWS service should be used?

A.Amazon Athena
B.Amazon Redshift
C.Amazon RDS
D.Amazon DynamoDB
AnswerA

Athena is serverless and supports SQL queries on S3 data.

Why this answer

Amazon Athena is a serverless interactive query service that allows you to query data directly from Amazon S3 using standard SQL without provisioning any servers. It is ideal for querying CSV datasets that are updated daily because it supports schema-on-read, meaning you can define the table schema at query time without loading or transforming the data beforehand.

Exam trap

The trap here is that candidates may confuse Amazon Athena with Amazon Redshift Spectrum, but Redshift Spectrum still requires a provisioned Redshift cluster, whereas Athena is truly serverless and directly queries S3 without any infrastructure.

How to eliminate wrong answers

Option B (Amazon Redshift) is wrong because it requires provisioning and managing a cluster of nodes, which incurs ongoing costs and administrative overhead, contradicting the 'without provisioning any servers' requirement. Option C (Amazon RDS) is wrong because it is a managed relational database service that requires provisioning a database instance and does not natively query data stored in S3 without additional tools like AWS Glue or federated queries. Option D (Amazon DynamoDB) is wrong because it is a NoSQL key-value and document database that does not support standard SQL queries and is not designed for querying CSV files stored in S3.

1028
MCQmedium

A data scientist is using SageMaker to train a model. The training job is failing with a 'ResourceLimitExceeded' error. Which action should be taken to resolve this issue?

A.Use a different AWS Region.
B.Request a service limit increase for the instance type.
C.Reduce the training dataset size.
D.Switch to a different instance type with lower resource requirements.
AnswerB

The error indicates the instance limit is reached; requesting an increase resolves it.

Why this answer

The 'ResourceLimitExceeded' error in SageMaker indicates that the AWS account has reached the maximum number of allowed resources (e.g., instances, vCPUs, or storage) for a given instance type in the current region. Requesting a service limit increase via the AWS Service Quotas console or API directly resolves this by raising the cap for that specific instance type, allowing the training job to proceed.

Exam trap

The trap here is that candidates may confuse 'ResourceLimitExceeded' with an out-of-memory or insufficient capacity error, leading them to choose dataset reduction or instance type changes instead of recognizing it as a quota-based limit that requires a service limit increase.

How to eliminate wrong answers

Option A is wrong because using a different AWS Region does not resolve the underlying resource limit issue; it only moves the problem to another region where limits may also be exceeded or where the required instance type may not be available. Option C is wrong because reducing the training dataset size does not affect the resource limit error; it might reduce training time or memory usage but does not change the account-level quota on instance count or vCPUs. Option D is wrong because switching to a different instance type with lower resource requirements may avoid the limit for the original type but does not address the root cause—the account's overall resource quota—and could still hit limits for the new type if it is also constrained.

1029
MCQmedium

A company is building a recommendation system using matrix factorization. The dataset has 1 million users and 100,000 items. The data scientist trains a model using SageMaker's Factorization Machines algorithm. The model achieves a root mean squared error (RMSE) of 0.95 on the test set. However, the business requires RMSE below 0.90. The data scientist has already tuned hyperparameters like number of factors and learning rate. Which additional step should the data scientist take to improve RMSE?

A.Add side features such as user demographics and item categories
B.Increase the number of training iterations
C.Increase the number of factors to 1000
D.Use a linear regression model instead
AnswerA

Side features enrich the model and can improve accuracy.

Why this answer

(add side features) provides more information to the model, which can help reduce RMSE. Option B (more iterations) may not help if the model has already converged. Option C (increasing factors to 1000) could lead to overfitting.

Option D (linear regression) is less powerful than matrix factorization for recommendation tasks.

1030
MCQhard

A data scientist is training a deep learning model for image classification on Amazon SageMaker. The dataset consists of 10,000 images of size 224x224 pixels. The training job uses a single ml.p3.2xlarge instance. The data scientist notices that the GPU utilization is very low (~20%) and the training is slow. Which change would most likely improve GPU utilization?

A.Use gradient accumulation
B.Use a larger instance type with more GPUs
C.Increase the batch size
D.Increase the number of data loader workers to load data in parallel
AnswerD

More workers can load data faster, reducing idle GPU time.

Why this answer

Low GPU utilization often indicates that the data loading pipeline is bottlenecked. Increasing the number of data loader workers can improve data throughput to the GPU, keeping it busy.

1031
MCQeasy

A data scientist needs to query a dataset stored as Parquet files in Amazon S3 using standard SQL without managing any infrastructure. Which service should they use?

A.Amazon Athena
B.Amazon QuickSight
C.AWS Glue
D.Amazon Redshift
AnswerA

Athena is serverless and supports SQL on S3.

Why this answer

Amazon Athena is a serverless interactive query service that allows you to query data stored in Amazon S3 using standard SQL without any infrastructure to manage. It directly reads Parquet files from S3 and executes queries using Presto under the hood, making it the ideal choice for this use case.

Exam trap

The trap here is that candidates often confuse AWS Glue (which has a 'crawler' and 'catalog' feature) as a query service, but it is an ETL and cataloging tool, not an interactive SQL query engine; similarly, Redshift Spectrum might seem serverless but still requires a provisioned Redshift cluster.

How to eliminate wrong answers

Option B (Amazon QuickSight) is wrong because it is a business intelligence (BI) visualization tool, not a query engine; it can connect to Athena but cannot directly query Parquet files with standard SQL on its own. Option C (AWS Glue) is wrong because it is a serverless data integration and ETL service, not an interactive query engine; while it can catalog Parquet metadata, it does not support ad-hoc SQL queries. Option D (Amazon Redshift) is wrong because it requires provisioning and managing a cluster (infrastructure), even with Redshift Spectrum; the question explicitly states 'without managing any infrastructure,' so a serverless option like Athena is required.

1032
MCQmedium

An ML team is analyzing a time series dataset of daily website traffic. They notice a pattern where traffic spikes every Sunday. Which EDA technique should they use to confirm this seasonality?

A.Plot the time series data with a line plot
B.Compute autocorrelation at different lags
C.Create a scatter plot of traffic vs. day of week
D.Plot a histogram of the traffic values
AnswerA

A line plot over time directly reveals seasonal patterns.

Why this answer

A line plot of time series data visually displays trends and repeating patterns, making it the most direct way to confirm weekly seasonality. Option B (autocorrelation) can quantify periodicity but is less intuitive for simple confirmation; it is not a histogram. Option C (scatter plot of traffic vs. day of week) aggregates data by day, losing the sequential order needed to see seasonality over time.

Option D (histogram) shows value distribution, not time-dependent patterns.

1033
MCQhard

A data engineer created a CloudFormation template for a Glue ETL job as shown. The job processes 500 GB of data and takes 90 minutes to complete. However, the job fails after 60 minutes. What is the MOST likely cause?

A.The IAM role does not have sufficient permissions.
B.The ScriptLocation S3 bucket is in a different region.
C.The Timeout property is set to 60 minutes, but the job requires more time.
D.The MaxRetries property is set to 0, so the job does not retry on failure.
AnswerC

The job is killed when it exceeds the timeout, causing failure.

Why this answer

The Glue ETL job has a `Timeout` property set to 60 minutes, but the job requires 90 minutes to complete. When the timeout is reached, AWS Glue forcibly terminates the job, causing it to fail. This is the most direct cause of the failure after exactly 60 minutes of execution.

Exam trap

The trap here is that candidates often confuse the `Timeout` property with the `MaxRetries` property, assuming that a job failing after a specific duration must be due to a retry limit rather than a timeout limit, or they overlook the exact 60-minute failure point as a clear indicator of a timeout being reached.

How to eliminate wrong answers

Option A is wrong because insufficient IAM permissions would typically cause an immediate failure at job start (e.g., when reading from S3 or writing to the target), not a failure after 60 minutes of processing. Option B is wrong because if the ScriptLocation S3 bucket were in a different region, the job would fail immediately at launch due to cross-region access restrictions, not after 60 minutes. Option D is wrong because MaxRetries set to 0 means the job will not be retried automatically after a failure, but it does not cause the initial failure itself; the job still runs until it encounters an error or timeout.

1034
MCQhard

A company runs an e-commerce platform on AWS. They have a SageMaker endpoint serving a product recommendation model. The model uses a custom container with a TensorFlow model. Recently, the endpoint has been returning high latency and occasional 504 errors during peak traffic. The data scientist observes that the model inference time is around 200 ms per request, but the endpoint is configured with a single ml.c5.large instance. The traffic spikes can reach 100 requests per second. The data scientist needs to reduce latency and eliminate 504 errors. Which course of action is most appropriate?

A.Use Amazon Elastic Inference to attach an EI accelerator to the endpoint instance
B.Configure the SageMaker endpoint with Application Auto Scaling to scale out based on the 'InvocationsPerInstance' metric, and use a larger instance type such as ml.c5.xlarge
C.Switch to a multi-model endpoint to serve multiple models on the same instance
D.Replace the SageMaker endpoint with an AWS Lambda function that loads the model from S3 and returns predictions
AnswerB

Auto scaling adds instances to handle load; a larger instance reduces per-request latency.

Why this answer

The endpoint is bottlenecked by both instance size and concurrency. With a single ml.c5.large instance handling 100 requests per second and a 200 ms inference time, the instance can only process about 5 requests per second (1000 ms / 200 ms = 5 requests per second per instance). Application Auto Scaling based on the 'InvocationsPerInstance' metric will add instances during traffic spikes, while upgrading to ml.c5.xlarge doubles compute capacity per instance, reducing latency and eliminating 504 errors caused by request queue overflow.

Exam trap

The trap here is that candidates often confuse performance bottlenecks with model optimization or cost-saving strategies, and incorrectly choose Elastic Inference or multi-model endpoints, which address different problems (GPU acceleration or multi-model hosting) rather than the core issue of insufficient compute capacity and lack of auto scaling.

How to eliminate wrong answers

Option A is wrong because Amazon Elastic Inference attaches a GPU accelerator for deep learning inference, but the ml.c5.large instance is CPU-based and the bottleneck is compute capacity per instance, not GPU acceleration; EI does not address the concurrency or scaling issue. Option C is wrong because a multi-model endpoint is designed to host multiple models on a single instance to reduce hosting costs, not to reduce latency or handle high traffic spikes; it does not increase the compute capacity or scaling of the endpoint. Option D is wrong because AWS Lambda has a maximum execution timeout of 15 minutes and limited memory (up to 10 GB), but loading a TensorFlow model from S3 on each invocation would add cold start latency and cannot sustain 100 requests per second without heavy concurrency management, making it unsuitable for real-time inference at this scale.

1035
MCQeasy

A data scientist is training a random forest model. During hyperparameter tuning, which parameter is MOST effective at reducing overfitting?

A.Increase the number of trees
B.Increase the number of features considered per split
C.Decrease the maximum depth of each tree
D.Increase the maximum depth of each tree
AnswerC

Shallow trees generalize better.

Why this answer

Decreasing the maximum depth of each tree limits the complexity of individual trees, preventing them from memorizing noise and outliers in the training data. This directly reduces overfitting by enforcing simpler decision boundaries, which is a core regularization technique for ensemble methods like Random Forest.

Exam trap

AWS often tests the misconception that adding more trees always reduces overfitting, but the trap is that while more trees stabilize predictions, they do not address the root cause of overfitting from overly complex individual trees.

How to eliminate wrong answers

Option A is wrong because increasing the number of trees generally improves model stability and reduces variance without significantly increasing overfitting; it can even help generalization. Option B is wrong because increasing the number of features considered per split increases tree diversity and can reduce overfitting, but it is not the most effective parameter for directly controlling overfitting. Option D is wrong because increasing the maximum depth of each tree allows trees to grow deeper, capturing more specific patterns and noise, which exacerbates overfitting.

1036
MCQmedium

A company is using AWS Glue to run ETL jobs that process data from Amazon RDS to Amazon S3. The ETL jobs are failing intermittently with write timeout errors when writing to S3. The company wants to implement a retry mechanism for transient errors. What should the company do?

A.Configure the AWS Glue job to retry on failure by setting the 'Max retries' parameter
B.Increase the size of the Amazon EBS volumes attached to the Glue job
C.Use Amazon CloudWatch to monitor the job and manually restart on failure
D.Place the failed job messages in an Amazon SQS queue and reprocess them
AnswerA

Glue jobs can automatically retry up to a specified number of times.

Why this answer

AWS Glue provides a built-in retry mechanism via the 'Max retries' parameter, which automatically retries the job when transient errors like write timeouts to S3 occur. Option A directly addresses the need for a retry mechanism. Option B is incorrect because increasing EBS volume size does not fix S3 write timeout errors, which are network-related.

Option C is incorrect because manual restart via CloudWatch is not an automated retry mechanism. Option D is incorrect because AWS Glue does not natively integrate with SQS for job retries; the built-in retry parameter is the proper solution.

1037
Multi-Selecteasy

Which TWO SageMaker features can be used to monitor and debug training jobs? (Choose 2.)

Select 2 answers
A.SageMaker Debugger
B.SageMaker Model Monitor
C.SageMaker Ground Truth
D.Amazon CloudWatch Logs
E.SageMaker Clarify
AnswersA, D

Debugger captures real-time training metrics and tensors.

Why this answer

SageMaker Debugger (A) is correct because it provides real-time monitoring and debugging of training jobs by capturing tensors, gradients, and other metrics during training, allowing you to detect issues like vanishing gradients or overfitting. Amazon CloudWatch Logs (D) is correct because it automatically collects and stores logs from SageMaker training jobs, including algorithm output and framework logs, which you can monitor for errors or anomalies.

Exam trap

AWS often tests the distinction between monitoring training jobs (Debugger, CloudWatch) versus monitoring inference endpoints (Model Monitor) or data preparation (Ground Truth), leading candidates to confuse Model Monitor as a training debugger.

1038
MCQeasy

A data engineer is querying the AWS Glue Data Catalog table shown in the exhibit. The engineer runs an Athena query: SELECT * FROM transactions WHERE year=2023. The query returns results quickly. However, a subsequent query: SELECT * FROM transactions WHERE amount > 100 takes a long time. What is the most likely reason for the performance difference?

A.The data is compressed, and the first query benefits from compression.
B.The first query uses a partition column (year), allowing partition pruning, while the second query does not.
C.The data is stored in Parquet format, which is optimized for columnar access.
D.The second query is not optimized because it uses 'SELECT *'.
AnswerB

Partition pruning reduces data scanned.

Why this answer

The table is partitioned by year and month. The first query filters on a partition column (year), so Athena prunes partitions and scans only the relevant data. The second query filters on a non-partition column (amount), so Athena scans all partitions, resulting in a longer execution time.

Option A is incorrect because compression does not directly affect partition pruning; it reduces storage size but not scan time in this context. Option C is incorrect because the data format (Parquet) could help with columnar pruning, but the key difference here is partition pruning, not file format. Option D is incorrect because using SELECT * does not inherently cause slow performance; the lack of partition pruning is the main issue.

1039
MCQmedium

A data scientist runs a SageMaker notebook and uses pandas to explore a dataset. The dataset contains 500,000 rows and 20 columns, including a 'timestamp' column. After loading the data into a DataFrame, the memory usage is unexpectedly high. What is the most likely cause?

A.The DataFrame created an index column on the timestamp field, doubling memory usage.
B.The default data types inferred by pandas are unnecessarily large for the actual data ranges.
C.The DataFrame only loaded a sample of the data, but the sample size was too large.
D.The CSV file was compressed, and pandas inflated it in memory.
AnswerB

Pandas uses int64/float64 by default, which can be optimized by downcasting.

Why this answer

When pandas reads a CSV without explicit dtypes, it infers data types. For numeric columns, it defaults to int64 (8 bytes per value) or float64 (8 bytes per value), even if the actual values could fit in smaller types (e.g., int8, int16). With 500,000 rows and 20 columns, such large types significantly increase memory usage.

Option A is wrong because pandas does not automatically create an index from the timestamp column; it assigns a default integer index. Option C is wrong because the entire dataset was loaded, not just a sample. Option D is wrong because the CSV is uncompressed; compression would not cause memory inflation after loading.

1040
MCQhard

A team is analyzing a dataset with many categorical features that have high cardinality (e.g., ZIP code, user ID). They want to explore relationships between these features and a continuous target variable. Which approach is most appropriate for visualizing these relationships without overwhelming the viewer?

A.Group categories into top K levels and use a box plot for each group.
B.Compute a correlation matrix using Pearson correlation.
C.Create a scatter plot with each category as a different color.
D.Use a heatmap to show pairwise chi-square statistics.
AnswerA

Aggregating categories makes the plot interpretable.

Why this answer

When dealing with high-cardinality categorical features, grouping the most frequent categories into a manageable number (e.g., top 10) and using box plots per group allows for clear visualization of the relationship with a continuous target. This approach reduces clutter and highlights differences in distributions. Option B is incorrect because Pearson correlation is designed for continuous variables, not categorical ones.

Option C is incorrect: a scatter plot with color-coded categories becomes unreadable with many categories and does not effectively show distributional differences. Option D is incorrect because chi-square statistics assess association between two categorical variables, not between a categorical and a continuous variable.

1041
Multi-Selectmedium

A data scientist is training a random forest classifier on Amazon SageMaker and wants to reduce overfitting. Which TWO actions should the scientist take? (Choose TWO.)

Select 2 answers
A.Increase the number of features considered per split
B.Increase the maximum depth of trees
C.Decrease the number of trees
D.Limit the maximum depth of trees
E.Increase the number of trees
AnswersD, E

Shallow trees reduce overfitting.

Why this answer

To reduce overfitting in a random forest, limit the maximum depth of trees (Option D) to prevent them from growing too deep and capturing noise. Increasing the number of trees (Option E) reduces the variance of the ensemble, lowering overfitting risk. Option A is incorrect because increasing the number of features considered per split can increase tree correlation and overfitting.

Option B is incorrect because increasing maximum depth makes trees more complex and prone to overfitting. Option C is incorrect because decreasing the number of trees increases variance, which can worsen overfitting.

1042
MCQhard

A machine learning team is using Amazon SageMaker to train a model with a custom algorithm packaged in a Docker container. The training job fails with the error 'Error: Unable to locate sagemaker-training toolkit.' What is the MOST likely cause?

A.The container does not have internet access to download dependencies
B.The instance type is incompatible with the container
C.The training role does not have permissions to access the container repository
D.The container does not include the SageMaker Training Toolkit
AnswerD

The toolkit must be installed in the Docker image.

Why this answer

The SageMaker Training Toolkit is a required library that provides the interface between SageMaker and custom Docker containers for training jobs. When a custom container does not include this toolkit, SageMaker cannot execute the training script or communicate with the container, resulting in the 'Unable to locate sagemaker-training toolkit' error. This is a mandatory dependency for any custom training container used with SageMaker.

Exam trap

The trap here is that candidates often confuse missing dependencies with network or permission issues, but the specific error message 'Unable to locate sagemaker-training toolkit' directly points to the absence of the required SageMaker Training Toolkit package inside the container.

How to eliminate wrong answers

Option A is wrong because the error is specifically about the missing toolkit, not about internet access; SageMaker containers can pull dependencies from Amazon ECR or S3 without internet access if configured correctly. Option B is wrong because instance type compatibility issues typically manifest as hardware or driver errors (e.g., CUDA mismatch), not a missing Python package error. Option C is wrong because permissions to access the container repository would cause an authentication or authorization error (e.g., 'AccessDenied' or 'Unauthorized'), not a missing toolkit error within the container itself.

1043
MCQmedium

An AWS Glue ETL job failed with the error 'Insufficient memory allocated for the job'. The job run details show AllocatedCapacity: 5, WorkerType: Standard, NumberOfWorkers: 5. Which change should be made to resolve the issue?

A.Delete and recreate the job with a different name
B.Increase the job timeout to 3600 minutes
C.Increase the number of workers to 10
D.Change the worker type to G.2X
AnswerC, D

Increasing the number of workers increases the total allocated memory and DPUs, resolving the insufficiency.

Why this answer

The error indicates insufficient memory for the job. Both increasing the number of workers (Option C) and changing the worker type to G.2X (Option D) increase the total allocated memory. Option C scales out by adding more Standard workers, each with 16 GB memory and 1 DPU.

Option D scales up by switching to G.2X workers, each with 32 GB memory and 2 DPUs, effectively doubling the DPU and total memory for the same number of workers. Either change can resolve the insufficient memory error. Option A is incorrect because deleting and recreating the job does not change resource allocation.

Option B is incorrect because job timeout does not affect memory.

1044
Multi-Selecteasy

A company needs to transfer 10 TB of data from an on-premises data center to Amazon S3. The network bandwidth is limited to 100 Mbps, and the transfer must complete within 5 days. Which TWO options are viable? (Choose TWO.)

Select 2 answers
A.Use S3 Transfer Acceleration to speed up the transfer
B.Use S3 Multipart Upload to upload files in parallel
C.Use AWS Snowball Edge device to ship the data
D.Use AWS DataSync over the existing internet connection
E.Use AWS Direct Connect to establish a dedicated network connection
AnswersC, E

Snowball Edge is ideal for large data volumes over slow networks; physical shipping is faster.

Why this answer

AWS Snowball Edge is a physical data transport solution designed for large-scale data transfers over slow or unreliable networks. With 10 TB of data and a 100 Mbps link, the theoretical transfer time is over 9 days, exceeding the 5-day window. Snowball Edge bypasses the network bottleneck entirely by shipping the data via courier.

Option E is also correct because AWS Direct Connect provides a dedicated network connection that can offer higher and more consistent bandwidth than the existing internet connection. If provisioned with sufficient capacity (e.g., 1 Gbps), the transfer can complete within the 5-day window. Options A and B are not viable because they cannot overcome the physical bandwidth limitation of 100 Mbps.

Option D is not viable because DataSync still relies on the existing internet connection, which is insufficient.

Exam trap

The trap here is that candidates assume S3 Transfer Acceleration or Multipart Upload can magically overcome bandwidth limitations, but they only optimize existing throughput—they cannot exceed the physical capacity of the network link. Another trap is to overlook Direct Connect as a viable option, thinking it requires long lead times, but it can be provisioned quickly in some cases and effectively increases bandwidth.

1045
MCQeasy

A machine learning engineer needs to deploy a real-time inference endpoint for a model that requires GPU acceleration for low latency. Which AWS service should be used?

A.Amazon SageMaker real-time endpoint
B.Amazon SageMaker batch transform
C.Amazon EC2 with auto scaling
D.AWS Lambda with GPU
AnswerA

SageMaker real-time endpoints support GPU instances and provide low-latency inference.

Why this answer

Amazon SageMaker provides real-time endpoints that support GPU instances for low-latency inference. AWS Lambda does not support GPU, and Batch is for asynchronous processing. EC2 would require manual management.

1046
Multi-Selecthard

A machine learning team is building a real-time inference pipeline using Amazon SageMaker. The team has multiple models that need to be served, but usage patterns are unpredictable and traffic spikes occur several times a day. The team wants to minimize costs while maintaining low latency. Which THREE actions should the team take?

Select 3 answers
A.Enable provisioned concurrency on the endpoint to reduce cold starts.
B.Use SageMaker inference with Spot Instances to reduce cost.
C.Use a SageMaker multi-model endpoint to serve multiple models on the same instance.
D.Configure automatic scaling on the endpoint to handle traffic spikes.
E.Use SageMaker Batch Transform for all inference requests.
AnswersB, C, D

Spot Instances are cheaper but can be interrupted; for cost savings, sometimes acceptable.

Why this answer

Using Spot Instances for SageMaker inference can significantly reduce costs (up to 60-90% compared to On-Demand) while still providing the compute needed for real-time inference. Spot Instances are suitable when the workload can tolerate interruptions, and with SageMaker's managed Spot support, the endpoint can automatically fall back to On-Demand capacity if Spot capacity is reclaimed, ensuring availability during traffic spikes.

Exam trap

The trap here is that candidates often confuse provisioned concurrency (a Lambda feature) with SageMaker endpoint warm-up strategies, leading them to select Option A, which is not applicable to SageMaker inference endpoints.

1047
MCQmedium

A company is using AWS Glue to run ETL jobs that process data in an S3 data lake. The jobs are failing with out-of-memory errors when processing large files. Which configuration change should be made to resolve this issue?

A.Change the worker type to G.1X
B.Increase the number of DPUs allocated to the job
C.Partition the input data into smaller files
D.Enable job bookmark to process only new data
AnswerB

More DPUs provide more memory and compute resources.

Why this answer

Out-of-memory errors in AWS Glue ETL jobs indicate that the allocated memory (DPUs) is insufficient for the data being processed. Increasing the number of DPUs allocates more memory and compute capacity to the job, directly resolving the memory constraint. This is the standard approach for scaling Glue jobs handling large datasets.

Exam trap

The trap here is that candidates confuse scaling vertically (changing worker type) with scaling horizontally (adding DPUs), but for large files, increasing DPUs is the more effective and direct solution for out-of-memory errors in AWS Glue.

How to eliminate wrong answers

Option A is wrong because changing the worker type to G.1X (16 GB memory) from the default G.0X (8 GB) might help, but it does not increase total memory as effectively as adding DPUs; the question specifies 'large files' where scaling out with more DPUs is the correct fix. Option C is wrong because partitioning input data into smaller files is a data preparation step that can improve parallelism but does not resolve out-of-memory errors caused by insufficient DPU allocation; it addresses file size issues, not memory limits. Option D is wrong because enabling job bookmarks only tracks processed data to avoid reprocessing, which reduces runtime but does not increase memory or fix out-of-memory errors.

1048
MCQhard

Refer to the exhibit. A SageMaker training job failed with the error shown. What is the most likely cause of this error?

A.The input data contains missing or invalid values
B.The training algorithm is not compatible with the data type
C.The training instance type is not powerful enough
D.The training script has a syntax error
AnswerA

NaN or infinity in data cause this error.

Why this answer

The error indicates that the input data contains NaN or infinite values. This is a data quality issue. The algorithm expects clean numeric values.

The algorithm itself is fine; the training script may have a bug but the error specifically points to input data.

1049
MCQmedium

A data scientist is trying to launch a SageMaker training job using an IAM role with the above policy. The training job fails with an access denied error. What is the MOST likely reason?

A.The policy does not include s3:ListBucket permission
B.The sagemaker:StopTrainingJob action is not required
C.The sagemaker:CreateTrainingJob action is not allowed for the specific instance type
D.The S3 bucket ARN should not include the /* suffix
AnswerA

SageMaker needs ListBucket to access objects in the bucket.

Why this answer

The policy grants s3:GetObject and s3:PutObject permissions on the S3 bucket ARN with a /* suffix, but SageMaker training jobs also require s3:ListBucket permission at the bucket level (without the /*) to enumerate objects and validate paths during job creation. Without s3:ListBucket, the training job fails with an access denied error even though read/write permissions are present.

Exam trap

AWS often tests the subtle distinction between bucket-level actions (s3:ListBucket) and object-level actions (s3:GetObject, s3:PutObject), where candidates mistakenly assume object permissions are sufficient for SageMaker training jobs.

How to eliminate wrong answers

Option B is wrong because sagemaker:StopTrainingJob is an unrelated action that is not required for launching a training job; the error occurs during job creation, not stopping. Option C is wrong because the policy does not specify any instance type restrictions, and SageMaker IAM policies do not typically deny CreateTrainingJob based on instance type unless explicitly scoped with a condition key like sagemaker:InstanceTypes. Option D is wrong because the /* suffix is correctly used to grant object-level permissions on all objects within the bucket; the issue is the missing bucket-level s3:ListBucket permission, not the suffix itself.

1050
MCQmedium

A machine learning team is deploying a real-time inference endpoint for a fraud detection model using Amazon SageMaker. The model requires low latency (<100 ms) and the team expects a steady stream of requests with occasional spikes. Which instance type and deployment strategy should they use to minimize cost while meeting latency requirements?

A.Use ml.p3 instances with a multi-model endpoint.
B.Use AWS Lambda with a container image for serverless inference.
C.Use ml.m5 instances with a production variant and auto-scaling.
D.Use ml.c5 instances with a single endpoint and auto-scaling with a minimum instance count to handle baseline traffic.
AnswerD

Correct. ml.c5 instances provide compute-optimized performance at lower cost, and auto-scaling with a minimum instance count ensures pre-warmed capacity for low latency.

Why this answer

Ml.c5 instances are compute-optimized for low-latency inference, and auto-scaling with a minimum instance count ensures pre-warmed capacity to handle steady traffic with spikes without cold starts, meeting the <100 ms requirement cost-effectively. This combination avoids over-provisioning while ensuring consistent performance.

Exam trap

The trap here is that candidates often choose auto-scaling without a minimum instance count (Option C) thinking it handles spikes cost-effectively, but they overlook the latency penalty of scaling up during a spike, which can exceed 100 ms. With a minimum instance count set to handle baseline traffic, scaling adds capacity during spikes with minimal latency impact.

How to eliminate wrong answers

Option A is wrong because ml.p3 instances are GPU-based and designed for deep learning training, not cost-effective for real-time inference on a fraud detection model that likely uses tree-based or linear models; multi-model endpoints add overhead that can increase latency. Option B is wrong because AWS Lambda has a maximum execution timeout of 15 minutes and cold starts can exceed 100 ms, making it unsuitable for sub-100 ms real-time inference with occasional spikes. Option C is wrong because ml.m5 instances are general-purpose and may not provide the compute-optimized performance needed for low latency; using a production variant with auto-scaling can introduce scaling latency during spikes, potentially violating the 100 ms requirement.

Page 13

Page 14 of 23

Page 15