Courseiva

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

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

Page 7

Page 8 of 12

Page 9
526
MCQeasy

A data science team wants to deploy a real-time inference endpoint on Amazon SageMaker for a model that requires low latency (under 100 ms). The model is a small ensemble of three tree-based models, each about 50 MB. The team expects around 1000 requests per minute, with occasional spikes to 5000 requests per minute. Which instance type and deployment strategy would be MOST cost-effective while meeting the latency requirement?

A.Deploy a single model endpoint on an ml.c5.large instance with Auto Scaling configured using a target tracking policy based on invocations per minute
B.Deploy a single model endpoint on an ml.c5.large instance with a Multi-Model endpoint
C.Use SageMaker batch transform with multiple ml.c5.large instances to process all requests offline
D.Deploy a single model endpoint on an ml.c5.xlarge instance with provisioned concurrency
AnswerA

The ml.c5.large provides sufficient compute for the latency requirement, and Auto Scaling scales out during spikes. This is the most cost-effective approach.

Why this answer

Deploying a single model endpoint on an ml.c5.large instance with Auto Scaling based on invocations per minute provides the necessary compute capacity for the expected 1000 requests per minute while scaling up to handle spikes up to 5000 requests per minute. The ml.c5.large instance offers sufficient memory (4 GB) and compute for three 50 MB tree-based models, and the target tracking policy ensures low latency by maintaining a buffer of capacity without over-provisioning, keeping inference under 100 ms.

Exam trap

The trap here is that candidates might confuse provisioned concurrency (a Lambda concept) with SageMaker's scaling options, or incorrectly assume Multi-Model endpoints are suitable for ensemble models, leading to choosing B or D without considering the real-time latency constraint.

How to eliminate wrong answers

Option B is wrong because Multi-Model endpoints are designed to host multiple independent models on a single instance, but here the ensemble is a single model composed of three sub-models that must be loaded together for each inference; using a Multi-Model endpoint would require loading each sub-model separately, increasing latency and complexity. Option C is wrong because SageMaker batch transform is an asynchronous, offline processing method that does not support real-time inference with sub-100 ms latency; it is designed for large-scale batch jobs, not low-latency endpoints. Option D is wrong because provisioned concurrency is a feature for AWS Lambda, not Amazon SageMaker endpoints; SageMaker uses Auto Scaling or manual instance scaling, and an ml.c5.xlarge instance would be over-provisioned for the baseline load, increasing cost unnecessarily.

527
MCQeasy

A machine learning engineer is using SageMaker Data Wrangler to perform data validation. Which step should be added to the pipeline to ensure data quality before training?

A.Write a custom SageMaker Processing job for validation
B.Apply a 'Data Quality' transformation in Data Wrangler to validate column statistics
C.Use AWS Glue DataBrew to profile the dataset
D.Add a SageMaker Pipeline step to check data quality after Data Wrangler
AnswerB

Data Wrangler provides built-in data quality checks.

Why this answer

SageMaker Data Wrangler includes a built-in 'Data Quality' transformation that allows you to validate column statistics (e.g., missing values, min/max, distinct counts) directly within the visual pipeline. This step ensures data quality without requiring custom code or external services, integrating seamlessly with the Data Wrangler workflow for pre-training validation.

Exam trap

The trap here is that candidates often overcomplicate the solution by choosing a custom Processing job or external service, missing that Data Wrangler's built-in 'Data Quality' transformation is the most direct and efficient way to validate data quality within the same pipeline.

How to eliminate wrong answers

Option A is wrong because writing a custom SageMaker Processing job for validation is unnecessary overhead; Data Wrangler already provides native data quality checks that are simpler and more integrated. Option C is wrong because AWS Glue DataBrew is a separate service for data preparation, not a step within a SageMaker Data Wrangler pipeline, and using it would break the pipeline's continuity. Option D is wrong because adding a SageMaker Pipeline step to check data quality after Data Wrangler is redundant; Data Wrangler itself can perform validation inline, and a post-hoc step would not catch issues before training in the same streamlined flow.

528
Multi-Selecthard

A company has deployed a model to a SageMaker endpoint. The security team wants to ensure that all traffic between the endpoint and the client application is encrypted and that the endpoint is not accessible from the internet. Which TWO actions should the company take? (Choose TWO.)

Select 2 answers
A.Place the endpoint behind an API Gateway and call it from the client.
B.Configure the SageMaker endpoint to be VPC-only by setting the endpoint's VPC configuration.
C.Create the endpoint with a public endpoint and allow only the client's IP address via security group.
D.Enable HTTPS on the endpoint by using a custom certificate from ACM.
E.Use AWS KMS to encrypt data in transit between the client and the endpoint.
AnswersB, D

VPC-only endpoints are not publicly accessible.

Why this answer

Configuring a SageMaker endpoint as VPC-only ensures that the endpoint is not publicly accessible; it can only be reached from within the specified VPC, satisfying the security team's requirement to block internet access. Option D is correct because enabling HTTPS on the endpoint using a custom certificate from AWS Certificate Manager (ACM) encrypts all data in transit between the client and the endpoint, meeting the encryption requirement.

Exam trap

The trap here is that candidates often confuse encryption in transit with encryption at rest, leading them to select KMS (Option E) for data in transit, or they assume that restricting IP addresses via security groups (Option C) is sufficient to block internet access, when in fact a public endpoint remains internet-accessible regardless of security group rules.

529
MCQeasy

A data scientist is using SageMaker built-in XGBoost algorithm for a regression problem. Which metric is most appropriate as the objective metric for hyperparameter tuning?

A.NDCG
B.RMSE
C.AUC
D.F1
AnswerB

RMSE is appropriate for regression tasks.

Why this answer

For regression tasks, RMSE is a common objective metric. AUC is for classification, F1 is for classification, and NDCG is for ranking.

530
MCQeasy

An ML engineer needs to split a dataset into training, validation, and test sets. The dataset has a time-based column that should not be leaked. Which split method is most appropriate?

A.Stratified split based on target
B.Temporal split based on date
C.Random split with 70/20/10
D.K-fold cross-validation
AnswerB

Temporal split respects chronology by using earlier data for training and later data for testing.

Why this answer

A temporal split ensures that the time-based column is not leaked by preserving the chronological order of the data. This method uses the date column to assign earlier records to the training set and later records to the validation and test sets, preventing future information from influencing the model during training.

Exam trap

AWS often tests the concept of data leakage by presenting random or stratified splits as viable options, trapping candidates who overlook the time-based column and assume standard splitting methods are always safe.

How to eliminate wrong answers

Option A is wrong because a stratified split based on the target variable preserves class proportions but does not account for time order, leading to potential data leakage when time-dependent patterns exist. Option C is wrong because a random split ignores the temporal structure entirely, allowing future data points to appear in the training set and causing leakage. Option D is wrong because K-fold cross-validation shuffles data randomly across folds, which breaks the time sequence and introduces leakage; it is unsuitable for time-series or time-sensitive data.

531
Multi-Selectmedium

A data engineer is designing an ETL pipeline using AWS Glue to transform raw data from S3 into a curated set for ML training. The data contains personally identifiable information (PII) that must be masked before being used by data scientists. Which TWO actions should the engineer take? (Choose TWO.)

Select 2 answers
A.Use AWS Glue DataBrew to define PII masking transformations
B.Use Amazon Kinesis Data Firehose to transform data at ingestion
C.Use AWS Glue Data Catalog to automatically mask PII fields
D.Use AWS Glue ETL scripts with PySpark to apply custom masking functions
E.Use AWS Glue Crawler to detect and mask PII automatically
AnswersA, D

DataBrew provides built-in transforms for PII detection and masking.

Why this answer

AWS Glue ETL jobs support custom transforms via PySpark. DataBrew provides a visual interface for data preparation including PII masking. The Glue Data Catalog is for metadata, not transformation.

Crawlers catalog data, not mask. Kinesis Firehose is for streaming, not batch ETL.

532
MCQmedium

A data scientist is training a binary classification model using Amazon SageMaker. The dataset has a severe class imbalance (95% negative, 5% positive). The model achieves 99% accuracy but fails to identify positive cases correctly. Which action should the data scientist take to improve the model's ability to detect positive cases?

A.Switch to a logistic regression model with balanced class weights.
B.Use accuracy as the evaluation metric and retrain the model.
C.Apply SMOTE (Synthetic Minority Over-sampling Technique) to the training data.
D.Use the F1 score as the evaluation metric and adjust the classification threshold based on the precision-recall curve.
AnswerD

F1 score and threshold tuning directly address the imbalance.

Why this answer

In a severely imbalanced dataset (95% negative, 5% positive), accuracy is misleading. The F1 score balances precision and recall, and adjusting the classification threshold based on the precision-recall curve allows the model to prioritize recall for the minority class, directly improving detection of positive cases. This approach is recommended in SageMaker when using built-in algorithms or custom models with imbalanced data.

Exam trap

The trap here is that candidates often think oversampling (SMOTE) or changing the model type is the primary fix, but the exam tests understanding that evaluation metrics and threshold tuning are critical for imbalanced classification, not just data preprocessing.

How to eliminate wrong answers

Option A is wrong because switching to logistic regression with balanced class weights may help, but it is not the best action; the question asks for a single action to improve detection, and adjusting the threshold and metric (D) is more direct and effective than changing the model type. Option B is wrong because using accuracy as the evaluation metric will continue to favor the majority class and fail to reflect poor positive detection, reinforcing the original problem. Option C is wrong because applying SMOTE to the training data can introduce synthetic samples, but it does not address the need to evaluate and tune the model's decision threshold; SMOTE alone may not fix the detection issue if the threshold remains at 0.5.

533
MCQhard

A company deploys a model using SageMaker real-time endpoint with auto scaling. They observe that during a traffic spike, the endpoint quickly scales up to 10 instances, but after the spike, it takes a long time to scale down, leading to high costs. The scaling policy is based on a simple average CPU utilization threshold. Which adjustment would optimize the scaling down behavior?

A.Increase the scale-in cooldown period to prevent premature scale-down.
B.Decrease the scale-in cooldown period to allow the endpoint to scale down faster when utilization drops.
C.Use a step scaling policy with a larger step adjustment for scale-in.
D.Change the scaling policy to use memory utilization instead of CPU.
AnswerB

Reducing cooldown enables the Auto Scaling group to remove instances sooner.

Why this answer

Decreasing the scale-in cooldown period allows the endpoint to respond more quickly to sustained drops in CPU utilization. By default, SageMaker auto scaling uses cooldown periods to prevent rapid fluctuations; a long scale-in cooldown delays the termination of instances after utilization falls, keeping costs high. Reducing this cooldown lets the endpoint scale down faster when the spike subsides, directly addressing the problem.

Exam trap

The trap here is that candidates often confuse cooldown periods with step adjustments, thinking that larger scale-in steps will speed up the process, when in fact the cooldown period controls the timing of when scaling actions can occur.

How to eliminate wrong answers

Option A is wrong because increasing the scale-in cooldown period would make the problem worse, not better—it would cause the endpoint to wait even longer before scaling down, increasing costs. Option C is wrong because step scaling policies control the magnitude of scaling adjustments (e.g., adding or removing multiple instances at once), but they do not affect the timing or delay of scale-in actions; the cooldown period is the key parameter for timing. Option D is wrong because changing the metric to memory utilization does not address the core issue of slow scale-down timing; the problem is with the cooldown period, not the metric choice.

534
MCQmedium

An MLOps engineer is setting up a SageMaker endpoint for a model that performs inference on large images. The model is containerized and expects input in a specific format. The team wants to preprocess the images (resize and normalize) before passing them to the model. What is the most efficient way to implement this?

A.Configure SageMaker to use a preprocessing container as the first step of an inference pipeline, followed by the model container.
B.Use Amazon API Gateway to perform request transformation before forwarding to the endpoint.
C.Package the preprocessing logic into the same Docker container as the model.
D.Use a Lambda function as a proxy to preprocess requests before calling the SageMaker endpoint.
AnswerA

Inference pipeline allows separation of concerns and efficient processing.

Why this answer

SageMaker Inference Pipelines allow you to chain multiple containers in a serial fashion, where the output of one container becomes the input of the next. By placing a preprocessing container as the first step, you can resize and normalize large images before passing them to the model container, which keeps the model container focused on inference and avoids unnecessary data transfer or custom code. This is the most efficient and natively supported approach within SageMaker for multi-step inference workflows.

Exam trap

The trap here is that candidates often choose Option C (packaging everything into one container) because it seems simpler, but they overlook the fact that SageMaker Inference Pipelines are specifically designed for this exact use case and provide better modularity, maintainability, and efficiency.

How to eliminate wrong answers

Option B is wrong because Amazon API Gateway is designed for request routing and transformation at the HTTP level, not for heavy image preprocessing (e.g., resizing and normalization) — it lacks the computational capability and libraries needed for such tasks, and it would introduce latency without any benefit. Option C is wrong because packaging preprocessing logic into the same container as the model violates the separation of concerns principle and makes the container larger and harder to maintain; it also prevents independent scaling or updating of preprocessing steps. Option D is wrong because using a Lambda function as a proxy adds unnecessary cold-start latency and a 6 MB (or 10 MB via extension) payload limit, which is problematic for large images, and it does not integrate as seamlessly with SageMaker's built-in batching or inference pipeline features.

535
MCQhard

A company deploys a model in a different AWS account for production. They want to allow the production account to invoke the model endpoint from a SageMaker notebook in the same account, while keeping the model in the original account. Which configuration is required?

A.Create an IAM role in the production account with cross-account trust to assume a role in the model account
B.Use SageMaker Model Registry to share the model across accounts
C.Set up VPC peering between the two accounts and use private DNS
D.Attach a resource policy to the SageMaker model in the model account that grants invoke permissions to the production account's IAM role
AnswerD

Resource policy on the model allows cross-account invocation when combined with proper IAM permissions.

Why this answer

Cross-account model access requires a resource policy on the model in Account A that grants invoke permissions to Account B. The production account's execution role must also have permission to invoke the model. SageMaker Model Registry does not handle cross-account inference.

VPC peering is not sufficient for IAM permissions. IAM role cross-account trust is needed but the model resource policy is also necessary.

536
Multi-Selecteasy

A company uses SageMaker Autopilot to build a regression model predicting house prices. After the experiment completes, the company wants to understand why the model makes certain predictions. Which TWO SageMaker features can provide this explainability? (Choose TWO.)

Select 2 answers
A.SageMaker Clarify
B.SageMaker Autopilot explainability report
C.SageMaker Model Monitor
D.SageMaker Debugger
E.SageMaker Experiments
AnswersA, B

Clarify provides feature importance and SHAP values for model explainability.

Why this answer

SageMaker Autopilot automatically generates explainability reports. SageMaker Clarify can be used separately for additional analysis. Model Monitor is for drift detection, not explainability.

Debugger is for debugging training. Experiments is for tracking.

537
Multi-Selecthard

A data engineer is using AWS Glue to run an ETL job that joins two large datasets and writes the output to S3 for ML training. The job is failing due to out-of-memory errors. Which THREE actions can help resolve this issue? (Select THREE.)

Select 3 answers
A.Filter unnecessary records early in the transformation
B.Increase the number of DPUs for the Glue job
C.Partition the input data on the join keys
D.Switch from Spark to Python shell
E.Use a smaller worker type
AnswersA, B, C

Reducing data volume early decreases memory usage.

Why this answer

Filtering unnecessary records early in the transformation reduces the amount of data that needs to be processed and shuffled, which directly lowers memory pressure. In AWS Glue, applying filters before joins or aggregations minimizes the dataset size in the Spark execution plan, helping to avoid out-of-memory errors.

Exam trap

The trap here is that candidates might think reducing worker size (Option E) saves costs and helps memory, but it actually reduces available memory per worker, making out-of-memory errors more likely.

538
MCQmedium

A company is using SageMaker to train a model for image classification. The training dataset contains 100,000 labeled images. The team wants to use a pre-trained model to reduce training time. Which SageMaker feature should they use?

A.SageMaker Debugger
B.SageMaker Model Monitor
C.SageMaker built-in Image Classification algorithm
D.SageMaker JumpStart
AnswerD

JumpStart offers pre-trained models for transfer learning.

Why this answer

SageMaker JumpStart provides pre-trained models that can be fine-tuned on custom datasets, reducing training time and data requirements.

539
MCQhard

An e-commerce company uses Amazon SageMaker to train a model that predicts click-through rates. The training data includes a timestamp column 'click_time' and a categorical feature 'device_type' (8 values). They notice that the model's performance degrades over time because the data distribution shifts. They want to ensure the training data represents the most recent behavior. The data is stored in a daily partitioned S3 bucket (e.g., s3://bucket/data/2024-01-01/). The total dataset size is 500 GB. Which approach should they take to prepare the training data while minimizing bias and cost?

A.Select only the data from the last 30 days to train the model.
B.Take a random sample of 10% of the rows from the entire dataset.
C.Use all historical data and let the model learn the temporal patterns.
D.Downsample older data exponentially so that recent data is overrepresented.
AnswerA

Using a recent window captures current patterns, reduces volume, and mitigates drift.

Why this answer

Selecting only the last 30 days of data directly addresses the data distribution shift by focusing on the most recent user behavior, which is critical for click-through rate prediction. This approach minimizes bias from outdated patterns and reduces training cost by using a smaller, relevant dataset (approximately 500 GB / 365 * 30 ≈ 41 GB). SageMaker training jobs benefit from this reduced volume through faster data loading and lower compute costs.

Exam trap

AWS often tests the misconception that more data always improves model performance, but in the presence of concept drift, recent data is more valuable than historical data, making a time-window selection the most cost-effective and bias-minimizing strategy.

How to eliminate wrong answers

Option B is wrong because random sampling from the entire dataset would include outdated data from months or years ago, failing to capture the recent distribution shift and introducing bias from stale patterns. Option C is wrong because using all historical data would force the model to learn temporal patterns that may no longer be valid, leading to degraded performance on current data and higher training costs due to the full 500 GB dataset. Option D is wrong because exponential downsampling of older data is an overly complex approach that may still retain some outdated data, and it does not guarantee that the training set reflects the most recent behavior as cleanly as a simple time-window cut; it also adds unnecessary preprocessing overhead.

540
MCQmedium

An ML team is using SageMaker Model Registry to manage model versions. After training a new model version, they register it with an 'Approved' status. The CI/CD pipeline automatically deploys the latest approved model to a staging endpoint. However, the pipeline fails with an error: 'Cannot deploy model because the model version is not approved.' The model version is clearly approved in the registry. What is the most likely cause?

A.The pipeline is using the model package ARN instead of the model version ARN.
B.The model version is approved but the pipeline uses a different version that is still pending.
C.The SageMaker endpoint configuration does not have the necessary IAM permissions to read the registry.
D.The approval status was set on the model package group, not on the specific model version.
AnswerD

Approval is per model version; if only the group is approved, individual versions may not inherit.

Why this answer

In SageMaker Model Registry, approval is a property of a specific model version within a model package group, not of the model package group itself. The error indicates the pipeline is likely referencing the model package group ARN or a version that lacks explicit approval, even though the team believes the model is approved. The CI/CD pipeline must use the exact model version ARN that has the 'Approved' status to deploy successfully.

Exam trap

The trap here is that candidates confuse model package group approval with model version approval, assuming that approving the group automatically approves all versions, whereas AWS requires explicit approval on each version individually.

How to eliminate wrong answers

Option A is wrong because using the model package ARN (which refers to the group) would cause a different error, such as 'ModelPackageNotFound' or 'InvalidARN', not a specific 'not approved' error; the pipeline would still need to specify a version. Option B is wrong because the question states the model version is clearly approved in the registry, so the pipeline using a different pending version would imply a misconfiguration in the pipeline's version selection logic, but the error message directly contradicts the approval status of the intended version. Option C is wrong because IAM permissions for the endpoint configuration to read the registry would cause an 'AccessDenied' or authorization error, not a 'not approved' error; the error is about approval status, not permissions.

541
MCQeasy

A company uses SageMaker Neo to compile a trained model for deployment on edge devices. What is the primary benefit of using Neo?

A.It monitors model drift in production
B.It reduces model size and improves inference speed on target hardware
C.It automatically retrains the model on new data
D.It provides a serverless inference endpoint
AnswerB

Neo uses hardware-specific optimizations like kernel fusion and quantization to improve performance.

Why this answer

SageMaker Neo optimizes models for specific hardware architectures (e.g., ARM, Intel, NVIDIA) to achieve faster inference and lower memory footprint.

542
MCQhard

A data scientist is using SageMaker built-in linear learner algorithm for a regression problem. The dataset has 10 features, some have missing values, and the target variable is right-skewed. The data scientist wants to handle missing values and transform the target variable to improve model performance. Which data preparation steps should the data scientist take?

A.Apply one-hot encoding to all features and remove missing values by dropping rows.
B.Standardize all features to have zero mean and unit variance, then apply a box-cox transformation to the target.
C.Impute missing values with the median of each feature and apply a log transformation to the target variable.
D.Remove rows with missing values and normalize the target to range [0,1].
AnswerC

Handles missing values and skew appropriately.

Why this answer

Imputing missing values with the median is robust to outliers and preserves the distribution of each feature, which is important when the target is right-skewed. Applying a log transformation to the right-skewed target variable helps normalize its distribution, which aligns with the linear learner algorithm's assumption of normally distributed errors and improves convergence and prediction accuracy.

Exam trap

The trap here is that candidates may assume standardizing features (Option B) is always required, but for a right-skewed target, transforming the target itself (e.g., log transform) is more critical than scaling features, and imputation is essential to avoid data loss.

How to eliminate wrong answers

Option A is wrong because one-hot encoding all features, including numeric ones, would dramatically increase dimensionality and is inappropriate for features that are not categorical; dropping rows with missing values reduces the dataset size and can introduce bias. Option B is wrong because standardizing features is beneficial, but applying a Box-Cox transformation to the target variable requires all target values to be positive (which may not hold) and is less commonly used than log transformation for right-skewed targets; also, Box-Cox is not directly available in SageMaker's built-in linear learner without custom preprocessing. Option D is wrong because removing rows with missing values discards potentially valuable data and can lead to biased models; normalizing the target to [0,1] does not address skewness and may compress the variance, harming regression performance.

543
Multi-Selectmedium

A company wants to track the lineage of their ML models for reproducibility and auditability. Which THREE services or features should they use together to achieve this? (Choose THREE.)

Select 3 answers
A.Amazon S3 versioning
B.SageMaker Experiments
C.AWS CloudTrail
D.SageMaker ML Lineage Tracking
E.AWS Config
AnswersA, B, D

Versioning enables tracking changes to datasets and model artifacts over time.

Why this answer

Amazon S3 versioning is correct because it preserves every version of an object stored in an S3 bucket, including model artifacts, datasets, and configuration files. By enabling versioning, you can retrieve and revert to any previous version of a model artifact, which is essential for reproducibility and auditability. This directly supports tracking the lineage of ML models by ensuring that the exact input data and model binaries used in a specific experiment are never overwritten or lost.

Exam trap

The trap here is that candidates confuse AWS CloudTrail or AWS Config with lineage tracking because both deal with 'tracking' and 'auditing,' but they operate at the infrastructure/API level, not at the ML experiment and artifact relationship level required for model lineage.

544
MCQeasy

A data science team needs to deploy a trained PyTorch model for real-time inference with sub-100ms latency. The model fits on a single GPU. Which SageMaker inference option is MOST cost-effective while meeting the latency requirement?

A.SageMaker Batch Transform
B.SageMaker real-time endpoint on ml.g4dn.xlarge
C.SageMaker Async Inference
D.SageMaker Serverless Inference
AnswerB

Why this answer

SageMaker real-time endpoints provide dedicated, persistent instances that can handle synchronous inference with sub-100ms latency. The ml.g4dn.xlarge instance includes a single NVIDIA T4 GPU, which is sufficient for the model size and offers the lowest cost among GPU instances that meet the latency requirement. This option balances performance and cost for real-time, low-latency inference.

Exam trap

The trap here is that candidates often choose SageMaker Serverless Inference for its cost-saving potential, but they overlook the cold start latency and lack of GPU support, which makes it unsuitable for real-time, sub-100ms inference with PyTorch models.

How to eliminate wrong answers

Option A is wrong because SageMaker Batch Transform is designed for asynchronous, offline inference on large datasets, not for real-time sub-100ms latency; it processes data in batches and returns results only after the job completes. Option C is wrong because SageMaker Async Inference queues inference requests and processes them asynchronously, which introduces unpredictable latency and is not suitable for sub-100ms real-time requirements. Option D is wrong because SageMaker Serverless Inference auto-scales from zero and has a cold start latency that can exceed 100ms, especially for GPU-based models, making it unsuitable for strict real-time latency demands.

545
MCQhard

A machine learning team is building a model using a dataset that contains a mix of numerical and categorical features. The categorical features have high cardinality (e.g., zip code with thousands of unique values). The team wants to use Amazon SageMaker for training. Which technique should the team use to encode the high-cardinality categorical features effectively?

A.Apply hash encoding to map categories to a fixed number of buckets.
B.Apply target encoding (mean encoding) to the high-cardinality features.
C.Apply one-hot encoding to all categorical features.
D.Apply label encoding to assign integer values to each category.
AnswerB

Target encoding reduces dimensionality and captures target-related information.

Why this answer

For high-cardinality categorical features, target encoding (mean encoding) replaces each category with the mean of the target variable for that category, which captures information without creating a large number of dummy variables. One-hot encoding would create too many features. Label encoding implies ordinal relationships.

Hash encoding can cause collisions.

546
MCQeasy

A company wants to reduce costs for a SageMaker real-time endpoint that has variable traffic. Which feature allows the endpoint to automatically adjust instance count based on demand?

A.SageMaker Savings Plans
B.SageMaker Inference Recommender
C.SageMaker Model Monitor
D.Auto Scaling for SageMaker endpoints
AnswerD

Auto Scaling adjusts instance count based on demand using target tracking or step scaling policies.

Why this answer

Application Auto Scaling for SageMaker endpoints allows dynamic adjustment of instance count based on CloudWatch metrics such as CPU utilization or invocations per instance.

547
Multi-Selectmedium

A company wants to use SageMaker to deploy a model that requires GPU acceleration for inference but wants to minimize costs by using a smaller attached GPU. Which options can they use? (Select TWO.)

Select 2 answers
A.Amazon Elastic Inference
B.SageMaker Neo compilation
C.Use a smaller GPU instance like ml.g4dn.xlarge instead of ml.p3.2xlarge
D.Quantize the model to INT8 precision
E.Use SageMaker serverless inference with GPU
AnswersA, C

Elastic Inference attaches a GPU accelerator to a CPU instance, providing GPU acceleration at lower cost.

Why this answer

Amazon Elastic Inference (Option A) allows you to attach a smaller, configurable GPU acceleration resource to a SageMaker endpoint, enabling GPU-accelerated inference without the cost of a full GPU instance. This directly meets the requirement of minimizing costs by using a smaller attached GPU.

Exam trap

The trap here is that candidates may confuse SageMaker Neo compilation (a model optimization technique) with hardware acceleration, or mistakenly think SageMaker serverless inference supports GPU, when in fact it only supports CPU-based compute.

548
Multi-Selecthard

An ML engineer is fine-tuning a foundation model using RLHF on SageMaker. Which THREE components are essential for this workflow? (Select THREE.)

Select 3 answers
A.A reward model trained on the preference data
B.A large validation dataset for final evaluation
C.The PPO (Proximal Policy Optimization) algorithm for model updates
D.A preference dataset with human rankings
E.A PEFT technique like LoRA
AnswersA, C, D

The reward model scores outputs for the PPO algorithm.

Why this answer

RLHF requires a preference dataset for human feedback, a reward model trained on that data, and the PPO algorithm to update the foundation model. The PEFT technique (like LoRA) is often used to make fine-tuning efficient, but it is not strictly essential for RLHF; however, it is commonly used. The base foundation model is required.

A validation dataset is needed but not specific to RLHF.

549
MCQmedium

A data scientist is training a deep learning model on Amazon SageMaker and notices that the training loss decreases but the validation loss starts increasing after a certain number of epochs. The model is likely overfitting. Which SageMaker feature can they use to detect and diagnose this issue during training?

A.SageMaker Model Monitor
B.SageMaker Automatic Model Tuning
C.SageMaker Experiments
D.SageMaker Debugger
AnswerD

SageMaker Debugger provides built-in rules such as OverfitRule to monitor training and detect issues like overfitting in real time.

Why this answer

SageMaker Debugger is the correct choice because it provides real-time monitoring of training metrics, including loss values, and can automatically detect anomalies such as overfitting (where training loss decreases but validation loss increases). It allows you to set rules (e.g., `OverfitRule`) that trigger alerts or stop training when overfitting is detected, enabling proactive diagnosis during the training job.

Exam trap

The trap here is that candidates may confuse SageMaker Debugger's real-time training diagnostics with SageMaker Model Monitor's post-deployment monitoring, or assume that hyperparameter tuning (Automatic Model Tuning) inherently addresses overfitting, when in fact it only searches for optimal hyperparameters without detecting the overfitting condition during a specific training run.

How to eliminate wrong answers

Option A is wrong because SageMaker Model Monitor is designed to monitor inference endpoints for data drift and model quality after deployment, not for detecting overfitting during training. Option B is wrong because SageMaker Automatic Model Tuning (hyperparameter tuning) optimizes hyperparameters to improve model performance but does not monitor or diagnose overfitting in real time during a single training run. Option C is wrong because SageMaker Experiments tracks and organizes training runs, metrics, and parameters for comparison, but it does not actively detect or alert on overfitting patterns during training.

550
MCQmedium

A company is building a fraud detection model on an imbalanced dataset (99% legitimate, 1% fraudulent). To improve recall on the minority class, they want to resample data. Which combination of techniques should they use?

A.SMOTE on entire dataset before train/test split
B.Random oversampling of minority class before train/test split
C.Random undersampling of majority class
D.SMOTE on training set only
AnswerD

Correct: SMOTE generates synthetic minority samples on the training set without affecting the test distribution.

Why this answer

SMOTE should be applied only to the training set to avoid data leakage; evaluation must reflect the original distribution. Random undersampling may discard useful majority samples; random oversampling before split leaks information.

551
MCQmedium

A data engineer needs to integrate a new streaming data source into an existing ML pipeline. The data arrives as JSON records and must be transformed to Parquet format, partitioned by date, and stored in Amazon S3. The engineer also needs to catalog the data for querying with Amazon Athena. Which service should be used to perform the transformation and cataloging?

A.AWS Glue ETL job
B.Amazon EMR with Spark Streaming
C.Amazon Kinesis Data Analytics
D.Amazon SageMaker Data Wrangler
AnswerA

Glue ETL can process streaming data (via Glue streaming ETL), convert to Parquet, partition, and catalog the output.

Why this answer

AWS Glue ETL jobs can read streaming data (e.g., from Kinesis), transform it (e.g., JSON to Parquet), write to S3 with partitioning, and update the Glue Data Catalog for Athena to query. This is a managed, serverless solution.

552
MCQmedium

A financial services company needs to enforce that only approved model versions are deployed to production. They use SageMaker Model Registry to track versions, with an approval workflow. Which action must they take in the model registry to ensure only approved models can be deployed?

A.Set the model version status to 'Approved' in the Model Registry
B.Tag the model version as 'production-ready'
C.Manually move the model artifact to a production S3 bucket
D.Use AWS IAM policies to restrict deployment to specific model ARNs
AnswerA

Only model versions with Approved status can be deployed via SageMaker endpoints.

Why this answer

The SageMaker Model Registry uses a status field to control the lifecycle of model versions. By setting the model version status to 'Approved', the company can enforce that only approved models are deployable, as SageMaker's deployment APIs (e.g., CreateModel, CreateEndpointConfig) can be configured to require an 'Approved' status. This integrates with the approval workflow, ensuring that unapproved or pending versions are blocked from production deployment.

Exam trap

The trap here is that candidates may confuse tagging (a flexible but non-enforceable mechanism) with the Model Registry's built-in approval status, which is specifically designed to enforce deployment gates in SageMaker.

How to eliminate wrong answers

Option B is wrong because tagging a model version as 'production-ready' is a metadata label that does not enforce any deployment restrictions; SageMaker does not natively use tags to gate deployments. Option C is wrong because manually moving the model artifact to a production S3 bucket bypasses the Model Registry's approval workflow entirely, offering no governance or audit trail. Option D is wrong because while IAM policies can restrict deployment to specific model ARNs, they do not leverage the Model Registry's approval status; this approach would require manual ARN management and does not integrate with the approval workflow.

553
MCQmedium

A machine learning engineer needs to prepare a dataset with a target variable that has severe class imbalance (1:1000). The dataset has 100,000 rows and 200 features. Which approach should the engineer use to address the class imbalance before training a classification model?

A.Use SMOTE to generate synthetic samples for the minority class.
B.Apply random undersampling to the majority class to match the minority class count.
C.Set class weights inversely proportional to class frequencies in the model.
D.Use StandardScaler on the features to normalize them.
AnswerA

SMOTE creates synthetic examples, balancing the classes without losing majority data.

Why this answer

SMOTE generates synthetic samples for the minority class, which is effective for severe imbalance. The other options either do not address imbalance (standardization) or are not appropriate for the scenario (undersampling alone discards too many majority samples, class weights are a modeling technique not a data preparation step).

554
MCQeasy

A team wants to fine-tune a pre-trained Hugging Face transformer model for text classification using SageMaker. They have a custom training script. Which SageMaker estimator should they use?

A.SageMaker generic estimator with a custom container
B.SageMaker Hugging Face estimator
C.SageMaker PyTorch estimator
D.SageMaker TensorFlow estimator
AnswerB

The Hugging Face estimator is specifically designed for Hugging Face models, managing the Transformers library and tokenizers.

Why this answer

The Hugging Face estimator is the recommended way to run Hugging Face models on SageMaker, as it automatically handles the environment and dependencies.

555
MCQhard

A machine learning engineer is preparing a dataset for a binary classification model. The dataset has a severe class imbalance (95% class A, 5% class B). The engineer wants to use Amazon SageMaker to train the model. Which data preparation technique should the engineer apply to the training dataset to address the imbalance and improve model performance?

A.Apply data augmentation to the majority class by adding noise.
B.Apply Synthetic Minority Over-sampling Technique (SMOTE) to generate synthetic samples for the minority class.
C.Use a weighted loss function during training to penalize misclassifications of the minority class.
D.Apply random under-sampling to reduce the majority class to match the minority class size.
AnswerB

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

Why this answer

SMOTE generates synthetic samples for the minority class by interpolating between existing minority instances, which directly addresses the severe class imbalance (95% class A, 5% class B) by creating a more balanced training dataset. This technique is particularly effective for tabular data in Amazon SageMaker, as it increases the representation of the minority class without simply duplicating existing samples, thereby reducing overfitting and improving the model's ability to learn decision boundaries for the minority class.

Exam trap

The trap here is that candidates confuse data preparation techniques (like SMOTE) with training-time strategies (like weighted loss functions), leading them to select option C even though the question explicitly specifies applying a technique to the training dataset before training.

How to eliminate wrong answers

Option A is wrong because applying data augmentation by adding noise to the majority class does not address the imbalance—it only increases the size of the already dominant class, potentially worsening the imbalance and introducing irrelevant variance. Option C is wrong because using a weighted loss function is a training-time technique, not a data preparation technique; the question explicitly asks for a data preparation technique to apply to the training dataset before training. Option D is wrong because random under-sampling to match the minority class size would discard 90% of the majority class data, leading to significant information loss and a high risk of underfitting, especially with a severe 95:5 imbalance.

556
MCQmedium

A data scientist is preparing a large dataset for training a binary classification model. The dataset has a severe class imbalance (95% negative, 5% positive). Which data preparation technique should the scientist use to address this imbalance without losing too much data?

A.SMOTE (Synthetic Minority Over-sampling Technique)
B.Random undersampling of the majority class
C.Random oversampling of the minority class
D.Apply class weights during model training
AnswerA

Generates synthetic samples for the minority class.

Why this answer

SMOTE (Synthetic Minority Over-sampling Technique) is the best choice because it generates synthetic examples for the minority class by interpolating between existing minority instances and their k-nearest neighbors, rather than simply duplicating data. This addresses the severe 95:5 class imbalance without losing data (as undersampling would) and without the overfitting risk of naive random oversampling. The synthetic samples help the model learn a more general decision boundary for the positive class.

Exam trap

AWS often tests the distinction between data-level techniques (like SMOTE, oversampling, undersampling) and algorithm-level techniques (like class weights), and the trap here is that candidates confuse class weighting as a data preparation method when it is actually a model training adjustment, not a data transformation step.

How to eliminate wrong answers

Option B is wrong because random undersampling of the majority class discards a large portion of the dataset (up to 95% of the negative examples), which leads to significant information loss and can degrade model performance due to reduced training data. Option C is wrong because random oversampling of the minority class simply duplicates existing positive examples, which does not introduce new variability and often causes overfitting, especially when the minority class is very small (5%). Option D is wrong because applying class weights during model training is a cost-sensitive learning technique, not a data preparation technique; it adjusts the loss function to penalize misclassifications of the minority class more heavily, but the question specifically asks for a data preparation technique to address imbalance without losing data.

557
Multi-Selecthard

A financial services company needs to build a fraud detection model using historical transaction data. The dataset has a timestamp column, and the model must be evaluated on its ability to detect fraud in future unseen transactions. The data is imbalanced (fraud is rare). Which TWO data splitting strategies should the engineer use for model validation? (Select TWO.)

Select 2 answers
A.k-fold cross-validation without stratification
B.Leave-one-out cross-validation
C.Stratified k-fold cross-validation
D.Simple random split
E.Time-series split (walk-forward validation)
AnswersC, E

Maintains class proportions in each fold, important for imbalanced data.

Why this answer

Time-series split (walk-forward validation) respects temporal order, and stratified k-fold cross-validation maintains class proportions across folds. Simple random split ignores time; k-fold without stratification may produce folds without fraud.

558
MCQmedium

A financial services company is building a fraud detection model using historical transaction data stored in Amazon S3. The data includes features such as transaction amount, merchant category, time of day, and user location. The data scientist observes that the 'merchant_category' column is a text attribute with over 200 unique values. Additionally, the 'transaction_amount' column has a long-tail distribution with extreme outliers. The dataset is 200 GB in size, and the company wants to use Amazon SageMaker for model training. The data scientist needs to engineer features that capture the high-cardinality category and reduce the impact of outliers. What is the MOST efficient and effective approach to prepare this data?

A.Use AWS Glue ETL to apply one-hot encoding to merchant_category and min-max scaling to transaction_amount.
B.Use Amazon EMR with Spark to apply ordinal encoding to merchant_category based on frequency, and log-transform the transaction_amount to reduce skewness.
C.Use Amazon Athena to bin transaction_amount into 10 equal-width bins and replace merchant_category with its count encoding.
D.Use AWS Glue DataBrew to apply a one-hot encoding on merchant_category and a standard scaler on transaction_amount after removing outliers.
AnswerB

Ordinal encoding handles high cardinality efficiently, and log transformation compresses extreme values, both reducing dimensionality and improving model performance.

Why this answer

Ordinal encoding based on frequency handles high-cardinality categorical features efficiently without exploding dimensionality, and log-transform is a standard technique to reduce skewness in long-tail distributions. Using Amazon EMR with Spark provides distributed processing for the 200 GB dataset, making it scalable and cost-effective compared to single-node alternatives.

Exam trap

The trap here is that candidates often default to one-hot encoding for categorical data without considering cardinality, and assume scaling methods like min-max or standard scaling are always appropriate, ignoring the impact of outliers on these transformations.

How to eliminate wrong answers

Option A is wrong because one-hot encoding on a column with over 200 unique values would create over 200 sparse columns, dramatically increasing memory and training time, and min-max scaling is sensitive to outliers, which would compress the majority of values into a narrow range. Option C is wrong because equal-width binning on a long-tail distribution will result in most data falling into the first few bins, losing information, and count encoding alone may not capture the ordinal relationship implied by frequency. Option D is wrong because one-hot encoding again suffers from high dimensionality, standard scaling is not robust to outliers (it uses mean and standard deviation), and removing outliers arbitrarily can discard valuable fraud signals.

559
MCQeasy

A marketing company is preparing a dataset to train a logistic regression model to predict whether a customer will click on an online ad. The dataset includes 1 million records with features: customer_age (numeric), income (numeric), education_level (ordinal: high school, bachelor, master, PhD), and ad_category (categorical: 50 unique values). The data is stored in a CSV file in Amazon S3. The data scientist plans to use Amazon SageMaker's built-in linear learner algorithm. The data scientist needs to preprocess the data before training. What is the correct sequence of data preparation steps that should be applied to this dataset to ensure optimal model performance?

A.Drop any duplicate records, apply min-max scaling to all numeric features, and use target encoding for ad_category based on click rates.
B.Apply PCA to all numeric and categorical features after converting categories to numeric indices, then standardize the principal components.
C.Apply min-max scaling to customer_age and income, label encode education_level and ad_category, then use recursive feature elimination to reduce dimensionality.
D.Standardize customer_age and income to have zero mean and unit variance, one-hot encode ad_category, ordinal encode education_level (e.g., map to 1-4), then combine all features into a feature matrix.
AnswerD

Standardization helps linear models converge faster; one-hot encoding for categorical with many categories is standard; ordinal encoding preserves the ordinal nature of education.

Why this answer

It applies appropriate preprocessing for a logistic regression model using SageMaker's linear learner. Standardizing numeric features (zero mean, unit variance) is essential for linear models to ensure convergence and equal feature influence. One-hot encoding the categorical ad_category (50 unique values) avoids imposing ordinal relationships, while ordinal encoding education_level respects its natural order.

This combination prepares a feature matrix suitable for the linear learner's optimization.

Exam trap

The trap here is that candidates often choose label encoding for all categorical features (Option C) or target encoding (Option A) without considering the ordinal nature of education_level or the risk of data leakage, leading to suboptimal model performance.

How to eliminate wrong answers

Option A is wrong because min-max scaling is not optimal for linear models (it does not center data, which can slow convergence), and target encoding ad_category based on click rates introduces data leakage (future information) and risks overfitting. Option B is wrong because applying PCA to categorical features after converting to numeric indices is inappropriate (PCA assumes linear relationships and continuous data), and standardizing principal components is redundant since PCA already produces uncorrelated components. Option C is wrong because label encoding ad_category (50 unique values) imposes false ordinal relationships, and recursive feature elimination is computationally expensive and unnecessary for this dataset size; min-max scaling also lacks centering for linear models.

560
MCQhard

A team is deploying a deep learning model on a SageMaker real-time endpoint. The model has high memory requirements, and the team wants to minimize instance cost while ensuring the endpoint can handle up to 10 concurrent requests. They plan to use a single ml.p3.2xlarge instance (8 vCPUs, 61 GB memory). Which SageMaker endpoint configuration will allow the endpoint to handle 10 concurrent requests without errors?

A.Disable ModelServerWorkers to reduce overhead.
B.Set the initial instance count to 1 and configure the container to use multiple ModelServerWorkers.
C.Set the initial variant weight to 10.
D.Set the initial instance count to 10 in the production variant.
AnswerB

Multiple workers allow the instance to handle multiple requests concurrently, up to the CPU/memory limit.

Why this answer

SageMaker's ModelServerWorkers (MSWs) allow a single container to handle multiple inference requests concurrently by running multiple worker processes. With 8 vCPUs on ml.p3.2xlarge, configuring multiple MSWs (e.g., 8 workers) enables the endpoint to process up to 10 concurrent requests without errors, as each worker can handle one request at a time. This minimizes cost by using a single instance while meeting concurrency requirements.

Exam trap

The trap here is confusing concurrency mechanisms: candidates often think increasing instance count (Option D) is the only way to handle concurrent requests, but SageMaker's ModelServerWorkers allow a single instance to serve multiple requests in parallel, which is more cost-effective.

How to eliminate wrong answers

Option A is wrong because disabling ModelServerWorkers would force the container to use a single worker, limiting concurrency to 1 request at a time, which cannot handle 10 concurrent requests. Option C is wrong because initial variant weight controls traffic distribution across multiple variants, not concurrency or instance count; setting it to 10 does not increase the number of instances or workers. Option D is wrong because setting the initial instance count to 10 would deploy 10 instances, which is unnecessary and costly for handling 10 concurrent requests, and does not address the goal of minimizing cost.

561
MCQmedium

A machine learning team has a model that needs to serve predictions with very low latency (under 10 ms) for a real-time web application. The model is a small ensemble of three neural networks that fits in memory. Which SageMaker inference option is MOST appropriate?

A.SageMaker batch transform
B.SageMaker real-time endpoint
C.SageMaker asynchronous inference
D.SageMaker serverless inference
AnswerB

Real-time endpoints are always running and can achieve sub-10 ms latency with appropriately sized instances.

Why this answer

SageMaker real-time endpoints are designed for low-latency, synchronous inference, making them the best fit for a model that must serve predictions in under 10 ms. Since the ensemble of three neural networks fits in memory, a real-time endpoint can keep the model loaded and respond to each request with minimal overhead, typically using HTTPS and the SageMaker InvokeEndpoint API.

Exam trap

The trap here is that candidates confuse 'low latency' with 'serverless' or 'asynchronous' options, not realizing that serverless inference has cold starts and asynchronous inference adds queueing delays, both of which break the sub-10 ms requirement.

How to eliminate wrong answers

Option A is wrong because SageMaker batch transform is an asynchronous, offline inference option that processes large datasets in batches and does not provide real-time, low-latency responses. Option C is wrong because SageMaker asynchronous inference is designed for requests with large payloads or long processing times, and it introduces queueing and callback mechanisms that add latency beyond the 10 ms requirement. Option D is wrong because SageMaker serverless inference auto-scales from zero and has a cold-start latency that can exceed 10 ms, making it unsuitable for sub-10 ms real-time predictions.

562
MCQeasy

A company deployed a machine learning model on an Amazon SageMaker real-time endpoint. Over several weeks, they notice that inference latency has been gradually increasing, especially during peak business hours. The model and instance type have remained unchanged. What is the most likely cause of the increased latency?

A.The inference script is not using batch processing.
B.The SageMaker endpoint auto scaling is not configured to scale out quickly enough under increasing traffic.
C.The model size is too large for the instance type.
D.The endpoint has data capture enabled, causing additional overhead.
AnswerB

If auto scaling policies are too conservative, the endpoint may not add instances fast enough during traffic spikes, leading to increased latency.

Why this answer

The gradual increase in latency during peak hours, with no change to the model or instance type, strongly indicates that the endpoint is not scaling out fast enough to handle increased traffic. SageMaker real-time endpoints rely on auto scaling policies to add instances based on metrics like invocation count or CPU utilization; if the scale-out step is too slow or the cooldown period is too long, requests queue up and latency rises. This matches the symptom of latency growing over weeks as traffic patterns evolve, rather than a sudden spike.

Exam trap

The trap here is that candidates may confuse a gradual latency increase with a model size or code issue, but the key clue is the unchanged model and instance type, pointing to a scaling configuration problem rather than a static resource limitation.

How to eliminate wrong answers

Option A is wrong because batch processing is not relevant to a real-time endpoint; SageMaker real-time endpoints process individual requests synchronously, and the inference script's use of batching would not cause gradual latency increases over weeks. Option C is wrong because the model size has remained unchanged, so if it were too large for the instance type, latency would be consistently high from the start, not gradually increasing. Option D is wrong because data capture, when enabled, adds a small, fixed overhead per request (writing to S3), which would cause a constant latency increase, not a gradual one that worsens over weeks.

563
MCQeasy

A data science team deploys a regression model to Amazon SageMaker for real-time inference. After one month, the model's prediction errors increase significantly, but data distributions remain unchanged. Which monitoring approach is MOST suitable for detecting this issue?

A.Set up Amazon SageMaker Model Monitor to track model performance metrics against ground truth labels as they arrive.
B.Use Amazon SageMaker Clarify to monitor feature attribution drift.
C.Enable Amazon CloudWatch to monitor model endpoint latency.
D.Configure Amazon SageMaker Model Monitor to track data drift on the input features.
AnswerA

Model performance monitoring directly detects concept drift by comparing predictions to actuals.

Why this answer

Amazon SageMaker Model Monitor can be configured to track model performance metrics (e.g., regression error metrics like RMSE or MAE) against ground truth labels as they arrive. Since the question states that data distributions remain unchanged but prediction errors increase, the issue is likely model degradation (e.g., concept drift or model staleness) rather than data drift. Monitoring ground truth labels directly captures this performance degradation, making option A the most suitable approach.

Exam trap

The trap here is that candidates often confuse data drift (changes in input features) with concept drift (changes in the relationship between features and target), and mistakenly choose data drift monitoring (option D) even though the question explicitly states data distributions are unchanged, while the correct approach is to monitor ground truth performance metrics (option A).

How to eliminate wrong answers

Option B is wrong because Amazon SageMaker Clarify is designed for detecting bias and explaining model predictions, not for monitoring model performance degradation over time; it focuses on feature attribution drift, which is a form of explainability monitoring, not a direct measure of prediction error increase. Option C is wrong because Amazon CloudWatch monitoring of endpoint latency tracks infrastructure performance (e.g., response times, invocation counts), not the accuracy or error rate of model predictions; latency issues do not explain increased prediction errors when data distributions are unchanged. Option D is wrong because Amazon SageMaker Model Monitor configured for data drift tracks changes in the input feature distribution, but the question explicitly states that data distributions remain unchanged, so data drift monitoring would not detect the issue; the problem is model performance degradation despite stable input data.

564
MCQmedium

A team needs to deploy a new model version to production while minimizing risk. They want to route 5% of live traffic to the new model and 95% to the current model, and then gradually increase the new model's traffic. Which SageMaker deployment pattern should they use?

A.Shadow testing
B.Blue/green deployment
C.A/B testing with production variants
D.Canary deployment using production variants
AnswerD

Canary deployment with production variants allows gradual traffic shift from 5% to 100%.

Why this answer

Canary deployment uses production variants with weighted traffic allocation. By setting the new model variant to 5% and the current to 95%, and later adjusting weights, the team can gradually shift traffic. Blue/green is a full switch, and shadow testing duplicates traffic without affecting live responses.

565
MCQeasy

A machine learning engineer is preparing a dataset that contains both numerical and categorical features. The categorical features have high cardinality (e.g., zip code with thousands of unique values). Which technique is most appropriate for encoding these high-cardinality categorical features?

A.Label encoding
B.One-hot encoding
C.Frequency encoding
D.Target encoding
AnswerD

Encodes using target mean, handles high cardinality well.

Why this answer

Target encoding is the most appropriate technique for high-cardinality categorical features because it replaces each category with the mean of the target variable for that category, effectively capturing the predictive signal while keeping the feature as a single numeric column. This avoids the dimensionality explosion of one-hot encoding and the arbitrary ordinality of label encoding, making it a common choice in gradient boosting frameworks like XGBoost or LightGBM for datasets with thousands of unique categories.

Exam trap

AWS often tests the misconception that one-hot encoding is always the safest choice for categorical data, but candidates fail to recognize that high cardinality makes it impractical, leading them to overlook target encoding as a more efficient alternative.

How to eliminate wrong answers

Option A is wrong because label encoding assigns arbitrary integer values to categories, which introduces a false ordinal relationship that can mislead tree-based models into treating high-cardinality features as ordered, degrading performance. Option B is wrong because one-hot encoding creates a binary column for each unique category, which with thousands of categories leads to an extremely high-dimensional and sparse feature space, causing memory issues and overfitting. Option C is wrong because frequency encoding replaces categories with their occurrence counts, which loses the relationship between the category and the target variable, often resulting in weaker predictive power compared to target encoding.

566
MCQmedium

An ML team is developing a regression model using Amazon SageMaker. They have a 100 GB CSV dataset stored in Amazon S3. The data is contained in a single large file. They launch a SageMaker training job with an ml.p3.8xlarge instance using a custom Docker container. The training script loads the data using pandas' read_csv from S3 directly. The team observes that the training job takes over 24 hours, and CloudWatch metrics show: GPU utilization is consistently above 90%, but CPU utilization is below 30%. Network I/O is moderate, and disk I/O is low. The team has already tried switching to a larger instance type (ml.p3.16xlarge) with no significant improvement. They need to reduce training time. Which action is MOST likely to achieve this?

A.Use SageMaker Pipe Mode to stream data directly from S3 to the algorithm, bypassing the local file system.
B.Split the CSV file into multiple smaller files (e.g., 100 MB each) and update the training script to read from a list of files in S3.
C.Use Amazon SageMaker Managed Spot Training to reduce cost, then use the savings to rent a larger instance.
D.Increase the number of training instances by using a distributed training configuration with Horovod.
AnswerB

This allows SageMaker to parallelize data loading across multiple instances or even multiple processes within one instance, improving I/O throughput.

Why this answer

The bottleneck is data loading. The single large CSV file prevents parallelism; SageMaker's Pipe mode streams data directly to the algorithm, but custom containers must support it. However, a simpler and effective approach is to split the data into multiple smaller files, enabling SageMaker's distributed data loading across instances and improving I/O parallelism.

Increasing instance count with single file doesn't help because each instance still reads the same file. Changing instance type already tried. Spot instances don't improve speed.

EBS volume doesn't matter.

567
MCQmedium

A company uses Amazon SageMaker Ground Truth to label images for object detection. They want to minimize labeling costs while maintaining high accuracy. Which feature should they enable?

A.Active learning to automatically select samples for labeling
B.Use of mechanical turk for all labeling
C.Pre-built annotation workflows for bounding boxes
D.Automated data labeling with AWS Lambda
AnswerA

Active learning prioritizes samples where the model is uncertain, reducing labeling effort.

Why this answer

Active learning in Ground Truth selects the most informative images for labeling, reducing the number of labels needed while maintaining model quality.

568
MCQeasy

Refer to the exhibit. The Glue job reads a CSV file and attempts to write to a Parquet table. What is the most likely cause of this error?

A.The 'price' column is missing from some rows
B.The schema inference incorrectly detected the column as String
C.The 'price' column contains non-numeric values in some rows
D.The CSV file is compressed and not properly decompressed
AnswerC

Non-numeric strings like 'N/A' or commas cause conversion errors.

Why this answer

The error message indicates a 'NumberFormatException' when parsing the 'price' column, which occurs when Spark attempts to convert a string value to a numeric type. Since the Glue job's schema inference likely detected 'price' as a numeric column based on the majority of rows, any row containing a non-numeric value (e.g., 'N/A', 'null', or a currency symbol) will cause this parsing failure during the write to Parquet.

Exam trap

AWS often tests the distinction between schema inference behavior and runtime type conversion errors, where candidates mistakenly attribute the error to missing data or schema detection rather than the actual parsing failure caused by malformed values.

How to eliminate wrong answers

Option A is wrong because missing values in a column would result in a null value, not a NumberFormatException; Spark can handle nulls in numeric columns without throwing a parsing error. Option B is wrong because if the schema inference had incorrectly detected the column as String, the write to Parquet would succeed without any type conversion error; the error occurs only when Spark tries to parse a string as a number. Option D is wrong because compressed CSV files are automatically decompressed by Spark/Glue based on the file extension (e.g., .gz, .bz2), and a decompression issue would produce an IOException or a different error, not a NumberFormatException.

569
MCQmedium

A data scientist is using Amazon SageMaker Processing to run a feature engineering job. The job requires installing additional Python libraries not included in the default SageMaker containers. Which approach should the data scientist use to include these libraries?

A.Add the libraries to the `requirements.txt` file in the same S3 bucket as the script
B.Create a custom Docker image with the libraries installed and specify it in the ProcessingInput
C.Use Amazon EFS to store the libraries and mount them to the processing container
D.Use the `pip install` command within the processing script at runtime
AnswerB

A custom image ensures dependencies are available without runtime installation.

Why this answer

SageMaker Processing jobs run in isolated containers that cannot install packages at runtime via pip without internet access or custom images. Creating a custom Docker image with the required libraries pre-installed ensures the environment is consistent, reproducible, and avoids dependency resolution failures during job execution. This approach aligns with SageMaker's best practice for custom dependencies.

Exam trap

The trap here is that candidates assume SageMaker containers have internet access by default or that a `requirements.txt` in S3 is automatically processed, but in reality, SageMaker Processing jobs often run in isolated subnets without outbound internet, making pip install impossible without a pre-built custom image.

How to eliminate wrong answers

Option A is wrong because a `requirements.txt` file in S3 is not automatically processed by SageMaker Processing; the container does not read it unless explicitly handled in a custom entry point or lifecycle script, and even then, pip install requires network access or a pre-built wheel. Option C is wrong because Amazon EFS is a file system for shared storage, not for distributing Python libraries; mounting EFS to a processing container would require custom network configuration and does not integrate with Python's import system without additional setup. Option D is wrong because `pip install` inside the processing script at runtime will fail if the container lacks internet access (common in VPC-only modes) or if the required build tools are missing, and it violates the principle of immutable infrastructure.

570
MCQhard

A data science team is using Amazon SageMaker Pipelines to orchestrate a multi-step workflow that includes data preprocessing, training, and model evaluation. They want to reuse the preprocessed data across multiple pipeline executions without re-running the preprocessing step if the source data hasn't changed. What should they configure?

A.Use SageMaker Training steps with checkpointing
B.Use SageMaker Processing steps with caching
C.Use SageMaker Feature Store to store the preprocessed features
D.Use SageMaker Data Wrangler for the preprocessing
AnswerB

Caching in SageMaker Pipelines reuses step outputs when inputs are identical, avoiding redundant computation.

Why this answer

SageMaker Processing steps support caching, which allows the pipeline to skip re-execution of the preprocessing step if the input data and pipeline parameters have not changed. This is achieved by configuring a `CacheConfig` with a caching key based on the input data source and step parameters, ensuring that the preprocessed data is reused across multiple pipeline executions without redundant computation.

Exam trap

The trap here is that candidates may confuse checkpointing (for training resumption) with caching (for step reuse), or assume that Feature Store or Data Wrangler inherently provide caching, when in fact only Processing steps with explicit CacheConfig enable this behavior in SageMaker Pipelines.

How to eliminate wrong answers

Option A is wrong because SageMaker Training steps with checkpointing are designed to save intermediate model state during training (e.g., for resuming from failures), not to cache or reuse preprocessed data across pipeline executions. Option C is wrong because SageMaker Feature Store is a managed repository for storing, sharing, and managing features for ML models, but it does not automatically cache the output of a preprocessing step; it requires explicit feature ingestion and retrieval, which adds complexity and does not directly address skipping the preprocessing step based on unchanged source data. Option D is wrong because SageMaker Data Wrangler is a visual interface for data preparation and feature engineering, but it does not provide built-in caching for pipeline steps; it can be used within a Processing step, but the caching behavior is a property of the Processing step itself, not of Data Wrangler.

571
MCQmedium

A data scientist is training a large model on SageMaker and wants to reduce training time by using multiple GPUs. The model is small enough to fit on a single GPU but training is slow. Which SageMaker feature should be used?

A.Data parallelism using SageMaker's Distributed Data Parallel
B.Use a larger instance with more vCPUs
C.Model parallelism using SageMaker's Model Parallel
D.Use Elastic Inference
AnswerA

Data parallelism distributes the training across multiple GPUs, reducing training time for models that fit on a single GPU.

Why this answer

SageMaker's Distributed Data Parallel (DDP) is the correct choice because it splits the mini-batch across multiple GPUs, allowing each GPU to hold a copy of the model and process a subset of the data simultaneously. This reduces training time for models that fit on a single GPU by leveraging data parallelism, where gradients are synchronized across GPUs after each step.

Exam trap

The trap here is that candidates confuse model parallelism (for large models) with data parallelism (for slow training of small models), or mistakenly think Elastic Inference can accelerate training when it is strictly for inference latency reduction.

How to eliminate wrong answers

Option B is wrong because using a larger instance with more vCPUs does not directly accelerate GPU-bound training; the bottleneck is GPU compute, not CPU cores. Option C is wrong because model parallelism is designed for models that are too large to fit on a single GPU, partitioning layers across devices, which adds communication overhead and is unnecessary when the model fits on one GPU. Option D is wrong because Elastic Inference attaches a separate accelerator for inference only, not for training, and cannot be used to speed up training loops.

572
MCQhard

A data science team at a financial services company is deploying a real-time fraud detection model using Amazon SageMaker. The model is a gradient boosting classifier trained on historical transaction data. The model is deployed to a SageMaker endpoint with an ML.M5.LARGE instance for real-time inference. After deployment, the team observes that the endpoint's latency spikes to over 2 seconds during peak hours (10:00-12:00 and 14:00-16:00), causing timeouts for client applications. The average latency during off-peak hours is 200 ms. The team has enabled auto-scaling with a target average CPU utilization of 70%, but the endpoint still experiences high latency during peak hours. The instance count never scales beyond 2 instances during peaks. The model size is 500 MB, and each request includes 200 features. The team needs to reduce latency to under 500 ms at the 99th percentile during peak hours without increasing costs beyond the current budget. Which course of action should the team take?

A.Configure SageMaker batch transform for the real-time endpoint to process requests asynchronously.
B.Increase the auto-scaling maximum instance count to 10 and set target CPU utilization to 50%.
C.Switch the endpoint instance type to a GPU instance such as ml.g4dn.xlarge to accelerate inference.
D.Enable data compression on the endpoint to reduce payload size and network latency.
AnswerB

Correct. Increasing the maximum instance count and lowering the CPU utilization target allows the endpoint to scale out to more instances during peak hours, distributing the workload and reducing latency. This addresses the compute bottleneck without requiring GPU instances or incurring extra costs if the budget accommodates the higher maximum.

Why this answer

The root cause of high latency during peak hours is insufficient compute capacity. By increasing the auto-scaling maximum instance count to 10 and lowering the target CPU utilization to 50%, the endpoint will scale out more aggressively during peak traffic, distributing the inference load across more instances. This reduces per-instance CPU utilization and latency without resorting to more expensive GPU instances.

The current budget likely supports up to 10 instances, so costs remain within budget. Option C is incorrect because gradient boosting inference is CPU-bound and does not benefit significantly from GPU acceleration; GPU instances are also more expensive, potentially increasing costs.

Exam trap

The trap is that candidates might assume GPU acceleration is the standard fix for high latency, but gradient boosting models are CPU-bound. Horizontal scaling (more instances) is the appropriate and cost-effective solution.

How to eliminate wrong answers

Option A is wrong because SageMaker batch transform is designed for offline, asynchronous processing of large datasets, not for real-time inference; it would introduce unacceptable delays and cannot meet the sub-500 ms latency requirement. Option B is wrong because increasing the maximum instance count to 10 and lowering CPU target to 50% would significantly increase costs (more instances running) and still not guarantee sub-500 ms latency if each instance is CPU-bound; the current scaling limit of 2 instances suggests the bottleneck is per-instance compute capacity, not scaling policy. Option D is wrong because data compression reduces payload size and network latency, but the primary latency spike is due to compute time (model inference), not network transfer; the 500 MB model and 200 features are already moderate, and compression would offer minimal improvement for the compute-bound bottleneck.

573
MCQhard

A company uses SageMaker training jobs that need to access data in an S3 bucket in a different AWS account. The bucket uses a bucket policy that allows access only from a specific VPC. How should they configure the training job?

A.Use AWS DataSync to copy data to the training account's S3.
B.Create an IAM role in the source account and assume it from the training account.
C.Use an S3 VPC endpoint in the training job's VPC and attach a bucket policy that allows the VPC.
D.Use cross-account access with an IAM role and add a bucket policy allowing the training job's VPC.
AnswerD

This combines IAM role assumption and VPC condition to meet both requirements.

Why this answer

The training job in Account A needs to access an S3 bucket in Account B that is restricted to a specific VPC. This requires both cross-account IAM role trust (so the training job can assume a role in Account B) and a bucket policy that explicitly allows access from the VPC where the training job runs. Without the VPC condition in the bucket policy, the S3 service would deny requests even if the IAM role is valid, because the bucket policy enforces the VPC restriction.

Exam trap

The trap here is that candidates often think a cross-account IAM role alone is sufficient, forgetting that the bucket policy's VPC restriction is a separate, mandatory condition that must be explicitly satisfied, and that the VPC endpoint alone does not grant cross-account permissions.

How to eliminate wrong answers

Option A is wrong because AWS DataSync is a data transfer service for large-scale migrations or syncs, not for real-time access during a SageMaker training job; it would add latency and complexity without solving the VPC-based access restriction. Option B is wrong because simply creating an IAM role in the source account and assuming it from the training account does not satisfy the bucket policy's VPC condition; the bucket policy explicitly requires requests to originate from the specified VPC, and the IAM role alone does not control the network origin. Option C is wrong because using an S3 VPC endpoint in the training job's VPC is necessary but insufficient on its own; the bucket policy must also explicitly allow the VPC (via the `aws:SourceVpc` condition), and cross-account access still requires an IAM role in the source account to grant permissions to the training account's principal.

574
MCQeasy

A data scientist is using SageMaker built-in XGBoost algorithm for a binary classification task. Which objective metric is MOST appropriate for SageMaker Automatic Model Tuning to maximize?

A.validation:mae
B.validation:rmse
C.validation:ndcg
D.validation:auc
AnswerD

AUC is a common binary classification metric and is available in XGBoost.

575
MCQmedium

A machine learning engineer is training a deep learning model on SageMaker and notices that the training loss decreases rapidly in the first few epochs but then plateaus. The validation loss starts increasing after 10 epochs. Which action should the engineer take to improve generalization?

A.Add more layers to the model
B.Use early stopping with validation loss monitoring
C.Increase the learning rate
D.Decrease the batch size
AnswerB

Early stopping halts training when validation loss stops decreasing, reducing overfitting.

Why this answer

Early stopping is the correct action because the validation loss increasing after 10 epochs while training loss continues to decrease is a classic sign of overfitting. By monitoring validation loss and halting training when it stops improving (e.g., using a patience parameter), the engineer prevents the model from memorizing noise in the training data, thereby improving generalization. SageMaker's built-in training job features or the `EarlyStopping` callback in frameworks like TensorFlow or PyTorch can implement this directly.

Exam trap

AWS often tests the distinction between underfitting and overfitting symptoms, and the trap here is that candidates mistake a plateauing training loss for a need to increase model complexity or learning rate, when the rising validation loss clearly signals overfitting that early stopping can mitigate.

How to eliminate wrong answers

Option A is wrong because adding more layers increases model capacity, which would exacerbate overfitting and likely cause validation loss to rise even sooner, not improve generalization. Option C is wrong because increasing the learning rate would make training more unstable, potentially causing the loss to diverge or oscillate, and would not address the overfitting indicated by the rising validation loss. Option D is wrong because decreasing the batch size introduces more noise into gradient estimates, which can sometimes help escape local minima but does not directly prevent overfitting; it may even slow convergence and does not target the core issue of validation loss increasing.

576
MCQhard

A company operates an IoT platform that ingests sensor data from thousands of devices. Data is streamed via Amazon Kinesis Data Streams and stored in an S3 bucket using a Kinesis Firehose delivery stream, which writes data in 5-minute windows. The data is then used to train a machine learning model for anomaly detection. Recently, the data science team noticed that the training dataset is always missing the last 5 minutes of events from the end of each day. The S3 objects show that the last delivery stream buffer window is incomplete. The data engineer checked the Kinesis Firehose metrics and found no delivery errors or data loss, but the 'IncomingBytes' and 'IncomingRecords' metrics show consistent data for all periods. The S3 bucket has Lifecycle policies that do not delete objects. The team suspects the issue is related to the data preparation pipeline. Which course of action would correctly resolve the missing data problem?

A.Increase the buffer size to 10 MB and reduce the buffer interval to 60 seconds in the Firehose delivery stream configuration
B.Reprocess the Kinesis stream data from the beginning using a custom application
C.Modify the data preparation pipeline to use AWS Lambda to write data to S3 directly from Kinesis
D.Increase the buffer interval to 600 seconds to allow more time for data to accumulate
AnswerA

Reducing the buffer interval to 60 seconds ensures that data is flushed every minute, preventing incomplete windows from being missed at the end of the day.

Why this answer

The issue is that the last 5-minute buffer window at the end of each day never completes, so Firehose never delivers that final object to S3. By reducing the buffer interval to 60 seconds and increasing the buffer size to 10 MB, Firehose will flush data more frequently, ensuring that even small residual data at the end of the day is delivered before the stream stops. This directly addresses the incomplete last window without requiring reprocessing or changing the pipeline architecture.

Exam trap

The trap here is that candidates assume the missing data is due to data loss or pipeline errors, but the real issue is that Firehose's buffer window never completes when data stops arriving, so no S3 object is created for that final period.

How to eliminate wrong answers

Option B is wrong because reprocessing the entire Kinesis stream from the beginning is unnecessary and inefficient; the data is not lost, it is simply never delivered due to the buffer window not closing. Option C is wrong because switching to a Lambda-based direct write from Kinesis to S3 would bypass Firehose entirely, adding complexity and potential for data loss or duplication, and does not fix the root cause of the incomplete buffer window. Option D is wrong because increasing the buffer interval to 600 seconds would make the problem worse, as it would extend the time needed for a buffer window to complete, increasing the likelihood of incomplete windows at day boundaries.

577
MCQeasy

An ML engineer needs to compile a trained TensorFlow model to run efficiently on a target edge device with an ARM CPU. Which AWS service should they use?

A.SageMaker Debugger
B.AWS Inferentia
C.SageMaker Neo
D.Amazon Elastic Inference
AnswerC

Neo optimizes models for target hardware, including ARM CPUs, using its compiler.

Why this answer

SageMaker Neo compiles trained models for specific hardware targets, including ARM CPUs, to optimize inference performance.

578
MCQmedium

A data scientist is working with a dataset that contains missing values in several numerical columns. The missing data is not completely at random (MNAR). The scientist wants to minimize bias in the imputed values. Which imputation strategy is most appropriate?

A.Delete all rows with missing values
B.Use a model-based imputation like iterative imputer or KNN imputer
C.Replace missing values with the median of each column
D.Replace missing values with the mean of each column
AnswerB

Model-based imputation uses correlations between features to estimate missing values, reducing bias in MNAR settings.

Why this answer

Model-based imputation methods, such as using a regressor to predict missing values based on other features, can capture complex relationships and reduce bias compared to simple mean/median imputation, especially when data is not MCAR.

579
MCQmedium

A company uses SageMaker JumpStart to deploy a foundation model for a summarization task. They want to minimize costs while still meeting a latency requirement of under 2 seconds. Which option should they consider?

A.Use SageMaker Inference Recommender to select the cheapest instance that meets latency
B.Deploy the model on a serverless endpoint
C.Enable auto-scaling to handle variable traffic
D.Use the largest GPU instance to ensure fast inference
AnswerA

Inference Recommender benchmarks the model on different instances to find the optimal balance of cost and latency.

Why this answer

SageMaker Inference Recommender runs load tests against your model on various instance types and provides latency and cost metrics. By selecting the cheapest instance that still meets the sub-2-second latency requirement, you directly minimize cost while satisfying the performance constraint. This is the most systematic and cost-effective approach for this scenario.

Exam trap

A common misconception is that serverless endpoints are always the cheapest option, but for latency-sensitive workloads with large models, the cold-start overhead and lack of guaranteed compute resources make them unsuitable. Inference Recommender is the correct tool for cost-latency trade-off analysis.

How to eliminate wrong answers

Option B is wrong because serverless endpoints have a cold-start latency that can exceed 2 seconds, especially for large foundation models, and they do not guarantee consistent sub-2-second inference under variable traffic. Option C is wrong because auto-scaling handles variable traffic but does not reduce per-invocation cost or latency; it only adjusts capacity, and the chosen instance type still determines base latency and cost. Option D is wrong because using the largest GPU instance is unnecessarily expensive and may provide excess compute capacity that is not needed to meet a 2-second latency requirement, violating the cost-minimization goal.

580
MCQhard

A team is fine-tuning a foundation model using LoRA for a text summarization task. They want to reduce memory footprint during training. Which technique should they combine with LoRA?

A.Data parallelism
B.Gradient checkpointing
C.Mixed precision
D.QLoRA
AnswerD
581
MCQmedium

A financial services company ingests transaction data from multiple sources into an S3 data lake. They want to use AWS Glue to catalog this data and make it queryable by Amazon Athena. The data schema changes frequently as new sources are added. Which AWS Glue feature should they enable to automatically detect and update the schema?

A.AWS Glue DataBrew
B.AWS Glue crawlers with schema update policy set to 'UPDATE'
C.AWS Glue ETL job scheduled to run daily
D.Manual schema definition in the AWS Glue Data Catalog
AnswerB

Crawlers automatically detect new partitions and schema changes, updating the Data Catalog accordingly.

Why this answer

AWS Glue crawlers can automatically scan data in S3, infer schemas, and update the Data Catalog. Schema evolution is supported natively when crawlers are configured to update table definitions. Manual schema definition would not handle frequent changes.

582
Multi-Selecthard

An ML team uses SageMaker to deploy a model for real-time inference. They want to monitor and improve cost efficiency. Which THREE actions should they take? (Select THREE.)

Select 3 answers
A.Use SageMaker Inference Recommender to find the optimal instance type and count
B.Enable auto-scaling to adjust the number of instances based on demand
C.Create a CloudWatch dashboard to monitor endpoint latency
D.Use SageMaker Managed Spot Training for endpoint instances
E.Purchase SageMaker Savings Plans for a discounted rate
AnswersA, B, E

Inference Recommender provides recommendations to avoid over-provisioning.

Why this answer

SageMaker Inference Recommender runs load tests against your model to generate instance type and count recommendations that balance performance and cost. By selecting the optimal configuration, you avoid over-provisioned instances that waste money or under-provisioned ones that degrade user experience, directly improving cost efficiency.

Exam trap

The trap here is that candidates confuse monitoring (Option C) with cost optimization, or they mistakenly apply Spot Training (Option D) to inference endpoints, not realizing that Spot instances are only supported for training and not for real-time inference due to interruption risk.

583
MCQeasy

A data science team deploys a machine learning model to a SageMaker endpoint for real-time inference. They need to monitor the model for feature distribution drift over time to ensure the model's predictions remain accurate. Which AWS service should they use?

A.Amazon CloudWatch Evidently
B.AWS Glue DataBrew
C.SageMaker Clarify
D.SageMaker Model Monitor
E.SageMaker Debugger
AnswerD

Correct. SageMaker Model Monitor monitors data and model quality, including drift detection.

Why this answer

SageMaker Model Monitor is the correct service because it is specifically designed to continuously monitor machine learning models deployed to SageMaker endpoints for data quality issues, including feature distribution drift. It automatically captures inference data, computes statistics against a baseline, and triggers alerts when drift is detected, ensuring the model's predictions remain accurate over time.

Exam trap

The trap here is confusing SageMaker Model Monitor with SageMaker Clarify or Debugger, as candidates often misattribute drift monitoring to Clarify's bias detection or Debugger's training-time analysis, but only Model Monitor handles post-deployment feature drift.

How to eliminate wrong answers

Option A is wrong because Amazon CloudWatch Evidently is a feature flag and A/B testing service, not designed for monitoring feature distribution drift in ML models. Option B is wrong because AWS Glue DataBrew is a visual data preparation tool for cleaning and normalizing data, not for monitoring model drift. Option C is wrong because SageMaker Clarify is used for bias detection and explainability of model predictions, not for continuous drift monitoring.

Option E is wrong because SageMaker Debugger is used for debugging training jobs by monitoring system and model metrics during training, not for monitoring inference data drift post-deployment.

584
MCQeasy

A machine learning engineer needs to split a dataset for binary classification where the positive class represents only 2% of the data. Which data splitting strategy ensures that both training and test sets maintain the same class proportion as the original dataset?

A.Stratified sampling based on the target variable
B.Time-series split respecting the timestamp order
C.Simple random split with a 80/20 ratio
D.K-fold cross-validation without stratification
AnswerA

Stratified sampling ensures each fold retains the same class proportion as the full dataset.

Why this answer

Stratified splitting preserves the original class distribution in each split, which is critical for imbalanced datasets.

585
Multi-Selectmedium

A data scientist is training a binary classification model using Amazon SageMaker. The dataset is highly imbalanced (95% negative class, 5% positive class). The model is evaluated on a held-out test set, and the F1 score is 0.12. The data scientist wants to improve the F1 score. Which two actions should the data scientist take? (Choose two.)

Select 2 answers
A.Reduce the model complexity by decreasing the number of layers in a deep neural network.
B.Apply SMOTE (Synthetic Minority Oversampling Technique) to the training data using a preprocessing script in SageMaker Processing.
C.Increase the decision threshold to reduce false positives.
D.Use recall as the primary evaluation metric instead of F1.
E.Set the `scale_pos_weight` parameter in the SageMaker XGBoost estimator to the ratio of negative to positive samples.
AnswersB, E

Correct: SMOTE generates synthetic samples of the minority class, balancing the dataset and improving F1.

Why this answer

SMOTE generates synthetic samples for the minority class by interpolating between existing minority instances, which directly addresses the class imbalance by creating a more balanced training set. This increases the model's exposure to positive examples, improving recall and precision, and thus the F1 score. Using SageMaker Processing allows this preprocessing step to be integrated into the ML pipeline efficiently.

Exam trap

The trap here is that candidates often confuse threshold tuning with addressing imbalance directly, not realizing that adjusting the threshold without rebalancing the data or weighting classes typically fails to improve F1 score because it does not change the underlying model's learned distribution.

586
MCQeasy

A company is using SageMaker Pipelines to automate a multi-step ML workflow. The pipeline includes data preprocessing, training, and model evaluation. The team wants to ensure that if the evaluation step fails, the pipeline stops and sends an alert to the operations team. Which SageMaker Pipelines feature should they use?

A.Configure an Amazon CloudWatch Events rule to monitor the pipeline execution status and stop it if the evaluation step fails
B.Register the model in the Model Registry only if evaluation passes, and configure the pipeline to stop if registration fails
C.Add a Lambda step after the evaluation step that checks the evaluation metrics and sends an SNS notification if the metrics are below a threshold
D.Use a Condition step to check the evaluation result and route to a Fail step if the result indicates failure
AnswerD

Condition step allows branching; a Fail step terminates the pipeline and can trigger notifications via SNS.

Why this answer

SageMaker Pipelines provides a built-in Condition step that evaluates a boolean expression (e.g., checking if evaluation metrics meet a threshold) and then routes execution to different steps. If the condition fails, you can direct the pipeline to a Fail step, which immediately stops the pipeline and marks it as failed. This is the native, event-driven way to halt a pipeline based on step output without relying on external services.

Exam trap

The trap here is that candidates often confuse external monitoring (CloudWatch) or post-step actions (Lambda) with native pipeline control flow, missing that SageMaker Pipelines has a dedicated Condition step for conditional branching and halting execution.

How to eliminate wrong answers

Option A is wrong because CloudWatch Events rules can monitor pipeline state changes but cannot stop a running pipeline; they can only trigger notifications or invoke other actions after the fact. Option B is wrong because registering a model in the Model Registry is an optional downstream step, not a mechanism to stop the pipeline; if registration fails, the pipeline would still continue to subsequent steps unless explicitly handled. Option C is wrong because a Lambda step can send SNS notifications but does not have the ability to halt the pipeline execution; it would only alert after the step completes, not prevent further steps from running.

587
Multi-Selecteasy

A data science team uses SageMaker to train models. They need to track the lineage of each model, including the dataset used, training job, and hyperparameters. Which TWO SageMaker features can they use together? (Select TWO.)

Select 2 answers
A.SageMaker SDK
B.SageMaker Model Registry
C.SageMaker ML Lineage Tracking
D.SageMaker Pipelines
E.SageMaker Experiments
AnswersA, C

The SDK automatically creates lineage entities when used with SageMaker training jobs.

Why this answer

SageMaker ML Lineage Tracking captures the relationships between artifacts, actions, and contexts. SageMaker SDK automates lineage tracking when using the SDK for training jobs. SageMaker Experiments can also be used to track runs, but lineage tracking is specifically for provenance.

588
Multi-Selecthard

Which THREE steps should be taken to optimize a large-scale distributed training job on SageMaker? (Choose 3.)

Select 3 answers
A.Attach multiple EBS volumes with throughput provisioning.
B.Use GPU instances with high bandwidth and memory (e.g., ml.p4d.24xlarge).
C.Enable batch transform for offline inference after training.
D.Use Elastic Fabric Adapter (EFA) for low-latency inter-node communication.
E.Select the appropriate distributed training strategy (e.g., Horovod, SageMaker data parallel, or model parallel).
AnswersB, D, E

GPU instances are necessary for large model training.

Why this answer

GPU instances like ml.p4d.24xlarge provide high-bandwidth GPU memory and NVLink inter-GPU connectivity, which are essential for large-scale distributed training. These instances reduce communication bottlenecks and allow larger batch sizes, directly improving throughput and model convergence speed.

Exam trap

The trap here is that candidates confuse storage optimization (EBS) or inference features (batch transform) with training optimization, failing to recognize that distributed training performance hinges on compute, memory, and inter-node communication, not disk I/O or post-training steps.

589
MCQhard

A data science team uses SageMaker Pipelines to orchestrate their ML workflow. They noticed that even when source data hasn't changed, the pipeline re-runs all steps, wasting compute time. What should they enable to avoid redundant runs?

A.Enable pipeline caching by setting the CacheConfig property for each step
B.Configure the pipeline to run on a schedule instead of on-demand
C.Use the Parameter step to pass previous execution ID
D.Use Lambda step to check data changes before running
AnswerA

Caching causes the pipeline to skip steps if inputs and configuration haven't changed, saving time and cost.

Why this answer

SageMaker Pipelines supports step caching via the `CacheConfig` property. When enabled, the pipeline checks if the step's inputs (including source data, parameters, and code) have changed since the last successful run. If no changes are detected, the step is skipped and the previous output is reused, eliminating redundant compute.

Exam trap

The trap here is that candidates may think caching requires external logic (like a Lambda step) or scheduling, when SageMaker Pipelines has a native `CacheConfig` property that directly addresses redundant runs with minimal configuration.

How to eliminate wrong answers

Option B is wrong because scheduling the pipeline does not prevent redundant runs; it only triggers execution at fixed intervals, which could still re-run all steps even when data hasn't changed. Option C is wrong because passing a previous execution ID via a Parameter step does not enable caching; it merely provides a reference but does not automatically skip unchanged steps. Option D is wrong because using a Lambda step to check data changes before running adds custom logic but is not a built-in mechanism for step-level caching; SageMaker Pipelines already provides `CacheConfig` for this purpose, making a Lambda workaround unnecessary and less efficient.

590
MCQmedium

A company is building a time series forecasting model using SageMaker DeepAR. The raw data is a CSV with columns: timestamp, item_id, and value. What is the correct data format required for DeepAR training?

A.JSON Lines files with 'start', 'target', and optional fields per time series
B.A wide-format CSV where each column is a different time series
C.Parquet files with a schema containing timestamp, item_id, and value
D.A single CSV file with columns: timestamp, item_id, value
AnswerA

DeepAR's training data format is JSON Lines with start timestamp and target array.

Why this answer

DeepAR requires time series data to be provided in JSON Lines format, where each line represents a single time series with a 'start' timestamp (in ISO 8601 format), a 'target' array of values, and optional fields like 'cat' for categorical features. This structured format allows DeepAR to handle variable-length sequences and missing values natively, which is not possible with simple CSV or wide-format data.

Exam trap

The trap here is that candidates assume DeepAR can accept raw CSV data like other SageMaker built-in algorithms (e.g., XGBoost), but DeepAR is a specialized time series algorithm that requires a specific JSON Lines structure with 'start' and 'target' fields, not a simple tabular format.

How to eliminate wrong answers

Option B is wrong because wide-format CSV (each column as a separate time series) is not supported by DeepAR; it expects each time series to be a separate JSON object, not columns. Option C is wrong because Parquet files are not a native input format for DeepAR; the built-in algorithm specifically requires JSON Lines or RecordIO-protobuf format. Option D is wrong because a single CSV with timestamp, item_id, and value columns does not provide the 'start' and 'target' structure DeepAR needs; it would require significant preprocessing to group by item_id and convert to the required JSON Lines format.

591
MCQeasy

A data scientist is preparing a dataset for a machine learning model that predicts customer churn. The dataset contains a column 'CustomerID' that is a unique identifier. What should the data scientist do with this column before training the model?

A.Keep the column as a feature because it uniquely identifies each customer.
B.Use the column as the target variable.
C.Remove the column from the feature set.
D.Encode the column using one-hot encoding.
AnswerC

Removing unique identifiers prevents overfitting and is standard practice.

Why this answer

'CustomerID' is a unique identifier with no predictive power for churn. Including it as a feature would cause the model to memorize individual customers rather than learn generalizable patterns, leading to overfitting and poor performance on unseen data. In machine learning, such columns should be removed during data preparation to ensure the model learns from meaningful features.

Exam trap

The trap here is that candidates may think unique identifiers are useful for tracking or that they can be encoded as categorical features, but the exam tests the principle that identifiers with no predictive relationship to the target must be removed to avoid overfitting and data leakage.

How to eliminate wrong answers

Option A is wrong because keeping 'CustomerID' as a feature introduces a high-cardinality categorical variable with no correlation to the target, which can cause overfitting and degrade model generalization. Option B is wrong because the target variable for churn prediction should be a binary or categorical label indicating churn status, not a unique identifier that has no relationship to the outcome. Option D is wrong because one-hot encoding a unique identifier like 'CustomerID' would create thousands of sparse binary columns, dramatically increasing dimensionality without adding any predictive value, and is computationally wasteful.

592
MCQmedium

Refer to the exhibit. A SageMaker Processing job fails with the following error log. Which change during data preparation would resolve the issue?

A.In SageMaker Data Wrangler, set the 'age' column type to 'number'
B.Drop rows with missing values in the 'age' column before training
C.Remove the 'age' column from the dataset entirely
D.Modify the preprocessing script to cast 'age' to float using astype(float)
AnswerD

Casting the column ensures numeric operations work.

Why this answer

The error log indicates a type mismatch when processing the 'age' column, likely due to mixed data types (e.g., strings and numbers) in a column expected to be numeric. By explicitly casting the column to float using astype(float) in the preprocessing script, you ensure consistent numeric type handling, which resolves the failure during SageMaker Processing job execution.

Exam trap

The trap here is that candidates often assume missing value handling (Option B) or column removal (Option C) is the fix, when the actual issue is a data type inconsistency that requires explicit type casting in the preprocessing code.

How to eliminate wrong answers

Option A is wrong because setting the 'age' column type to 'number' in SageMaker Data Wrangler only affects the visual interface and exported recipe, but does not enforce type casting in the actual processing script, so the underlying data type mismatch persists. Option B is wrong because dropping rows with missing values does not address the core issue of mixed data types (e.g., strings like 'N/A' or 'unknown') in the 'age' column; the error is about type conversion, not missing values. Option C is wrong because removing the 'age' column entirely discards potentially valuable feature data and does not solve the type mismatch problem; it is an overly aggressive workaround that reduces model performance.

593
Multi-Selecthard

A data scientist is using SageMaker Experiments to track multiple training runs. They want to compare runs based on the objective metric and visualize performance. Which THREE steps should they perform? (Choose THREE.)

Select 3 answers
A.Deploy the best model to an endpoint
B.Use SageMaker Studio Experiments UI to list and compare trials
C.Log hyperparameters and metrics using the SageMaker SDK
D.Create a SageMaker Experiment
E.Enable SageMaker Model Monitor for each run
AnswersB, C, D

The UI provides visualization and comparison.

Why this answer

To track and compare runs, you create an experiment, log parameters and metrics, and then use the Experiments UI or SDK to list and compare trials.

594
MCQeasy

A company wants to deploy a machine learning model that was trained on-premises using TensorFlow. The model is a TensorFlow SavedModel. The company uses AWS and wants to minimize operational overhead. Which deployment option meets these requirements?

A.Deploy the model on Amazon ECS using a custom Docker image.
B.Deploy the model as an AWS Lambda function with the TensorFlow runtime.
C.Deploy the model using Amazon SageMaker Studio.
D.Deploy the model using Amazon SageMaker with a TensorFlow inference container.
AnswerD

SageMaker provides pre-built TensorFlow containers and manages the endpoint, reducing operational overhead.

Why this answer

Amazon SageMaker provides a fully managed TensorFlow inference container that directly supports TensorFlow SavedModel format, enabling deployment without any custom infrastructure management. This minimizes operational overhead compared to self-managed options like ECS or Lambda, as SageMaker handles scaling, load balancing, and model updates automatically.

Exam trap

AWS often tests the distinction between SageMaker Studio (an IDE) and SageMaker hosting (deployment endpoints), leading candidates to mistakenly select Studio as a deployment option when it is only for development and experimentation.

How to eliminate wrong answers

Option A is wrong because deploying on Amazon ECS with a custom Docker image requires you to build, maintain, and scale the container infrastructure yourself, increasing operational overhead. Option B is wrong because AWS Lambda has a maximum deployment package size limit (250 MB unzipped) and a 15-minute timeout, making it unsuitable for large TensorFlow SavedModels or inference requests that require significant compute. Option C is wrong because Amazon SageMaker Studio is an integrated development environment (IDE) for building, training, and debugging models, not a deployment target; the actual deployment would still require creating an endpoint, which is covered by Option D.

595
Multi-Selecthard

A company is deploying a machine learning model using Amazon SageMaker. The model is a large deep learning model that requires GPU for inference. The company expects unpredictable traffic patterns with occasional bursts. They want to minimize cost while ensuring low latency during bursts. Which TWO actions should they take? (Select TWO.)

Select 2 answers
A.Use a serverless endpoint configuration to automatically scale.
B.Use a multi-model endpoint with a mix of CPU and GPU instances to handle variable traffic.
C.Use Spot instances for the endpoint to reduce cost.
D.Provision multiple on-demand GPU instances behind a load balancer.
E.Use Amazon SageMaker Elastic Inference to attach GPU acceleration to a CPU instance.
AnswersB, E

Multi-model endpoints allow efficient resource utilization and cost savings.

Why this answer

A multi-model endpoint with a mix of CPU and GPU instances allows the company to host multiple models on the same endpoint, reducing cost by sharing underlying instances. By including GPU instances, the endpoint can handle the GPU-intensive deep learning inference for the large model, while the CPU instances can serve lighter loads or fallback traffic, ensuring low latency during unpredictable bursts without over-provisioning.

Exam trap

The trap here is that candidates often confuse serverless endpoints with GPU support, not realizing that SageMaker serverless endpoints are CPU-only, and they may overlook that multi-model endpoints can mix instance types to balance cost and performance for bursty GPU workloads.

596
MCQhard

A machine learning engineer deploys a new model version to a SageMaker endpoint with production variants. They want to gradually shift traffic from the old model to the new model, monitoring for errors, and automatically roll back if the error rate exceeds 5%. Which deployment pattern should they use?

A.Canary deployment with CloudWatch alarms
B.A/B testing with traffic splitting
C.Blue/green deployment
D.Shadow testing
AnswerA

Why this answer

Canary deployments gradually shift traffic and allow automated rollback based on CloudWatch alarms. Blue/green switches all at once. A/B testing is for comparing variants.

Shadow testing mirrors traffic but doesn't serve the new model to users.

597
MCQeasy

A data scientist wants to quickly build a binary classification model without writing any code. Which SageMaker feature is MOST suitable?

A.SageMaker Debugger
B.SageMaker Model Monitor
C.SageMaker Ground Truth
D.SageMaker Autopilot
AnswerD
598
MCQhard

A team uses SageMaker Pipelines to retrain a model nightly. They want to skip the training step if the new data is unchanged (same checksum as previous run) to save cost and time. Which pipeline configuration achieves this?

A.Enable pipeline caching on the training step
B.Use a Lambda step to check data before running the training step
C.Use a ConditionStep that compares the current data checksum to the previous run's checksum, and branch to a NoOp step if unchanged
D.Set the training step's CacheConfig with a TTL of 24 hours
AnswerC

This allows skipping the training step dynamically based on data content changes.

Why this answer

SageMaker Pipelines' ConditionStep allows you to evaluate a condition—such as comparing the current data checksum to a stored previous checksum—and branch accordingly. If the checksums match, you can route to a NoOp step (which does nothing) instead of executing the training step, thereby skipping the training and saving cost and time. This is the native, recommended pattern for conditional execution in SageMaker Pipelines.

Exam trap

The trap here is that candidates confuse pipeline caching (which caches based on step input parameters) with conditional branching based on external data state, leading them to pick Option A or D, which do not actually evaluate data checksums.

How to eliminate wrong answers

Option A is wrong because pipeline caching in SageMaker reuses a step's output only if the step's input parameters and source code are unchanged; it does not evaluate external data checksums, so it would not detect unchanged new data. Option B is wrong because a Lambda step can check the data, but it cannot directly skip the training step; you would still need a ConditionStep to branch based on the Lambda's result, making the Lambda step redundant and adding unnecessary complexity. Option D is wrong because CacheConfig with a TTL of 24 hours caches the step's output for that duration regardless of data changes, which would incorrectly skip training even if the data had changed within the TTL window, and it does not compare checksums.

599
Multi-Selecthard

A team wants to ensure that their SageMaker training jobs cannot access the internet for security reasons. However, they need to download a public PyTorch package for training. Which TWO steps should they take? (Choose TWO.)

Select 2 answers
A.Configure the training job to run in VPC-only mode
B.Use a public subnet for the training job
C.Disable network isolation for the training job
D.Attach a NAT Gateway to the VPC to allow outbound internet
E.Create an S3 VPC interface endpoint to access S3 privately
AnswersA, E

VPC-only blocks internet access.

Why this answer

Enabling VPC-only mode (also known as network isolation) for a SageMaker training job ensures the job runs within a specified VPC and cannot access the internet. This satisfies the security requirement of blocking internet access. Option E is correct because creating an S3 VPC interface endpoint allows the training job to download the public PyTorch package from S3 privately, using AWS PrivateLink, without traversing the internet.

Exam trap

The trap here is that candidates often confuse 'no internet access' with 'no network access at all,' and incorrectly assume that disabling network isolation or using a NAT Gateway is necessary for downloading packages, when in fact private connectivity via VPC endpoints is the correct approach.

600
MCQhard

A financial services company must deploy a SageMaker endpoint that processes sensitive customer data. They require that all traffic between the endpoint and the model containers be encrypted, and that the endpoint cannot be accessed from outside a specific VPC. Which combination of settings should they use?

A.Use a private VPC and enable data encryption at rest using KMS
B.Enable inter-container traffic encryption and configure the endpoint with VPC-only mode
C.Enable network isolation mode and inter-container traffic encryption
D.Deploy the endpoint in a private subnet and use a VPC endpoint for SageMaker API
AnswerB

VPC-only mode makes the endpoint only accessible from the VPC, and inter-container traffic encryption encrypts data between containers.

Why this answer

Inter-container traffic encryption ensures that data between the SageMaker endpoint and the model containers is encrypted in transit, typically using TLS. Configuring the endpoint with VPC-only mode restricts all inference traffic to the specified VPC, preventing any access from outside that VPC. This combination directly addresses the requirements for encrypted inter-container traffic and VPC-restricted access.

Exam trap

The trap here is confusing network isolation mode with inter-container traffic encryption and VPC-only mode, as candidates often assume network isolation alone secures all traffic and access, but it does not encrypt inter-container communication or restrict inbound endpoint access to a VPC.

How to eliminate wrong answers

Option A is wrong because enabling data encryption at rest using KMS only protects stored data, not traffic between the endpoint and model containers, and using a private VPC alone does not enforce VPC-only mode for endpoint access. Option C is wrong because network isolation mode prevents the model container from accessing the internet but does not encrypt inter-container traffic nor restrict endpoint access to a specific VPC. Option D is wrong because deploying the endpoint in a private subnet and using a VPC endpoint for the SageMaker API controls API calls but does not encrypt inter-container traffic or enforce VPC-only mode for inference requests.

Page 7

Page 8 of 12

Page 9