Courseiva

CCNA Machine Learning Implementation and Operations Questions

75 of 338 questions · Page 4/5 · Machine Learning Implementation and Operations · Answers revealed

226
Multi-Selectmedium

Which TWO factors should be considered when choosing between Amazon SageMaker's real-time endpoints and serverless inference? (Select TWO.)

Select 2 answers
A.GPU requirement
B.Inference traffic pattern (intermittent vs steady)
C.Integration with AWS Lambda
D.Availability of built-in algorithms
E.Model size in GB
AnswersA, B

Serverless inference does not support GPU instances.

Why this answer

GPU requirement is a key factor because SageMaker real-time endpoints support GPU-based instances (e.g., ml.p3, ml.g4dn) for low-latency inference on deep learning models, while serverless inference only supports CPU instances. If your model requires GPU acceleration for acceptable latency, you must choose a real-time endpoint.

Exam trap

Candidates often mistakenly think serverless inference cannot handle large models or lacks Lambda integration, but the real differentiators are GPU support and traffic pattern suitability.

227
MCQeasy

A data scientist needs to version control datasets used for machine learning experiments. Which AWS service should the data scientist use?

A.AWS Lake Formation
B.Amazon SageMaker Feature Store
C.Amazon SageMaker Model Registry
D.Amazon S3 with versioning enabled
AnswerD

S3 versioning provides dataset version control.

Why this answer

Amazon S3 with versioning enabled is the correct choice because it provides a simple, scalable, and cost-effective way to version control datasets. S3 versioning preserves every object version, allowing you to retrieve, restore, or compare previous dataset states, which is essential for reproducibility in ML experiments. This directly meets the requirement for dataset version control without additional overhead.

Exam trap

The trap here is that candidates confuse services designed for model management (Model Registry) or feature management (Feature Store) with the fundamental storage versioning capability of S3, which is the simplest and most direct answer for dataset version control.

How to eliminate wrong answers

Option A is wrong because AWS Lake Formation is a service for building, securing, and managing data lakes, not for version controlling individual datasets used in ML experiments. Option B is wrong because Amazon SageMaker Feature Store is designed to store, manage, and share ML features (preprocessed data for training and inference), not for versioning raw datasets. Option C is wrong because Amazon SageMaker Model Registry is used to catalog, version, and manage trained ML models, not datasets.

228
MCQeasy

A data scientist is using Amazon SageMaker to train a model. The training job is taking longer than expected. The data scientist notices that the GPU utilization is low. Which action would most likely improve GPU utilization?

A.Change to a CPU-based instance
B.Increase the batch size
C.Decrease the batch size
D.Use a larger instance type
E.Enable data augmentation
AnswerB

Larger batch sizes keep GPU busy.

Why this answer

Low GPU utilization during training often indicates that the GPU is waiting for data to process, a condition known as data bottleneck. Increasing the batch size allows the GPU to process more samples per forward/backward pass, keeping it busier and improving utilization. In SageMaker, this directly impacts the training loop by reducing the frequency of data loading and model update steps.

Exam trap

The trap here is that candidates often assume low GPU utilization means the GPU is underpowered, leading them to choose a larger instance (Option D), when in fact the issue is a data bottleneck that can be mitigated by increasing batch size.

How to eliminate wrong answers

Option A is wrong because switching to a CPU-based instance would likely worsen performance, as CPUs are slower for parallel matrix operations than GPUs. Option C is wrong because decreasing the batch size reduces the amount of work per GPU step, potentially increasing idle time and lowering utilization further. Option D is wrong because using a larger instance type (e.g., more GPUs or faster GPUs) does not address the root cause of low utilization; it may even exacerbate the bottleneck if data loading is the issue.

Option E is wrong because enabling data augmentation adds computational overhead to the data pipeline, which can further slow data delivery and reduce GPU utilization.

229
MCQhard

A company has a real-time inference endpoint on Amazon SageMaker that uses a custom container. The endpoint is experiencing high latency and occasional 502 errors. The logs from the container show that the model inference time is low, but the overall response time is high. Which step is MOST likely to reduce the latency?

A.Switch to batch transform to process requests in batches
B.Use a larger instance type for the endpoint
C.Optimize the model to reduce inference time
D.Increase the number of instances and enable auto-scaling
AnswerD

More instances can handle more concurrent requests, reducing queuing and latency.

Why this answer

Increasing the number of instances and enabling auto-scaling helps distribute the incoming request load, reducing queuing delays at the endpoint. The logs show inference time is low, so the high latency is likely due to request queuing behind other requests. Scaling out addresses this.

Option A is wrong because batch transform is designed for offline, batch processing, not real-time inference. Option B is wrong because using a larger instance type may provide more compute but does not directly address queuing; it is also less cost-effective than scaling out. Option C is wrong because the model inference time is already low, so further optimization would have minimal impact on overall latency.

230
MCQmedium

A model deployed on a SageMaker endpoint is producing predictions that are consistently biased against a certain demographic. Which step should the team take FIRST to address this issue?

A.Enable SageMaker Model Monitor to track prediction quality
B.Switch to a different algorithm that is less prone to bias
C.Use SageMaker Clarify to analyze bias in the training data and predictions
D.Retrain the model with balanced data
AnswerC

Clarify can detect and explain bias, guiding corrective actions.

Why this answer

The first step is to analyze the data and model for bias. SageMaker Clarify can detect bias in training data and predictions, making option C the correct first step. Option A (SageMaker Model Monitor) tracks prediction quality but does not specifically analyze bias.

Option B (switching algorithm) is a reactive change without understanding the bias source. Option D (retraining with balanced data) is a potential fix but should come after bias analysis.

231
MCQmedium

Refer to the exhibit. A data scientist is deploying a PyTorch model on a SageMaker endpoint. When the endpoint is invoked, the above error appears in CloudWatch logs. What is the MOST likely cause?

A.The endpoint instance type does not support the required CUDA version.
B.The endpoint instance does not have enough memory to load the model.
C.The input tensor shape does not match the model's expected input shape.
D.The model artifact was not properly saved or is missing from the S3 location.
AnswerD

If the model file is missing or corrupted, load_model returns None.

Why this answer

The error shown in CloudWatch logs is a `FileNotFoundError` or `No such file or directory` when SageMaker attempts to load the model artifact. This indicates that the model file (e.g., `model.pth` or `model.pt`) is missing from the specified S3 bucket path or was not properly packaged during training. SageMaker endpoints require the model artifact to be present and correctly referenced in the `model_data_url` parameter; otherwise, the container fails to load the model and throws this error.

Exam trap

The MLS-C01 exam often tests the distinction between model-loading errors (missing artifact) and inference-time errors (shape mismatch, memory), so candidates mistakenly attribute a file-not-found error to a shape or memory issue instead of recognizing it as a deployment configuration problem.

How to eliminate wrong answers

Option A is wrong because CUDA version compatibility issues typically manifest as runtime errors (e.g., 'CUDA error: no kernel image is available for execution on the device') or driver errors, not as file-not-found errors in CloudWatch logs. Option B is wrong because insufficient memory would cause an `OutOfMemoryError` or a container crash (e.g., 'CUDA out of memory' or 'Cannot allocate memory'), not a missing file error. Option C is wrong because an input tensor shape mismatch would produce a runtime inference error (e.g., 'RuntimeError: size mismatch') during invocation, not a model-loading failure at startup.

232
Multi-Selecteasy

A data scientist is using Amazon SageMaker to train a large neural network on a GPU instance. The training is taking longer than expected. The scientist wants to reduce training time without changing the model architecture. Which TWO approaches should the scientist consider?

Select 2 answers
A.Use SageMaker Automatic Model Tuning to find optimal hyperparameters.
B.Use SageMaker Managed Spot Training to reduce cost.
C.Use SageMaker's distributed training with multiple GPU instances.
D.Switch to a larger GPU instance type with more CUDA cores.
E.Enable SageMaker Debugger to capture training metrics.
AnswersC, D

Distributed training parallelizes computation, reducing wall-clock time.

Why this answer

SageMaker's distributed training can split the large neural network across multiple GPU instances, reducing wall-clock training time through data parallelism or model parallelism. Option D is correct because switching to a larger GPU instance type with more CUDA cores increases the computational throughput per step, directly accelerating training without altering the model architecture.

Exam trap

The trap here is that candidates confuse cost-saving techniques (Spot Training) or monitoring tools (Debugger) with performance optimization, or mistakenly think hyperparameter tuning reduces training time when it actually increases total compute effort.

233
MCQhard

A company uses Amazon SageMaker to host a model for fraud detection. The model uses a custom XGBoost container. The endpoint receives about 100 requests per second, each with 50 features. The team notices that the model's predictions are occasionally incorrect for a subset of requests. Which approach should the team take to debug the issue?

A.Use SageMaker Debugger to capture tensors during inference.
B.Scale the endpoint to more instances to reduce load.
C.Enable SageMaker Model Monitor to capture and analyze inference data.
D.Enable detailed CloudWatch Logs for the endpoint.
AnswerC

Model Monitor captures input data and predictions, enabling analysis of data quality and drift.

Why this answer

SageMaker Model Monitor captures inference data (input features and predictions) and compares them against a baseline to detect data drift or quality issues. This allows the team to identify if incorrect predictions stem from distribution shifts or anomalous input patterns, which is the most direct debugging approach for sporadic prediction errors.

Exam trap

The trap here is that candidates confuse SageMaker Debugger (for training debugging) with Model Monitor (for inference monitoring), or assume scaling or logging alone can diagnose prediction quality issues without analyzing input data distributions.

How to eliminate wrong answers

Option A is wrong because SageMaker Debugger is designed for training jobs to capture tensors and gradients, not for inference endpoints; it cannot debug live prediction errors. Option B is wrong because scaling the endpoint to more instances addresses throughput or latency issues, not the root cause of incorrect predictions for a subset of requests. Option D is wrong because detailed CloudWatch Logs provide request/response metadata and system metrics but do not analyze feature distributions or detect data drift, which is needed to debug why specific predictions are incorrect.

234
Multi-Selecteasy

Which TWO services can be used to perform hyperparameter tuning in Amazon SageMaker? (Choose two.)

Select 2 answers
A.Amazon SageMaker Automatic Model Tuning
B.Amazon SageMaker Experiments
C.AWS Glue
D.Amazon SageMaker Ground Truth
E.Amazon EMR
AnswersA, B

This is the native hyperparameter tuning service.

Why this answer

Amazon SageMaker Automatic Model Tuning (option A) is the native hyperparameter tuning service in SageMaker, which automatically searches for the best hyperparameter values by launching training jobs with different combinations and evaluating them against a specified objective metric. Amazon SageMaker Experiments (option B) is used to organize, track, and compare machine learning experiments, including hyperparameter tuning runs, by capturing parameters, metrics, and artifacts for reproducibility and analysis.

Exam trap

The trap here is that candidates may confuse Amazon SageMaker Experiments as merely a tracking tool rather than a service that can be used to perform and manage hyperparameter tuning, or they might incorrectly associate AWS Glue or EMR with machine learning tuning due to their data processing roles.

235
MCQhard

A company runs a real-time fraud detection model on a SageMaker endpoint. The model is a TensorFlow neural network trained on transactional data. The endpoint uses a single ml.p3.2xlarge instance. Recently, the application’s latency has increased from 50ms to 500ms on average. The CloudWatch metrics show that CPU utilization is at 90%, GPU utilization is at 30%, and memory utilization is at 40%. The number of requests per second has remained stable. The ML team suspects the model is not fully utilizing the GPU. What action should the team take to reduce latency without changing the instance type?

A.Switch to SageMaker Batch Transform to process requests in batches
B.Change the endpoint to a compute-optimized instance like ml.c5.large
C.Use SageMaker Neo to compile the model for the target instance
D.Increase the number of instances behind the endpoint and use a load balancer
AnswerC

Neo optimizes model to better utilize GPU.

Why this answer

SageMaker Neo compiles the model to optimize inference for the target hardware, improving GPU utilization and reducing latency. Option A is incorrect because SageMaker Batch Transform is for offline inference, not real-time requests. Option B is incorrect because switching to a CPU-based instance (ml.c5.large) would not leverage the GPU and could increase latency.

Option D is incorrect because adding more instances improves throughput, not per-request latency, and does not address GPU underutilization.

236
MCQmedium

A data scientist is using Amazon SageMaker Ground Truth to create a labeled dataset for object detection. The team has limited budget and wants to minimize labeling costs while ensuring high-quality labels. Which approach is MOST cost-effective?

A.Use only a private workforce of domain experts to label all data.
B.Use a public workforce and have each data point labeled by three workers.
C.Use active learning to automatically label high-confidence data and send only uncertain data to a private workforce.
D.Use the built-in automated labeling feature without human review.
AnswerC

Active learning reduces labeling cost while ensuring quality.

Why this answer

Active learning uses the model to automatically label high-confidence data points, while only sending low-confidence or uncertain data to a private workforce for human labeling. This significantly reduces the number of data points requiring manual labeling, thereby minimizing costs while still ensuring high-quality labels through expert review of challenging cases. Option A is incorrect because using only a private workforce for all data is expensive due to the high cost of domain experts.

Option B is incorrect because using a public workforce with three workers per data point increases labeling costs without necessarily guaranteeing higher quality than a focused approach. Option D is incorrect because relying solely on automated labeling without human review can introduce errors and reduce label quality, especially for uncertain cases.

237
MCQmedium

An ML team uses Amazon SageMaker to train a deep learning model. The training job runs on a single ml.p3.2xlarge instance and is taking 10 hours. The team wants to reduce the training time to under 2 hours without changing the model architecture. Which approach is MOST effective?

A.Use SageMaker distributed training with multiple ml.p3.2xlarge instances.
B.Use SageMaker Managed Spot Training to reduce cost.
C.Switch to a single ml.p3.16xlarge instance with more GPUs.
D.Enable SageMaker Debugger to identify bottlenecks.
AnswerA

Distributed training partitions the model or data across instances, reducing wall-clock time.

Why this answer

A is correct because SageMaker's distributed training framework can partition the training workload across multiple ml.p3.2xlarge instances, each with one NVIDIA V100 GPU, enabling data parallelism that scales near-linearly. With sufficient instances (e.g., 5 or more), the 10-hour job can be reduced to under 2 hours without altering the model architecture, as the framework handles gradient synchronization via AllReduce.

Exam trap

The trap here is that candidates assume more GPUs on a single instance (Option C) always yields proportional speedup, but they overlook the diminishing returns from intra-instance GPU contention and the fact that distributed training across multiple instances often scales better for deep learning workloads.

How to eliminate wrong answers

Option B is wrong because Managed Spot Training reduces cost by using spare EC2 capacity, but it does not reduce training time; it may even increase time due to interruptions and checkpoint restarts. Option C is wrong because switching to a single ml.p3.16xlarge instance provides 8 GPUs, but the model may not be large enough to fully utilize all GPUs on one instance, and the speedup is limited by GPU memory bandwidth and intra-instance communication overhead, often achieving less than 8x improvement. Option D is wrong because SageMaker Debugger monitors training metrics and identifies bottlenecks (e.g., CPU/GPU utilization, memory), but it does not directly reduce training time; it only provides insights for optimization.

238
MCQmedium

A company is using Amazon Rekognition to detect objects in images stored in S3. They want to reduce costs by processing images only when they are uploaded. Which AWS service should be used to trigger Rekognition automatically?

A.Amazon CloudWatch Events
B.Amazon Simple Notification Service (SNS)
C.AWS Lambda
D.AWS Step Functions
AnswerC

Lambda can be triggered by S3 event and call Rekognition.

Why this answer

AWS Lambda is the correct service because it can be triggered directly by S3 events (e.g., s3:ObjectCreated:Put) to invoke Amazon Rekognition's DetectLabels API on the newly uploaded image. This serverless architecture ensures processing occurs only on upload, eliminating idle costs and manual polling.

Exam trap

The trap here is that candidates often confuse S3 event notifications with CloudWatch Events or SNS, thinking those services can directly invoke Rekognition, but only Lambda (or an HTTP endpoint) can execute custom code to call the Rekognition API.

How to eliminate wrong answers

Option A is wrong because Amazon CloudWatch Events (now Amazon EventBridge) is designed for scheduling or reacting to AWS service state changes, not for direct S3 object-level event triggers; it would require an intermediary like Lambda to invoke Rekognition. Option B is wrong because Amazon SNS is a pub/sub messaging service that cannot directly invoke Rekognition; it would need a subscriber (e.g., Lambda or an HTTP endpoint) to process the notification and call the API. Option D is wrong because AWS Step Functions is an orchestration service for coordinating multiple AWS services, but it is not directly triggered by S3 upload events; it would require an S3 event notification to Lambda or EventBridge to start execution, adding unnecessary complexity and cost.

239
Multi-Selecthard

A machine learning team is using SageMaker Pipelines to orchestrate a multi-step workflow. The pipeline fails with a 'ThrottlingException' when submitting a training job. Which TWO actions can reduce the likelihood of throttling?

Select 2 answers
A.Use SageMaker Model Registry to version models
B.Implement retry logic with exponential backoff in the pipeline
C.Increase the number of parallel training jobs
D.Reduce the number of concurrent pipeline steps
E.Request a service quota increase for training jobs
AnswersB, D

Exponential backoff reduces request rate after throttling.

Why this answer

ThrottlingException occurs when the API request rate exceeds service limits. Implementing retry logic with exponential backoff (option B) helps handle transient throttling by automatically retrying requests with increasing delays. Reducing the number of concurrent pipeline steps (option D) decreases the rate of API calls, reducing the likelihood of hitting rate limits.

Option A (Model Registry) is unrelated to throttling. Option C (increasing parallel training jobs) would increase concurrent API calls, worsening throttling. Option E (requesting a quota increase) raises the limit but does not reduce the immediate likelihood of throttling; it is a longer-term mitigation, not a direct action to reduce throttling in the current pipeline.

240
MCQmedium

A data scientist needs to deploy a PyTorch model for real-time inference. Which AWS service is best suited for this task?

A.Amazon SageMaker Batch Transform
B.Amazon ECS with Fargate
C.AWS Lambda with custom container
D.Amazon SageMaker real-time endpoint
AnswerD

SageMaker provides managed real-time endpoints with auto-scaling and built-in model hosting.

Why this answer

Amazon SageMaker real-time endpoints are purpose-built for hosting ML models that require low-latency, synchronous inference. They automatically manage the underlying infrastructure, including scaling, load balancing, and health checks, and support custom PyTorch containers via the SageMaker inference toolkit. This makes them the optimal choice for deploying a PyTorch model for real-time inference.

Exam trap

The trap here is that candidates often confuse batch inference with real-time inference, or assume that any container service (like ECS or Lambda) is equally suitable, failing to recognize that SageMaker endpoints provide ML-specific optimizations like model versioning, A/B testing, and built-in CloudWatch metrics for inference latency.

How to eliminate wrong answers

Option A is wrong because Amazon SageMaker Batch Transform is designed for asynchronous, batch predictions on large datasets, not for real-time, low-latency inference. Option B is wrong because Amazon ECS with Fargate is a general-purpose container orchestration service that lacks built-in ML-specific features like model hosting, automatic scaling based on inference traffic, and integration with SageMaker model artifacts. Option C is wrong because AWS Lambda with a custom container has a maximum execution timeout of 15 minutes and is intended for short-lived, event-driven workloads, not for persistent, real-time inference serving that requires continuous availability and low latency.

241
MCQeasy

A data scientist is using Amazon SageMaker to train an XGBoost model on a dataset with missing values. The dataset has both numeric and categorical features. Which preprocessing step is MOST appropriate before training?

A.Impute missing numeric values with the mean and categorical values with the mode, then train without encoding
B.Remove all rows with missing values and train on the remaining data
C.One-hot encode categorical features and let XGBoost handle missing values natively
D.Label encode categorical features and use the built-in missing value handling of XGBoost
AnswerC

XGBoost handles missing values by default; one-hot encoding is appropriate for categorical data.

Why this answer

XGBoost has a built-in mechanism to handle missing values by learning the best direction to split on during training, making explicit imputation unnecessary. One-hot encoding categorical features is required because XGBoost only accepts numeric inputs, and this encoding preserves the categorical information without imposing ordinal relationships. This approach avoids data leakage from imputation and leverages XGBoost's native sparsity-aware algorithm.

Exam trap

The trap here is that candidates often assume missing values must always be imputed or rows removed, overlooking XGBoost's built-in missing value handling, and they may also confuse label encoding with one-hot encoding, thinking XGBoost can handle categorical features directly without encoding.

How to eliminate wrong answers

Option A is wrong because imputing missing values with the mean or mode can introduce bias and reduce variance, and training without encoding categorical features is invalid since XGBoost cannot process non-numeric data directly. Option B is wrong because removing all rows with missing values can discard a significant portion of the dataset, leading to loss of information and potential bias, especially when missingness is not completely at random. Option D is wrong because label encoding categorical features imposes an arbitrary ordinal relationship that can mislead the model, and while XGBoost handles missing values natively, the label encoding is inappropriate for nominal categories.

242
Multi-Selectmedium

A data scientist is using Amazon SageMaker to deploy a model for real-time inference. The endpoint receives a large number of requests with variable traffic patterns. The team wants to minimize cost while ensuring low latency. Which THREE actions should the team take? (Choose THREE.)

Select 3 answers
A.Use a multi-model endpoint to host multiple models on the same instance.
B.Enable auto-scaling for the endpoint based on the invocation count.
C.Set the initial variant weight to 1 and increase the number of instances.
D.Use a single large instance to handle all traffic.
E.Create a production variant with a smaller instance type.
AnswersA, B, E

Multi-model endpoints reduce cost by sharing resources.

Why this answer

Options A, B, and E are correct. Option A: Using a multi-model endpoint allows multiple models to be hosted on the same instance, reducing costs by sharing resources. Option B: Enabling auto-scaling based on invocation count dynamically adjusts capacity to match variable traffic patterns, minimizing cost while maintaining low latency.

Option E: Creating a production variant with a smaller instance type reduces per-instance cost. Option C is incorrect because setting the initial variant weight to 1 and increasing the number of instances does not directly minimize cost; it is a traffic distribution strategy. Option D is incorrect because a single large instance may be over-provisioned for variable traffic, leading to higher costs.

243
Multi-Selecthard

Which TWO of the following are valid configurations for SageMaker Training Job resource limits? (Select TWO.)

Select 2 answers
A.Maximum number of instances
B.Maximum wait time in seconds
C.Maximum run time in seconds
D.Minimum number of instances
E.Maximum number of spot instances
AnswersA, C

You can limit the number of instances used by the training job.

Why this answer

SageMaker Training Jobs allow you to set a resource limit on the maximum number of instances that can be used for distributed training, which helps control costs and prevent accidental over-provisioning. Option C is correct because you can specify a maximum run time in seconds for a training job; if the job exceeds this limit, SageMaker automatically stops it, ensuring you don't incur unexpected charges.

Exam trap

The trap here is that candidates often confuse 'maximum run time' with 'maximum wait time' (a non-existent parameter) or assume that SageMaker supports minimum instance counts or separate spot instance limits, which are not part of the resource limit configuration.

244
MCQeasy

A data scientist needs to store and version machine learning models, along with metadata such as hyperparameters and metrics. Which AWS service is designed for this purpose?

A.Amazon S3 with versioning enabled
B.Amazon SageMaker Model Registry
C.Amazon DynamoDB
D.Amazon Elastic Container Registry (ECR)
AnswerB

Amazon SageMaker Model Registry is specifically designed to catalog, version, and manage ML models with metadata such as hyperparameters and metrics.

Why this answer

Amazon SageMaker Model Registry is a purpose-built service for cataloging, versioning, and managing machine learning models along with their metadata such as hyperparameters and metrics. It provides a central repository to track model versions, lineage, and approval status. Option A (S3 with versioning) is object storage that can store model artifacts but lacks metadata management and versioning capabilities for ML models.

Option C (DynamoDB) is a NoSQL database, not designed for ML model management. Option D (ECR) is for storing container images, not ML models directly.

245
MCQmedium

A company is using Amazon SageMaker to deploy a model for real-time predictions. The model requires access to a DynamoDB table to look up features. The SageMaker endpoint is configured with a VPC and subnet. However, the endpoint cannot connect to DynamoDB. What is the most likely reason?

A.The security group does not allow outbound traffic to DynamoDB
B.The IAM role for the endpoint does not have dynamodb:GetItem permission
C.The VPC does not have a VPC endpoint for DynamoDB or a NAT gateway
D.The DynamoDB table is in a different AWS Region
E.The CloudWatch logs show no errors
AnswerC

Without a route to DynamoDB, the endpoint cannot connect.

Why this answer

A SageMaker endpoint deployed in a VPC, by default, cannot access public AWS services like DynamoDB unless the VPC has a VPC endpoint for DynamoDB (Gateway endpoint) or a NAT gateway to route traffic through an internet gateway. Without either, the endpoint's private subnet has no route to DynamoDB's public endpoints, causing the connection failure.

Exam trap

The trap here is that candidates often assume the issue is IAM permissions (Option B) or security group rules (Option A), overlooking the fundamental network routing requirement for private VPC resources to access public AWS services.

How to eliminate wrong answers

Option A is wrong because security groups control inbound and outbound traffic by IP address or security group ID, but DynamoDB is accessed via a public endpoint (not a specific IP), so the issue is network routing, not security group rules. Option B is wrong because the IAM role lacking dynamodb:GetItem would cause an authorization failure (e.g., AccessDeniedException), not a network connectivity failure; the endpoint would still be able to reach DynamoDB but be denied the action. Option D is wrong because DynamoDB is a global service; cross-region access is possible and would not inherently block connectivity—the issue is network routing within the VPC.

Option E is wrong because CloudWatch logs showing no errors does not diagnose the root cause; the endpoint may silently fail to connect without logging network-level errors.

246
MCQhard

A machine learning team is building a fraud detection system using Amazon SageMaker. The training data is highly imbalanced (99% legitimate, 1% fraudulent). They need to maximize the recall of the fraud class while keeping precision above 90%. Which approach should they take?

A.Undersample the majority class to create a balanced dataset and train a Random Forest
B.Train a model using the original data, then adjust the decision threshold on the validation set to maximize recall while precision > 90%
C.Train an XGBoost model with scale_pos_weight parameter set to 99
D.Use SMOTE to oversample the fraud class and then train a logistic regression
AnswerB

Threshold tuning directly optimizes recall with a precision constraint.

Why this answer

Adjusting the decision threshold on the validation set directly optimizes the trade-off between recall and precision. By lowering the threshold, the model classifies more instances as fraud, increasing recall, while the precision constraint (≥90%) ensures the threshold is set at a point where false positives remain acceptably low. This approach works with any probabilistic classifier and does not alter the training data distribution.

Exam trap

The trap here is that candidates often assume resampling (undersampling, oversampling, or SMOTE) or class-weight adjustments are the only ways to handle imbalance, but they overlook the simpler and more precise method of threshold tuning, which directly controls the recall-precision trade-off without altering the training data.

How to eliminate wrong answers

Option A is wrong because undersampling the majority class discards 99% of legitimate transactions, which can cause the model to lose valuable patterns and lead to high variance and poor generalization on real-world data. Option C is wrong because setting scale_pos_weight to 99 in XGBoost adjusts the loss function to penalize misclassifications of the minority class more heavily, but it does not guarantee that precision will stay above 90%—it only helps with class imbalance, not with meeting a specific precision constraint. Option D is wrong because SMOTE oversamples the fraud class by creating synthetic examples, which can introduce noise and overfitting, and logistic regression may not capture complex fraud patterns; more importantly, this approach does not provide a mechanism to precisely control the recall-precision trade-off to meet the 90% precision requirement.

247
MCQeasy

A data scientist wants to deploy a PyTorch model for real-time inference. Which SageMaker deployment option provides the lowest latency for single-digit millisecond responses?

A.SageMaker Real-Time Inference endpoint
B.SageMaker Asynchronous Inference
C.SageMaker Serverless Inference
D.SageMaker Batch Transform
AnswerA

Real-Time endpoints provide the lowest latency for online inference.

Why this answer

SageMaker Real-Time Inference endpoints (Option A) are optimized for low-latency, real-time predictions, often achieving single-digit millisecond response times because they maintain a persistent endpoint with pre-warmed instances. Option B (SageMaker Asynchronous Inference) is designed for non-real-time workloads with higher latency due to queuing. Option C (SageMaker Serverless Inference) can introduce cold starts and higher latency, especially for sporadic traffic.

Option D (SageMaker Batch Transform) is for offline batch processing and not suitable for real-time inference.

248
MCQeasy

A company wants to perform automated hyperparameter tuning for a model. Which Amazon SageMaker feature should be used?

A.Amazon SageMaker Clarify
B.Amazon SageMaker Ground Truth
C.Amazon SageMaker Debugger
D.Amazon SageMaker automatic model tuning
AnswerD

Purpose-built for hyperparameter optimization.

Why this answer

Amazon SageMaker automatic model tuning (also known as hyperparameter tuning) is the correct feature because it automates the process of searching for the optimal combination of hyperparameters for a machine learning model. It uses algorithms like Bayesian optimization, random search, or Hyperband to efficiently explore the hyperparameter space and find the best-performing configuration based on a specified objective metric.

Exam trap

The trap here is that candidates may confuse SageMaker Debugger (which monitors training) with hyperparameter tuning, or assume that Ground Truth or Clarify are involved in model optimization, when in fact they serve entirely different purposes in the ML pipeline.

How to eliminate wrong answers

Option A is wrong because Amazon SageMaker Clarify is designed for bias detection and explainability, not for hyperparameter tuning. Option B is wrong because Amazon SageMaker Ground Truth is used for creating and managing labeled datasets for training, not for tuning hyperparameters. Option C is wrong because Amazon SageMaker Debugger monitors training jobs for anomalies, profiles system resources, and captures tensors for debugging, but it does not perform hyperparameter optimization.

249
Multi-Selecthard

A company is deploying a machine learning model using Amazon SageMaker. To reduce costs, they want to use SageMaker Managed Spot Training. Which THREE conditions must be met for the training job to use spot instances? (Choose THREE.)

Select 3 answers
A.The model must be deployed to a serverless endpoint
B.The training job must be able to handle interruptions gracefully
C.The chosen instance type must be available in the spot market
D.The training script must save checkpoints to an S3 bucket periodically
E.The training job must be configured to run in a VPC
AnswersB, C, D

Spot instances can be reclaimed; the job must be fault-tolerant.

Why this answer

For SageMaker Managed Spot Training, the training job must be able to handle interruptions (B) because spot instances can be reclaimed. The chosen instance type must be available in the spot market (C). Additionally, the training script should save checkpoints to S3 periodically (D) to resume training if interrupted.

Option A is incorrect because spot training is for training, not deploying endpoints. Option E is not required; training can run inside or outside a VPC.

Exam trap

A common trap is to think that serverless endpoints or VPC configuration are required for spot training. They are not. The key requirements are interruption handling and checkpointing.

250
MCQhard

An ML team is using SageMaker Autopilot to automatically build a binary classification model. The dataset has 500,000 rows and 200 columns, with a severe class imbalance (1% positive). Which configuration should the team set to address the imbalance?

A.Specify the 'objective' as 'F1' or 'AUC' to optimize for imbalanced data.
B.Set the 'problem_type' to 'MulticlassClassification' to handle imbalance.
C.Use the 'AutoML' job with 'EnsembleMode' and 'SMOTE' sampling.
D.Configure the data split to use stratified sampling based on the target.
AnswerA

F1 and AUC are better metrics for imbalanced classification.

Why this answer

SageMaker Autopilot allows specifying the objective metric for optimization. For imbalanced datasets, metrics like F1 score or AUC are more appropriate than accuracy because they account for precision and recall or the trade-off between true positive and false positive rates. By setting the objective to 'F1' or 'AUC', Autopilot will optimize the model for these metrics, which better handle class imbalance.

Option B (MulticlassClassification) is for multi-class problems, not binary imbalance; Option C (SMOTE) is not supported by Autopilot; Option D (stratified splitting) helps ensure representative validation splits but does not directly address the imbalance in model optimization.

251
MCQhard

A company wants to serve a scikit-learn model via SageMaker. The inference code requires a custom preprocessing step that is not in the default scikit-learn container. What is the simplest way to deploy?

A.Create a custom Docker image extending the SageMaker scikit-learn container
B.Package the code in a Lambda layer and use SageMaker hosting
C.Use SageMaker Batch Transform with a custom processing script
D.Use SageMaker Neo to compile the model and add preprocessing
AnswerA

Extending the container with the custom preprocessing is straightforward and supported.

Why this answer

Extending the SageMaker scikit-learn container with a custom Docker image is the simplest and most direct way to add custom preprocessing logic that is not included in the default container. SageMaker's pre-built scikit-learn container supports only standard scikit-learn inference code; any additional dependencies or custom preprocessing steps require you to build a custom image that inherits from the official SageMaker scikit-learn image and adds your code. This approach avoids the complexity of managing separate inference pipelines or external services.

Exam trap

The trap here is that candidates often confuse SageMaker's built-in algorithm containers with the ability to inject arbitrary code via environment variables or Lambda layers, when in fact custom preprocessing requires a custom Docker image that extends the official container.

How to eliminate wrong answers

Option B is wrong because Lambda layers are used to package dependencies for AWS Lambda functions, not for SageMaker hosting endpoints; SageMaker hosting does not support Lambda layers for inference code. Option C is wrong because SageMaker Batch Transform is designed for offline, batch predictions and does not provide a real-time inference endpoint; it also requires a separate processing script rather than integrating preprocessing directly into the model serving container. Option D is wrong because SageMaker Neo is a model compilation and optimization service that targets hardware acceleration, not a mechanism for adding custom preprocessing logic to inference code.

252
MCQmedium

A company is using Amazon SageMaker to deploy a real-time inference endpoint for a computer vision model. The endpoint receives bursts of traffic with up to 500 requests per second, but the load is unpredictable. Which scaling strategy is MOST cost-effective while maintaining low latency?

A.Manually provision enough instances to handle peak load
B.Use provisioned concurrency on SageMaker Serverless Inference
C.Use a multi-model endpoint to reduce the number of instances
D.Configure automatic scaling with a target tracking policy and add a buffer to handle bursts
AnswerD

Autoscaling with a target tracking policy adjusts instances based on demand, and a buffer helps absorb sudden spikes.

Why this answer

Amazon SageMaker's automatic scaling with a target tracking policy dynamically adjusts the number of instances based on a target metric (e.g., InvocationsPerInstance), which handles unpredictable bursts cost-effectively. Adding a buffer (e.g., a higher target value or a cooldown period) ensures low latency by pre-scaling before traffic spikes, avoiding cold starts and over-provisioning.

Exam trap

The trap here is that candidates often confuse provisioned concurrency (Option B) as a cost-effective burst solution, but it is actually designed for serverless functions with predictable traffic and incurs costs for idle capacity, making it unsuitable for high-throughput, unpredictable bursts.

How to eliminate wrong answers

Option A is wrong because manually provisioning enough instances for peak load leads to significant over-provisioning and wasted cost during low-traffic periods, as the endpoint runs idle instances continuously. Option B is wrong because SageMaker Serverless Inference with provisioned concurrency is designed for intermittent or low-throughput workloads, not for sustained bursts of 500 requests per second, and it incurs costs for provisioned concurrency even when idle, plus potential cold start latency. Option C is wrong because a multi-model endpoint reduces the number of instances by hosting multiple models on shared instances, but it does not inherently address scaling for traffic bursts; it still requires manual or auto-scaling configuration to handle load spikes and can suffer from model loading latency during bursts.

253
MCQhard

A company deploys a SageMaker endpoint for real-time inference. After a week, the response latency increases from 50 ms to 500 ms. CPU utilization is at 30%. What is the most likely cause?

A.The model has a memory leak
B.The instance type is underpowered for the inference load
C.The inference code makes a call to a downstream service that is throttling requests
D.The SageMaker endpoint is experiencing a network outage
AnswerC

Downstream throttling can increase latency without high CPU on the endpoint.

Why this answer

Increased latency with low CPU utilization indicates that the model itself is not compute-bound. Instead, the bottleneck is likely external, such as a downstream service (e.g., database, API) that the inference code calls. Throttling by that service causes requests to queue up, increasing latency without raising CPU usage on the SageMaker instance.

Option A would typically cause memory pressure rather than low CPU. Option B would show high CPU if underpowered. Option D would cause connection errors, not just latency increase.

254
MCQhard

Refer to the exhibit. A data scientist is reviewing CloudWatch logs for a SageMaker real-time endpoint. The log shows that a prediction took 15 ms. The endpoint is configured with an ml.c5.large instance and the model is a small scikit-learn model. The latency requirement is under 10 ms. Which action would most likely reduce the latency?

A.Use a larger instance type
B.Add more instances to the endpoint
C.Change the model to a TensorFlow model
D.Enable SageMaker Batch Transform
E.Increase the batch size for inference
AnswerA

More CPU power reduces latency.

Why this answer

The latency of 15 ms exceeds the 10 ms requirement, indicating that the current ml.c5.large instance lacks sufficient compute resources (CPU) to process predictions quickly enough. Upgrading to a larger instance type (e.g., ml.c5.xlarge or ml.c5.2xlarge) provides more CPU capacity, reducing inference time by allowing the model to compute predictions faster. This directly addresses the bottleneck for a small scikit-learn model, which is CPU-bound and benefits from increased compute power.

Exam trap

The trap here is that candidates confuse horizontal scaling (adding instances) with reducing latency, but horizontal scaling only improves throughput, not the per-request response time, which is the key metric in this question.

How to eliminate wrong answers

Option B is wrong because adding more instances to the endpoint (horizontal scaling) improves throughput and availability but does not reduce per-request latency; it distributes load across instances but each request still runs on a single instance with the same compute capacity. Option C is wrong because changing the model to TensorFlow does not inherently reduce latency; TensorFlow models can be more computationally intensive than scikit-learn models, potentially increasing latency, and the framework change does not address the underlying compute limitation. Option D is wrong because SageMaker Batch Transform is designed for asynchronous, offline batch predictions on large datasets, not for real-time endpoints; it does not reduce latency for individual requests and introduces queuing delays.

Option E is wrong because increasing the batch size for inference would process multiple requests together, which increases the time to complete a batch and raises latency per individual request, worsening the problem.

255
MCQhard

A machine learning engineer is using Amazon SageMaker to train a deep learning model. The training job is failing with a 'ResourceLimitExceeded' error. The engineer checks the account limits and sees that the current limit for the instance type is 2, and they are already using 2 instances for other jobs. Which approach would resolve the issue MOST cost-effectively?

A.Request a service limit increase for the current instance type
B.Use a different instance type that is available and has sufficient capacity
C.Use a managed spot training instead of on-demand
D.Stop the other training jobs to free up resources
AnswerB

Different instance types have separate limits and may be available immediately.

Why this answer

Using a different instance type within the same family often has separate limits. Option A increases cost. Option C may not resolve if the limit is account-wide.

Option D changes the request, not the limit.

256
MCQeasy

A company is using Amazon SageMaker to train a model. The training data is stored in an S3 bucket. The data scientist wants to use the Pipe mode for training to stream data directly from S3 instead of downloading it first. Which of the following is a prerequisite for using Pipe mode?

A.The training data must be compressed using Gzip.
B.The S3 bucket must have public read access.
C.The training data must be stored as a single large file.
D.The training data must be in RecordIO-protobuf or TFRecord format.
AnswerD

Pipe mode streams data line by line; RecordIO and TFRecord are supported.

Why this answer

Pipe mode in Amazon SageMaker streams data directly from S3 to the training algorithm without downloading it first. This mode requires the data to be in a format that supports random access and chunked reading, such as RecordIO-protobuf or TFRecord. Option D is correct because these formats enable efficient streaming.

Option A is incorrect: SageMaker can uncompress data on the fly if needed, and compression is not a prerequisite. Option B is incorrect: the S3 bucket does not need public read access; SageMaker uses IAM roles to access the data. Option C is incorrect: Pipe mode works best with multiple sharded files, not a single large file, to allow parallel streaming.

257
Multi-Selecteasy

Which TWO of the following are benefits of using SageMaker Managed Spot Training? (Select TWO.)

Select 2 answers
A.No need to checkpoint the model
B.Potential for significant cost savings
C.Faster training times
D.Guaranteed instance availability
E.Lower training cost compared to on-demand instances
AnswersB, E

Savings can be up to 90%.

Why this answer

SageMaker Managed Spot Training leverages spare AWS EC2 compute capacity at a significantly reduced price compared to on-demand instances, often achieving cost savings of 60-90%. This makes it a highly cost-effective option for training machine learning models, especially when the training job is fault-tolerant and can handle interruptions.

Exam trap

The trap here is that candidates often confuse 'lower cost' with 'faster training' or assume Spot instances are always available, but the key distinction is that Spot training is interruptible and requires checkpointing, while on-demand instances are reliable but more expensive.

258
MCQeasy

A machine learning engineer needs to deploy a model that requires custom inference code with dependencies. Which SageMaker deployment option should be used?

A.Use a SageMaker notebook instance as an endpoint.
B.Create a custom Docker container and deploy to SageMaker endpoint.
C.Use a built-in SageMaker algorithm.
D.Use a SageMaker batch transform job.
AnswerB

Custom container provides flexibility for custom code and dependencies.

Why this answer

When a model requires custom inference code with dependencies, the only way to fully control the runtime environment, libraries, and inference logic is to package everything into a custom Docker container. SageMaker endpoints can then deploy this container, allowing the engineer to specify the exact inference script and dependencies (e.g., via a Dockerfile and a requirements.txt). This approach supports any framework or custom logic that built-in algorithms cannot provide.

Exam trap

A common mistake is assuming a SageMaker notebook instance can be used as an inference endpoint, but notebook instances are for development and experimentation only. To serve custom inference code, you must package it in a Docker container and deploy it to a SageMaker endpoint.

How to eliminate wrong answers

Option A is wrong because a SageMaker notebook instance is an interactive development environment, not a persistent inference endpoint; it cannot serve production traffic and lacks the necessary scaling, load balancing, and health-check mechanisms. Option C is wrong because built-in SageMaker algorithms are pre-packaged with fixed inference code and dependencies; they cannot be modified to run custom inference logic or include additional libraries. Option D is wrong because a SageMaker batch transform job is designed for offline, asynchronous predictions on a dataset, not for real-time, low-latency inference with a persistent endpoint; it does not support custom inference code in the same way as a deployed container.

259
MCQmedium

A data scientist is training a model using Amazon SageMaker and wants to automatically stop training when the model stops improving. Which feature should be used?

A.Use SageMaker Debugger to monitor the loss metric.
B.Configure a CloudWatch alarm on the training job's CPU utilization.
C.Use SageMaker Hyperparameter Tuning with random search.
D.Enable early stopping in the training job configuration.
AnswerD

Stops training if improvement plateaus.

Why this answer

SageMaker's built-in early stopping feature automatically halts a training job when the model's objective metric (e.g., loss or accuracy) ceases to improve over a specified number of steps or epochs. This is configured directly in the training job's `StoppingCondition` parameter, which monitors the metric defined in the `MetricDefinitions` and stops training if no improvement is detected, saving compute time and avoiding overfitting.

Exam trap

The trap here is that candidates confuse SageMaker Debugger's monitoring capabilities with automatic stopping, but Debugger only provides hooks for custom actions (e.g., via rules like `LossNotDecreasing`) and does not natively halt training without additional configuration, whereas early stopping is a direct, built-in feature of the training job configuration.

How to eliminate wrong answers

Option A is wrong because SageMaker Debugger is designed for debugging and profiling training jobs (e.g., capturing tensors, monitoring system bottlenecks), not for automatically stopping training based on metric stagnation; it can emit alerts but does not natively trigger a stop. Option B is wrong because a CloudWatch alarm on CPU utilization monitors infrastructure health (e.g., resource exhaustion), not model performance metrics like loss or accuracy, so it cannot determine when the model stops improving. Option C is wrong because SageMaker Hyperparameter Tuning with random search is a strategy for exploring hyperparameter combinations to find optimal values, not a mechanism to stop an individual training job early; early stopping can be used within a tuning job, but the feature itself is separate and configured via the training job's `StoppingCondition`.

260
MCQhard

A machine learning team is deploying a real-time inference endpoint on Amazon SageMaker for a model that requires low latency (<100 ms). The model is a PyTorch model with custom pre- and post-processing logic. The team uses a SageMaker Model with a custom inference container. After deployment, they observe that the endpoint takes over 500 ms for the first request, but subsequent requests are fast (~50 ms). What is the MOST likely cause?

A.The instance type is too small to handle the model size.
B.The model is too large and exceeds the instance memory.
C.The container has a cold start delay because the model needs to be loaded into memory from Amazon S3 on the first request.
D.The endpoint is not configured with auto-scaling.
AnswerC

Cold start occurs when no idle instances are available; model loading from S3 adds latency.

Why this answer

The first request triggers a cold start where the custom inference container initializes and loads the model from Amazon S3 into memory, causing high latency. Subsequent requests are fast because the model remains cached. Option A is wrong because the instance type primarily affects throughput and steady-state latency, not transient cold starts.

Option B is wrong because the issue is not about memory exhaustion—the endpoint handles subsequent requests well. Option D is wrong because auto-scaling adds instances but does not eliminate the cold start for the initial request on a new instance.

261
Multi-Selectmedium

Which TWO options are valid ways to reduce inference latency for a model deployed on a SageMaker real-time endpoint? (Select TWO.)

Select 2 answers
A.Use SageMaker batch transform instead of real-time endpoint
B.Deploy the model to multiple instances behind a load balancer
C.Enable SageMaker Neo to compile the model for the target instance
D.Use a GPU instance type for the endpoint
E.Increase the endpoint's invocation timeout
AnswersC, D

Neo optimizes model for faster inference.

Why this answer

SageMaker Neo compiles the trained model into an optimized binary for the specific target instance type, using hardware-specific instructions (e.g., Intel MKL-DNN, NVIDIA TensorRT) to reduce inference latency without sacrificing accuracy. This compilation optimizes the model graph and fuses operations, leading to faster execution on the deployed endpoint.

Exam trap

The trap here is that candidates often confuse improving throughput (e.g., load balancing) with reducing per-request latency, or they mistakenly think increasing timeout values can speed up inference, when in fact it only extends the allowed wait time.

262
MCQhard

A machine learning team is using SageMaker to train a model with a custom Docker container. The training script runs locally but fails on SageMaker with a 'Permission denied' error when writing to /opt/ml/model. What is the likely cause?

A.The container's user does not have write permission to /opt/ml/model
B.The Docker image is too large
C.The training script is trying to read from /opt/ml/input/data instead of /opt/ml/input/data/training
D.The training data is not in the correct S3 bucket
AnswerA

Correct. The container user lacks write permission to /opt/ml/model, which is required for saving the model artifact.

Why this answer

In SageMaker, the training container is expected to store the trained model artifacts in the /opt/ml/model directory. If the user running the training script inside the container does not have write permissions to that directory, the training will fail with a 'Permission denied' error. Option A is correct.

Option B (image too large) would cause different errors, such as EBS volume limits. Option C refers to input data paths; the error is about writing the model, not reading inputs. Option D (S3 bucket) would cause read errors, not a write permission issue.

263
MCQmedium

A company is using Amazon SageMaker to deploy a model for real-time inference. The endpoint uses an ml.c5.xlarge instance. The company wants to reduce costs without affecting performance. The current traffic pattern shows a daily peak of 500 requests per second for 2 hours, and the rest of the day sees fewer than 50 requests per second. The model has a cold start time of about 30 seconds. What should the company do?

A.Switch to a serverless inference endpoint.
B.Configure an auto scaling policy that scales down during low traffic and keep a minimum of 1 instance.
C.Use a single ml.c5.xlarge instance and rely on it.
D.Use SageMaker Batch Transform for all predictions.
AnswerB

Auto scaling reduces instances during low traffic, and minimum instance prevents cold starts.

Why this answer

Configuring an auto scaling policy that scales down during low traffic reduces costs, and keeping a minimum of 1 instance avoids cold starts during low traffic, ensuring low latency. Option A is incorrect because serverless endpoints have cold starts and may not handle the peak of 500 TPS. Option C is wrong because a single instance may not handle the peak traffic, causing latency.

Option D is wrong because Batch Transform is for batch predictions, not real-time inference.

264
MCQmedium

A machine learning team is deploying a model using Amazon SageMaker. They need to automatically retrain the model every week with new data and update the endpoint without downtime. Which approach should they use?

A.Use SageMaker Ground Truth to label new data and trigger retraining
B.Use SageMaker batch transform to periodically generate predictions and replace the model
C.Use AWS Lambda to trigger retraining on a schedule and deploy a new endpoint
D.Use SageMaker automatic model tuning with a schedule and update the endpoint using CreateEndpointConfig and UpdateEndpoint
E.Use SageMaker Pipelines to automate retraining and deploy a new endpoint with blue/green deployment
AnswerE

SageMaker Pipelines provides a fully managed way to automate the entire ML workflow, including scheduled retraining. It supports blue/green deployment by using CreateEndpointConfig and UpdateEndpoint to update the endpoint without downtime. This directly meets the requirement.

Why this answer

The correct approach is to use SageMaker Pipelines, which provides a fully managed service to automate the machine learning workflow, including retraining on a schedule. SageMaker Pipelines supports blue/green deployment patterns using `CreateEndpointConfig` and `UpdateEndpoint` to update the endpoint without downtime. Option E correctly describes this.

Option D is incorrect because automatic model tuning is for hyperparameter optimization, not scheduled retraining. Option C (AWS Lambda) could be used, but it requires more manual orchestration and is not the best practice recommended by AWS.

Exam trap

The trap is that candidates may confuse automatic model tuning (hyperparameter optimization) with scheduling retraining. The key is that the tool should both automate the retraining and support zero-downtime endpoint updates, which is best achieved with SageMaker Pipelines using blue/green deployment.

How to eliminate wrong answers

Option A is wrong because SageMaker Ground Truth is a data labeling service, not a mechanism for automated retraining or endpoint updates; it does not trigger retraining or manage endpoint deployment. Option B is wrong because SageMaker batch transform is used for offline, asynchronous predictions on a batch of data, not for real-time endpoint updates or zero-downtime deployment. Option C is wrong because while AWS Lambda can trigger retraining on a schedule, deploying a new endpoint via Lambda alone does not inherently guarantee zero-downtime updates; it would require additional logic to manage endpoint configuration swaps.

Option E is wrong because SageMaker Pipelines can automate retraining and deploy a new endpoint, but blue/green deployment is not a native SageMaker feature; the question specifically asks for zero-downtime updates, which is achieved via `UpdateEndpoint` with a new endpoint configuration, not via a separate blue/green deployment mechanism.

265
MCQhard

A company is using SageMaker to host a model for real-time inference. They notice that the endpoint's latency increases over time. The model is stateless and the inference code does not log any errors. What is the MOST likely cause?

A.Memory leak in the inference container
B.Gradual increase in request payload size
C.Endpoint auto scaling is adding new instances
D.Model is accumulating state from previous requests
AnswerA

Memory leaks cause slowdown over time.

Why this answer

A memory leak in the inference container causes the process's resident memory to grow over time as allocated memory is not freed. Since the model is stateless and no errors are logged, the leak is likely in the inference code or a dependency (e.g., a TensorFlow session or a Python list that grows unbounded). As memory pressure increases, the operating system may swap or the container may be OOM-killed, leading to increased garbage collection pauses and higher latency for each request.

Exam trap

The trap here is that candidates confuse a 'stateless model' with 'no memory issues' — but a stateless model means no state between requests, not that the container's memory usage is stable; a memory leak in the inference code or framework can still cause latency degradation over time.

How to eliminate wrong answers

Option B is wrong because a gradual increase in request payload size would cause a sudden or stepwise latency increase when the payload crosses a threshold, not a steady increase over time, and it would be observable in request logs. Option C is wrong because endpoint auto scaling adding new instances would reduce latency by distributing load, not increase it; new instances are warm and ready to serve. Option D is wrong because the model is explicitly stated as stateless, meaning it does not accumulate state from previous requests; if it did, that would contradict the given information and would likely cause errors or state corruption.

266
MCQmedium

A machine learning engineer is deploying a real-time inference endpoint using Amazon SageMaker. The model is a large deep learning model that requires low latency (under 100 ms) and high throughput (1000 requests per second). Which SageMaker deployment option is MOST suitable?

A.Deploy the model on a single endpoint with automatic scaling based on CPU utilization.
B.Use SageMaker Serverless Inference with provisioned concurrency.
C.Use SageMaker Inference Recommender to find the optimal instance type and endpoint configuration.
D.Use a multi-model endpoint to load multiple copies of the model on the same instance.
AnswerC

Inference Recommender runs load tests and suggests the best instance and configuration to meet latency and throughput targets.

Why this answer

SageMaker Inference Recommender runs load tests against the model to identify the optimal instance type, instance count, and endpoint configuration (e.g., container parameters, model server settings) that meet the specific latency and throughput requirements. For a large deep learning model demanding under 100 ms latency and 1000 requests per second, this automated benchmarking is essential to avoid over-provisioning or under-provisioning resources.

Exam trap

The trap here is that candidates assume serverless or multi-model endpoints are always cost-effective for high throughput, but they fail to account for the strict latency and concurrency ceilings that make those options unsuitable for demanding real-time inference workloads.

How to eliminate wrong answers

Option A is wrong because automatic scaling based on CPU utilization is reactive and may not achieve the sub-100 ms latency target; CPU utilization is a poor proxy for inference latency, and scaling lag can cause timeouts during traffic spikes. Option B is wrong because SageMaker Serverless Inference has a maximum concurrency limit (typically 200 requests per second per endpoint) and cold-start latency that can exceed 100 ms, making it unsuitable for high-throughput, low-latency real-time inference. Option D is wrong because a multi-model endpoint loads multiple model copies on the same instance, which can cause memory contention and unpredictable latency due to model loading/unloading overhead, and it does not guarantee the throughput or latency required for a single large deep learning model.

267
MCQhard

A machine learning engineer is using AWS Step Functions to orchestrate a SageMaker training job followed by a Lambda function for post-processing. The training job completes successfully, but the Lambda function fails with a timeout error. What is the MOST likely cause?

A.The Lambda function's IAM role lacks permissions to access the training output
B.The Lambda function execution time exceeds the maximum timeout limit
C.The Step Functions state machine has a misconfigured retry policy
D.The SageMaker training job output data is too large for Lambda to process
AnswerB

Lambda timeout is 15 minutes max.

Why this answer

The Lambda function failed with a timeout error, which directly indicates that its execution duration exceeded the configured maximum timeout limit (default 3 seconds, max 15 minutes). This is the most likely cause because the error message explicitly states 'timeout', and Lambda enforces a hard timeout that terminates the function if it runs longer than the configured limit.

Exam trap

The trap here is that candidates confuse a timeout error with a permissions or data size issue, but the error message explicitly names 'timeout', making it a direct indicator of execution duration exceeding the configured limit.

How to eliminate wrong answers

Option A is wrong because a permissions issue would result in an 'AccessDenied' or authorization error, not a timeout error. Option C is wrong because a misconfigured retry policy in Step Functions would affect how the state machine handles failures, but it would not cause the Lambda function itself to timeout; the timeout occurs at the Lambda service level before Step Functions retry logic even applies. Option D is wrong because while large output data could cause processing delays, the error is specifically a timeout, not a memory or data size error; Lambda has a 6 MB invocation payload limit, but the error message would be different (e.g., 'Request too large') if that were the issue.

268
MCQmedium

A company is deploying a machine learning model to production on Amazon SageMaker. The model requires low-latency inference (under 10 ms) for real-time predictions. The data scientist has trained a model using XGBoost and wants to minimize cost while meeting latency requirements. Which SageMaker hosting option should be used?

A.Use a real-time endpoint with a single model
B.Use a serverless inference endpoint
C.Use a real-time endpoint with multi-model hosting
D.Use a batch transform job
E.Use an asynchronous inference endpoint
AnswerA

Real-time endpoints provide low-latency inference.

Why this answer

A real-time endpoint with a single model is the correct choice because it provides dedicated, always-on compute resources that can consistently achieve sub-10 ms inference latency for XGBoost models. SageMaker real-time endpoints keep instances warm and route requests directly to the model container, minimizing cold-start delays and network overhead, which is essential for low-latency requirements.

Exam trap

The trap here is that candidates confuse 'serverless' with 'low-latency' because serverless is cost-effective, but they overlook the cold-start penalty that makes it unsuitable for sub-10 ms inference; AWS often tests this by pairing a latency requirement with a cost-saving option to see if you prioritize performance constraints over cost optimization.

How to eliminate wrong answers

Option B is wrong because serverless inference endpoints have cold-start latency that can exceed 10 ms, especially for infrequent or bursty traffic, making them unsuitable for strict low-latency requirements. Option C is wrong because multi-model hosting shares a single instance across multiple models, which can introduce contention and unpredictable latency spikes due to model loading/unloading, violating the under-10 ms target. Option D is wrong because batch transform jobs are designed for offline, asynchronous processing of large datasets and do not provide real-time endpoints or sub-second latency.

Option E is wrong because asynchronous inference endpoints are intended for requests with larger payloads or longer processing times (typically seconds to minutes), not for real-time predictions under 10 ms.

269
MCQmedium

A team is training a large NLP model using SageMaker. The training job fails with an OutOfMemory error. The instance type is ml.p3.2xlarge with 61 GB GPU memory. Which action should the team take to resolve the issue without changing the model architecture?

A.Switch to a regression model
B.Increase the number of epochs
C.Enable SageMaker Managed Warm Pools
D.Reduce the batch size in the training script
AnswerD

Smaller batch size reduces GPU memory consumption per step.

Why this answer

Reducing the batch size in the training script decreases GPU memory usage per iteration, which can resolve the OutOfMemory error without changing the model architecture. Option A is incorrect because switching to a regression model changes the problem type. Option B is incorrect because increasing the number of epochs does not affect memory per step.

Option C is incorrect because Managed Warm Pools are for reducing cold start times, not for memory issues.

270
Multi-Selecthard

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

Select 2 answers
A.Attach an Elastic Inference accelerator
B.Increase the batch size
C.Enable SageMaker Model Monitor
D.Use a GPU instance type
E.Compile the model using SageMaker Neo
AnswersA, E

Provides GPU acceleration at lower cost.

Why this answer

Elastic Inference (EI) accelerators attach a dedicated, low-cost FPGA-based inference accelerator to a SageMaker endpoint, offloading matrix operations from the CPU. This reduces inference latency by accelerating the compute-intensive forward pass of deep learning models without requiring a full GPU instance, making it ideal for real-time, low-latency predictions.

Exam trap

The trap here is that candidates often confuse 'reducing latency' with 'increasing throughput' — choosing larger batch sizes or GPU instances, which improve throughput but can increase per-request latency due to batching delays and GPU context switching.

271
MCQmedium

A company's ML model is deployed on a SageMaker endpoint. The model's predictions are used in a customer-facing application that requires low latency. Over time, the model's performance degrades due to data drift. What is the most suitable approach to detect this drift automatically?

A.Set up a CloudWatch alarm on the endpoint's invocation latency
B.Periodically retrain the model using all historical data
C.Use Amazon S3 events to trigger a Lambda function that compares distributions
D.Enable Amazon SageMaker Model Monitor to continuously check for data drift
AnswerD

Built-in drift detection.

Why this answer

Amazon SageMaker Model Monitor is purpose-built to automatically detect data drift by continuously comparing incoming inference data against a baseline dataset. It computes statistical metrics (e.g., distribution distances like Kolmogorov-Smirnov or Chi-squared) and raises alerts when drift exceeds configurable thresholds, enabling proactive retraining without manual intervention. This directly addresses the need for automated drift detection in a low-latency customer-facing application.

Exam trap

The trap here is confusing operational metrics (latency, errors) with data quality metrics (drift), leading candidates to choose CloudWatch alarms (Option A) instead of the dedicated monitoring service.

How to eliminate wrong answers

Option A is wrong because CloudWatch alarms on invocation latency measure endpoint performance (e.g., response times), not data drift; latency degradation is unrelated to changes in input data distribution. Option B is wrong because periodically retraining on all historical data is a reactive, resource-intensive approach that does not detect drift—it assumes drift has occurred without confirmation, wasting compute and potentially overfitting to stale patterns. Option C is wrong because S3 events trigger Lambda on object creation, not on inference data; comparing distributions would require custom code to sample and compare against a baseline, which is less reliable and more complex than SageMaker Model Monitor's built-in statistical tests and integration.

272
MCQmedium

A company is building a fraud detection model. The dataset is highly imbalanced (99% legitimate, 1% fraud). The data scientist trains a model using Amazon SageMaker's built-in XGBoost algorithm. The model achieves 99% accuracy but only catches 10% of fraud cases. Which technique should the data scientist apply to improve recall for the minority class?

A.Use random under-sampling of the majority class.
B.Set the scale_pos_weight hyperparameter in XGBoost.
C.Use mean squared error as the objective function.
D.Use SMOTE to oversample the minority class.
AnswerB

This adjusts the weight of positive class to handle imbalance.

Why this answer

Setting the scale_pos_weight hyperparameter in XGBoost adjusts the weight of the positive (minority) class during training, effectively penalizing misclassifications of fraud cases more heavily. This directly addresses the class imbalance by forcing the model to focus on the minority class, which improves recall without altering the dataset distribution. The current 99% accuracy with only 10% fraud recall indicates the model is biased toward the majority class, and scale_pos_weight is the most direct and efficient fix within XGBoost.

Exam trap

The trap here is that candidates often choose SMOTE (Option D) as a default oversampling technique for imbalanced data, but the question specifically asks for a technique to apply to XGBoost, where the built-in scale_pos_weight hyperparameter is the most direct and efficient solution, avoiding the overhead and potential noise of synthetic data generation.

How to eliminate wrong answers

Option A is wrong because random under-sampling of the majority class discards large amounts of legitimate transaction data, which can lead to loss of valuable patterns and reduce model robustness, especially when the majority class is 99% of the data. Option C is wrong because mean squared error (MSE) is a regression loss function, not suitable for binary classification tasks like fraud detection; XGBoost uses log loss (binary:logistic) for classification, and MSE would produce poor probability estimates and gradient updates. Option D is wrong because SMOTE (Synthetic Minority Oversampling Technique) generates synthetic fraud samples, which can introduce noise and overfitting, and is less efficient than directly adjusting class weights via scale_pos_weight in XGBoost, which is a built-in, parameter-based solution.

273
MCQeasy

A machine learning team is using AWS Glue to prepare data for training. They notice that the ETL job takes a long time to process large datasets. Which change is most likely to improve performance?

A.Increase the number of DPUs for the Glue job.
B.Decrease the number of workers in the Glue job.
C.Disable Spark shuffle operations.
D.Reduce the dataset size by sampling.
AnswerA

More DPUs increase parallelism and speed up processing.

Why this answer

Increasing the number of DPUs (Data Processing Units) for the AWS Glue job allocates more distributed computing resources, which allows the job to process data in parallel across more executors. This directly reduces the runtime for large datasets by improving the parallelism of Spark transformations and actions.

Exam trap

The trap here is that candidates may think reducing workers or disabling shuffle will speed up the job, but they fail to recognize that AWS Glue's performance is primarily limited by parallelism, and reducing resources or core Spark operations will degrade or break the job.

How to eliminate wrong answers

Option B is wrong because decreasing the number of workers reduces the parallelism and available compute capacity, which would likely increase job duration, not improve performance. Option C is wrong because disabling Spark shuffle operations would break most distributed data processing workflows that require repartitioning, joins, or aggregations, leading to incorrect results or job failure. Option D is wrong because reducing dataset size by sampling would compromise data completeness and model accuracy, and is not a valid performance optimization for production ETL jobs.

274
Multi-Selectmedium

A company is deploying a SageMaker model for real-time inference. The endpoint must be highly available and cost-effective. Which TWO actions should the company take? (Select TWO.)

Select 2 answers
A.Use managed spot training for inference
B.Deploy the endpoint with at least two instances in different Availability Zones
C.Use GPU instances for all models even if not required
D.Configure automatic scaling based on latency or request count
E.Use a single large instance to handle peak load
AnswersB, D

Multi-AZ deployment provides high availability.

Why this answer

Deploying a SageMaker endpoint with at least two instances in different Availability Zones (AZs) ensures high availability by eliminating a single point of failure. If one AZ goes down, traffic is automatically routed to the healthy instance in the other AZ, meeting the requirement for a highly available real-time inference endpoint.

Exam trap

The trap here is that candidates often confuse managed spot training with inference, or think a single large instance is more cost-effective than multiple smaller instances with auto scaling, ignoring the high availability requirement.

275
MCQmedium

A machine learning engineer needs to deploy a model that performs real-time inference with strict latency requirements of under 100 milliseconds. The model is a large ensemble of 10 deep learning models. Which SageMaker deployment strategy is MOST appropriate?

A.Use batch transform and cache predictions.
B.Deploy each model as a separate endpoint and route traffic using Application Load Balancer.
C.Use a SageMaker Inference Pipeline with serial inference within a single endpoint.
D.Use a multi-model endpoint to host all models.
AnswerC

Inference Pipelines allow chaining containers in a single endpoint, reducing latency.

Why this answer

A SageMaker Inference Pipeline allows you to chain multiple containers (e.g., the 10 deep learning models) within a single endpoint, enabling serial inference with low latency. This approach avoids the network overhead of routing between separate endpoints and keeps the entire ensemble under the 100 ms threshold by processing sequentially in one HTTPS request.

Exam trap

The MLS-C01 exam often tests the misconception that multi-model endpoints are suitable for ensemble models, but they are designed for independent model hosting with dynamic loading, not for sequential inference pipelines.

How to eliminate wrong answers

Option A is wrong because batch transform is designed for offline, asynchronous inference on large datasets, not real-time inference with sub-100 ms latency. Option B is wrong because deploying each model as a separate endpoint with an ALB introduces additional network hops and load-balancing overhead, increasing latency beyond the strict requirement. Option D is wrong because a multi-model endpoint is optimized for hosting many independent models that are loaded on demand from Amazon S3, not for a tightly coupled ensemble where all models must run in sequence for a single prediction.

276
MCQeasy

A machine learning engineer needs to deploy a model that performs real-time fraud detection. The model must be highly available and scalable. Which AWS service should be used to host the model?

A.AWS Lambda
B.Amazon ECS with a custom container
C.Amazon SageMaker batch transform
D.Amazon SageMaker real-time endpoint
AnswerD

Purpose-built for real-time inference with auto-scaling.

Why this answer

Amazon SageMaker real-time endpoints are designed for low-latency, synchronous inference, making them ideal for real-time fraud detection. They automatically scale across multiple instances and Availability Zones, providing high availability and elasticity to handle variable traffic loads without manual intervention.

Exam trap

The trap here is that candidates confuse batch transform with real-time inference, or assume Lambda can handle persistent, low-latency model serving without considering its timeout and payload size limits.

How to eliminate wrong answers

Option A is wrong because AWS Lambda has a maximum execution timeout of 15 minutes and is better suited for short-lived, event-driven tasks rather than persistent, real-time inference with large models. Option B is wrong because Amazon ECS with a custom container requires manual setup of auto-scaling, load balancing, and health checks, adding operational overhead compared to SageMaker's managed endpoint infrastructure. Option C is wrong because Amazon SageMaker batch transform is designed for asynchronous, offline inference on large datasets, not for real-time, low-latency predictions required in fraud detection.

277
MCQmedium

An ML engineer is deploying a model to a SageMaker endpoint for real-time inference. The model requires a custom inference script that preprocesses input data and postprocesses predictions. Which SageMaker feature should be used to implement this custom logic?

A.Use SageMaker Ground Truth to transform inference requests
B.Use SageMaker Processing jobs to preprocess data before inference
C.Use a built-in SageMaker algorithm with the default inference code
D.Create a SageMaker model with a custom inference script that includes pre- and post-processing functions
AnswerD

Custom inference scripts allow full control over request handling.

Why this answer

SageMaker allows you to bring your own container or use a pre-built container with a custom inference script that defines `input_fn`, `predict_fn`, `output_fn`, and `model_fn` functions. These functions handle preprocessing of input data, model prediction, and postprocessing of predictions, enabling custom logic for real-time inference endpoints without requiring separate infrastructure.

Exam trap

The trap here is that candidates confuse SageMaker Processing jobs (batch) with real-time inference preprocessing, or assume built-in algorithms can be customized via inference scripts, when in fact only custom containers or scripts provide that flexibility.

How to eliminate wrong answers

Option A is wrong because SageMaker Ground Truth is a data labeling service for creating training datasets, not for transforming inference requests at an endpoint. Option B is wrong because SageMaker Processing jobs are batch-oriented and run asynchronously, not suitable for real-time inference preprocessing at an endpoint. Option C is wrong because built-in SageMaker algorithms come with fixed inference code that cannot be customized; they do not support user-defined pre- or post-processing logic.

278
MCQeasy

A company is using Amazon SageMaker to train a model. The training data is stored in an S3 bucket in a different AWS account. Which IAM policy configuration is required to allow SageMaker to access the data?

A.Add a bucket policy that allows s3:GetObject for the SageMaker execution role's ARN.
B.Add a bucket policy allowing access from the SageMaker execution role ARN, and ensure the SageMaker execution role has an IAM policy allowing s3:GetObject on the bucket.
C.Create an IAM user in the data owner's account and use its credentials in SageMaker.
D.Use the data owner's IAM role as the SageMaker execution role.
AnswerB

Both policies are needed for cross-account access.

Why this answer

Cross-account access requires the SageMaker execution role to have an IAM policy allowing access to the S3 bucket, and the S3 bucket policy must grant access to that role. Option A is wrong because SageMaker cannot assume a role in another account without proper trust policy. Option C is wrong because the data owner's role cannot be used directly.

Option D is wrong because SageMaker does not use the data owner's IAM user credentials.

279
MCQhard

A data scientist is using SageMaker to train a model with a custom algorithm. The training script uses TensorFlow and runs on GPU instances. The training job fails with 'CUDA_ERROR_OUT_OF_MEMORY'. What is the most likely cause?

A.The S3 bucket is in a different region
B.The batch size is too large for the GPU memory
C.The GPU driver is outdated
D.The training script has a memory leak on CPU
E.The instance type does not have enough CPU cores
AnswerB

Large batch sizes can exceed GPU memory, causing out-of-memory errors.

Why this answer

The error 'CUDA_ERROR_OUT_OF_MEMORY' indicates that the GPU memory has been exhausted during training. In TensorFlow, the batch size directly determines how many samples are processed simultaneously on the GPU; a batch size that is too large will exceed the available GPU memory, causing this specific CUDA error. Reducing the batch size is the standard fix for this issue.

Exam trap

AWS often tests the misconception that GPU errors are always driver-related, leading candidates to choose 'outdated GPU driver' instead of recognizing that the error message explicitly points to memory exhaustion, not driver version issues.

How to eliminate wrong answers

Option A is wrong because an S3 bucket in a different region would cause a network or permission error (e.g., 'AccessDenied' or 'BucketRegionError'), not a CUDA out-of-memory error. Option C is wrong because an outdated GPU driver would typically cause a driver initialization failure or a 'CUDA_ERROR_NO_DEVICE' error, not an out-of-memory error during training. Option D is wrong because a CPU memory leak would manifest as an out-of-memory error on the CPU (e.g., 'MemoryError' in Python), not a GPU-specific CUDA error.

Option E is wrong because insufficient CPU cores would lead to slow data preprocessing or CPU bottlenecks, but would not trigger a GPU memory exhaustion error.

280
MCQeasy

A data scientist is training a TensorFlow model on a single GPU instance. The training is taking too long. Which AWS service should be used to reduce training time by distributing the workload across multiple GPUs?

A.Amazon SageMaker
B.AWS Glue
C.Amazon EMR
D.AWS Batch
AnswerA

SageMaker provides built-in distributed training libraries for multi-GPU training.

Why this answer

Amazon SageMaker provides built-in support for distributed training across multiple GPUs using its managed training infrastructure. By configuring a SageMaker training job with a 'distributed training' strategy (e.g., SageMaker's distributed data parallelism library), the TensorFlow model can automatically split the workload across multiple GPU instances, significantly reducing training time. SageMaker handles the underlying cluster orchestration, network setup, and fault tolerance, making it the correct choice for this scenario.

Exam trap

The exam often tests the distinction between services that handle generic batch computing (AWS Batch) versus those specifically optimized for distributed machine learning training (Amazon SageMaker), leading candidates to mistakenly choose AWS Batch because they think 'batch' implies distributed processing.

How to eliminate wrong answers

Option B (AWS Glue) is wrong because it is a serverless data integration and ETL service, not designed for distributed model training with TensorFlow or GPU workloads. Option C (Amazon EMR) is wrong because it is optimized for big data processing using frameworks like Apache Spark and Hadoop, not for deep learning training with TensorFlow across multiple GPUs. Option D (AWS Batch) is wrong because it is a batch computing service for running containerized jobs at scale, but it lacks native support for distributed training orchestration, GPU-aware scheduling, and the specific TensorFlow distributed strategies needed to reduce training time across multiple GPUs.

281
MCQhard

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

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

Pipelines provide a robust, scheduled workflow for training.

Why this answer

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

Exam trap

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

How to eliminate wrong answers

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

282
MCQhard

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

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

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

Why this answer

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

Exam trap

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

How to eliminate wrong answers

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

283
MCQmedium

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

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

GPU instance suitable for inference.

Why this answer

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

Exam trap

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

How to eliminate wrong answers

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

284
MCQeasy

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

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

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

Why this answer

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

Exam trap

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

How to eliminate wrong answers

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

285
MCQhard

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

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

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

Why this answer

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

Exam trap

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

How to eliminate wrong answers

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

286
Multi-Selecthard

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

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

Required for SageMaker to interface with the container.

Why this answer

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

Exam trap

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

287
MCQhard

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

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

Smaller batch size reduces GPU memory consumption.

Why this answer

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

Exam trap

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

How to eliminate wrong answers

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

288
MCQhard

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

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

Larger instance provides more memory.

Why this answer

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

Exam trap

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

How to eliminate wrong answers

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

289
Multi-Selecthard

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

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

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

Why this answer

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

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

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

290
MCQeasy

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

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

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

Why this answer

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

Exam trap

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

How to eliminate wrong answers

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

291
MCQeasy

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

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

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

Why this answer

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

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

292
MCQhard

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

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

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

Why this answer

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

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

293
MCQmedium

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

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

Deny requires AES256 encryption.

Why this answer

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

Exam trap

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

How to eliminate wrong answers

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

294
Multi-Selecteasy

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

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

Required to read objects.

Why this answer

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

Exam trap

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

295
Multi-Selecteasy

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

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

Docker is used to create custom containers.

Why this answer

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

Exam trap

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

296
MCQmedium

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

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

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

Why this answer

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

Exam trap

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

How to eliminate wrong answers

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

297
MCQhard

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

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

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

Why this answer

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

Exam trap

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

How to eliminate wrong answers

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

298
MCQeasy

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

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

SageMaker has automatic model tuning.

Why this answer

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

Exam trap

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

How to eliminate wrong answers

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

299
Multi-Selecteasy

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

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

SageMaker Pipelines is designed for ML pipeline orchestration.

Why this answer

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

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

Exam trap

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

300
MCQmedium

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

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

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

Why this answer

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

Exam trap

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

How to eliminate wrong answers

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

← PreviousPage 4 of 5 · 338 questions totalNext →

Ready to test yourself?

Try a timed practice session using only Machine Learning Implementation and Operations questions.