Courseiva

AWS Certified Machine Learning Engineer Associate MLA-C01 (MLA-C01) — Questions 151225

835 questions total · 12pages · All types, answers revealed

Page 2

Page 3 of 12

Page 4
151
MCQmedium

Refer to the exhibit. A data scientist creates a SageMaker Pipeline definition using the JSON shown. The pipeline runs successfully, but the scientist notices that the training step did not use the parameter 'TrainingInstanceCount' defined in Parameters. Why did this happen?

A.The pipeline encountered a runtime error and fell back to default values.
B.The parameter name has a typo; it should be 'TrainingInstanceCount' not 'TrainingInstanceCount'.
C.The steps do not reference the Parameters; the values are hardcoded in the step definitions.
D.The training image is not compatible with the specified instance type.
AnswerC

Parameters must be explicitly referenced in steps to take effect.

Why this answer

The SageMaker Pipeline definition shows that the training step's `InstanceCount` field is hardcoded to `1` in the step definition, rather than referencing the `TrainingInstanceCount` parameter using the `Parameters` object (e.g., `Parameters.TrainingInstanceCount`). In SageMaker Pipelines, parameters defined in the `Parameters` section must be explicitly referenced within the step definitions using the `Parameters` object; otherwise, the pipeline uses the hardcoded values and ignores the parameters entirely.

Exam trap

AWS often tests the misconception that simply defining a parameter in the `Parameters` section automatically applies it to all steps, when in reality each step must explicitly reference the parameter using the `Parameters` object.

How to eliminate wrong answers

Option A is wrong because the pipeline ran successfully, and a runtime error would have caused the pipeline to fail, not fall back to default values; SageMaker Pipelines does not silently fall back to defaults on error. Option B is wrong because the parameter name 'TrainingInstanceCount' is spelled identically in both the Parameters section and the step definition, so there is no typo. Option D is wrong because the training image compatibility with the instance type would cause a runtime error during execution, not cause the parameter to be ignored; the pipeline would fail if the image were incompatible.

152
MCQeasy

A data engineer is preparing a dataset for a k-means clustering algorithm. The features have different scales: age (18-100), income ($20k-$200k), and number of purchases (0-50). Without scaling, which feature will dominate the distance calculations?

A.All features will contribute equally
B.Income
C.Number of purchases
D.Age
AnswerB

Income has the highest magnitude and range, dominating distance metrics.

Why this answer

Income has the largest range (180,000 compared to 82 and 50), so it will dominate Euclidean distance calculations. Standardization or normalization is needed before clustering.

153
Multi-Selecteasy

A machine learning engineer is monitoring a production SageMaker endpoint using Amazon CloudWatch. They want to set up alarms for anomalous behavior. Which TWO CloudWatch metrics are MOST appropriate for detecting a sudden increase in request latency?

Select 2 answers
A.ModelLatency
B.5XXError
C.MemoryUtilization
D.Invocations
E.CPUUtilization
AnswersA, E

Correct. This metric measures the time taken for the model to process a request.

Why this answer

ModelLatency directly measures request latency, and CPUUtilization can indicate resource saturation leading to latency increases.

154
MCQhard

A company runs a real-time inference endpoint with an auto-scaling policy based on average CPU utilization. During a traffic spike, the endpoint scales out but takes several minutes to become healthy, causing increased latency. The endpoint uses a large instance type. Which change would MOST effectively reduce the time to scale out?

A.Switch to a smaller instance type.
B.Use a pre-warmed endpoint with a target tracking scaling policy.
C.Enable SageMaker Inference Recommender to optimize instance type.
D.Implement a canary deployment with a blue/green strategy.
E.Set a lower scaling cooldown period.
AnswerB

Correct. Pre-warmed endpoints keep a minimum number of instances ready, and target tracking proactively scales based on metrics.

Why this answer

A pre-warmed endpoint with a target tracking scaling policy ensures that a baseline number of instances are always ready to handle traffic, eliminating the cold-start delay during scale-out. The target tracking policy dynamically adjusts the number of instances to maintain a target average CPU utilization, which reduces the time to scale out by avoiding the need to provision and initialize new instances from scratch during a spike.

Exam trap

The trap here is that candidates often confuse scaling policies (like target tracking) with deployment strategies (like canary or blue/green), or assume that reducing instance size or cooldown periods will solve initialization delays, when the core issue is the cold-start time of large instances.

How to eliminate wrong answers

Option A is wrong because switching to a smaller instance type may reduce initialization time but can increase the number of instances needed, potentially worsening latency during spikes due to more frequent scaling events. Option C is wrong because SageMaker Inference Recommender optimizes instance type and configuration for cost and performance, but it does not directly reduce the time to scale out; it may even recommend larger instances that take longer to initialize. Option D is wrong because a canary deployment with a blue/green strategy is a deployment pattern for updating models or endpoints without downtime, not a mechanism to reduce scale-out time during traffic spikes.

Option E is wrong because setting a lower scaling cooldown period can cause rapid, thrashing scaling actions that destabilize the endpoint, and it does not address the underlying initialization delay of new instances.

155
MCQmedium

Refer to the exhibit. A Glue job runs successfully the first time but on subsequent runs with new data (added to the same input location), the job does not process the new data. What is the most likely cause?

A.The script location is incorrect
B.The MaxRetries is set to 0, so the job does not retry on failure
C.The job bookmark is enabled, causing the job to skip already processed data
D.The WorkerType is Standard, which does not support incremental processing
AnswerC

Job bookmarks prevent reprocessing; new data in same path is ignored unless bookmarks are reset.

Why this answer

When a Glue job bookmark is enabled, the job tracks previously processed data using a persistent state stored in a DynamoDB table. On subsequent runs, the bookmark mechanism skips files that have already been processed, so new data added to the same input location is ignored unless the bookmark is reset or the job is configured to process new partitions. This explains why the first run succeeds but later runs do not process new data.

Exam trap

AWS often tests the misconception that job bookmarks are always beneficial for incremental processing, but candidates forget that bookmarks cause the job to skip already processed data by default, which can lead to missing new data if the bookmark is not reset or the job is not designed to handle new files in the same location.

How to eliminate wrong answers

Option A is wrong because the script location being incorrect would cause the job to fail on the first run, not only on subsequent runs. Option B is wrong because MaxRetries controls the number of retry attempts after a job failure, but the job is not failing—it runs successfully but skips new data, so retries are irrelevant. Option D is wrong because the WorkerType (Standard, G.1X, G.2X) affects memory and compute resources, not the ability to perform incremental processing; job bookmarks control incremental processing, not the worker type.

156
MCQhard

A social media company is processing a real-time stream of user activity data from Amazon Kinesis Data Streams to train a machine learning model for content recommendation. The raw data includes user ID, timestamp, content ID, interaction type (like, share, comment), and device type. The data scientists need to aggregate features per user over a sliding window of 7 days, including counts of interaction types, unique content IDs engaged, and a moving average of interaction timestamps. The aggregated data will be used to update a user embedding model. The streaming data volume is approximately 500 records per second, and the company uses an AWS Glue streaming ETL job for transformation. However, the Glue job is failing frequently with high latency and checkpoint errors. The team needs a more robust solution to prepare the streaming data features. Which approach should the team take?

A.Increase the DPU count on the Glue streaming ETL job and reduce the checkpoint interval to improve performance.
B.Use Amazon Kinesis Data Analytics for Apache Flink to perform the sliding window aggregations with built-in state management and exactly-once processing, then write the features to S3 and DynamoDB.
C.Use AWS Lambda functions to process records from Kinesis, store intermediate aggregation results in Amazon DynamoDB, and read them back to compute windowed features.
D.Use Amazon SageMaker Processing jobs that run periodically every hour to read data from S3 (landing from Kinesis Firehose) and perform the aggregations batch-wise.
AnswerB

Kinesis Data Analytics for Flink provides stateful stream processing optimized for sliding windows, ensuring low latency and fault tolerance.

Why this answer

Amazon Kinesis Data Analytics for Apache Flink provides native support for sliding window aggregations with managed state and exactly-once processing semantics, which directly addresses the high latency and checkpoint errors seen in the Glue streaming ETL job. Flink's checkpointing mechanism ensures fault-tolerant state management for the 7-day sliding window, while Glue's Spark Streaming engine struggles with long-running stateful operations at 500 records/sec due to its micro-batch architecture and checkpoint overhead.

Exam trap

The trap here is that candidates assume increasing resources (DPU) on Glue streaming ETL will fix performance issues, but the root cause is Spark's micro-batch architecture's inability to efficiently manage long-running stateful sliding windows, which Flink's native streaming engine is designed for.

How to eliminate wrong answers

Option A is wrong because increasing DPU count and reducing checkpoint interval on a Glue streaming ETL job exacerbates checkpoint errors and latency due to Spark's micro-batch overhead and lack of native long-lived state management for sliding windows. Option C is wrong because AWS Lambda functions have a maximum execution timeout of 15 minutes and no built-in state management, making them unsuitable for maintaining 7-day sliding window aggregations across 500 records/sec without external state stores that introduce eventual consistency and latency. Option D is wrong because using hourly SageMaker Processing jobs on S3 data from Kinesis Firehose introduces a minimum 1-hour delay, which violates the real-time requirement for updating a user embedding model with sliding window features.

157
MCQmedium

A company uses Amazon SageMaker to train and deploy machine learning models. The security team requires that all data in transit between the training job and S3 be encrypted, and that no data traverses the public internet. Which configuration should the company use?

A.Create a VPC with S3 VPC endpoints, attach a VPC-only policy to the SageMaker execution role, and enable KMS encryption for training jobs.
B.Use an S3 bucket with SSE-S3 encryption and restrict bucket access to a VPC.
C.Enable default encryption on the S3 bucket and use HTTPS for all SageMaker endpoints.
D.Create a VPC with a NAT gateway, and configure SageMaker to use the VPC and enforce HTTPS.
AnswerA

S3 VPC endpoints keep traffic within AWS network, and KMS encrypts data in transit and at rest.

Why this answer

It ensures that data in transit between SageMaker and S3 stays within the AWS network and is encrypted. By creating a VPC with S3 VPC endpoints, traffic uses AWS private IPs and never traverses the public internet. Attaching a VPC-only policy to the SageMaker execution role restricts the training job to only use VPC endpoints, and enabling KMS encryption for the training job ensures data is encrypted in transit (via TLS) and at rest.

Exam trap

The trap here is that candidates often confuse encryption in transit (HTTPS) with keeping traffic off the public internet, not realizing that HTTPS can still traverse the public internet unless a VPC endpoint or Direct Connect is used.

How to eliminate wrong answers

Option B is wrong because SSE-S3 only encrypts data at rest in S3, not data in transit; it also does not prevent data from traversing the public internet. Option C is wrong because default bucket encryption and HTTPS only address encryption in transit but do not keep traffic off the public internet; HTTPS can still route over the public internet. Option D is wrong because a NAT gateway is used for outbound internet access, which would send traffic over the public internet, violating the requirement that no data traverses the public internet; HTTPS alone does not enforce private network routing.

158
Multi-Selectmedium

A machine learning engineer is deploying a model using SageMaker and needs to ensure that the endpoint can automatically scale based on traffic patterns. Which TWO actions should the engineer take? (Choose two.)

Select 2 answers
A.Define a scaling policy using Application Auto Scaling for the SageMaker endpoint variant.
B.Set up an Amazon CloudWatch alarm to trigger scaling based on the InvocationsPerInstance metric.
C.Enable SageMaker Model Monitor to detect data drift.
D.Configure a multi-model endpoint to serve multiple models.
E.Use SageMaker batch transform to handle variable traffic.
AnswersA, B

Auto Scaling policies adjust capacity based on CloudWatch metrics.

Why this answer

SageMaker endpoints use Application Auto Scaling to automatically adjust the number of instances based on traffic. You define a scaling policy (e.g., target tracking, step scaling) that references a CloudWatch metric. Option B is correct because the InvocationsPerInstance metric is a standard SageMaker endpoint metric that reflects the load per instance, and a CloudWatch alarm on this metric can trigger the scaling policy to add or remove instances as traffic changes.

Exam trap

The trap here is confusing monitoring and scaling: candidates often pick Model Monitor (Option C) because it sounds like it monitors traffic, but it is for data drift, not scaling; similarly, batch transform (Option E) is mistaken for a scaling solution when it is a separate inference mode.

159
Multi-Selecthard

A machine learning team is building a CI/CD pipeline to train and deploy models using Amazon SageMaker. They want to ensure that the deployment step only proceeds if the model evaluation metrics exceed a certain threshold. Which THREE components should the team include in the pipeline? (Choose THREE.)

Select 3 answers
A.An AWS Lambda function for manual approval.
B.An AWS CodeBuild project to compile the model artifacts.
C.The SageMaker Model Registry to approve and store the model after evaluation.
D.A SageMaker endpoint deployment step that runs only after approval.
E.A condition step that checks if the evaluation metric exceeds the threshold.
AnswersC, D, E

Model Registry can store model versions and track approval status.

Why this answer

The SageMaker Model Registry is the central component for approving and storing model versions after evaluation. It enables governance by allowing you to set approval statuses (e.g., Approved, Rejected) and track model lineage, ensuring only validated models proceed to deployment.

Exam trap

AWS often tests the misconception that manual approval via Lambda is required for gating deployments, but the correct approach uses SageMaker Model Registry's built-in approval mechanism combined with a condition step in the pipeline.

160
MCQeasy

An ML engineer needs to create a feature store that supports both low-latency online inference and large-scale offline training. The features are updated hourly from a streaming source. Which Amazon SageMaker Feature Store configuration should the engineer use?

A.Create a feature group with both online and offline stores enabled.
B.Create a feature group with only an online store enabled.
C.Create two separate feature groups: one for online and one for offline.
D.Create a feature group with only an offline store enabled.
AnswerA

This configuration provides a low-latency online store for inference and a scalable offline store for training.

Why this answer

SageMaker Feature Store supports both an online store (for low-latency retrieval) and an offline store (for large-scale analytics and training). Enabling both meets the dual requirement.

161
MCQmedium

A team trains a model using SageMaker and wants to ensure that the training job cannot access the internet, but needs to access a private S3 bucket in the same VPC. Which configuration should they use?

A.Enable network isolation and provide VPC subnet and security group
B.Enable network isolation only, without VPC configuration
C.Disable network isolation but restrict security group rules
D.Use a public S3 bucket with bucket policies
AnswerA

Network isolation blocks internet; VPC config allows access to private resources via VPC endpoints.

Why this answer

SageMaker training jobs can be configured with VPC settings. Enabling network isolation prevents internet access, but the job still needs VPC connectivity to reach S3 via VPC endpoints. Setting the VPC config allows access to private resources.

162
MCQhard

A company uses SageMaker Model Monitor's feature attribution drift monitoring with SHAP. They receive an alert that the average SHAP value for a particular feature has increased significantly compared to the baseline. The feature's input distribution has not changed. What does this likely indicate?

A.The feature is no longer relevant to predictions
B.A bug in the SHAP computation
C.Data drift in that feature
D.Concept drift in the model
AnswerD

SHAP attribution drift indicates that the model's reliance on features has changed, which is a sign of concept drift.

Why this answer

SHAP values measure the contribution of each feature to the model's predictions. A change in SHAP values while input distribution is stable suggests the model has learned a new reliance on that feature, i.e., the relationship between the feature and the target has changed — concept drift.

163
MCQhard

A machine learning team is building a feature store using Amazon SageMaker Feature Store. They need to store features that support both real-time inference (low latency) and historical training. Which configuration should they choose?

A.Create two separate feature groups: one online and one offline
B.Create a feature group with both online and offline stores enabled
C.Create a feature group with only an online store enabled
D.Create a feature group with only an offline store enabled
AnswerB

Both stores can be configured; online for real-time, offline for training.

Why this answer

SageMaker Feature Store supports both online and offline stores. The online store (backed by DynamoDB) provides low-latency access for real-time inference, while the offline store (S3) stores historical data for training. Enabling both satisfies the requirement.

164
MCQmedium

A company notices that the prediction distribution of their deployed model has shifted significantly from the training data distribution, but the input data distribution remains unchanged. Which type of drift is occurring, and what is the MOST likely cause?

A.Data drift; the training data is no longer representative of the current environment
B.Bias drift; the model is making unfair predictions against a protected group
C.Concept drift; the underlying relationship between features and target has changed
D.Model drift; the model has degraded due to software issues
AnswerC

Concept drift changes the prediction function while input distribution remains stable.

Why this answer

Concept drift occurs when the relationship between input features and target variable changes, causing prediction distribution shift. Data drift would be input distribution change. The scenario specifically says input distribution unchanged but predictions shifted, indicating concept drift.

Possible cause: change in customer behavior or market conditions.

165
MCQeasy

A company has a trained machine learning model that needs to be deployed as a real-time inference endpoint on Amazon SageMaker. The endpoint must automatically scale based on incoming traffic. Which SageMaker feature should be used?

A.SageMaker Endpoint Auto Scaling
B.SageMaker Elastic Inference
C.SageMaker Batch Transform
D.SageMaker Model Monitor
AnswerA

Auto Scaling automatically adjusts the instance count based on configured policies to handle traffic changes.

Why this answer

Amazon SageMaker Endpoint Auto Scaling is the correct feature because it automatically adjusts the number of instances serving a real-time inference endpoint based on the incoming traffic load. It uses Application Auto Scaling policies, which monitor CloudWatch metrics (e.g., InvocationsPerInstance) to scale in or out, ensuring low latency and cost efficiency without manual intervention.

Exam trap

The trap here is that candidates confuse SageMaker Elastic Inference (which accelerates inference) with auto scaling, or they assume Batch Transform can be used for real-time endpoints, but only Endpoint Auto Scaling directly manages dynamic instance count based on traffic.

How to eliminate wrong answers

Option B is wrong because SageMaker Elastic Inference attaches GPU acceleration to an endpoint for low-cost deep learning inference, but it does not handle automatic scaling of the endpoint itself. Option C is wrong because SageMaker Batch Transform is designed for offline, asynchronous batch predictions on entire datasets, not for real-time inference endpoints that require automatic scaling. Option D is wrong because SageMaker Model Monitor tracks data quality, bias, and drift for deployed models, but it does not manage scaling of the endpoint infrastructure.

166
MCQeasy

A company wants to detect anomalies in login events from a large user base, focusing on unusual patterns that may indicate compromised accounts. Which SageMaker built-in algorithm is most suitable for this task?

A.IP Insights
B.K-Means
C.DeepAR
D.Factorisation Machines
AnswerA

IP Insights uses a neural network to learn patterns in IP addresses and can identify anomalous login events.

Why this answer

IP Insights is designed for anomaly detection in IP address usage, learning typical login patterns and flagging unusual ones. The other algorithms are not specialized for this use case.

167
Multi-Selecteasy

A data scientist is using Amazon SageMaker Ground Truth to create a labeled dataset for object detection. The team wants to reduce labeling costs by automatically labeling easy examples and only sending uncertain examples to human annotators. Which TWO features should the scientist use? (Select TWO.)

Select 2 answers
A.Using Amazon Mechanical Turk for annotations
B.Active learning
C.Pre-labeling with a trained model
D.Using a private workforce
E.Using the built-in object detection labeling UI
AnswersB, C

Selects the most uncertain examples for human annotation, reducing total labels needed.

Why this answer

Active learning in Ground Truth automatically selects uncertain examples for human labeling, while pre-labeling from a trained model can auto-label confident predictions. Mechanical Turk and workforce types are about who labels, not cost reduction via automation.

168
MCQhard

A company is deploying a deep learning model for real-time inference using Amazon SageMaker. The model is a CPU-intensive XGBoost model that performs well with CPU. However, the team wants to minimize latency further by using hardware acceleration. They are considering Amazon Elastic Inference (EI) or moving to a GPU instance. The model is not optimized for GPU, so significant code changes would be required. Which approach is the MOST cost-effective way to reduce latency without changing the model code?

A.Use a GPU instance (ml.p3.2xlarge) and optimize the model with SageMaker Neo compilation.
B.Attach an Elastic Inference accelerator (e.g., ml.eia2.medium) to the existing CPU endpoint.
C.Use SageMaker Neo to compile the model for CPU with INT8 quantization.
D.Migrate the model to AWS Lambda with a custom runtime and use AVX instructions.
AnswerB

Elastic Inference provides cost-effective acceleration for XGBoost and other models without code changes.

Why this answer

Amazon Elastic Inference (EI) allows you to attach a low-cost GPU-powered acceleration to an existing SageMaker CPU endpoint without any code changes. Since the XGBoost model is CPU-optimized and not GPU-native, EI provides hardware acceleration for the inference computation (specifically matrix operations) while keeping the model execution on the CPU, thus reducing latency without requiring model modifications.

Exam trap

The trap here is that candidates assume GPU instances are always the best for hardware acceleration, but the question explicitly states the model is not GPU-optimized and requires significant code changes, making Elastic Inference the only viable option that reduces latency without code modifications.

How to eliminate wrong answers

Option A is wrong because using a GPU instance (ml.p3.2xlarge) would require significant code changes to leverage GPU acceleration, as XGBoost is not natively GPU-optimized for inference; SageMaker Neo compilation does not automatically adapt the model to run on GPU hardware without code changes. Option C is wrong because SageMaker Neo compilation for CPU with INT8 quantization reduces model size and improves throughput, but it does not provide hardware acceleration (like GPU or EI) to reduce latency; it optimizes for CPU execution, not hardware-accelerated inference. Option D is wrong because AWS Lambda does not support attaching Elastic Inference accelerators, and using AVX instructions is a CPU-level optimization that does not provide the hardware acceleration needed to reduce latency beyond CPU capabilities; moreover, Lambda has a 15-minute timeout and is not designed for real-time inference with large models.

169
MCQhard

A company wants to use a pre-trained NLP model from SageMaker JumpStart for sentiment analysis. Which step is required to make predictions?

A.Label the dataset for fine-tuning
B.Train the model from scratch on the company's data
C.Convert the model to ONNX format
D.Deploy the model to an endpoint
AnswerD

Deploying to a SageMaker endpoint allows real-time inference on new data.

Why this answer

D is correct because SageMaker JumpStart provides pre-trained models that are ready for inference without additional training. To make predictions, you must deploy the model to a SageMaker endpoint, which creates a hosted inference endpoint that can accept input data and return sentiment analysis results.

Exam trap

AWS often tests the misconception that pre-trained models require fine-tuning or additional data preparation before inference, when in fact they can be used directly for predictions after deployment to an endpoint.

How to eliminate wrong answers

Option A is wrong because labeling the dataset for fine-tuning is only necessary if you want to adapt the pre-trained model to a specific domain or task, but it is not required for making predictions with the pre-trained model as-is. Option B is wrong because training from scratch defeats the purpose of using a pre-trained model from JumpStart, which is designed to avoid the cost and time of training from scratch. Option C is wrong because converting the model to ONNX format is an optimization step for cross-platform deployment or performance, but it is not a prerequisite for making predictions with SageMaker JumpStart models, which natively support SageMaker inference.

170
MCQeasy

A company wants to version and track ML models, with an approval workflow for promoting models from staging to production. Which SageMaker feature should they use?

A.SageMaker Model Monitor
B.SageMaker Experiments
C.SageMaker Pipelines
D.SageMaker Model Registry
AnswerD

Model Registry offers versioning, approval workflow, and deployment to production.

Why this answer

SageMaker Model Registry is the correct choice because it provides a centralized repository to catalog, version, and manage ML models, and it supports approval workflows (e.g., PendingApproval, Approved, Rejected) to promote models from staging to production. This directly addresses the requirement for version tracking and an approval gate for model promotion.

Exam trap

The trap here is that candidates confuse SageMaker Pipelines (which orchestrates the workflow) with SageMaker Model Registry (which manages the model versions and approvals), but the question specifically asks for the feature that handles versioning and approval workflow, not the orchestration of the pipeline itself.

How to eliminate wrong answers

Option A is wrong because SageMaker Model Monitor is designed for detecting data and model quality drift in production, not for versioning or approval workflows. Option B is wrong because SageMaker Experiments is used for tracking and comparing training runs (e.g., hyperparameters, metrics), not for managing model versions or approval states. Option C is wrong because SageMaker Pipelines orchestrates end-to-end ML workflows (e.g., data processing, training, deployment) but does not natively provide a model version registry or approval workflow; it can integrate with Model Registry for that purpose.

171
MCQmedium

A machine learning engineer runs a training job and notices the loss is NaN after a few steps. Which SageMaker Debugger rule can help identify this issue?

A.Overfit
B.Exploding gradients
C.Dead ReLU
D.Class imbalance
AnswerB
172
MCQmedium

A financial institution uses SageMaker to train and deploy models. They need to track every experiment, model version, and deployment step for audit purposes. Which SageMaker feature should they use to capture the full lineage of artifacts, actions, and contexts?

A.SageMaker Clarify
B.SageMaker Model Registry
C.SageMaker Experiments
D.SageMaker ML Lineage Tracking
AnswerD

Lineage Tracking records relationships between all ML steps for auditability.

Why this answer

SageMaker ML Lineage Tracking creates a graph of artifacts (datasets, models), actions (training jobs, deployment), and contexts (experiments). It provides a complete audit trail. Experiments alone track trials but not lineage.

Model Registry tracks model versions but not full pipeline lineage. Clarify is for bias monitoring.

173
MCQhard

A team is deploying a real-time inference endpoint in SageMaker. The model requires access to an S3 bucket containing customer data, which is encrypted with SSE-KMS. The team needs to ensure that the endpoint can decrypt the data. Which IAM role configuration is necessary?

A.Add kms:GenerateDataKey permission to the SageMaker execution role.
B.Attach a policy to the S3 bucket granting s3:GetObject to the KMS key.
C.Add kms:Decrypt permission to the SageMaker execution role for the specific KMS key.
D.Configure the endpoint to assume the S3 bucket's IAM role.
AnswerC

The execution role must be allowed to decrypt using the customer-managed key.

Why this answer

The SageMaker execution role must have the kms:Decrypt permission for the specific KMS key that encrypted the S3 objects. When the endpoint reads data from the S3 bucket, SageMaker uses its execution role to call KMS to decrypt the data. Without this permission, the endpoint will fail with an access denied error, even if the S3 bucket policy allows s3:GetObject.

Exam trap

The trap here is that candidates confuse the permissions needed for encryption (kms:GenerateDataKey) with those needed for decryption (kms:Decrypt), or incorrectly think that S3 bucket policies can grant permissions to KMS keys.

How to eliminate wrong answers

Option A is wrong because kms:GenerateDataKey is used to create new data keys for encryption, not to decrypt existing data; the endpoint needs to decrypt, not encrypt. Option B is wrong because attaching a policy to the S3 bucket granting s3:GetObject to the KMS key is syntactically incorrect—KMS keys are not IAM principals, and bucket policies grant actions to principals, not to keys. Option D is wrong because the endpoint cannot assume the S3 bucket's IAM role; IAM roles are assumed by principals (users, services), not by buckets, and SageMaker endpoints use their own execution role for S3 access.

174
MCQmedium

A data scientist is using Amazon SageMaker Data Wrangler to prepare a dataset that contains a column 'CustomerID' with high cardinality (over 10,000 unique values). The column will be used as a feature in a model predicting customer churn. What is the recommended approach to handle this high-cardinality feature?

A.Use target encoding to replace each ID with the average target per ID
B.Drop the 'CustomerID' column entirely
C.Apply ordinal encoding by assigning a unique integer to each ID
D.Apply one-hot encoding to create a sparse binary representation
AnswerA

Target encoding reduces cardinality to a single numeric column while capturing the relationship with the target.

Why this answer

Target encoding (also known as mean encoding) replaces each category with the mean of the target for that category. This is a common technique for high-cardinality features in supervised learning, though it requires careful handling to avoid data leakage.

175
MCQeasy

A data scientist wants to train a binary classification model using Amazon SageMaker with a built-in algorithm that performs well on tabular data. Which algorithm should they choose?

A.Image Classification
B.DeepAR
C.XGBoost
D.BlazingText
AnswerC

XGBoost is a gradient boosting algorithm that works well for classification and regression on tabular data.

Why this answer

XGBoost is a popular built-in algorithm in SageMaker for classification and regression on tabular data. Linear Learner is also for tabular data but XGBoost often performs better for complex patterns.

176
MCQmedium

A company is deploying a large NLP model on SageMaker for real-time inference. They want to reduce inference latency and cost by optimizing the model for the target hardware. The model is trained in PyTorch. Which SageMaker feature should they use to compile the model for best performance on the chosen instance?

A.SageMaker Neo
B.AWS Step Functions
C.Amazon Elastic Inference
D.SageMaker Triton Inference Server
AnswerA

Neo optimizes models for target hardware to improve inference speed and reduce cost.

Why this answer

SageMaker Neo is the correct choice because it is specifically designed to compile trained models (including PyTorch models) into an optimized binary for a target hardware instance, reducing inference latency and improving throughput. Neo applies hardware-specific optimizations such as operator fusion, memory layout tuning, and quantization, which directly address the need for best performance on the chosen SageMaker instance.

Exam trap

The trap here is that candidates confuse model compilation (Neo) with inference serving (Triton) or hardware acceleration (Elastic Inference), leading them to pick a service that addresses a different part of the inference pipeline.

How to eliminate wrong answers

Option B is wrong because AWS Step Functions is a serverless workflow orchestration service, not a model compilation tool; it cannot optimize model performance for hardware. Option C is wrong because Amazon Elastic Inference attaches a separate accelerator to an instance for cost-effective inference, but it does not compile or optimize the model itself; it only provides additional compute resources. Option D is wrong because SageMaker Triton Inference Server is a high-performance inference server that supports multiple frameworks and model formats, but it does not compile the model for the target hardware; it serves models as-is, relying on the underlying framework's runtime.

177
MCQeasy

A company wants to build a machine learning model to predict house prices based on features like square footage, number of bedrooms, and location. The target variable is a continuous numeric value. Which Amazon SageMaker built-in algorithm is most appropriate for this task?

A.Object2Vec
B.XGBoost
C.Linear Learner
D.BlazingText
AnswerC

Linear Learner is designed for regression and classification, and is the most direct choice for predicting a continuous value with linear relationships.

Why this answer

Linear Learner is the most appropriate built-in algorithm for this regression task because it is specifically designed for predicting continuous numeric values (house prices) using linear models. It supports both regression and classification, and for regression, it minimizes mean squared error (MSE) to fit a linear relationship between features and the target variable. The algorithm also offers automatic feature scaling and model tuning, making it a direct fit for this use case.

Exam trap

The trap here is that candidates often choose XGBoost (Option B) because it is a popular and powerful algorithm for tabular data, but the question specifically asks for the most appropriate built-in algorithm for a linear regression task, and Linear Learner is the direct, optimized choice for that purpose.

How to eliminate wrong answers

Option A (Object2Vec) is wrong because it is designed for learning embeddings from pairs of objects (e.g., recommendation systems or similarity tasks), not for regression on tabular data. Option B (XGBoost) is wrong because while it can be used for regression, it is a gradient-boosted tree algorithm that is not a built-in SageMaker algorithm optimized for linear regression; it is better suited for structured data with complex non-linear relationships, but the question asks for the most appropriate built-in algorithm, and Linear Learner is the direct choice for linear regression. Option D (BlazingText) is wrong because it is designed for natural language processing tasks like word embeddings and text classification, not for numerical regression on tabular features.

178
MCQmedium

A machine learning engineer uses Amazon SageMaker Data Wrangler to preprocess a dataset. After applying a transform, the engineer wants to export the data to a feature group in Amazon SageMaker Feature Store for reuse in training and inference. Which export option should they choose?

A.Export to Amazon DynamoDB
B.Export to Amazon SageMaker Feature Store
C.Export to Amazon S3 as CSV
D.Export to Amazon SageMaker Pipelines
AnswerB

Data Wrangler can directly create a feature group and ingest data into Feature Store.

Why this answer

SageMaker Data Wrangler can export directly to a feature group in Feature Store, making the features available for both training (offline) and inference (online).

179
Multi-Selecthard

A data engineer is building a feature engineering pipeline in AWS Glue ETL to process streaming data from Amazon Kinesis. The data includes a nested JSON structure with arrays. The engineer needs to flatten the nested structures into a tabular format for machine learning. Which THREE approaches are valid for this task? (Choose 3.)

Select 3 answers
A.Use Python's json.loads in a map function
B.Use Athena's UNNEST function on the raw data
C.Use PySpark's explode function on array columns
D.Use Amazon SageMaker Processing with scikit-learn
E.Use AWS Glue's Relationalize transform
AnswersA, C, E

You can parse JSON strings and flatten them manually.

Why this answer

Python's json.loads can be used within a PySpark map function to parse nested JSON strings from streaming data in AWS Glue ETL. This allows you to extract and flatten nested fields into a tabular structure by iterating over each record and converting the JSON into a flat dictionary, which can then be mapped to DataFrame columns.

Exam trap

The trap here is that candidates often confuse Athena's UNNEST (a query-time SQL function for static data) with a streaming transform, or assume SageMaker Processing can handle real-time streaming data, when in fact Glue ETL's native transforms are required for Kinesis streams.

180
Multi-Selectmedium

A data scientist is preparing text data for a sentiment analysis model using Amazon SageMaker. Which two data preprocessing techniques are commonly used when working with text data for natural language processing? (Choose two.)

Select 2 answers
A.One-hot encoding of all words
B.Image resizing
C.Tokenization
D.Principal component analysis (PCA)
E.Stop word removal
AnswersC, E

Tokenization splits text into tokens (words or subwords), a fundamental step in NLP preprocessing.

Why this answer

Tokenization is correct because it is a fundamental preprocessing step that splits raw text into smaller units (tokens), such as words or subwords, which are necessary for converting text into a structured format that machine learning models can process. Stop word removal is correct because it filters out common words (e.g., 'the', 'and', 'is') that carry little semantic meaning, reducing noise and improving model performance in sentiment analysis.

Exam trap

The trap here is that candidates may confuse one-hot encoding as a preprocessing technique for raw text, when it is actually a feature engineering step applied after tokenization, and they may overlook that stop word removal is a standard preprocessing step despite its potential to remove sentiment-bearing words in certain contexts.

181
MCQhard

A team is training a large model on SageMaker using the SageMaker distributed training library with model parallelism. They need to choose the most cost-effective instance type. Which instance family offers the best balance of performance and cost for large model training?

A.ml.g4dn
B.ml.p3
C.ml.trn1
D.ml.c5
AnswerC
182
MCQhard

A company is deploying a ML model for real-time fraud detection using SageMaker. The model must process requests within 50 ms and scale to handle up to 10,000 requests per second during peak hours. The data includes PII, so all traffic must stay within a VPC. The team has configured the SageMaker endpoint with a VPC and an internet gateway for model downloads. During a load test, the endpoint fails to achieve the required throughput. Which change would most likely resolve the issue?

A.Remove the VPC configuration and use public endpoints to reduce network overhead.
B.Use VPC endpoints (interface endpoint for SageMaker and gateway endpoint for S3) to keep traffic within AWS backbone.
C.Add a NAT gateway to allow the SageMaker endpoint to access the internet efficiently.
D.Increase the instance count and use a larger instance type to handle the throughput.
AnswerB

VPC endpoints reduce latency and keep traffic within AWS network, improving throughput.

Why this answer

The endpoint is currently using an internet gateway for model downloads, which forces traffic out to the public internet and back, adding latency and risking throughput failures. By using VPC interface endpoints for SageMaker and gateway endpoints for S3, all traffic stays within the AWS backbone network, reducing network overhead and meeting the 50 ms latency requirement. This also keeps PII traffic within the VPC, satisfying security constraints.

Exam trap

The trap here is that candidates often assume throughput issues are always solved by scaling compute resources (Option D), when the real bottleneck is network architecture—specifically, the unnecessary internet gateway hop that adds latency and reduces throughput.

How to eliminate wrong answers

Option A is wrong because removing the VPC configuration would expose PII traffic to the public internet, violating security requirements, and public endpoints can still suffer from internet-related latency and bandwidth limitations. Option C is wrong because a NAT gateway is used to allow outbound internet access from private subnets, but the issue is not about internet access—it's about reducing latency by keeping traffic on the AWS backbone; a NAT gateway would add another hop and increase latency. Option D is wrong because increasing instance count and size addresses compute capacity but does not fix the network bottleneck caused by routing traffic through an internet gateway; the throughput failure is likely due to network latency, not insufficient compute resources.

183
MCQeasy

A data scientist wants to track feature definitions, share them across teams, and serve features for both training and real-time inference. Which AWS service provides these capabilities?

A.Amazon DynamoDB
B.Amazon S3
C.AWS Glue Data Catalog
D.Amazon SageMaker Feature Store
AnswerD

Designed specifically for feature storage, sharing, and serving.

Why this answer

Amazon SageMaker Feature Store is purpose-built for ML workflows, providing a centralized repository to define, share, and serve features for both training (batch) and real-time inference (low-latency retrieval). It supports offline and online stores, enabling consistent feature definitions across teams and automatic feature ingestion via SageMaker Pipelines or custom code.

Exam trap

The trap here is that candidates may confuse a general-purpose storage or catalog service (like S3 or Glue Data Catalog) with a purpose-built ML feature store, overlooking the need for both offline and online serving with feature-specific management.

How to eliminate wrong answers

Option A is wrong because Amazon DynamoDB is a NoSQL key-value and document database optimized for transactional workloads, not for managing feature definitions, versioning, or serving features specifically for ML training and inference. Option B is wrong because Amazon S3 is an object storage service that can store feature data but lacks built-in capabilities for feature definition management, sharing across teams, or low-latency online serving for real-time inference. Option C is wrong because AWS Glue Data Catalog is a metadata repository for data sources and ETL jobs, not a feature store; it does not provide online serving or feature-specific versioning and sharing for ML.

184
MCQhard

A machine learning engineer is performing feature selection for a regression model with 200 features. The dataset has 10,000 samples. The engineer wants to remove irrelevant features while keeping those that have a strong non-linear relationship with the target. Which feature selection method is best suited for this requirement?

A.Lasso regularization (L1)
B.Recursive feature elimination (RFE) with a linear model
C.Pearson correlation coefficient
D.Mutual information
AnswerD

Mutual information captures any kind of dependency, including non-linear, between features and target.

Why this answer

Mutual information measures the dependency between two variables and can capture non-linear relationships. It is model-agnostic and suitable for feature selection when non-linear dependencies are important.

185
MCQeasy

Refer to the exhibit. A data scientist ran a training job using a custom algorithm container. The job failed with the error shown. What is the most likely cause?

A.The S3 output path is incorrect
B.The algorithm script references an undefined variable or metric named 'loss'
C.The training image is not accessible
D.The instance type is insufficient
AnswerB

The error directly states it cannot evaluate 'loss', meaning the variable is not defined or out of scope.

Why this answer

The error 'Cannot evaluate expression: loss' indicates that the training script attempted to compute or log a variable named 'loss' that is not defined in the code. The training image access, S3 output path, and instance type are not related to this specific error.

186
MCQmedium

A team is using AWS Step Functions to orchestrate a machine learning workflow that includes data preprocessing, training, and model evaluation. The team wants to run the workflow whenever new data arrives in an S3 bucket. Which approach should they use to trigger the Step Functions workflow?

A.Configure the S3 bucket to send an event notification directly to the Step Functions state machine.
B.Use S3 event notifications to send a message to an Amazon SQS queue, and have a Lambda function poll the queue to start the execution.
C.Use a CloudWatch Logs metric filter to trigger the Step Functions execution.
D.Configure the S3 bucket to send events to Amazon EventBridge, and create an EventBridge rule that targets the Step Functions state machine.
AnswerD

EventBridge can directly invoke Step Functions based on S3 events, providing a simple serverless trigger.

Why this answer

Amazon S3 can send event notifications directly to Amazon EventBridge, and EventBridge rules can target AWS Step Functions state machines as a target. This provides a fully managed, serverless integration that allows the Step Functions workflow to be triggered automatically whenever new data arrives in the S3 bucket, without needing intermediate polling or custom code.

Exam trap

The trap here is that candidates may assume S3 can directly invoke Step Functions (Option A) because they know S3 can trigger Lambda, but they overlook that Step Functions is not a supported direct destination for S3 event notifications.

How to eliminate wrong answers

Option A is wrong because S3 event notifications cannot directly target a Step Functions state machine; S3 event notifications support only Lambda, SQS, SNS, and EventBridge as destinations. Option B is wrong because while it would work, it introduces unnecessary complexity and latency by requiring a Lambda function to poll an SQS queue, which is not the simplest or most efficient approach when EventBridge provides direct integration. Option C is wrong because CloudWatch Logs metric filters are designed to monitor log data and trigger alarms or metrics, not to trigger Step Functions executions; they cannot directly invoke a state machine.

187
MCQmedium

A data engineer is building a data pipeline for a machine learning model that requires both structured and unstructured data. The structured data (customer demographics) is in Amazon RDS, and the unstructured data (customer support chat logs) is in Amazon S3 as JSON files. The engineer needs to combine these datasets into a single training dataset stored in S3 in Parquet format. They must also perform feature engineering such as text vectorization on the chat logs. The pipeline should be serverless and cost-effective. Which approach should they use?

A.Use a SageMaker Processing job with a custom Python script that reads from both sources and writes to S3.
B.Use Amazon Athena to join the data from RDS and S3, then export the results as Parquet.
C.Use AWS Glue ETL with a Spark script that reads from RDS (via JDBC) and S3, performs transformations, and writes Parquet.
D.Use Amazon Kinesis Data Analytics to read from RDS and S3 and produce a continuous stream of processed data.
AnswerC

Glue provides a serverless Spark environment capable of handling both sources and complex transformations.

Why this answer

AWS Glue ETL with a Spark script is the correct choice because it natively supports reading from both Amazon RDS (via JDBC) and Amazon S3 (JSON), performing complex transformations like text vectorization, and writing the output as Parquet. Glue is serverless, cost-effective (pay per DPU-hour), and fully managed, making it ideal for batch ETL pipelines that combine structured and unstructured data for ML training.

Exam trap

The trap here is that candidates often choose SageMaker Processing (Option A) because it is associated with ML, but they overlook that Glue ETL is the designated AWS service for serverless data preparation and transformation, especially when combining disparate data sources like RDS and S3.

How to eliminate wrong answers

Option A is wrong because SageMaker Processing jobs are designed for ML-specific tasks like training or inference, not general-purpose ETL; they lack native JDBC connectors for RDS and require custom networking setup, increasing complexity and cost. Option B is wrong because Amazon Athena cannot perform feature engineering like text vectorization; it is an interactive query service for SQL-on-data, not a transformation engine, and cannot write Parquet with custom logic. Option D is wrong because Kinesis Data Analytics is for real-time stream processing, not batch ETL; it would introduce unnecessary latency and cost for a one-time or scheduled training dataset generation, and it cannot directly write Parquet to S3 without additional sinks.

188
Multi-Selectmedium

A machine learning engineer is preparing a training job on SageMaker with a custom Docker container. Which TWO actions are required to use the container with SageMaker? (Choose TWO.)

Select 2 answers
A.Push the container image to Amazon ECR
B.Use a SageMaker Estimator with image_uri parameter pointing to the ECR image
C.Upload the container image to Amazon S3
D.Enable SageMaker Debugger to monitor the custom container
E.Register the container in SageMaker Model Registry
AnswersA, B

ECR is the registry for Docker images used by SageMaker.

Why this answer

To use a custom container, you must push it to Amazon ECR and specify the registry path in the estimator. The container must also implement the SageMaker training contract (like /opt/ml), but that is part of building the image.

189
MCQmedium

A data scientist is building a binary classification model on a highly imbalanced dataset where the positive class represents only 1% of the data. The scientist needs to train the model using Amazon SageMaker's built-in XGBoost algorithm. Which strategy should be used to address the class imbalance?

A.Undersample the majority class until the dataset is balanced
B.Set the `scale_pos_weight` hyperparameter to `sum(negative cases) / sum(positive cases)`
C.Use the `max_delta_step` hyperparameter to increase the learning rate for the majority class
D.Use SMOTE to oversample the minority class before passing the data to XGBoost
AnswerB

This is the standard way to handle imbalance in XGBoost; it boosts the weight of the minority class during training.

Why this answer

XGBoost's `scale_pos_weight` hyperparameter is specifically designed to handle class imbalance by adjusting the weight of the positive class during training. Setting it to `sum(negative cases) / sum(positive cases)` (i.e., 99/1 = 99) tells the algorithm to penalize misclassifications of the minority class more heavily, effectively balancing the gradient updates. This is the recommended approach for built-in XGBoost in SageMaker, as it directly modifies the loss function without altering the dataset.

Exam trap

The trap here is that candidates often confuse `scale_pos_weight` with resampling techniques (like SMOTE or undersampling) or with other hyperparameters like `max_delta_step`, assuming any imbalance-handling method is equally valid, but the exam expects knowledge of the specific built-in mechanism for SageMaker's XGBoost.

How to eliminate wrong answers

Option A is wrong because undersampling the majority class discards valuable data, which can lead to loss of important patterns and reduced model performance, especially when the dataset is large and the imbalance is extreme (1% positive). Option C is wrong because `max_delta_step` controls the step size in tree boosting to prevent overfitting on imbalanced data, but it does not increase the learning rate for the majority class; it caps the update magnitude for all classes, and is not a direct imbalance correction mechanism. Option D is wrong because while SMOTE can be used to oversample the minority class, it is not a built-in feature of SageMaker's XGBoost algorithm and requires preprocessing outside the training job; moreover, SMOTE can introduce synthetic noise and is less efficient than using `scale_pos_weight` directly.

190
MCQmedium

An ML team uses AWS Step Functions to orchestrate a multi-step inference pipeline: data preprocessing, model inference, and postprocessing. The pipeline runs on demand for single records. The team notices that the pipeline occasionally fails due to timeouts in the preprocessing step. They want to implement retries with exponential backoff and a maximum retry count of 3 for that step. How should they configure this?

A.Implement retry logic inside the preprocessing Lambda function code.
B.Modify the Step Functions state machine definition to add a Retry field on the preprocessing state with a maximum retry count of 3 and an exponential backoff rate of 2.0.
C.Wrap the preprocessing step in a SageMaker Pipeline step with retry policy.
D.Add a Catch in the state machine to rerun the entire pipeline if preprocessing fails.
AnswerB

Step Functions Retry field automatically implements exponential backoff and retry logic.

Why this answer

AWS Step Functions natively supports retry logic with exponential backoff directly in the state machine definition. By adding a `Retry` field on the preprocessing state with `MaxAttempts: 3` and `BackoffRate: 2.0`, the service automatically retries the step on specified errors (e.g., `States.Timeout` or `Lambda.ServiceException`) with exponentially increasing wait times, without requiring custom code or external orchestration.

Exam trap

The trap here is that candidates often assume retry logic must be coded inside the Lambda function (Option A) or that a Catch block (Option D) is the correct way to handle failures, but Step Functions provides a declarative Retry mechanism that is more robust and easier to maintain for orchestrated workflows.

How to eliminate wrong answers

Option A is wrong because implementing retry logic inside the Lambda function code would not leverage Step Functions' built-in exponential backoff and would require custom sleep logic, increasing complexity and violating the separation of concerns between orchestration and business logic. Option C is wrong because SageMaker Pipeline steps are designed for batch training and model building workflows, not for orchestrating a lightweight inference pipeline with single-record processing; wrapping a preprocessing Lambda in a SageMaker Pipeline step adds unnecessary overhead and does not natively support the simple retry policy needed here. Option D is wrong because adding a `Catch` to rerun the entire pipeline on preprocessing failure would restart all steps (including inference and postprocessing), wasting compute time and resources, whereas a targeted retry on only the preprocessing step is more efficient and aligns with the requirement.

191
MCQhard

A financial services company deploys multiple models on a single Amazon SageMaker endpoint using a multi-model endpoint (MME). The models are stored in Amazon S3. Each model is approximately 500 MB and is loaded on demand. Users report high latency for cold-start scenarios. What should the company do to reduce cold-start latency?

A.Reduce the instance size to increase the number of instances per unit cost.
B.Increase the number of instances in the endpoint's auto-scaling group.
C.Deploy each model on a separate endpoint to avoid concurrent loading.
D.Configure the endpoint to use a larger 'ModelCacheSize' parameter.
AnswerD

Increasing the model cache size allows more models to be cached in memory, reducing load time.

Why this answer

Increasing the 'ModelCacheSize' parameter allows the SageMaker multi-model endpoint to keep more models loaded in memory, reducing the frequency of cold starts where a model must be downloaded from S3 and loaded into memory. This directly addresses the latency issue by caching models that are frequently accessed, avoiding repeated loading overhead.

Exam trap

The trap here is that candidates often confuse scaling the number of instances (Option B) with improving per-request latency, but horizontal scaling does not reduce the time to load a model from S3 into memory on a given instance.

How to eliminate wrong answers

Option A is wrong because reducing instance size decreases available memory and compute resources, which can increase cold-start latency and degrade performance for loading 500 MB models. Option B is wrong because increasing the number of instances in the auto-scaling group scales the endpoint horizontally but does not reduce cold-start latency for individual model loads; it only helps with overall request throughput. Option C is wrong because deploying each model on a separate endpoint eliminates the multi-model endpoint's shared caching benefit and increases operational complexity and cost, while still requiring cold-start loading on each endpoint.

192
Multi-Selectmedium

A data scientist is preparing a dataset for a linear regression model. The features have different scales: one feature ranges from 0 to 1000, another from 0 to 1, and a third from -5 to 5. The scientist wants to ensure that all features contribute equally to the model. Which TWO scaling techniques should the scientist consider? (Select TWO.)

Select 2 answers
A.MinMaxScaler (min-max normalization)
B.Principal Component Analysis (PCA)
C.One-hot encoding
D.Log transformation
E.StandardScaler (z-score normalization)
AnswersA, E

Scales features to a fixed range (e.g., [0,1]), appropriate for many algorithms.

Why this answer

StandardScaler (z-score normalization) and MinMaxScaler are both appropriate for scaling features to similar ranges. Log transformation is for skewed data; PCA reduces dimensionality; one-hot encoding is for categorical features.

193
Multi-Selectmedium

Which THREE steps are part of the typical workflow when using SageMaker built-in algorithms?

Select 3 answers
A.Set up a real-time inference endpoint
B.Create a training job
C.Create a custom training image
D.Set hyperparameters
E.Monitor training with CloudWatch
AnswersB, D, E

A training job is required to start model training.

Why this answer

Creating a training job is a fundamental step in the SageMaker workflow for built-in algorithms. You must specify the algorithm, input data location in S3, output path, and compute resources to start model training. Without a training job, no model artifact is generated for deployment.

Exam trap

The trap here is that candidates confuse the deployment step (setting up an endpoint) with the core training workflow, or think custom images are required for built-in algorithms, when in fact SageMaker handles the container automatically.

194
Multi-Selecteasy

A data scientist wants to monitor a deployed model for performance degradation. Which TWO metrics from Amazon CloudWatch should they use to detect issues? (Select two.)

Select 2 answers
A.ModelQuality
B.ModelLatency
C.CpuUtilization
D.Invocation5XXErrors
E.InvocationCount
AnswersB, D

Increased model latency can indicate performance degradation due to inefficient code or resource pressure.

Why this answer

(ModelLatency) is correct because it measures the time taken for the model to respond to inference requests, and a sudden increase in latency can indicate performance degradation due to resource contention, model drift, or infrastructure issues. Option D (Invocation5XXErrors) is correct because a rise in 5XX HTTP errors from the SageMaker endpoint signals that the model is failing to process requests, often due to out-of-memory errors, timeouts, or internal faults, directly reflecting degraded service health.

Exam trap

The trap here is that candidates confuse CloudWatch metrics with SageMaker-specific monitoring features, assuming `ModelQuality` is a standard CloudWatch metric when it is actually a custom metric generated by SageMaker Model Monitor, not automatically available for all deployed models.

195
MCQmedium

An engineer runs: aws sagemaker describe-endpoint --endpoint-name my-endpoint and receives the exhibit output. The engineer wants to update the endpoint to use a new model version stored in ECR with tag ':2'. Which step is necessary to perform the update?

A.Create a new endpoint configuration (my-endpoint-config-v2) referencing the new image, then call update-endpoint with the new config name.
B.Modify the existing endpoint configuration (my-endpoint-config-v1) to use the new image, then update the endpoint.
C.Use the update-endpoint command directly with the new image ARN.
D.Delete the endpoint and recreate it with the new model image.
AnswerA

Standard process: create new endpoint config, then update endpoint to use it.

Why this answer

SageMaker endpoints are immutable with respect to their configuration; you cannot modify an existing endpoint configuration in place. To update an endpoint to use a new model version, you must create a new endpoint configuration (e.g., my-endpoint-config-v2) that points to the new ECR image tag ':2', then call update-endpoint with the new configuration name. This triggers a zero-downtime deployment where SageMaker gradually shifts traffic to the new variant.

Exam trap

The trap here is that candidates assume endpoint configurations are mutable like a text file, but AWS SageMaker enforces immutability — you must create a new configuration for any change, even a simple image tag update.

How to eliminate wrong answers

Option B is wrong because SageMaker endpoint configurations are immutable after creation; you cannot modify an existing configuration (my-endpoint-config-v1) to reference a new image — you must create a new configuration. Option C is wrong because the update-endpoint command does not accept a direct image ARN; it only accepts an endpoint configuration name, and the model image is specified within that configuration. Option D is wrong because deleting and recreating the endpoint would cause downtime and is unnecessary; SageMaker supports rolling updates via update-endpoint with a new configuration, which avoids service interruption.

196
Multi-Selectmedium

A team wants to evaluate a binary classification model for credit risk. They need to understand the trade-off between false positives and false negatives. Which TWO metrics should they use? (Select TWO.)

Select 2 answers
A.Recall
B.Precision
C.NDCG
D.AUC-ROC
E.RMSE
AnswersA, B

Recall focuses on false negatives.

Why this answer

Precision and recall are complementary; precision measures false positives, recall measures false negatives. AUC-ROC summarizes the trade-off across thresholds. RMSE is for regression.

NDCG is for ranking.

197
MCQmedium

A company is using SageMaker to train a model for image classification. They have a dataset of 10,000 images. They use SageMaker's built-in image classification algorithm with transfer learning. During training, they notice that the training job completes successfully but the model accuracy on the validation set is very low (~30%). They suspect the model is underfitting. Which action is most likely to improve accuracy?

A.Use a different algorithm.
B.Add more layers to the model architecture.
C.Use a smaller batch size.
D.Increase the number of training epochs.
AnswerD

Correct: More epochs allow the model to learn patterns better, reducing underfitting.

Why this answer

Underfitting occurs when the model has not learned enough from the training data, often because training was stopped too early. Increasing the number of training epochs allows the model more iterations to converge to a better solution, which directly addresses underfitting by giving the optimizer more time to minimize the loss function.

Exam trap

The trap here is that candidates confuse underfitting with overfitting and choose to reduce batch size or change the algorithm, when the correct diagnostic for underfitting is to increase training time or model capacity, not to reduce data exposure.

How to eliminate wrong answers

Option A is wrong because switching algorithms is a drastic measure and does not target the root cause of underfitting; the built-in image classification algorithm with transfer learning is already appropriate for this task. Option B is wrong because adding more layers increases model capacity, which can help with underfitting, but in the context of transfer learning with a pre-trained base, the issue is more likely insufficient fine-tuning (epochs) rather than architectural depth. Option C is wrong because using a smaller batch size introduces more noise into gradient estimates, which can sometimes help generalization but does not directly address underfitting; it may even slow convergence or destabilize training.

198
MCQeasy

A machine learning engineer needs to handle missing values in a dataset containing numerical features. The missingness is completely at random (MCAR). Which imputation strategy is most robust for downstream model performance?

A.Impute with median of each feature
B.Impute with a constant like -1
C.Use a model to predict missing values
D.Remove all rows with missing values
AnswerA

Median is robust to outliers and maintains the central tendency.

Why this answer

When missingness is completely at random (MCAR), imputing with the median is robust because it preserves the central tendency of the distribution without introducing bias or distorting variance. Unlike mean imputation, the median is resistant to outliers, making it a safe default for numerical features in downstream models that assume normally distributed inputs or are sensitive to skewed data.

Exam trap

AWS often tests the misconception that model-based imputation (Option C) is always superior, but the trap is that for MCAR data, simpler methods like median imputation are more robust and avoid overfitting, while model-based approaches can introduce unnecessary complexity and bias.

How to eliminate wrong answers

Option B is wrong because imputing with a constant like -1 introduces an artificial value that can shift the feature distribution, create a spurious cluster, and mislead models that interpret -1 as a meaningful numeric relationship rather than a placeholder. Option C is wrong because using a model to predict missing values (e.g., regression or k-NN imputation) can overfit to the observed data and introduce bias, especially when MCAR holds and the missingness is truly random—this added complexity does not improve robustness and may reduce generalizability. Option D is wrong because removing all rows with missing values reduces sample size and discards potentially valuable information, which can degrade model performance and increase variance, even under MCAR.

199
Multi-Selectmedium

A company uses SageMaker Pipelines to automate their ML workflow. They want to ensure that pipeline steps are not re-executed if the inputs and parameters have not changed since the last successful run. Which THREE features can help achieve this? (Choose three.)

Select 3 answers
A.Use a ConditionStep to skip steps if data is unchanged
B.Deploy a real-time endpoint for data validation
C.Use SageMaker Model Monitor
D.Enable pipeline caching on each step
E.Leverage SageMaker Experiments lineage to compare input checksums
AnswersA, D, E

A ConditionStep can branch based on data checksums, skipping unnecessary steps.

Why this answer

Pipeline caching reuses step outputs when inputs/parameters are identical. SageMaker Experiments lineage can track previous run metadata. Using a ConditionStep with checksums can skip steps based on data content.

200
MCQmedium

A data scientist needs to split a dataset into training, validation, and test sets. The dataset has a categorical target variable with imbalanced class distribution. Which splitting technique ensures that each subset has a similar proportion of each class?

A.K-fold cross-validation split
B.Chronological split
C.Stratified split
D.Random split
AnswerC

Stratified split ensures each subset has the same class distribution as the original dataset.

Why this answer

Stratified splitting preserves the original class proportions in each subset (training, validation, test) by sampling each class independently. This is critical for imbalanced datasets to avoid skewed distributions that could bias model evaluation or training.

Exam trap

AWS often tests the distinction between data splitting techniques and model evaluation methods, so the trap here is that candidates confuse k-fold cross-validation (a validation strategy) with a static split technique, leading them to select option A.

How to eliminate wrong answers

Option A is wrong because k-fold cross-validation is a resampling technique for model evaluation, not a method for creating a single static split into training, validation, and test sets. Option B is wrong because chronological split orders data by time, which is irrelevant for a categorical target with imbalanced classes and does not guarantee proportional class representation. Option D is wrong because random split does not account for class distribution; with imbalanced data, it can produce subsets with significantly different class proportions, especially for rare classes.

201
MCQmedium

A data scientist is preparing a dataset for a binary classification model. The dataset has 10,000 samples, but the positive class represents only 2% of the data. The data scientist needs to train a model that will be evaluated on a hold-out test set that preserves the original class distribution. Which data preparation strategy is MOST appropriate?

A.Undersample the majority class in the training set to match the minority class size.
B.Oversample the minority class in the training set using SMOTE, and keep the test set as is.
C.Randomly oversample the minority class in the entire dataset and then split.
D.Apply SMOTE to the entire dataset before splitting into training and test sets.
AnswerB

SMOTE on the training set only addresses class imbalance during training; the test set preserves the original distribution for a realistic assessment.

Why this answer

SMOTE generates synthetic samples for the minority class to balance the training set, while keeping the test set realistic with the original class distribution. Oversampling the test set would give an overly optimistic evaluation, and undersampling the majority class in training may lose useful information. Class weights are a modeling technique, not a data preparation step.

202
MCQmedium

A company uses SageMaker Pipelines to automate model retraining. The pipeline runs daily but sometimes fails due to data quality issues. What is the best design to handle this?

A.Add a data quality check step with Conditional to skip training if data fails.
B.Use SageMaker Debugger to monitor training.
C.Use SageMaker Model Registry to track model versions.
D.Increase the instance size for the training step.
AnswerA

A conditional step checks data quality and only proceeds to training if criteria are met, preventing failures.

Why this answer

SageMaker Pipelines supports a data quality check step that can be integrated with a ConditionStep. If the data quality check fails, the ConditionStep can skip the training step entirely, preventing the pipeline from failing due to bad data. This design ensures the pipeline completes successfully (or exits gracefully) without wasting compute resources on training with invalid data.

Exam trap

The trap here is that candidates may confuse monitoring tools (Debugger) or model management (Model Registry) with pipeline orchestration and conditional logic, failing to recognize that a ConditionStep is the correct mechanism to gate execution based on data quality.

How to eliminate wrong answers

Option B is wrong because SageMaker Debugger is designed to monitor training jobs for issues like overfitting, vanishing gradients, or hardware bottlenecks, not to prevent pipeline failures caused by data quality issues before training starts. Option C is wrong because SageMaker Model Registry is used for cataloging, versioning, and approving model artifacts, not for handling data quality checks or pipeline failure prevention. Option D is wrong because increasing the instance size for the training step addresses performance or memory constraints, not data quality issues; it would not prevent the pipeline from failing if the input data is invalid.

203
MCQhard

A SageMaker endpoint is failing with the exhibited error. What is the most likely cause of this error?

A.The Docker container does not have the necessary IAM role to read the model artifacts.
B.The model archive uploaded to S3 does not contain the 'classes.txt' file.
C.The inference script is referencing the wrong path for the model directory.
D.The SageMaker endpoint does not have internet access to download the model from S3.
AnswerB

If the file is missing from the tar.gz, the endpoint cannot find it.

Why this answer

The error indicates that 'classes.txt' is missing from /opt/ml/model. Most likely, the file was not included in the model archive or the archive was not extracted properly.

204
MCQmedium

A company is deploying multiple models on a single endpoint to reduce costs. They need to update one model without affecting others. Which solution?

A.Use multiple single-model endpoints behind an Application Load Balancer
B.Use SageMaker Batch Transform for some models
C.Use SageMaker Multi-Model Endpoint
D.Use a SageMaker Endpoint with multiple production variants
AnswerC

Multi-model endpoints host multiple models and allow updating one model independently.

Why this answer

SageMaker Multi-Model Endpoint (MME) allows hosting multiple models on a single endpoint, sharing the underlying compute instance. When you need to update one model, you can simply upload a new model artifact (e.g., a new `model.tar.gz`) to Amazon S3, and the endpoint will automatically load the updated version on subsequent inference requests without affecting the other models currently cached or in use.

Exam trap

AWS often tests the distinction between multi-model endpoints (for hosting many models on one endpoint) and production variants (for routing traffic between versions of the same model), leading candidates to incorrectly choose option D when they need to update one model independently.

How to eliminate wrong answers

Option A is wrong because using multiple single-model endpoints behind an Application Load Balancer does not reduce costs (it increases them by requiring separate endpoints) and updating one model still requires managing each endpoint individually. Option B is wrong because SageMaker Batch Transform is designed for offline, asynchronous batch predictions on a dataset, not for real-time inference or updating models on a live endpoint. Option D is wrong because multiple production variants are used for A/B testing, canary deployments, or routing traffic between different versions of the same model, not for hosting and independently updating multiple distinct models on a single endpoint.

205
MCQeasy

A machine learning engineer needs to automatically retrain a model whenever SageMaker Model Monitor detects data drift. Which combination of services should be used to trigger the retraining pipeline?

A.SageMaker Ground Truth → Lambda → SageMaker Training job
B.CloudWatch Alarms → SNS → Lambda → SageMaker Processing job
C.SageMaker Model Monitor → EventBridge → Step Functions → SageMaker Training job
D.SageMaker Data Wrangler → SNS → SageMaker Training job
AnswerB

Model Monitor publishes metrics to CloudWatch. A CloudWatch Alarm on drift metric triggers an SNS topic, which invokes a Lambda function that starts a SageMaker Processing job for retraining.

Why this answer

SageMaker Model Monitor publishes metrics to CloudWatch, and when data drift is detected, a CloudWatch Alarm triggers an SNS notification, which invokes a Lambda function to start a SageMaker Processing job for retraining. This architecture decouples monitoring from retraining and uses native AWS services for event-driven automation.

Exam trap

The trap here is that candidates assume SageMaker Model Monitor can directly trigger retraining via EventBridge or Step Functions, but the exam expects the CloudWatch Alarms → SNS → Lambda chain because Model Monitor metrics are published to CloudWatch, not directly to EventBridge for retraining triggers.

How to eliminate wrong answers

Option A is wrong because SageMaker Ground Truth is used for creating labeled datasets, not for monitoring data drift or triggering retraining pipelines. Option C is wrong because while SageMaker Model Monitor can integrate with EventBridge, the correct flow to trigger a retraining pipeline is via CloudWatch Alarms → SNS → Lambda → SageMaker Processing job, not directly from Model Monitor to Step Functions; Step Functions would orchestrate the pipeline but the trigger must come from CloudWatch alarms on drift metrics. Option D is wrong because SageMaker Data Wrangler is a data preparation tool, not a monitoring service, and SNS alone cannot directly start a SageMaker Training job without a compute trigger like Lambda.

206
MCQmedium

A company wants to use SageMaker Autopilot to automatically build a binary classification model. Which output does Autopilot provide to help understand model decisions?

A.A leaderboard of models with only accuracy metrics
B.An explainability report with feature importance
C.A confusion matrix for each candidate model
D.A SHAP values summary plot for each trial
AnswerB

Autopilot generates an explainability report as part of its output.

Why this answer

SageMaker Autopilot generates an explainability report with feature importance. It does not provide a confusion matrix by default; users must evaluate separately. It does not provide SHAP values directly but uses similar techniques.

Leaderboard is for ranking trials, not explainability.

207
MCQmedium

A machine learning engineer is using AWS Glue ETL to transform a large dataset stored in Amazon S3. The transformation involves joining two tables on a high-cardinality column and aggregating results. The job is running slowly and the engineer needs to improve performance. Which optimization technique should the engineer apply?

A.Increase the number of workers and memory allocation
B.Use bucketing on the join key for both tables
C.Use Spark SQL instead of the DynamicFrame API
D.Convert the job to use Python Shell
AnswerB

Bucketing co-locates rows with the same key, reducing shuffle during join.

Why this answer

Bucketing the join key in both tables enables efficient merging without shuffling all data, significantly improving join performance on high-cardinality keys. Increasing workers and memory may help but is not specific to join optimization; using Spark SQL alone may not help.

208
MCQmedium

A data scientist runs this pipeline but the Train step fails with "ResourceLimitExceeded". What is the most likely cause?

A.The account has a limit of 0 for ml.p3.2xlarge instances.
B.The volume size is too small for training.
C.The Preprocess step did not complete successfully.
D.The training image is not accessible.
AnswerA

A zero limit or insufficient quota results in ResourceLimitExceeded.

Why this answer

The 'ResourceLimitExceeded' error indicates that the requested instance type (ml.p3.2xlarge) exceeds the account's service quota for that specific instance family. In AWS SageMaker, each account has a default limit of 0 for certain GPU instance types like ml.p3.2xlarge unless a quota increase has been requested and approved. This error occurs at the Train step because SageMaker attempts to launch the training job with an instance type that is not allowed by the current quota.

Exam trap

AWS often tests the distinction between resource limits (quotas) and other failure modes; the trap here is that candidates may confuse 'ResourceLimitExceeded' with a generic 'insufficient capacity' error, but the error specifically refers to account-level service quotas, not AWS resource availability.

How to eliminate wrong answers

Option B is wrong because volume size limits (e.g., EBS volume size) do not cause a 'ResourceLimitExceeded' error; they would result in an 'InsufficientVolumeCapacity' or 'VolumeLimitExceeded' error. Option C is wrong because if the Preprocess step had failed, the pipeline would stop at that step and the Train step would not be attempted, so the error would be a different one (e.g., 'StepFailure'). Option D is wrong because an inaccessible training image would produce an 'ImageNotFoundException' or 'AccessDeniedException', not a 'ResourceLimitExceeded' error.

209
MCQhard

A company deploys a model using SageMaker and enables data capture for monitoring. After a week, they notice that the captured data is not being written to the specified S3 bucket. The endpoint is running and invocations are successful. What is the most likely cause?

A.The IAM role used for the endpoint does not have s3:PutObject permission for the capture bucket.
B.The capture bucket is in a different region.
C.The endpoint is using a multi-model endpoint which does not support data capture.
D.The DataCaptureConfig parameter in the endpoint configuration is missing the "CaptureOptions" field.
AnswerA

Without write permission, data capture fails silently.

Why this answer

The most likely cause is that the IAM role associated with the SageMaker endpoint lacks the `s3:PutObject` permission for the target S3 bucket. Without this permission, the endpoint cannot write the captured inference data to S3, even though invocations succeed because the model itself does not require S3 write access to serve predictions.

Exam trap

The trap here is that candidates often assume data capture fails due to endpoint misconfiguration (like missing CaptureOptions) or regional restrictions, when in fact the root cause is almost always an IAM permissions issue with the S3 bucket.

How to eliminate wrong answers

Option B is wrong because SageMaker data capture supports cross-region S3 buckets; the bucket can be in a different region as long as the endpoint has network access and proper permissions. Option C is wrong because multi-model endpoints fully support data capture; there is no restriction that prevents capture on multi-model endpoints. Option D is wrong because the `CaptureOptions` field is optional; if omitted, SageMaker uses default capture options (e.g., capturing both input and output).

The missing field would not prevent data from being written to S3.

210
MCQhard

Refer to the exhibit. An IAM policy is attached to a user to allow invoking a SageMaker endpoint. A developer tries to call the endpoint from a laptop with IP 203.0.113.5 and receives an access denied error. What is the most likely reason?

A.The resource ARN is incorrect.
B.The condition restricts the IP address to the 10.0.0.0/8 range.
C.The user does not have permission to assume the SageMaker role.
D.The policy does not include access to the API action.
AnswerB

The condition enforces that source IP must be in 10.0.0.0/8, but the laptop IP is not.

Why this answer

The policy includes a condition that restricts the source IP address to the 10.0.0.0/8 private range. The developer's laptop has a public IP of 203.0.113.5, which does not fall within that range, so the condition fails and access is denied. This is the most likely reason for the error because the condition explicitly blocks requests from outside the specified private network.

Exam trap

The trap here is that candidates may overlook the condition element and assume the error is due to a missing action or incorrect ARN, when in fact the condition is the restrictive factor that denies access based on the source IP.

How to eliminate wrong answers

Option A is wrong because if the resource ARN were incorrect, the error would typically indicate an invalid ARN or a mismatch, not an access denied due to IP restriction; the ARN in the policy appears correctly formatted for a SageMaker endpoint. Option C is wrong because the policy does not involve assuming a role; it directly grants invoke permissions to the user, and the error is not related to role assumption. Option D is wrong because the policy explicitly includes the 'sagemaker:InvokeEndpoint' action, so the user does have permission to the API action; the denial is caused by the condition, not a missing action.

211
MCQeasy

A data scientist is training a binary classification model using imbalanced data where the positive class is only 1% of the dataset. The scientist wants to maximize the recall for the positive class while maintaining reasonable precision. Which evaluation metric is most appropriate to tune during model selection?

A.Log loss
B.Area under the ROC curve (AUC)
C.F1 score
D.Accuracy
AnswerC

F1 score combines precision and recall, making it suitable for imbalanced classes when both matter.

Why this answer

The F1 score is the harmonic mean of precision and recall, making it ideal for imbalanced datasets where the positive class is only 1%. By tuning the F1 score, the data scientist directly balances the trade-off between maximizing recall (capturing true positives) and maintaining reasonable precision (avoiding false positives), which aligns with the stated goal.

Exam trap

AWS often tests the misconception that AUC-ROC is always the best metric for imbalanced data, but the trap here is that AUC-ROC can remain high even when the model fails to recall the minority class, whereas the F1 score directly penalizes poor recall.

How to eliminate wrong answers

Option A is wrong because log loss measures the probabilistic accuracy of predictions, penalizing confident wrong predictions, but it does not directly optimize recall or precision for the minority class in imbalanced data. Option B is wrong because AUC-ROC evaluates the model's ability to rank positive instances higher than negative ones across all thresholds, but it can be misleadingly high even when recall for the minority class is poor, as it is insensitive to class imbalance. Option D is wrong because accuracy is the ratio of correct predictions to total predictions, and with only 1% positive class, a model that predicts all negatives achieves 99% accuracy, completely failing to capture any positive instances.

212
Multi-Selectmedium

An ML engineer is setting up monitoring for a SageMaker endpoint. Which THREE metrics should be monitored to detect performance issues? (Select THREE.)

Select 3 answers
A.Model latency
B.Invocations per second
C.CPUUtilization
D.MemoryUtilization
E.DiskWriteBytes
AnswersA, C, D

High latency indicates performance degradation.

Why this answer

Model latency is a critical metric for detecting performance issues in a SageMaker endpoint because it directly measures the time taken to process inference requests. High latency can indicate resource bottlenecks, model inefficiency, or scaling problems, and it is essential for meeting service-level agreements (SLAs). Monitoring latency helps identify when the endpoint is underprovisioned or when the model itself has degraded in performance.

Exam trap

The trap here is that candidates often confuse throughput metrics (like invocations per second) with performance health indicators, but the question specifically asks for metrics that detect performance issues, not just operational statistics.

213
Multi-Selecteasy

A company is using Amazon SageMaker to host a real-time inference endpoint. They want to restrict access to the endpoint to only a specific VPC and require authentication using AWS IAM. Which TWO configuration steps should they take to achieve this? (Choose TWO.)

Select 2 answers
A.Configure the endpoint to be deployed in a private subnet within the VPC
B.Enable IAM-based authentication for the endpoint
C.Attach a resource-based policy to the endpoint that denies all traffic except from the VPC
D.Place the endpoint behind Amazon CloudFront to act as a proxy
E.Use a public subnet and configure a security group to allow only the company's IP range
AnswersA, B

Private subnet restricts traffic to within the VPC.

Why this answer

Deploying the SageMaker endpoint in a private subnet within the VPC ensures that the endpoint is not publicly accessible and can only be reached from within that VPC. This is achieved by using a VPC interface endpoint (AWS PrivateLink) or by placing the endpoint directly in the VPC, which restricts network traffic to the VPC boundary.

Exam trap

The trap here is that candidates often confuse resource-based policies (like S3 bucket policies) with SageMaker endpoint capabilities, or assume that a security group alone can enforce VPC-only access, when in fact SageMaker requires explicit VPC configuration via PrivateLink or subnet placement.

214
MCQmedium

A team wants to orchestrate a multi-step ML workflow that includes data preprocessing, hyperparameter tuning, model training, evaluation, and conditional deployment to staging or production based on evaluation metrics. The workflow should run on a schedule and track lineage. Which service should they use?

A.SageMaker Pipelines
B.Amazon MWAA (Managed Workflows for Apache Airflow)
C.AWS Glue workflows
D.AWS Step Functions with Lambda functions for each step
AnswerA

SageMaker Pipelines provides DAG-based orchestration with all the required step types and automatic lineage tracking.

Why this answer

SageMaker Pipelines is the correct choice because it is purpose-built for orchestrating multi-step ML workflows, including data preprocessing, hyperparameter tuning, model training, evaluation, and conditional deployment. It natively supports scheduling via EventBridge or a cron expression, tracks lineage automatically through SageMaker Experiments and artifact tracking, and allows conditional branching (e.g., deploy to staging or production based on evaluation metrics) using `ConditionStep`.

Exam trap

The trap here is that candidates often choose AWS Step Functions or MWAA because they are familiar general-purpose orchestrators, but they overlook that SageMaker Pipelines is the only service that provides native, end-to-end ML workflow orchestration with built-in lineage tracking, conditional deployment, and direct integration with SageMaker training, tuning, and model registry.

How to eliminate wrong answers

Option B (Amazon MWAA) is wrong because while Apache Airflow can orchestrate ML workflows, it is a general-purpose workflow engine that requires significant custom setup for ML-specific features like hyperparameter tuning, model evaluation, and lineage tracking; it lacks native integration with SageMaker's conditional deployment and artifact lineage. Option C (AWS Glue workflows) is wrong because Glue workflows are designed for ETL and data preparation tasks, not for orchestrating ML training, hyperparameter tuning, or conditional model deployment; they do not support SageMaker training jobs or endpoint deployment natively. Option D (AWS Step Functions with Lambda functions for each step) is wrong because although Step Functions can orchestrate steps, using Lambda for each ML step introduces cold start latency, payload size limits (256 KB), and a maximum execution duration of 15 minutes, making it impractical for long-running training jobs or hyperparameter tuning; it also lacks built-in lineage tracking and conditional deployment logic specific to ML models.

215
Multi-Selecthard

A company is using SageMaker to train a large model using data parallelism with the SageMaker distributed data parallelism library. They notice that the training throughput is not scaling linearly with the number of GPUs. Which THREE factors could be causing this?

Select 3 answers
A.I/O bottleneck from reading data from Amazon S3
B.Using different instance types across the cluster
C.Model size too large for the GPUs
D.Inefficient loss scaling strategy
E.Communication overhead from gradient synchronization
AnswersA, D, E

Slow data loading can starve GPUs, reducing scaling efficiency.

Why this answer

Communication overhead from gradient synchronization, I/O bottlenecks from reading data, and an inefficient loss scaling strategy can all limit scaling. Model size alone is not a scaling issue if it fits on GPUs. Instance type differences affect speed but not scaling linearity directly.

216
MCQhard

A machine learning engineer runs a SageMaker HyperparameterTuningJob with Bayesian optimization strategy. The job terminates earlier than the specified MaxNumberOfTrainingJobs. The engineer notices that the best objective metric value has not improved for several consecutive jobs. What is the most likely adjustment to make?

A.Adjust the early stopping tolerance (e.g., increase the number of consecutive jobs with no improvement allowed).
B.Switch to a grid search strategy to cover all hyperparameter combinations.
C.Increase the MaxNumberOfTrainingJobs parameter to allow more exploration.
D.Decrease the number of hyperparameters being tuned.
AnswerA

Early stopping is likely too aggressive; increasing the tolerance allows more exploration before terminating.

Why this answer

The Bayesian optimization strategy in SageMaker HyperparameterTuningJob uses early stopping to halt the tuning job when the objective metric has not improved for a specified number of consecutive training jobs. The engineer observed that the job terminated earlier than MaxNumberOfTrainingJobs because the default early stopping tolerance was reached. Increasing the early stopping tolerance (e.g., raising the number of consecutive jobs with no improvement allowed) gives the Bayesian optimizer more chances to explore and potentially find a better configuration before stopping.

Exam trap

AWS often tests the misconception that early termination is caused by insufficient training jobs or search strategy, when in fact it is the early stopping tolerance that directly controls the termination condition in Bayesian optimization.

How to eliminate wrong answers

Option B is wrong because switching to a grid search strategy would exhaustively try all hyperparameter combinations, which is computationally expensive and does not address the early stopping mechanism; the job terminated due to lack of improvement, not due to the search strategy. Option C is wrong because increasing MaxNumberOfTrainingJobs would not prevent early termination if the early stopping condition (no improvement for several consecutive jobs) is still triggered; the job would still stop early at the same point. Option D is wrong because decreasing the number of hyperparameters being tuned reduces the search space but does not change the early stopping tolerance; the job would still terminate early if the metric does not improve for the default number of consecutive jobs.

217
MCQmedium

A company uses Amazon SageMaker to host a real-time inference endpoint for a fraud detection model. The endpoint is deployed with three instances of ml.m5.large. The model processes each request in about 200 ms. Lately, users report occasional timeouts (requests taking >5 seconds). The team suspects model drift or data skew. What is the MOST likely cause and solution?

A.The instances are under-provisioned; switch to ml.m5.xlarge instances.
B.A recent change increased the average input size, causing longer inference time; investigate input preprocessing.
C.The endpoint is experiencing too many concurrent requests; add more instances.
D.Model drift caused the model to become computationally heavier; retrain the model.
AnswerB

Larger inputs can increase inference latency significantly.

Why this answer

The symptom of occasional timeouts (>5 seconds) on a model that normally processes requests in ~200 ms suggests that a recent change in input data characteristics (e.g., larger payloads or more complex features) is causing sporadic latency spikes. Investigating input preprocessing can identify if data skew or increased input size is overwhelming the model's inference path, which is a common monitoring concern in SageMaker real-time endpoints.

Exam trap

The trap here is that candidates confuse model drift (accuracy degradation) with performance degradation (latency increase), leading them to choose retraining (Option D) instead of investigating input preprocessing changes.

How to eliminate wrong answers

Option A is wrong because switching to ml.m5.xlarge instances would increase compute capacity but does not address the root cause of sporadic timeouts tied to input size changes; under-provisioning would cause consistent high latency, not occasional spikes. Option C is wrong because adding more instances helps with concurrency but not with per-request latency; if the model itself takes longer due to larger inputs, more instances won't reduce the inference time for a single request. Option D is wrong because model drift refers to degradation in prediction accuracy over time, not to an increase in computational heaviness; retraining would not fix latency caused by input preprocessing changes.

218
MCQmedium

A SageMaker endpoint is logging an error when processing inference requests that require database access. What is the most likely cause?

A.Data capture is not enabled
B.The endpoint instance type is too small
C.The model is not compatible with the instance
D.The endpoint lacks a VPC configuration with proper security groups
AnswerD

Correct. Without VPC and security groups, the endpoint cannot reach the database.

Why this answer

When a SageMaker endpoint needs to access an external database (e.g., Amazon RDS) during inference, it must be launched within a VPC that has proper security group and subnet configurations. If the endpoint is not in a VPC or the security groups do not allow outbound traffic to the database, the endpoint will be unable to connect, resulting in errors. The other options are less likely: data capture is for logging requests (A), instance size affects performance not connectivity (B), model compatibility affects deployment but not specifically database access (C).

Exam trap

Some candidates might think that database connectivity issues are due to endpoint instance size or missing data capture configuration. However, the key for accessing external resources from SageMaker is VPC configuration.

How to eliminate wrong answers

Option A is wrong because data capture is a feature for logging inference request/response payloads, not for enabling network connectivity to a database. Option B is wrong because an undersized instance type would cause performance issues like latency or out-of-memory errors, not a network connectivity failure to a database. Option C is wrong because model-instance compatibility issues typically manifest as runtime errors (e.g., 'CUDA error' or 'model loading failed'), not as a failure to establish a database connection.

219
Multi-Selecteasy

A data engineer is using AWS Glue to prepare a dataset for ML. The engineer wants to split the dataset into training and testing sets while preserving the distribution of the target variable. Which TWO methods achieve this goal? (Select TWO)

Select 2 answers
A.Use Amazon Athena to create views with random sampling
B.Use the `train_test_split` function from scikit-learn in a SageMaker notebook
C.Use AWS Glue's built-in random split transform
D.Use a custom Spark script with stratified sampling
E.Use Amazon SageMaker's built-in SplitType parameter in a Processing Job
AnswersB, D

The stratify parameter maintains class proportions.

Why this answer

The `train_test_split` function from scikit-learn supports the `stratify` parameter, which preserves the distribution of the target variable when splitting a dataset into training and testing sets. This is a standard, reliable method for stratified splitting in Python-based ML workflows, and it can be used directly in a SageMaker notebook.

Exam trap

The trap here is that candidates often confuse random splitting (which is available in many tools like Glue and Athena) with stratified splitting, assuming that any 'random' operation preserves distribution, but only stratified methods explicitly maintain class proportions.

220
Multi-Selecthard

A company is fine-tuning a foundation model using RLHF (Reinforcement Learning from Human Feedback) on SageMaker. They want to reduce memory usage and training time. Which THREE techniques should they consider? (Select THREE.)

Select 3 answers
A.Use a smaller foundation model (e.g., 7B instead of 70B parameters)
B.Use PPO (Proximal Policy Optimization) for the RL step
C.Use SageMaker Data Parallelism with sharded data
D.Use full fine-tuning on a larger instance
E.Use LoRA or QLoRA to reduce the number of trainable parameters
AnswersA, B, E

Smaller models require less memory and train faster.

Why this answer

LoRA/QLoRA reduces trainable parameters, PPO is the standard RLHF algorithm, and using smaller foundation models reduces memory and compute requirements.

221
MCQeasy

Which SageMaker built-in algorithm should be used for forecasting time series data with seasonal patterns?

A.IP Insights
B.BlazingText
C.DeepAR
D.Factorization Machines
AnswerC

DeepAR is specifically designed for time series forecasting.

Why this answer

DeepAR is a supervised learning algorithm for time series forecasting that handles seasonality and trends.

222
MCQmedium

A data scientist is using Amazon SageMaker Data Wrangler to prepare a dataset for classification. They want to detect potential bias in the data before training. Which SageMaker service should they use in conjunction with Data Wrangler to detect bias?

A.Amazon SageMaker Clarify
B.Amazon SageMaker Debugger
C.Amazon SageMaker Pipelines
D.Amazon SageMaker Model Monitor
AnswerA

Clarify provides pre-training bias metrics and can be called from Data Wrangler.

Why this answer

Amazon SageMaker Clarify is designed to detect bias in datasets and models. It integrates with Data Wrangler to provide bias analysis during the data preparation phase.

223
MCQeasy

A machine learning engineer trains a binary classifier and obtains an accuracy of 95% on the test set. The dataset is imbalanced with 95% positive class. What is the most important metric to evaluate the model's performance?

A.R-squared
B.F1 score
C.Accuracy
D.RMSE
AnswerB

F1 score combines precision and recall, making it suitable for imbalanced classification.

Why this answer

With a 95% positive class imbalance, a model that always predicts the majority class achieves 95% accuracy, making accuracy a misleading metric. The F1 score (option B) is the harmonic mean of precision and recall, providing a balanced evaluation of the model's ability to correctly identify the minority class while penalizing false positives and false negatives. This makes it the most important metric for imbalanced binary classification.

Exam trap

The trap here is that candidates see 95% accuracy and assume the model is performing well, failing to recognize that accuracy is inflated by the class imbalance and that the F1 score is the correct metric to evaluate minority class performance.

How to eliminate wrong answers

Option A is wrong because R-squared is a metric for regression models, measuring the proportion of variance explained by the independent variables, and is not applicable to binary classification. Option C is wrong because accuracy is misleading in imbalanced datasets; a model that predicts only the majority class (positive) would achieve 95% accuracy without learning any meaningful patterns, so it does not reflect true performance on the minority class. Option D is wrong because RMSE (Root Mean Square Error) is a regression metric that measures the square root of the average squared differences between predicted and actual values, and it is not designed for evaluating binary classification outcomes.

224
MCQmedium

A data science team needs to deploy a PyTorch model that performs real-time inference with sub-100ms latency. The model requires GPU acceleration, but the team wants to minimize cost by sharing GPU instances across multiple models. Which SageMaker hosting option should they choose?

A.SageMaker real-time endpoint with Multi-Model Endpoint (MME) on an ml.g4dn instance
B.SageMaker real-time endpoint with a single model per ml.g4dn instance
C.SageMaker Serverless Inference
D.SageMaker Asynchronous Inference
AnswerA

MME on GPU instances allows multiple models to share the same GPU, reducing cost while meeting latency requirements.

Why this answer

SageMaker Multi-Model Endpoint (MME) allows multiple PyTorch models to share a single GPU instance (e.g., ml.g4dn), reducing cost while meeting sub-100ms latency requirements. MME dynamically loads and unloads models into GPU memory based on traffic, enabling real-time inference with GPU acceleration without dedicating a full instance per model.

Exam trap

The trap here is that candidates often confuse SageMaker Serverless Inference with GPU support, but Serverless does not provide GPU acceleration, making it unsuitable for this latency-sensitive GPU workload.

How to eliminate wrong answers

Option B is wrong because deploying a single model per ml.g4dn instance would increase cost significantly, as the team wants to share GPU instances across multiple models. Option C is wrong because SageMaker Serverless Inference does not support GPU acceleration, so it cannot meet the sub-100ms latency requirement for PyTorch models needing GPU. Option D is wrong because SageMaker Asynchronous Inference is designed for large payloads and longer processing times (typically seconds to minutes), not for real-time sub-100ms inference.

225
Multi-Selectmedium

A data science team detects that a deployed model's prediction accuracy is degrading over time due to concept drift. They need to implement a retraining strategy. Which THREE actions are recommended best practices for handling concept drift?

Select 3 answers
A.Automatically roll back to a previous model version upon drift detection.
B.Monitor prediction quality using ground truth labels when available.
C.Retrain the model on a fixed schedule regardless of performance.
D.Incrementally update the model with new data using SageMaker Pipelines.
E.Use SageMaker Model Monitor to detect drift and trigger retraining.
AnswersB, D, E

Correct. Ground truth labels enable direct accuracy monitoring.

Why this answer

Monitoring prediction quality using ground truth labels is a fundamental best practice for detecting concept drift. When ground truth labels are available, you can directly measure the model's accuracy over time, which provides the most reliable signal for drift. SageMaker Model Monitor can be configured to capture ground truth data and compare it against predictions to generate quality metrics.

Exam trap

The trap here is that candidates may confuse 'detecting drift' with 'responding to drift' and incorrectly choose automatic rollback (Option A) as a best practice, when in reality rollback is a risky operation that should be evaluated carefully, not automated blindly.

Page 2

Page 3 of 12

Page 4