Courseiva

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

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

Page 8

Page 9 of 23

Page 10
601
MCQhard

A data scientist is troubleshooting a failed SageMaker training job that uses a custom Docker image. The failure reason shows 'unrecognized arguments: --sagemaker_program'. What is the most likely cause?

A.The Docker image is tagged incorrectly and cannot be pulled
B.The training job is in a different region than the ECR repository
C.The input mode is File mode, but the container expects Pipe mode
D.The custom Docker image does not use the SageMaker training toolkit and thus does not accept SageMaker hyperparameters
AnswerD

Custom containers that are not toolkit-based ignore SageMaker hyperparameters, causing unrecognized argument errors if the entry point tries to parse them.

Why this answer

The error 'unrecognized arguments: --sagemaker_program' indicates that the custom Docker image does not include the SageMaker Training Toolkit. The SageMaker Training Toolkit is a Python library that provides a default entry point to parse and handle SageMaker-specific hyperparameters (like --sagemaker_program, --sagemaker_submit_directory, etc.). Without this toolkit, the container's entry point does not recognize these arguments, causing the training job to fail.

Exam trap

The trap here is that candidates often confuse container-level errors (like pull failures or region mismatches) with argument parsing errors, failing to recognize that the SageMaker Training Toolkit is required to handle SageMaker-specific CLI arguments.

How to eliminate wrong answers

Option A is wrong because if the Docker image were tagged incorrectly or could not be pulled, the error would be an ECR pull failure (e.g., 'CannotPullContainerError' or 'RepositoryNotFoundException'), not an argument parsing error. Option B is wrong because a region mismatch between the training job and the ECR repository would result in a 'RepositoryNotFoundException' or access denied error, not an unrecognized argument error. Option C is wrong because the input mode (File vs.

Pipe) affects how data is ingested (e.g., via SM_INPUT_FILE or SM_INPUT_PIPE environment variables), but it does not affect the parsing of command-line hyperparameters like --sagemaker_program.

602
Multi-Selecthard

A company is deploying a machine learning model on SageMaker for real-time inference. The model requires GPU for low latency. Which THREE steps are necessary to set up the endpoint?

Select 3 answers
A.Train the model using a SageMaker training job
B.Create a SageMaker batch transform job
C.Create a SageMaker model object that points to the S3 bucket containing the model artifacts and the inference container image
D.Create an endpoint configuration specifying the instance type (e.g., ml.p3.2xlarge) and initial instance count
E.Create a SageMaker endpoint using the endpoint configuration
AnswersC, D, E

A model object is required to deploy an endpoint.

Why this answer

To deploy a model for real-time inference on SageMaker, you must first create a SageMaker model object that references the model artifacts stored in S3 and the inference container image (e.g., a GPU-enabled Docker image). This object is the foundational resource that SageMaker uses to launch instances for serving predictions.

Exam trap

The MLS-C01 exam often tests the distinction between batch transform and real-time endpoints, and candidates mistakenly think a batch transform job is required for deploying a real-time endpoint, but it is only for offline inference.

603
MCQmedium

A company is using Amazon SageMaker to train a deep learning model on a large dataset stored in S3. The training job is failing with an OutOfMemory error. The data scientist wants to minimize cost while resolving the issue. Which action should the data scientist take?

A.Increase the instance type to one with more memory.
B.Use the 'auto' setting for the input mode.
C.Reduce the batch size hyperparameter.
D.Change the input mode from 'File' to 'Pipe'.
AnswerD

Pipe mode streams data, reducing memory footprint.

Why this answer

The OutOfMemory error occurs because the 'File' input mode downloads the entire training dataset to the instance's local storage before training begins, consuming significant memory. Switching to 'Pipe' mode streams data directly from S3 to the training algorithm, reducing memory footprint and avoiding the need for larger instances. This minimizes cost by using the existing instance type while resolving the memory issue.

Exam trap

The trap here is that candidates may assume reducing the batch size (Option C) is the standard fix for memory issues, but they overlook that the 'File' input mode's full dataset download is the primary cause, and 'Pipe' mode directly addresses this without additional cost.

How to eliminate wrong answers

Option A is wrong because increasing the instance type to one with more memory would resolve the error but at a higher cost, contradicting the goal to minimize cost. Option B is wrong because the 'auto' setting for input mode does not exist in SageMaker; the valid input modes are 'File' and 'Pipe', and 'auto' is not a recognized configuration. Option C is wrong because reducing the batch size hyperparameter may reduce memory usage per step but does not address the root cause of the dataset being fully loaded into memory in 'File' mode, and it could negatively impact model convergence or training time.

604
MCQmedium

Refer to the exhibit. An administrator has attached this IAM policy to a user. The user tries to start a SageMaker training job that uses a custom Docker image from Amazon ECR. The training job fails with an access denied error. What is the MOST likely reason?

A.The s3:* action is too permissive and should be scoped.
B.The policy is missing ecr:GetDownloadUrlForLayer and ecr:BatchGetImage.
C.The iam:PassRole permission is missing the SageMaker service principal.
D.The sagemaker:* action should be restricted to specific resources.
AnswerB

ECR permissions are required to pull the custom image.

Why this answer

The IAM policy grants sagemaker:* and s3:* actions but does not include the specific ECR permissions required to pull a custom Docker image. When SageMaker launches a training job with a custom image, it needs ecr:GetDownloadUrlForLayer and ecr:BatchGetImage to authenticate and download the image layers from Amazon ECR. Without these permissions, the training job fails with an access denied error.

Exam trap

The trap here is that candidates assume full sagemaker:* and s3:* permissions are sufficient, overlooking the specific ECR permissions required when using a custom Docker image from a private repository.

How to eliminate wrong answers

Option A is wrong because the s3:* action being too permissive would not cause an access denied error for starting a training job; overly permissive policies do not block actions. Option C is wrong because the iam:PassRole permission is not missing the SageMaker service principal; the policy includes 'iam:PassRole' with 'Service': ['sagemaker.amazonaws.com'], which is correctly scoped. Option D is wrong because restricting sagemaker:* to specific resources is a best practice for least privilege but is not required for the job to start; the broad sagemaker:* action does not cause an access denied error.

605
MCQhard

Refer to the exhibit. A data scientist is trying to run a SageMaker training job using a script that reads training data from 's3://my-bucket/training/data.csv'. The job fails with an access denied error. What is the MOST likely reason?

A.The S3 bucket policy may deny access, or the IAM role lacks necessary permissions beyond GetObject.
B.The training job is running in a VPC without S3 VPC endpoint.
C.The sagemaker:CreateTrainingJob action is not allowed on the specific resource.
D.The S3 path is incorrectly formatted.
AnswerA

Common reason: the training script may need to list the bucket or access other prefixes, or a bucket policy denies the request.

Why this answer

The most likely reason for the access denied error is that the S3 bucket policy may deny access, or the IAM role used by SageMaker lacks the necessary permissions beyond s3:GetObject. The script reads from a specific path, but the role might not have permissions to list the bucket or access other required objects. Option B is incorrect because the error is about access denied, not VPC endpoint configuration.

Option C is incorrect because the CreateTrainingJob action is allowed. Option D is incorrect because the S3 path is correctly formatted.

606
Multi-Selecthard

Which THREE of the following are appropriate methods to reduce overfitting in a decision tree model?

Select 3 answers
A.Increase the number of features considered for each split
B.Increase the maximum depth of the tree
C.Prune the tree after training
D.Set a minimum number of samples required to split an internal node
E.Limit the maximum depth of the tree
AnswersC, D, E

Pruning the tree after training removes branches that have little predictive power, reducing complexity and helping to generalize better, which reduces overfitting.

Why this answer

To reduce overfitting in a decision tree, we aim to decrease model complexity. Pruning the tree after training (C) removes branches that have little predictive power, thus simplifying the model. Setting a minimum number of samples required to split an internal node (D) prevents the tree from learning overly specific patterns from small subsets.

Limiting the maximum depth of the tree (E) restricts the number of splits, reducing complexity. On the other hand, increasing the number of features considered for each split (A) can make the tree more prone to overfitting by including more irrelevant features, and increasing the maximum depth (B) allows the tree to grow deeper and capture noise, both of which increase overfitting.

607
MCQeasy

Refer to the exhibit. What is the recall of the model?

A.0.85
B.0.80
C.0.89
D.0.90
AnswerB

Recall = 80/(80+20) = 0.80.

Why this answer

Recall is calculated as True Positives divided by the sum of True Positives and False Negatives. From the confusion matrix, True Positives = 80 and False Negatives = 20, so recall = 80 / (80 + 20) = 0.80. Option B is correct.

Exam trap

The MLS-C01 exam often tests the distinction between recall and precision, where candidates mistakenly compute precision (TP/(TP+FP)) instead of recall, leading to option A (0.85).

How to eliminate wrong answers

Option A (0.85) is wrong because it incorrectly uses True Positives divided by the sum of True Positives and False Positives (80/94 ≈ 0.85), which is precision, not recall. Option C (0.89) is wrong because it likely results from dividing True Positives by the total number of predictions (80/90 ≈ 0.89), which is accuracy. Option D (0.90) is wrong because it might come from dividing True Positives by the sum of True Positives and False Positives plus False Negatives (80/100 = 0.80, not 0.90), or from a miscalculation such as using True Negatives incorrectly.

608
MCQeasy

During exploratory data analysis, a machine learning engineer finds that a dataset has a significant number of missing values in a categorical feature with 10 levels. Which approach should they take to handle these missing values before modeling?

A.Impute missing values with the mean of the feature.
B.Create a new category labeled 'Missing' for missing values.
C.Drop all rows with missing values.
D.Impute missing values with the mode of the feature.
AnswerB

Preserves the missingness pattern and avoids bias.

Why this answer

Creating a separate 'Missing' category preserves the missingness pattern and avoids data loss or bias from imputation for categorical features. Option A is incorrect because mean imputation is for numerical features, not categorical. Option C is incorrect because dropping all rows with missing values may discard valuable data and reduce sample size.

Option D is incorrect because mode imputation may introduce bias if missingness is not random.

609
MCQmedium

A data scientist is building a recommendation system for an e-commerce platform. The dataset includes user-item interactions (clicks, purchases, ratings). The scientist wants to use matrix factorization. Which approach is most appropriate for handling implicit feedback (e.g., clicks) rather than explicit ratings?

A.Use k-means clustering to segment users and then use item popularity within clusters
B.Use singular value decomposition (SVD) on the interaction matrix with missing values filled with 0
C.Use a deep neural network with a softmax output to predict item probabilities
D.Use weighted alternating least squares (WALS) with confidence weights
AnswerD

WALS is specifically designed for implicit feedback by assigning confidence to observed and unobserved interactions.

Why this answer

Weighted Alternating Least Squares (WALS) is specifically designed for implicit feedback scenarios because it treats unobserved interactions as negative signals with low confidence, rather than missing values. By assigning confidence weights (e.g., based on click frequency or dwell time), WALS can factorize the implicit feedback matrix effectively, avoiding the bias introduced by treating all zeros as true negatives.

Exam trap

The trap here is that candidates often assume SVD (Option B) is the standard matrix factorization method, but they overlook that SVD requires a complete matrix and treats zeros as missing, which is invalid for implicit feedback where zeros carry meaning.

How to eliminate wrong answers

Option A is wrong because k-means clustering followed by item popularity ignores the collaborative signal between users and items, and does not learn latent factors that capture nuanced preferences. Option B is wrong because SVD requires a dense matrix and assumes missing values are zero, which is inappropriate for implicit feedback where zeros can mean either no interaction or negative preference, leading to poor factorization. Option C is wrong because while a deep neural network with softmax can predict item probabilities, it is not the most appropriate or efficient approach for implicit feedback matrix factorization; WALS is a simpler, proven method that directly handles the implicit feedback structure without overfitting or requiring extensive hyperparameter tuning.

610
MCQhard

A data scientist is using Amazon SageMaker Autopilot to automatically build a model for a regression problem. The dataset has 100 features and 50,000 rows. Autopilot recommends a model with an R² of 0.85 on the validation set. However, when deployed to production, the model performs poorly (R² of 0.2). What is the most likely cause?

A.The model is overfitting to the training data
B.The production data distribution has shifted from the training data distribution
C.The model is underfitting due to insufficient training
D.Autopilot selected the wrong features
AnswerB

Data drift causes model performance to degrade in production.

Why this answer

A large discrepancy between validation and production performance often indicates data drift. Option A (overfitting) is possible but less likely given validation performance. Option C (feature importance) is not the direct cause.

Option D (Autopilot bug) is rare.

611
MCQeasy

A company uses SageMaker to deploy a model for predicting customer churn. The model was trained on historical data and achieves 85% accuracy on the test set. After deployment, the model's predictions are significantly worse on new data due to changes in customer behavior. What is the MOST likely cause?

A.Data leakage during training
B.The training dataset was too small
C.Concept drift in the underlying data distribution
D.The model is overfitting to the training data
AnswerC

Changes in customer behavior cause concept drift, reducing model accuracy over time.

Why this answer

The model's performance degradation on new data, despite high accuracy on the test set, is a classic symptom of concept drift. Concept drift occurs when the statistical properties of the target variable (customer churn) change over time due to shifts in customer behavior, making the trained model's decision boundary obsolete. SageMaker deployed the model as a persistent endpoint, but the underlying data distribution has evolved, so the model no longer generalizes to the current environment.

Exam trap

The trap here is that candidates confuse concept drift with overfitting, assuming any performance drop after deployment must be due to the model memorizing noise, but the key differentiator is the temporal nature of the degradation tied to changing customer behavior, not a static training-data issue.

How to eliminate wrong answers

Option A is wrong because data leakage would inflate test set accuracy artificially, but the model would fail immediately on new data—not after a period of deployment—and the scenario describes a gradual change in customer behavior, not a training flaw. Option B is wrong because a small training dataset typically causes high bias or variance, leading to poor accuracy on both test and new data, whereas here the model initially achieved 85% accuracy on the test set. Option D is wrong because overfitting would cause poor performance on the test set (not 85% accuracy) and would not explain a delayed degradation tied to changing customer behavior; overfitting is a static issue, not a temporal one.

612
MCQhard

A company is using Amazon Kinesis Data Analytics for Apache Flink to process real-time data. The data source is a Kinesis data stream, and the output is written to an S3 bucket. Recently, the processing latency has increased significantly. The team suspects that the Flink application is encountering backpressure. Which metric should the team monitor to confirm backpressure?

A.currentLowWatermark
B.busyTimeMsPerSecond
C.numberOfFailedCheckpoints
D.numRecordsInPerSecond
AnswerB

High busy time indicates operator is overloaded, causing backpressure.

Why this answer

The correct metric to confirm backpressure in a Flink application is `busyTimeMsPerSecond`. This metric measures the percentage of time a task is actively processing data versus waiting for input. A high `busyTimeMsPerSecond` value (close to 1000ms) indicates that the task is fully utilized and cannot keep up with the incoming data rate, which is the direct symptom of backpressure.

Other metrics like `currentLowWatermark` relate to event time progress, not backpressure.

Exam trap

The trap here is that candidates often confuse `currentLowWatermark` (event time progress) with backpressure detection, or they assume that a high input rate (`numRecordsInPerSecond`) automatically means backpressure, but backpressure is about the operator's inability to keep up, not just the volume of data.

How to eliminate wrong answers

Option A is wrong because `currentLowWatermark` tracks the progress of event time processing and is used for watermark alignment and out-of-order event handling, not for detecting backpressure. Option C is wrong because `numberOfFailedCheckpoints` indicates checkpoint failures, which can be a consequence of backpressure but are not a direct measure of backpressure itself; they could also result from other issues like state size or network failures. Option D is wrong because `numRecordsInPerSecond` shows the input rate but does not indicate whether the operator is struggling to process that rate; a high input rate alone does not confirm backpressure.

613
MCQmedium

The Glue job my-glue-job fails after a few successful runs. The error log shows 'Job run exceeds max concurrent runs limit'. The CloudFormation template is shown in the exhibit. What change should be made to allow multiple runs to execute concurrently?

A.Change the IAM role to one with more permissions
B.Increase the MaxRetries property to 3
C.Remove the --job-bookmark-option argument
D.Set the MaxConcurrentRuns property to 3
AnswerD

This allows up to 3 concurrent job runs.

Why this answer

The 'MaxConcurrentRuns' is set to 1, which prevents parallel executions. Setting it to a higher value (e.g., 3) allows concurrent runs. MaxRetries is for retry count, not concurrency.

Role and TempDir are not relevant.

614
MCQeasy

A data scientist runs the AWS CLI command shown in the exhibit. The output shows that job-2 failed. Which action should the data scientist take to diagnose the failure?

A.Check the CloudWatch Logs log group for job-2
B.Check the S3 bucket for any error logs uploaded by the training job
C.Run `aws sagemaker list-training-jobs --name-contains job-2` to get more details
D.Run `aws sagemaker describe-training-job --training-job-name job-2` to see the failure reason
AnswerD

DescribeTrainingJob includes a FailureReason field.

Why this answer

The `describe-training-job` API call returns a `FailureReason` field that provides the specific error message for a failed SageMaker training job. This is the most direct and efficient way to diagnose why job-2 failed, as it retrieves the exact failure reason from the SageMaker service without requiring additional log parsing or bucket inspection.

Exam trap

The trap here is that candidates assume CloudWatch Logs are always available for failed jobs, but SageMaker only writes to CloudWatch after the training container starts, so a pre-start failure (e.g., insufficient instance capacity) will have no logs, making `describe-training-job` the correct first diagnostic step.

How to eliminate wrong answers

Option A is wrong because CloudWatch Logs log groups for SageMaker training jobs are only created if the training job successfully starts and begins writing logs; if the job failed before that point (e.g., due to a resource limit or invalid input), no log group exists. Option B is wrong because SageMaker does not automatically upload error logs to an S3 bucket; only training output artifacts (like model artifacts) are uploaded, and error logs are not stored there by default. Option C is wrong because `list-training-jobs --name-contains job-2` only returns a list of training jobs matching the name filter with basic status information, not the detailed failure reason needed for diagnosis.

615
MCQmedium

A data science team uses Amazon SageMaker to train models on a large dataset stored in S3. The dataset is 500 GB in CSV format and is updated daily. The team wants to optimize data loading for training jobs to reduce I/O wait time. Which data ingestion strategy is MOST effective?

A.Use SageMaker File input mode and increase the EBS volume size to 1 TB.
B.Use SageMaker Pipe input mode to stream data directly from S3.
C.Convert the CSV files to Parquet format and use File input mode.
D.Load the data into an Amazon EFS file system and mount it to the training instance.
AnswerB

Pipe mode streams data on-the-fly, eliminating the need to download the full dataset, thus reducing I/O wait time.

Why this answer

SageMaker Pipe input mode streams data directly from S3 to the training algorithm without writing to the instance's EBS volume, eliminating disk I/O bottlenecks. This is especially effective for large datasets (500 GB) that are updated daily, as it reduces startup time and avoids the need to download the entire dataset before training begins.

Exam trap

The trap here is that candidates often assume converting to a columnar format like Parquet always improves performance, but they overlook that File input mode still requires a full download to disk, whereas Pipe mode avoids that entirely regardless of file format.

How to eliminate wrong answers

Option A is wrong because increasing the EBS volume size to 1 TB does not reduce I/O wait time; it only provides more storage space, and the data must still be downloaded from S3 to the EBS volume before training, which adds latency. Option C is wrong because while converting CSV to Parquet can improve read performance and reduce data size, using File input mode still requires the entire dataset to be downloaded to the instance's EBS volume before training starts, negating the benefit of reduced I/O wait time. Option D is wrong because mounting an Amazon EFS file system to the training instance introduces network file system latency and is not optimized for the high-throughput, low-latency data loading required for training jobs; SageMaker's built-in Pipe mode is designed specifically for this purpose.

616
MCQhard

A machine learning team is building a recommendation system for an e-commerce platform. They have user-item interaction data (clicks, purchases). They need to choose an algorithm that can capture both user and item latent factors and handle missing data. Which algorithm should they use?

A.Linear regression
B.Principal component analysis (PCA)
C.Matrix factorization
D.Convolutional neural network (CNN)
AnswerC

Matrix factorization learns latent factors and handles missing data.

Why this answer

Matrix factorization is the correct choice because it decomposes the user-item interaction matrix into lower-dimensional latent factors for users and items, capturing underlying patterns in preferences. It naturally handles missing data by learning from observed interactions only, making it ideal for recommendation systems with sparse data.

Exam trap

The trap here is that candidates may choose PCA because it also performs dimensionality reduction, but PCA cannot handle missing data or model user-item interactions for collaborative filtering, which is the core requirement of the question.

How to eliminate wrong answers

Option A is wrong because linear regression models a continuous target variable from features but cannot capture latent factors or handle missing data in a user-item matrix. Option B is wrong because PCA is an unsupervised dimensionality reduction technique that does not model user-item interactions or handle missing data; it requires a complete matrix and ignores the collaborative filtering structure. Option D is wrong because CNNs are designed for spatial data like images and are not suited for collaborative filtering or latent factor extraction from sparse interaction matrices.

617
MCQhard

A data scientist is training a deep learning model on SageMaker using a custom Docker container. The training job fails with an error indicating that the container exited with a non-zero status. The CloudWatch logs show 'FileNotFoundError: [Errno 2] No such file or directory: '/opt/ml/input/data/training/data.csv''. What is the most likely cause?

A.The container's Docker entry point is misconfigured.
B.The S3 data source path is incorrect or the data has not been uploaded.
C.The training script has a syntax error.
D.The model output path in the training job configuration is wrong.
AnswerB

Missing training data leads to FileNotFoundError.

Why this answer

The error indicates that the training data file 'data.csv' is missing at the expected container path '/opt/ml/input/data/training/'. This typically occurs when the S3 data source path specified in the training job configuration is incorrect or the data has not been uploaded to that S3 location. Option A is wrong because the error is about missing data, not the container entry point.

Option C is wrong because the error does not relate to training script syntax. Option D is wrong because the error does not mention model artifacts.

618
MCQeasy

A company uses AWS Lambda to process events from Amazon S3. The Lambda function transforms the data and writes results to another S3 bucket. Recently, the function has been failing due to timeout errors when processing large files. Which solution should the data engineer implement?

A.Increase the Lambda function memory and timeout limit
B.Increase the Lambda timeout to 15 minutes
C.Use S3 Batch Operations with a Lambda function to process objects
D.Use Amazon SQS to queue the events and process them in batches
AnswerC

Batch Operations can invoke Lambda for each object, handling large volumes.

Why this answer

S3 Batch Operations is designed to handle large-scale object processing by invoking a Lambda function asynchronously for each object, bypassing the synchronous invocation limits of S3 event notifications. This allows processing of large files without hitting Lambda's 15-minute timeout or memory constraints, as each object is processed independently and the operation can scale to billions of objects.

Exam trap

The trap here is that candidates assume increasing timeout or memory (Option A) is the universal fix for Lambda failures, but the real issue is the synchronous invocation model from S3 events, which S3 Batch Operations solves by decoupling the processing.

How to eliminate wrong answers

Option A is wrong because increasing memory and timeout only addresses symptoms of a single invocation limit, not the root cause of large file processing failures; Lambda's maximum timeout is 15 minutes regardless of memory. Option B is wrong because increasing timeout to 15 minutes is the maximum possible, but large files may still exceed this limit or cause memory exhaustion, and it does not solve the underlying issue of synchronous invocation constraints from S3 events. Option D is wrong because Amazon SQS queues events but does not change the per-invocation timeout or memory limits; batching events in SQS still results in individual Lambda invocations that can timeout on large files.

619
MCQeasy

A data scientist is training a binary classification model on imbalanced data (95% negative, 5% positive). The model achieves 95% accuracy but only 10% recall on the positive class. Which metric should be used to evaluate model performance?

A.F1 score
B.Accuracy
C.Recall
D.Precision
AnswerA

F1 score is the harmonic mean of precision and recall. It is appropriate for imbalanced datasets because it balances both metrics.

Why this answer

With imbalanced data (95% negative, 5% positive), accuracy is high despite poor positive class performance. The F1 score (harmonic mean of precision and recall) is a better metric because it captures both false positives and false negatives. Here, recall is only 10%, so even if precision is high, F1 score will be low, reflecting poor model quality.

620
MCQhard

A company needs to process sensitive data from multiple sources. They want to use AWS Glue to catalog and transform the data. Which feature should they use to ensure that sensitive columns are masked before the data is available for querying?

A.AWS Glue DataBrew
B.AWS Glue Studio
C.AWS Lake Formation
D.Amazon Macie
AnswerA

DataBrew allows data masking and cleansing interactively.

Why this answer

Glue DataBrew provides data masking and cleansing capabilities. Glue Studio is for building ETL jobs, but masking requires custom code. Lake Formation is for fine-grained access control, not masking.

Macie is for discovering sensitive data, not masking.

621
MCQeasy

A data scientist needs to train a machine learning model using a large dataset (500 GB) stored in an S3 bucket. The training will be performed on a SageMaker notebook instance. The data scientist wants to minimize data transfer costs and reduce training time. Which data ingestion approach should the data engineer recommend?

A.Use the SageMaker SDK to directly read the data from S3 during training without copying it to the notebook.
B.Copy the dataset to the notebook instance's attached EBS volume before training.
C.Load the dataset into an Amazon RDS database and query it from the notebook.
D.Mount the S3 bucket to the notebook instance using Amazon Elastic File System (EFS).
AnswerA

SageMaker can read data directly from S3, minimizing transfer and storage costs.

Why this answer

The SageMaker SDK allows training jobs to read data directly from S3 using the Pipe or File mode, which avoids copying the 500 GB dataset to the notebook instance's EBS volume. This minimizes data transfer costs (no egress from S3 to the notebook) and reduces training time by streaming data directly to the training container without intermediate storage.

Exam trap

The trap here is that candidates often assume they must copy data locally for faster access (Option B), not realizing that SageMaker's native S3 integration with Pipe mode is designed specifically to avoid that overhead and is the most cost-effective and performant approach for large datasets.

How to eliminate wrong answers

Option B is wrong because copying the entire 500 GB dataset to the notebook instance's EBS volume incurs high data transfer costs from S3 to the instance and consumes significant time for the copy operation, plus the EBS volume may be too small or require additional provisioning. Option C is wrong because loading 500 GB into Amazon RDS introduces unnecessary complexity, higher costs for database storage and I/O, and querying over the network adds latency, which is inefficient for large-scale ML training. Option D is wrong because mounting S3 via Amazon EFS is not a supported or practical approach; EFS is a separate NFS-based file system, not a direct S3 mount, and would require additional services like EFS File Sync or FUSE, adding cost and complexity without the native streaming benefits of SageMaker's S3 integration.

622
MCQeasy

A data scientist is analyzing a dataset of online retail transactions. The dataset contains 500,000 rows and 10 columns: 'TransactionID', 'CustomerID', 'ProductID', 'Quantity', 'UnitPrice', 'TransactionDate', 'PaymentMethod', 'ShippingAddress', 'Country', and 'TotalAmount'. The data scientist loads the data into a SageMaker notebook and performs initial EDA. The data scientist finds that 'UnitPrice' has a range from $0.01 to $10,000, with a mean of $50 and a median of $20. 'Quantity' ranges from -10 to 100, with negative values indicating returns. 'TotalAmount' is calculated as Quantity * UnitPrice. The data scientist also notices that 2% of the 'CustomerID' values are missing, and 1% of 'ProductID' values are missing. There are no missing values in other columns. The data scientist wants to clean the data and prepare it for customer segmentation. Which course of action is most appropriate?

A.Impute missing 'CustomerID' with the mean of 'CustomerID' and missing 'ProductID' with the mode.
B.Remove all rows with any missing values.
C.Keep negative 'Quantity' and treat them as errors; replace them with the median of positive quantities.
D.Remove rows with negative 'Quantity' to focus on purchases. Impute missing 'CustomerID' and 'ProductID' with a placeholder such as 'Unknown'.
AnswerD

Negative quantities are returns; imputing with 'Unknown' preserves rows.

Why this answer

The most appropriate approach. Negative quantities represent returns, which should be removed when analyzing purchase behavior for customer segmentation. Imputing missing 'CustomerID' and 'ProductID' with a placeholder like 'Unknown' retains data without guessing categorical values.

Option A is incorrect because mean imputation is not valid for categorical 'CustomerID'. Option B is incorrect because removing all rows with missing values would discard valuable data. Option C is incorrect because negative quantities are meaningful returns, not errors, and replacing them distorts the data.

623
MCQmedium

A company is using Amazon SageMaker to deploy a model for real-time inference. The model receives requests that are small but arrive in bursts. The data scientist wants to minimize latency and cost. Which deployment option is MOST appropriate?

A.Use a real-time endpoint with a single instance
B.Use a multi-model endpoint with auto-scaling
C.Use Amazon SageMaker Serverless Inference
D.Use a batch transform job triggered by a schedule
AnswerC

Serverless scales automatically and you pay only for inference duration.

Why this answer

Amazon SageMaker Serverless Inference is the most appropriate option because it automatically scales compute resources based on request volume, charges only for the compute time used during inference (per-millisecond billing), and has no idle costs. This matches the bursty, small-request pattern perfectly, minimizing both latency and cost without requiring manual instance management.

Exam trap

The trap here is that candidates often confuse 'multi-model endpoints' with 'serverless' and assume auto-scaling eliminates idle costs, but multi-model endpoints still require a minimum number of running instances, incurring continuous charges.

How to eliminate wrong answers

Option A is wrong because a single-instance real-time endpoint incurs continuous hourly costs even when idle, and cannot handle burst traffic without significant latency or throttling. Option B is wrong because a multi-model endpoint with auto-scaling still requires at least one running instance at all times, leading to idle costs and slower scaling compared to serverless. Option D is wrong because batch transform jobs are designed for offline, asynchronous processing of large datasets, not real-time inference, and cannot meet low-latency requirements.

624
MCQmedium

A team is training a deep learning model on Amazon SageMaker. The training job is slow because the data is stored in S3 as many small files. Which approach is MOST effective to improve training throughput?

A.Use SageMaker Pipe mode for training input
B.Increase the number of ml.c5.xlarge instances
C.Shuffle the S3 objects to randomize order
D.Use Amazon EFS instead of S3
AnswerA

Pipe mode streams data directly, avoiding the need to download all files first, improving throughput.

Why this answer

Using SageMaker Pipe mode streams data directly from S3, reducing startup time. Shuffling files or increasing instance count does not address the small file overhead. Using EFS would introduce latency.

625
MCQhard

A data engineer created an IAM policy to allow a Glue ETL job to read and write objects to an S3 bucket. The ETL job fails when writing data with the error 'Access Denied'. The job is configured to use SSE-S3 (AES256) encryption. What is the likely issue?

A.The policy grants s3:PutObject on all buckets, not just the specific one.
B.The condition requires objects to be encrypted with SSE-KMS, but the job uses SSE-S3.
C.The policy does not grant s3:PutObject on the bucket itself, which is needed for some write operations.
D.The condition requires objects to use SSE-S3, but the job uses SSE-KMS.
AnswerC

Bucket-level permissions may be required for certain write operations.

Why this answer

The error 'Access Denied' when writing to S3 with SSE-S3 encryption typically occurs because the IAM policy lacks the `s3:PutObject` permission on the bucket resource itself. While the policy may grant `s3:PutObject` on the object ARN (`arn:aws:s3:::bucket/*`), some S3 write operations—especially those involving encryption headers or bucket-level checks—also require the permission on the bucket ARN (`arn:aws:s3:::bucket`). Without this, the request is denied even if the object-level permission exists.

Exam trap

The trap here is that candidates assume `s3:PutObject` on the object ARN is sufficient for all write operations, overlooking that S3 requires the same permission on the bucket ARN for certain encryption-related or bucket-policy-evaluation scenarios.

How to eliminate wrong answers

Option A is wrong because granting `s3:PutObject` on all buckets would be overly permissive, not restrictive; the issue is missing permission on the specific bucket, not an overly broad scope. Option B is wrong because the job uses SSE-S3, and the condition requiring SSE-KMS would cause a different error (e.g., 'The request was denied because the encryption key is not authorized'), not a generic 'Access Denied'. Option D is wrong because the job uses SSE-S3, not SSE-KMS, so a condition requiring SSE-S3 would actually match and not cause a denial.

626
Multi-Selecthard

A data scientist is developing a deep learning model for object detection using Amazon SageMaker. The training dataset has 50,000 labeled images. The data scientist wants to improve model generalization without collecting more data. Which TWO techniques can be applied? (Choose two.)

Select 2 answers
A.Increase the learning rate to speed up convergence.
B.Increase the number of training epochs to ensure convergence.
C.Apply data augmentation techniques such as random cropping and horizontal flipping.
D.Use transfer learning from a pre-trained model on ImageNet.
E.Increase the batch size to reduce variance.
AnswersC, D

Data augmentation increases data diversity without new data.

Why this answer

Data augmentation techniques like random cropping and horizontal flipping artificially expand the training dataset by generating modified versions of existing images. This exposes the model to more varied input patterns, reducing overfitting and improving generalization without requiring new labeled data.

Exam trap

The trap here is that candidates may confuse techniques that improve training speed or convergence (like increasing learning rate or epochs) with those that improve generalization, failing to recognize that overfitting is the core issue when data is limited.

627
MCQhard

A data scientist attempts to create a SageMaker training job using the IAM policy shown in the exhibit. The training job fails with an access denied error. What is the most likely cause?

A.The S3 bucket policy does not grant access to the SageMaker service principal
B.The IAM policy is missing the sagemaker:DescribeTrainingJob permission
C.The IAM policy is missing the s3:ListBucket action
D.The IAM policy is missing the s3:PutObject permission
AnswerC

SageMaker needs ListBucket to read objects from the bucket.

Why this answer

The IAM policy shown in the exhibit grants s3:GetObject and s3:PutObject actions but is missing the s3:ListBucket action. When SageMaker attempts to read or write objects in an S3 bucket, it first needs to list the bucket's contents to verify the object's existence and path. Without s3:ListBucket, the training job fails with an access denied error during the initial S3 operation.

Exam trap

The trap here is that candidates assume only GetObject and PutObject are needed for S3 read/write operations, overlooking that SageMaker's S3 client implicitly calls ListBucket to verify object existence and path resolution before performing data transfers.

How to eliminate wrong answers

Option A is wrong because the S3 bucket policy is not mentioned in the question; the error is due to the IAM policy, not a bucket policy, and SageMaker service principal access is typically handled via IAM roles, not bucket policies. Option B is wrong because sagemaker:DescribeTrainingJob is a read-only action used to retrieve training job status, not required for creating or running a training job; the error occurs during S3 access, not SageMaker API calls. Option D is wrong because s3:PutObject is already present in the IAM policy (as shown in the exhibit), so missing it is not the cause of the access denied error.

628
Multi-Selectmedium

A data scientist is building a text classification model using a bag-of-words approach with logistic regression. The dataset has 10,000 documents and 50,000 unique tokens. The model overfits. Which TWO techniques can help reduce overfitting?

Select 2 answers
A.Increase the number of n-grams features
B.Use one-hot encoding instead of bag-of-words
C.Use a more complex model such as a neural network
D.Reduce the vocabulary size by removing rare and very frequent terms
E.Apply L2 regularization to the logistic regression model
AnswersD, E

Reducing the number of features reduces model complexity and overfitting.

Why this answer

Removing rare and very frequent terms reduces the feature space and eliminates noise, which helps the logistic regression model generalize better. Rare terms often act as noise that the model can latch onto for spurious correlations, while very frequent terms (like stopwords) provide little discriminative power. This dimensionality reduction directly combats overfitting by simplifying the model.

Exam trap

AWS often tests the misconception that adding more features or using a more complex model always improves performance, when in fact these actions increase overfitting risk in high-dimensional sparse datasets.

629
MCQhard

A machine learning team is deploying a time-series forecasting model using Amazon SageMaker. The model is trained on historical data and needs to be updated daily with new data. The team wants to automate the retraining pipeline and avoid manual intervention. Which approach is the most efficient?

A.Use AWS Step Functions to orchestrate retraining, but require a manual approval step.
B.Use SageMaker training jobs manually triggered by the team each day.
C.Use a cron job on an EC2 instance to run a training script.
D.Use Amazon SageMaker Pipelines with a scheduled Lambda function to trigger retraining daily.
AnswerD

Combines SageMaker Pipelines for automated ML workflows with Lambda for scheduling, providing a fully automated solution.

Why this answer

Amazon SageMaker Pipelines provides a fully managed, end-to-end orchestration service for building, training, and deploying machine learning models. By combining it with a scheduled AWS Lambda function, the team can automate daily retraining without manual intervention, leveraging SageMaker's native integration for step sequencing, artifact tracking, and model registry updates.

Exam trap

The trap here is that candidates might choose Option C (cron job on EC2) because it seems simpler, but they overlook the operational burden of managing EC2 and the lack of native SageMaker integration for model lineage and automated deployment.

How to eliminate wrong answers

Option A is wrong because requiring a manual approval step contradicts the requirement to avoid manual intervention, making the pipeline not fully automated. Option B is wrong because manually triggering training jobs each day is the opposite of automation and introduces human error and operational overhead. Option C is wrong because using a cron job on an EC2 instance requires managing the instance (patching, scaling, security), and the training script would lack native integration with SageMaker's managed infrastructure, model registry, and pipeline lineage tracking.

630
Multi-Selectmedium

Which TWO of the following are best practices for training deep learning models on Amazon SageMaker? (Select TWO.)

Select 2 answers
A.Use SageMaker Processing to perform data augmentation before training.
B.Use Pipe input mode to stream data directly from S3 to the algorithm.
C.Store training data on Amazon EBS volumes attached to the training instance.
D.Use managed spot training to reduce costs.
E.Disable checkpointing to improve training speed.
AnswersB, D

Pipe mode reduces startup time and storage.

Why this answer

SageMaker's Pipe input mode streams training data directly from Amazon S3 to the algorithm without writing it to disk, reducing I/O latency and eliminating the need for large local storage. This is especially beneficial for deep learning models that iterate over large datasets, as it allows training to start faster and avoids the overhead of downloading data to EBS volumes.

Exam trap

The trap here is that candidates often confuse SageMaker Processing with a general-purpose compute environment for any training task, when in fact it is specifically for data processing jobs, not for augmenting data during model training.

631
MCQmedium

A machine learning engineer is analyzing a dataset with a mix of categorical and numerical features. The engineer wants to understand the correlation between categorical features and the target variable. Which statistical test is most appropriate for measuring association between a categorical feature and a binary target?

A.Pearson correlation coefficient
B.ANOVA (Analysis of Variance)
C.Chi-squared test of independence
D.Mutual information
AnswerC

Chi-squared test tests association between two categorical variables.

Why this answer

The Chi-squared test of independence is used to determine if there is a significant association between two categorical variables, which is applicable here. Option A is wrong because Pearson correlation is for continuous variables. Option B is wrong because ANOVA is for comparing means across groups, but assumes continuous target.

Option D is wrong because Mutual Information can be used but is not a statistical test with a p-value.

632
MCQhard

A company is building a recommendation system using Amazon SageMaker's Factorization Machines algorithm. The dataset includes user IDs, item IDs, and ratings. The data is sparse. Which data format should be used for training?

A.CSV format with one row per rating.
B.JSON lines format with nested structures.
C.RecordIO-protobuf format with sparse feature vectors.
D.Parquet format with columns for each feature.
AnswerC

Protobuf with sparse encoding is efficient and recommended.

Why this answer

Factorization Machines (FM) in SageMaker are optimized for sparse, high-dimensional data. The RecordIO-protobuf format allows you to directly specify sparse feature vectors using integer keys and float values, which avoids the memory overhead of dense representations and enables efficient distributed training. This format is the recommended input for SageMaker's built-in FM algorithm.

Exam trap

The trap here is that candidates assume CSV is always the simplest and most compatible format, overlooking the fact that SageMaker's Factorization Machines specifically require sparse data representation for performance and correctness, making RecordIO-protobuf the only optimal choice among the options.

How to eliminate wrong answers

Option A is wrong because CSV format with one row per rating forces dense representation, which is inefficient for sparse data and does not leverage FM's native support for sparse feature vectors. Option B is wrong because JSON lines format with nested structures is not natively supported by SageMaker's Factorization Machines; the algorithm expects RecordIO-protobuf or CSV with a specific schema, not arbitrary nested JSON. Option D is wrong because Parquet format, while efficient for columnar storage, is not directly supported by SageMaker's FM algorithm and would require conversion to RecordIO-protobuf or CSV for training.

633
MCQeasy

A data scientist is starting a new machine learning project and needs to understand the dataset. The dataset is stored as CSV files in Amazon S3, with a total size of 50 GB. The data scientist wants to quickly get summary statistics (count, mean, standard deviation, min, max) for each numerical column, and also check for missing values. The data scientist has access to SageMaker Studio. What is the most efficient way to achieve this?

A.Use AWS Glue Crawler to infer schema and then query with Athena.
B.Write a PySpark script in a SageMaker notebook to compute statistics.
C.Load a sample into Amazon QuickSight and use SPICE to compute statistics.
D.Use SageMaker Data Wrangler to import the data and generate a data quality report.
AnswerD

Data Wrangler provides summary statistics and missing value analysis.

Why this answer

SageMaker Data Wrangler is purpose-built for data preparation and profiling, allowing you to compute summary statistics and check for missing values with a visual interface and without writing code. Option A (AWS Glue Crawler + Athena) only infers schema and enables SQL queries; it does not automatically provide summary statistics or missing value counts. Option B (PySpark script) is possible but requires manual coding and Spark cluster management, making it less efficient for quick exploration.

Option C (Amazon QuickSight) is a BI tool that requires loading data into SPICE, which is not as streamlined for initial data profiling as Data Wrangler.

634
MCQmedium

A data engineering team is using Apache Spark on Amazon EMR to process streaming data from Amazon Kinesis Data Streams. The Spark application uses structured streaming to read from Kinesis, perform transformations, and write to Amazon S3 in Parquet format. The team notices that the application is falling behind and the processing latency is increasing. The Kinesis stream has 5 shards, and the EMR cluster has 5 core nodes of type r5.xlarge. The Spark application is configured with 5 executors, each with 2 cores and 8 GB memory. The team wants to reduce processing latency. Which change would be most effective?

A.Increase the executor memory to 16 GB.
B.Increase the number of shards in the Kinesis stream to 10 and increase the number of core nodes to 10.
C.Use a larger instance type for the core nodes, such as r5.4xlarge.
D.Change the output format from Parquet to CSV to reduce write time.
AnswerB

More shards increase parallelism, and more nodes allow more concurrent processing.

Why this answer

The number of shards (5) matches the number of executors (5), but each shard can be processed by a single executor. To increase parallelism, the team should increase the number of shards in the Kinesis stream and correspondingly increase the number of executors or cores. Alternatively, they can increase the number of cores per executor to allow parallel processing of multiple shards per executor.

635
MCQhard

A company uses Amazon SageMaker to train a model for fraud detection. The dataset has 1 million samples with 200 features. The data is highly imbalanced (0.1% fraud). The team wants to use a random forest model. Which technique should they use to handle the class imbalance during training?

A.Synthetic Minority Over-sampling Technique (SMOTE)
B.Use class weights inversely proportional to class frequencies
C.Random undersampling of the majority class
D.Adjust the decision threshold after training
AnswerA

SMOTE generates synthetic samples, effectively balancing the dataset.

Why this answer

SMOTE generates synthetic samples of the minority class, effectively balancing the dataset before training. This is particularly useful for random forest as it learns from the augmented data directly. Option B (class weights) adjusts the loss function but may not work well with random forest's tree-based structure, and it's not a standard technique for this algorithm.

Option C (undersampling) discards majority class data, potentially losing valuable information. Option D (threshold adjustment) is a post-training step and does not address imbalance during the training phase.

636
Multi-Selecthard

A data scientist is using Amazon SageMaker to train a deep learning model for natural language processing. The training job is taking too long to converge. The data scientist wants to speed up training without significantly sacrificing model accuracy. Which THREE strategies should the data scientist consider? (Choose three.)

Select 3 answers
A.Reduce the model size by using fewer layers or smaller hidden dimensions.
B.Increase the learning rate by a factor of 10 to accelerate convergence.
C.Increase the batch size to its maximum possible value to utilize GPU memory fully.
D.Use mixed precision training (FP16) to reduce memory and speed up matrix operations.
E.Use SageMaker's distributed data parallelism across multiple instances.
AnswersA, D, E

Smaller models train faster but may lose some accuracy.

Why this answer

Options A, D, and E are correct. Reducing the model size (A) decreases computational requirements and speeds up training. Mixed precision training (D) uses FP16 to reduce memory usage and accelerate matrix operations on GPUs.

Distributed data parallelism (E) allows training across multiple instances, significantly reducing training time. Option B (increasing learning rate by a factor of 10) is likely too aggressive and can cause divergence. Option C (increasing batch size to maximum) may slow convergence due to reduced gradient noise and can cause memory issues.

637
MCQhard

A data scientist examines a dataset with 100 features and suspects that some features are redundant due to high pairwise correlations. Which EDA technique should the scientist use to systematically identify groups of highly correlated features?

A.Generate a correlation matrix and visualize it as a heatmap.
B.Plot histograms for each feature.
C.Create scatter plots for each pair of features.
D.Use box plots to identify outliers.
AnswerA

Heatmap of correlation matrix quickly reveals high pairwise correlations.

Why this answer

A correlation matrix heatmap allows systematic identification of groups of highly correlated features by visually highlighting high pairwise correlations. Option B is incorrect because histograms show univariate distributions, not relationships between features. Option C is incorrect because scatter plots for each pair would be time-consuming and not systematic for 100 features.

Option D is incorrect because box plots show outliers, not correlations.

638
MCQhard

A company runs a data pipeline using AWS Glue ETL jobs that process about 10 TB of data daily from Amazon S3. The jobs are triggered by a schedule and write results to a separate S3 bucket. Recently, the jobs have been taking longer to complete, and the data engineering team has observed that the number of files in the source bucket has increased significantly, from thousands to millions of small files (each about 100 KB). The Glue jobs are configured to use the 'Group Files' option, but performance is still poor. The team needs to improve the job performance without changing the source data generation process. Which course of action should the team take?

A.Increase the number of DPUs allocated to the existing Glue job
B.Switch the ETL processing to Amazon EMR with Spark
C.Use AWS Lambda to pre-process the files and combine them
D.Create a separate Glue job that runs before the main job to consolidate small files into larger ones in the source bucket
AnswerD

Consolidation reduces the number of files, improving read performance.

Why this answer

The main performance bottleneck is the large number of small files, which causes high overhead in reading metadata and opening files. Option D addresses this by creating a separate Glue job that consolidates small files into larger files (e.g., 100 MB) before the main ETL job runs, reducing the file count and improving read performance. Option A is incorrect because increasing DPUs may provide more parallelism but does not solve the underlying small-file problem; the overhead of opening millions of files remains.

Option B is incorrect because switching to Amazon EMR with Spark would still encounter the same small-file issue unless additional measures (like coalesce or file compaction) are taken, which Option D already provides. Option C is incorrect because AWS Lambda has limitations on execution duration and memory, making it impractical to pre-process millions of small files efficiently.

639
MCQmedium

A company is fine-tuning a BERT model on Amazon SageMaker for a text classification task. The training script uses PyTorch and Hugging Face Transformers. The training job completes successfully, but the final model accuracy is low. The dataset has 10,000 labeled samples. What is the most likely cause and solution?

A.The instance type is insufficient; use a larger instance
B.The model is overfitting due to small dataset; use a pre-trained checkpoint and fine-tune only top layers
C.The learning rate is too high; reduce it
D.The training script has a bug in the data loader
AnswerB

Correct. Fine-tuning the entire BERT model on only 10,000 samples leads to overfitting. Using a pre-trained checkpoint and fine-tuning only top layers reduces overfitting and improves accuracy.

Why this answer

Fine-tuning the entire BERT model on only 10,000 samples leads to overfitting, resulting in low accuracy. The recommended approach is to use a pre-trained checkpoint and fine-tune only the top layers, which leverages transfer learning and reduces the risk of overfitting. Option A (instance type) impacts training speed, not accuracy directly.

Option C (learning rate) could be a factor but overfitting is the most likely given the dataset size. Option D (data loader bug) would typically cause errors, not low accuracy without errors.

640
MCQhard

During EDA, a data scientist plots the distribution of a feature and sees a bimodal pattern. What does this likely indicate?

A.The data may contain two distinct groups.
B.The feature has missing values.
C.The feature contains outliers.
D.The feature needs to be standardized.
AnswerA

Bimodal suggests mixture of two populations.

Why this answer

A bimodal distribution has two distinct peaks, which typically indicates that the data contains two different subpopulations or clusters. This is a common finding in exploratory data analysis (EDA) when the feature is influenced by a categorical variable with two categories. For example, in a dataset of customer purchases, transaction amounts may be bimodal if there are two types of customers (e.g., individuals and businesses).

Therefore, option A is correct. Option B is incorrect because missing values usually appear as a separate bar or a spike at a specific value, not as a second peak. Option C is incorrect because outliers typically appear as extreme values far from the main distribution, not as a second mode.

Option D is incorrect because standardization (scaling to zero mean and unit variance) does not change the shape of the distribution; it only changes the scale.

641
Multi-Selecthard

A data engineer is designing a data pipeline that uses Amazon Kinesis Data Streams to ingest real-time transaction data. The data must be processed in near real-time and stored in Amazon S3 for long-term analytics. The engineer wants to ensure data durability and exactly-once processing semantics. Which TWO actions should the engineer take? (Choose two.)

Select 2 answers
A.Use the Kinesis Producer Library (KPL) with exactly-once delivery.
B.Use AWS Glue streaming ETL with checkpointing.
C.Enable exactly-once delivery on Kinesis Data Firehose.
D.Use AWS Lambda with the Kinesis trigger and enable event source mapping with RetryAttempts set to 0.
E.Use Amazon SQS as the event source for downstream processing.
AnswersB, D

AWS Glue streaming ETL with checkpointing can achieve exactly-once processing by tracking progress and writing to a transactional data lake, making this a correct action.

Why this answer

Correct options: B and D. AWS Glue streaming ETL with checkpointing provides exactly-once processing semantics when writing to S3 using a transactional format like Delta Lake. Setting RetryAttempts to 0 on a Lambda event source mapping ensures that each record is processed only once (no retries), which avoids duplicate processing, though failures may cause data loss.

Options A and C do not guarantee exactly-once: KPL provides at-least-once with deduplication, and Kinesis Data Firehose provides at-least-once delivery to S3. Option E (Amazon SQS) is not part of the Kinesis pipeline and does not ensure exactly-once semantics.

Exam trap

Candidates often assume Kinesis Data Firehose provides exactly-once delivery to S3, but it actually provides at-least-once. Also, the Kinesis Producer Library (KPL) provides at-least-once with deduplication, not exactly-once.

642
MCQeasy

A data scientist is using Amazon SageMaker to deploy a model for real-time inference. The model is a TensorFlow neural network. The scientist wants to use automatic scaling based on the number of incoming requests. Which service integration is required?

A.Amazon ECS with service auto scaling
B.Amazon SageMaker endpoint configured with Application Auto Scaling
C.AWS Lambda with provisioned concurrency
D.AWS Auto Scaling plans
AnswerB

SageMaker integrates with Application Auto Scaling to scale endpoints based on demand.

Why this answer

Amazon SageMaker endpoints natively integrate with Application Auto Scaling to adjust the number of instances based on a target metric, such as the number of incoming requests per instance. This allows the TensorFlow model to scale automatically in response to traffic, without needing additional orchestration services.

Exam trap

The trap here is that candidates may confuse SageMaker's built-in auto scaling with external services like ECS or Lambda, not realizing that SageMaker endpoints directly integrate with Application Auto Scaling for request-based scaling.

How to eliminate wrong answers

Option A is wrong because Amazon ECS with service auto scaling is used for container orchestration, not for scaling SageMaker endpoints; SageMaker manages its own infrastructure. Option C is wrong because AWS Lambda with provisioned concurrency is for serverless functions, not for deploying a TensorFlow neural network model for real-time inference via SageMaker. Option D is wrong because AWS Auto Scaling plans are a higher-level service for scaling multiple resources, but SageMaker endpoints require direct integration with Application Auto Scaling via a scaling policy, not a generic plan.

643
MCQhard

A company is using Amazon SageMaker to train a model using a custom Docker container. The training script writes model artifacts to the `/opt/ml/model` directory. The training job completes successfully, but the model artifacts are not uploaded to the S3 output path specified in the training job. The company has verified that the SageMaker execution role has the necessary S3 permissions. The Docker container is built using a base image that is not one of the official SageMaker Docker images. What is the MOST likely reason for the failure to upload model artifacts?

A.The training script's entry point is not correctly specified in the container.
B.The custom container does not include the SageMaker training toolkit, which handles artifact uploads.
C.The output path in the training job configuration is incorrectly formatted.
D.The SageMaker execution role does not have s3:PutObject permission on the output bucket.
AnswerB

Correct: Without the toolkit, SageMaker does not automatically upload artifacts.

Why this answer

The SageMaker training toolkit is required in custom containers to handle the automatic upload of model artifacts to S3. Without it, even if the script writes to /opt/ml/model and has correct permissions, SageMaker cannot perform the upload. Option B is correct because the container lacks the toolkit.

Option A is incorrect because the entry point is unrelated to the upload failure. Option C is incorrect as the output path formatting would cause a different error. Option D is incorrect because permissions were already verified.

644
MCQeasy

A data scientist wants to explore a large dataset stored in Amazon S3 using SQL queries without moving the data. The dataset is in CSV format and is updated daily with new partitions. Which AWS service should be used to directly query the data in S3?

A.Amazon Athena
B.Amazon Redshift Spectrum
C.Amazon EMR
D.AWS Glue
AnswerA

Athena is purpose-built for querying data in S3 with no infrastructure to manage.

Why this answer

Amazon Athena is a serverless interactive query service that allows you to analyze data directly in Amazon S3 using standard SQL, without needing to load or transform the data. It supports CSV format and can automatically discover new partitions when used with Hive-style partitioning and the MSCK REPAIR TABLE command or by enabling partition projection. This makes it the ideal choice for directly querying a large, daily-updated CSV dataset stored in S3.

Exam trap

The trap here is that candidates often confuse AWS Glue's data cataloging and ETL capabilities with interactive querying, or assume Redshift Spectrum is serverless, when in fact it requires a running Redshift cluster.

How to eliminate wrong answers

Option B (Amazon Redshift Spectrum) is wrong because it requires an active Amazon Redshift cluster to be provisioned and running, which adds cost and complexity, and it is designed for querying data in S3 from within Redshift, not as a standalone serverless query service. Option C (Amazon EMR) is wrong because it requires you to provision and manage a cluster of EC2 instances, install Spark or Hive, and submit jobs, which is overkill for simple SQL queries and does not allow direct serverless querying without infrastructure management. Option D (AWS Glue) is wrong because it is primarily a serverless data integration and ETL service, not an interactive SQL query engine; while Glue can catalog data and prepare it for querying, it does not natively execute SQL queries against data in S3 without using Athena or another engine.

645
MCQeasy

A data engineer needs to analyze large CSV files stored in Amazon S3 using SQL queries. The data is not frequently accessed, and cost is a primary concern. Which AWS service should be used to query the data directly in S3 without moving it?

A.Amazon Athena
B.Amazon EMR
C.Amazon Redshift Spectrum
D.AWS Glue
AnswerA

Athena is serverless and directly queries S3 using SQL with pay-per-query pricing.

Why this answer

Amazon Athena is a serverless interactive query service that allows you to analyze data directly in Amazon S3 using standard SQL, without needing to load or transform the data. It is ideal for this use case because it charges only for the data scanned per query, making it cost-effective for infrequently accessed large datasets. Athena integrates with AWS Glue Data Catalog for schema management and supports common formats like CSV, JSON, Parquet, and ORC.

Exam trap

The trap here is that candidates may choose Amazon Redshift Spectrum because it also queries S3, but they overlook the requirement that it requires a running Redshift cluster, which incurs fixed costs, making it unsuitable for cost-sensitive, infrequent access scenarios.

How to eliminate wrong answers

Option B (Amazon EMR) is wrong because it requires provisioning and managing a cluster of EC2 instances, which incurs ongoing compute costs even when idle, making it less cost-effective for infrequent queries. Option C (Amazon Redshift Spectrum) is wrong because it requires an existing Amazon Redshift cluster to run queries against data in S3, meaning you must pay for the cluster's compute and storage resources regardless of query frequency. Option D (AWS Glue) is wrong because it is primarily an ETL (extract, transform, load) service for preparing and cataloging data, not a direct SQL query engine; while it can catalog data for Athena, using Glue alone to query data would require additional compute resources and is not designed for ad-hoc SQL queries.

646
MCQmedium

An IAM policy attached to a SageMaker execution role is shown. A training job executed with this role fails with an error that the role cannot access the S3 bucket. The training job uses input data from s3://my-bucket/train/data.csv and output to s3://my-bucket/output/. What is the most likely cause?

A.The training job does not have s3:GetObject permission for the input data
B.The training data is encrypted with SSE-KMS and the role lacks KMS permissions
C.The training job does not have s3:PutObject permission for the output location
D.The S3 bucket is in a different region than the training job
AnswerC

The output path 'output/' is not covered by the resource 'train/*', so PutObject fails.

Why this answer

The error message indicates the role cannot access the S3 bucket, which typically occurs when the role lacks write permissions to the output location. The training job needs s3:PutObject permission to write the output artifacts (model, logs, etc.) to s3://my-bucket/output/. Without this permission, SageMaker fails to save the training results, resulting in an access error.

Exam trap

AWS often tests the distinction between read and write permissions in SageMaker S3 access, and the trap here is that candidates assume the error is about reading input data (Option A) when the actual failure is due to missing write permissions for the output location (Option C).

How to eliminate wrong answers

Option A is wrong because the error is about accessing the bucket, not specifically the input data; if s3:GetObject were missing, the error would likely be more specific to reading the input file, and the job would fail at the data loading stage, not with a general bucket access error. Option B is wrong because there is no mention of SSE-KMS encryption in the scenario; if the data were encrypted with KMS, the error would reference KMS permissions, not a generic S3 bucket access error. Option D is wrong because SageMaker training jobs can access S3 buckets in different regions as long as the bucket policy and IAM role allow cross-region access; the error message does not indicate a region mismatch, and SageMaker handles cross-region S3 access transparently.

647
Multi-Selecteasy

A data engineering team needs to schedule a nightly ETL job that extracts data from an Amazon RDS for PostgreSQL instance, transforms it using Spark, and loads it into Amazon S3. The team wants to use AWS Glue for this task. Which components are required? (Select TWO.)

Select 2 answers
A.An AWS Glue ETL job with a Spark script.
B.An AWS Glue crawler to populate the Data Catalog.
C.An AWS Glue connection to the RDS database.
D.An AWS Glue development endpoint.
E.An AWS Glue notebook for data exploration.
AnswersA, C

The job performs the defined ETL logic.

Why this answer

An AWS Glue ETL job with a Spark script is required because the transformation step explicitly uses Spark. AWS Glue provides a managed Spark runtime, and the ETL job definition must include a script (either auto-generated or custom) that performs the extract, transform, and load operations. Without this component, the team cannot execute the Spark-based transformation logic.

Exam trap

The trap here is that candidates often assume a crawler is mandatory for any Glue workflow, but the Data Catalog is only needed if you want to use it for schema discovery or as a metastore—the ETL job can operate without it by directly referencing the connection and writing raw data to S3.

648
Multi-Selectmedium

A data scientist is performing EDA on a dataset with 100 features. They want to reduce dimensionality by removing highly correlated features. Which TWO approaches are appropriate? (Choose TWO.)

Select 2 answers
A.Use feature importance from a random forest to select top features.
B.Remove features with low variance using VarianceThreshold.
C.Compute a correlation matrix and remove one feature from each pair with correlation >0.95.
D.Use Principal Component Analysis (PCA) and select components that explain 95% of variance.
E.Apply L1 regularization (Lasso) during model training to zero out coefficients of correlated features.
AnswersC, D

This directly removes redundant features.

Why this answer

Options C and D are correct. Option C directly addresses dimensionality reduction by removing highly correlated features, which reduces redundancy. Option D uses PCA to create uncorrelated components, effectively reducing dimensionality while preserving variance.

Option A is incorrect because feature importance from random forest is used for selecting features predictive of the target, not for removing correlated features per se. Option B is incorrect because VarianceThreshold removes features with low variance, not specifically for correlation. Option E is incorrect because L1 regularization (Lasso) is a modeling technique that zeroes out coefficients during model training, not a method for EDA.

649
Multi-Selecteasy

Which TWO of the following are valid Amazon SageMaker built-in algorithms for regression tasks? (Select TWO.)

Select 2 answers
A.BlazingText
B.XGBoost
C.Image Classification
D.Object Detection
E.Linear Learner
AnswersB, E

XGBoost supports regression.

Why this answer

XGBoost is a valid Amazon SageMaker built-in algorithm for regression tasks because it supports regression objectives such as 'reg:squarederror' and 'reg:logistic'. It is a gradient boosting framework that builds an ensemble of decision trees, making it suitable for both regression and classification problems.

Exam trap

The trap here is that candidates often confuse algorithms that can be used for regression (like XGBoost and Linear Learner) with those that are exclusively for classification or computer vision tasks, leading them to select BlazingText or Image Classification incorrectly.

650
MCQhard

During exploratory data analysis on a dataset with 1 million rows, a data scientist notices that the distribution of the target variable is highly imbalanced (99% class A, 1% class B). Which technique should be applied to address this imbalance before model training?

A.Randomly undersample the majority class to match the minority class size
B.Apply standard scaling to all features
C.Use PCA to reduce dimensionality and oversample in principal component space
D.Use SMOTE to generate synthetic samples for the minority class
AnswerD

SMOTE creates synthetic examples to balance classes.

Why this answer

SMOTE (Synthetic Minority Oversampling Technique) generates synthetic samples for the minority class, balancing the dataset. Option A is wrong because random undersampling can discard important data. Option B is wrong because scaling does not address imbalance.

Option C is wrong because PCA does not fix imbalance.

651
MCQhard

A company is running a machine learning training job on Amazon SageMaker that reads training data from an S3 bucket. The job fails intermittently with an S3 throttling error. The data is partitioned across thousands of small files (average 100 KB). Which strategy is MOST effective to resolve the throttling issue?

A.Use Amazon Athena to query the data and output results to a new S3 location
B.Enable S3 Transfer Acceleration on the bucket
C.Combine the small files into larger files (e.g., 100 MB) using a preprocessing step
D.Increase the number of SageMaker training instances to distribute the load
AnswerC

Larger files reduce the number of GET requests, mitigating throttling.

Why this answer

S3 throttling errors (HTTP 503) occur when many small files cause a high request rate per prefix. By combining thousands of 100 KB files into fewer 100 MB files, you drastically reduce the number of GET requests, staying within S3's 5,500 GET requests per second per prefix limit. This preprocessing step directly addresses the root cause of the throttling without changing the training infrastructure.

Exam trap

The trap here is that candidates confuse network-level optimizations (Transfer Acceleration) or parallelization (more instances) with the fundamental S3 request rate limit, which is a per-prefix throughput constraint, not a bandwidth issue.

How to eliminate wrong answers

Option A is wrong because Athena also issues GET requests to S3 and would itself be throttled or create additional overhead without consolidating the files; it does not reduce the number of small objects. Option B is wrong because S3 Transfer Acceleration optimizes network latency for uploads/downloads over long distances, not the request rate per prefix; it does not mitigate throttling caused by too many small files. Option D is wrong because increasing training instances multiplies the number of concurrent GET requests, worsening the throttling issue rather than resolving it.

652
MCQhard

A company is using a custom Docker container in SageMaker for training. The training job fails with 'ResourceLimitExceeded' error. Which action should the data scientist take?

A.Use a smaller instance type
B.Reduce the number of epochs
C.Request a limit increase for the instance type
D.Use a pre-built SageMaker container instead
AnswerC

Directly addresses the error.

Why this answer

The 'ResourceLimitExceeded' error in SageMaker indicates that the AWS account has reached a service quota for the specified instance type (e.g., ml.p3.2xlarge). This is a quota limit, not a performance or resource exhaustion issue within the training job itself. The correct action is to request a limit increase via the AWS Service Quotas console or AWS Support, which raises the maximum number of concurrent instances or total vCPUs allowed for that instance family.

Exam trap

AWS often tests the misconception that 'ResourceLimitExceeded' is a performance or memory error, leading candidates to choose instance downsizing or epoch reduction, when in fact it is a strict AWS account quota that must be raised through a formal request.

How to eliminate wrong answers

Option A is wrong because using a smaller instance type does not resolve a quota limit error; it only changes which quota is checked, and the smaller instance may still be subject to its own quota or may not meet the training job's memory/compute requirements. Option B is wrong because reducing the number of epochs addresses model convergence or training time, not the AWS service quota that limits the number or type of instances you can launch concurrently. Option D is wrong because switching to a pre-built SageMaker container does not affect instance quotas; the error is about resource limits at the AWS account level, not about container compatibility or image configuration.

653
MCQmedium

A company has a SageMaker endpoint that serves predictions for a mobile app. The endpoint is deployed on a single ml.m5.large instance. Recently, users have reported that the app sometimes returns outdated predictions. The data science team has confirmed that the model is updated daily by retraining with new data and creating a new endpoint configuration. However, the endpoint still returns predictions from the old model for some requests. The team has verified that the new endpoint configuration is associated with the endpoint and that the endpoint is in service. What is the most likely cause of this issue?

A.The old model artifacts are still being cached by the endpoint
B.The endpoint has multiple variants and the old variant still has a weight assigned
C.The mobile app is using a CDN that caches the predictions
D.The new endpoint configuration has not been deployed to the endpoint
AnswerB

If the old variant has a weight, it will continue to serve traffic. The new variant should get a weight of 1 and the old variant weight should be set to 0.

Why this answer

When a SageMaker endpoint has multiple variants with assigned weights, traffic is distributed proportionally. If the old variant still has a weight greater than zero, some requests will continue to be served by the old model, causing outdated predictions. Option A is incorrect because SageMaker endpoints do not cache model artifacts; they load the model from S3 into memory.

Option C is incorrect because the mobile app's CDN caching is unrelated to the SageMaker endpoint's model selection. Option D is incorrect because the team confirmed that the new endpoint configuration is associated with the endpoint and the endpoint is in service, meaning the configuration is deployed.

654
Matchingmedium

Match each data format to its typical use in AWS ML.

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

Concepts
Matches

Tabular data for SageMaker built-in algorithms

Efficient binary format for SageMaker

Columnar storage for analytics

Semi-structured data, e.g., for Lambda

TensorFlow training data format

Why these pairings

Common data formats in AWS ML: CSV for tabular data, JSON for semi-structured inference I/O, Parquet for columnar analytics, and TFRecord for TensorFlow training. Distractors confuse CSV with Parquet and JSON with binary formats.

655
MCQeasy

A data scientist is training a deep learning model on a large dataset using Amazon SageMaker. The training job is taking too long and the scientist wants to reduce the training time by distributing the workload across multiple GPUs. Which SageMaker feature should be used to achieve this?

A.Use SageMaker's distributed training libraries
B.Use Amazon EMR to distribute the training
C.Use SageMaker Automatic Model Tuning
D.Use SageMaker Hyperparameter Tuning
AnswerA

SageMaker provides built-in distributed training libraries that can split the workload across multiple GPUs.

Why this answer

SageMaker's distributed training libraries provide built-in optimized implementations of data parallelism and model parallelism, enabling efficient distribution of deep learning workloads across multiple GPUs with minimal code changes. This directly addresses the need to reduce training time by leveraging multiple GPUs in a SageMaker training job.

Exam trap

The trap here is that candidates confuse hyperparameter tuning (which runs multiple independent training jobs) with distributed training (which splits a single training job across multiple GPUs), leading them to select options C or D.

How to eliminate wrong answers

Option B is wrong because Amazon EMR is a big data processing service for Apache Hadoop/Spark workloads, not designed for deep learning model training with GPU distribution. Option C is wrong because SageMaker Automatic Model Tuning is a hyperparameter optimization feature that runs multiple training jobs with different hyperparameters, not a method to distribute a single training job across multiple GPUs. Option D is wrong because SageMaker Hyperparameter Tuning is the same as Automatic Model Tuning (just a different name) and does not distribute a single training job across GPUs.

656
MCQhard

A company uses SageMaker Pipelines to automate model retraining. The pipeline fails intermittently at the Preprocess step with a 'ResourceLimitExceeded' error. The team uses a ml.m5.xlarge instance. What is the most likely cause?

A.The account has reached the limit for concurrent ml.m5.xlarge instances
B.The preprocessing script has a memory leak
C.The S3 bucket has insufficient permissions
D.The pipeline execution role is missing the PassRole permission
AnswerA

ResourceLimitExceeded typically means hitting a service limit like concurrent instances.

Why this answer

The error indicates reaching a service quota. SageMaker has a default limit of concurrent training jobs per account. Option A is correct.

Option B would cause different errors. Option C is unrelated. Option D would cause a SageMaker service error, not a resource limit.

657
MCQhard

A data scientist is using Amazon SageMaker to deploy a custom model container. The model is a large transformer that requires 16 GB of memory. The scientist wants to minimize inference latency. Which SageMaker hosting option should they choose?

A.Use a real-time endpoint with an instance that has sufficient memory.
B.Use an asynchronous inference endpoint.
C.Use SageMaker Serverless Inference.
D.Use a batch transform job.
AnswerA

Real-time endpoints provide low latency and can accommodate large models.

Why this answer

For a large model requiring 16GB memory and minimal inference latency, a real-time endpoint with a suitably sized instance (e.g., ml.p3.2xlarge or ml.g4dn.xlarge) provides dedicated resources and low latency. Option B (asynchronous inference) adds queuing latency and is for non-real-time. Option C (Serverless Inference) has memory limits (up to 6 GB) and may have cold starts, not suitable for a 16GB model.

Option D (batch transform) is for offline inference on batches, not real-time.

658
MCQeasy

A machine learning engineer is evaluating a binary classification model. The model has a high recall but low precision. Which of the following is the most likely consequence?

A.The model has many false positives.
B.The model has few false negatives.
C.The model misses many positive cases.
D.The model has few false positives.
AnswerA

Low precision means a high rate of false positives.

Why this answer

High recall means the model correctly identifies most positive cases (few false negatives), but low precision indicates that among the cases predicted as positive, many are actually negative. This directly implies a high number of false positives, as precision = TP/(TP+FP) and a low precision with high recall forces FP to be large relative to TP.

Exam trap

The MLS-C01 exam often tests the precision-recall trade-off by asking candidates to confuse the definitions of false positives and false negatives, leading them to incorrectly associate high recall with many false positives instead of few false negatives.

How to eliminate wrong answers

Option B is wrong because high recall implies few false negatives (FN is low), so this is a characteristic of the model, not a consequence of low precision. Option C is wrong because high recall means the model does NOT miss many positive cases; it captures most of them. Option D is wrong because low precision is defined by having many false positives, not few; few false positives would yield high precision.

659
Multi-Selecteasy

A data scientist is building a classification model and wants to evaluate its performance. Which TWO metrics are appropriate for a multi-class classification problem? (Choose 2)

Select 2 answers
A.Mean Absolute Error (MAE)
B.Recall
C.Precision
D.R-squared
E.Root Mean Square Error (RMSE)
AnswersB, C

Recall can be averaged across classes.

Why this answer

Both precision and recall can be extended to multi-class via micro/macro averaging. R-squared is for regression; RMSE is for regression; Mean Absolute Error is for regression.

660
MCQmedium

A data scientist is exploring a dataset containing customer transactions. They want to create a feature that captures the average purchase amount per customer over the last 30 days. Which approach is most efficient in Amazon SageMaker Processing?

A.Use Amazon Athena SQL query with GROUP BY
B.Use PySpark with window functions in SageMaker Processing
C.Use a Python script with a for loop to calculate per customer
D.Use pandas groupby and rolling functions
AnswerB

Correct: PySpark window functions are optimized for large-scale grouped rolling aggregates.

Why this answer

Using PySpark with window functions in SageMaker Processing allows efficient distributed computation for grouped time-series aggregations like average purchase amount per customer over the last 30 days. Option A is wrong because Amazon Athena SQL requires moving data out of SageMaker Processing and may not be as tightly integrated. Option C is wrong because iterating over rows with a Python for loop is inefficient and does not scale.

Option D is wrong because pandas groupby and rolling functions may not scale to large datasets in a distributed environment; SageMaker Processing with PySpark provides better performance.

661
MCQeasy

A data analyst is exploring a dataset with a target variable that is highly imbalanced. The minority class represents only 1% of the data. Which technique should the analyst use to better understand the relationships between features and the minority class?

A.Apply SMOTE to the dataset before analysis.
B.Use random sampling to reduce the dataset size.
C.Scale the features using Min-Max scaling.
D.Use stratified sampling to create a balanced sample for analysis.
AnswerD

Stratified sampling preserves class proportions.

Why this answer

Stratified sampling ensures the minority class is proportionally represented in the sample, allowing meaningful analysis. Option A is wrong because SMOTE generates synthetic data, which is not appropriate for initial exploratory analysis. Option B is wrong because random sampling may miss the minority class entirely.

Option C is wrong because scaling features does not address class imbalance.

662
MCQhard

A data engineer is troubleshooting an AWS Glue job that reads from and writes to the S3 bucket 'data-lake-bucket'. The job fails when trying to write to the 'sensitive/' prefix. The IAM policy attached to the Glue job's IAM role is shown in the exhibit. What is the MOST likely reason for the failure?

A.The IAM role does not have permission to read objects from the bucket
B.The IAM role has an explicit deny for s3:PutObject on the 'sensitive/' prefix
C.The IAM policy does not specify the bucket resource correctly
D.The IAM policy lacks a required condition for encryption
AnswerB

The Deny statement blocks write access to the sensitive prefix.

Why this answer

Even though the first statement allows s3:PutObject on the entire bucket, the second statement explicitly denies s3:PutObject on the 'sensitive/' prefix. Explicit deny overrides any allow. Option A is wrong because the policy allows GetObject.

Option C is wrong because the policy covers the bucket. Option D is wrong because there is a deny statement.

663
MCQeasy

A machine learning engineer is training a regression model to predict house prices using Amazon SageMaker. The dataset contains 10,000 samples and 50 numerical features. After training a linear regression model, the engineer notices that the training loss is low, but the validation loss is high. The engineer suspects overfitting. The dataset is already normalized. Which action should the engineer take to reduce overfitting?

A.Increase the learning rate to speed up convergence.
B.Reduce the number of features using PCA.
C.Add L2 regularization (weight decay) to the loss function.
D.Decrease the mini-batch size during training.
AnswerC

Correct: L2 regularization penalizes large weights and reduces overfitting.

Why this answer

L2 regularization (weight decay) adds a penalty term to the loss function that discourages large weight values, effectively reducing model complexity and overfitting. Option A (increasing learning rate) can cause the model to diverge or overshoot minima, and does not directly prevent overfitting. Option B (PCA) reduces the number of features, which can help with overfitting but may discard important information; regularization is a more targeted approach for linear models.

Option D (decreasing mini-batch size) introduces more noise into gradient estimates, which can sometimes act as a regularizer but is less effective and reliable than L2 regularization for this scenario.

664
MCQmedium

A company uses Amazon SageMaker to train a model using a custom Docker container. The training job fails with an error: "Unable to write to /opt/ml/output/data". The data scientist checks the container and finds that the /opt/ml directory is not writable. What is the MOST likely cause?

A.The Docker image is built from a base image that does not have the required libraries.
B.The container runs as a non-root user that lacks write permissions to /opt/ml.
C.The SageMaker training job is configured with insufficient memory.
D.The training script is not copying the model to /opt/ml/model.
AnswerB

SageMaker mounts volumes as root by default; if the container runs as a different user, it may not have write access.

Why this answer

The error 'Unable to write to /opt/ml/output/data' indicates a permission issue. By default, SageMaker training containers run as a non-root user (uid 1000) for security reasons. If the Docker image is built with /opt/ml owned by root and without world-writable permissions, the non-root user cannot write to that directory, causing the failure.

Exam trap

The trap here is that candidates may confuse a permission error with a missing library or resource constraint, but the specific 'not writable' message directly points to filesystem permissions, not dependencies or memory.

How to eliminate wrong answers

Option A is wrong because missing libraries would cause import or runtime errors, not a 'not writable' filesystem error. Option C is wrong because insufficient memory would cause an out-of-memory (OOM) kill or swap thrashing, not a permission-denied write error. Option D is wrong because failing to copy the model to /opt/ml/model would result in a missing model artifact error, not a write failure to /opt/ml/output/data.

665
MCQhard

A data scientist is performing EDA on a time series dataset of daily sales. The data scientist observes a pattern that repeats every 7 days. Which characteristic of the time series is being observed?

A.Stationarity
B.Autocorrelation
C.Seasonality
D.Trend
AnswerC

Seasonality is a periodic pattern with a fixed frequency.

Why this answer

A pattern that repeats at a fixed frequency (every 7 days) is called seasonality. Option A is wrong because trend is a long-term increase or decrease. Option C is wrong because autocorrelation measures correlation with lagged values, not a repeating pattern.

Option D is wrong because stationarity refers to constant mean/variance over time.

666
MCQeasy

A company is building a sentiment analysis model for customer reviews. The dataset includes 10,000 positive and 10,000 negative reviews. The data scientist splits the data into 70% training, 15% validation, and 15% test sets. After training, the model achieves 99% accuracy on training set but only 82% on validation set. What is the most likely issue?

A.There is data leakage from validation to training
B.The dataset is imbalanced
C.The model is underfitting
D.The model is overfitting
AnswerD

High training accuracy with significantly lower validation accuracy is a classic sign of overfitting.

Why this answer

The 99% training accuracy versus 82% validation accuracy indicates the model has memorized the training data but fails to generalize to unseen data, which is classic overfitting. Option D is correct. Option A is incorrect because data leakage would typically cause both training and validation accuracy to be high and similar.

Option B is incorrect because the dataset is balanced (10,000 positive and 10,000 negative). Option C is incorrect because underfitting would show low accuracy on both training and validation sets.

667
MCQmedium

An IAM policy is attached to a SageMaker execution role. A data scientist tries to create a training job using a custom algorithm stored in an ECR repository. The training job fails with an 'AccessDenied' error when pulling the Docker image from ECR. What is the missing permission?

A.ecr:GetDownloadUrlForLayer and ecr:BatchGetImage on the ECR repository
B.ecr:PutImage on the ECR repository
C.s3:GetObject on the ECR repository
D.sagemaker:CreateTrainingJob on the ECR resource
AnswerA

These permissions are required to pull a Docker image from ECR.

Why this answer

When SageMaker pulls a custom Docker image from ECR during training job creation, the execution role needs permissions to download the image layers. The required actions are ecr:GetDownloadUrlForLayer (to generate pre-signed URLs for each layer) and ecr:BatchGetImage (to retrieve image metadata and layer manifests). Without these, the 'AccessDenied' error occurs because SageMaker cannot authenticate or fetch the container image from the ECR repository.

Exam trap

The trap here is that candidates often confuse ECR pull permissions with S3 permissions (option C) or assume that the SageMaker CreateTrainingJob permission (option D) implicitly covers the ECR pull, when in fact the IAM role must explicitly grant the specific ECR read actions for image retrieval.

How to eliminate wrong answers

Option B is wrong because ecr:PutImage is used to push images into ECR, not to pull them; the training job only needs read access. Option C is wrong because s3:GetObject is an S3 permission, not an ECR permission; ECR uses its own API actions for image retrieval, not S3. Option D is wrong because sagemaker:CreateTrainingJob is a SageMaker API action that allows creating the training job itself, not the ECR pull operation; the error occurs at the ECR layer, not at the SageMaker API level.

668
MCQeasy

During exploratory data analysis, a data scientist plots the distribution of a numerical feature and observes a heavy right skew. The feature has many outliers at the high end. Which transformation is most appropriate to reduce skewness?

A.Apply a log transformation to the feature.
B.Apply z-score normalization.
C.Apply one-hot encoding.
D.Apply min-max scaling.
AnswerA

Log transformation compresses high values and can make the distribution more symmetric.

Why this answer

A log transformation compresses the range of the data, reducing the impact of extreme values and pulling in the long tail of a right-skewed distribution. This makes the feature more normally distributed, which is often required for linear models and many statistical tests. It is the standard technique for handling positive-valued features with heavy right skew.

Exam trap

AWS often tests the distinction between scaling (which changes range) and transformation (which changes distribution shape), so the trap here is that candidates might pick min-max scaling or z-score normalization thinking they handle outliers, but they only rescale without fixing skewness.

How to eliminate wrong answers

Option B is wrong because z-score normalization (standardization) centers the data around zero with unit variance but does not change the shape of the distribution; it will still be skewed. Option C is wrong because one-hot encoding is used for categorical features, not for transforming numerical features to reduce skewness. Option D is wrong because min-max scaling rescales the feature to a fixed range (e.g., [0,1]) but does not alter the distribution's skewness; outliers remain outliers in the scaled range.

669
MCQeasy

A data scientist is analyzing a dataset with a timestamp column. The goal is to identify seasonality and trends. Which visualization technique is most suitable?

A.Time series line plot of the target variable over time.
B.Box plot of the target variable grouped by day of week.
C.Scatter plot of the target variable vs. the timestamp.
D.Heatmap of correlation between all features.
AnswerA

Line plots are standard for time series data.

Why this answer

A time series line plot is the standard visualization for identifying trends and seasonality over time. Option B (box plot grouped by day of week) can show distributions but may not reveal trends or seasonality clearly. Option C (scatter plot of target vs. timestamp) can show patterns but may be less clear than a line plot for time series.

Option D (heatmap of correlations) is for exploring relationships between features, not for time series analysis.

670
MCQhard

A data engineer needs to move 10 TB of historical data from an on-premises Hadoop cluster to Amazon S3 for ML training. The data is currently stored in HDFS and is compressible. The network bandwidth between the on-premises data center and AWS is 1 Gbps. The team needs to minimize the time to transfer and also wants to avoid any downtime for the on-premises system. Which solution meets these requirements?

A.Set up an AWS Direct Connect connection and use rsync to copy data to S3.
B.Enable S3 Transfer Acceleration on the bucket and use the AWS CLI to copy data.
C.Install the AWS DataSync agent on-premises, configure a task to transfer data to S3 with compression enabled.
D.Use AWS Snowball Edge devices to export the data and ship them to AWS.
AnswerC

DataSync is optimized for large data transfers with compression and parallelization.

Why this answer

AWS DataSync is designed for large-scale data transfers from on-premises storage to AWS, and it can compress data in transit to reduce transfer time over a 1 Gbps link. It also operates as an agent-based solution that does not require downtime for the on-premises Hadoop cluster, as it reads data from HDFS without disrupting ongoing operations.

Exam trap

The trap here is that candidates often overlook the compression capability of DataSync and assume that faster network options like Direct Connect or Transfer Acceleration alone are sufficient, ignoring that compression is critical to minimize transfer time over a fixed bandwidth.

How to eliminate wrong answers

Option A is wrong because rsync over Direct Connect does not natively compress data during transfer, and without compression, transferring 10 TB over 1 Gbps would take over 22 hours, failing to minimize time. Option B is wrong because S3 Transfer Acceleration optimizes network path but does not compress data; the raw 10 TB transfer over 1 Gbps still takes too long, and it requires the on-premises system to be actively serving data, which could cause downtime if not carefully managed. Option D is wrong because Snowball Edge involves physical shipping, which introduces days of latency and is not the fastest option for 10 TB when a 1 Gbps network is available; it also requires exporting data from HDFS to the device, which can cause downtime if not properly orchestrated.

671
MCQeasy

During training, a binary classification model has an AUC of 0.99 on the training set but only 0.72 on the validation set. Which of the following is the most likely cause?

A.Class imbalance in the training set.
B.Underfitting.
C.Overfitting.
D.Data leakage from validation to training.
AnswerC

Overfitting results in high training but lower validation AUC.

Why this answer

A large gap between high training AUC (0.99) and lower validation AUC (0.72) indicates overfitting. Option A is wrong: class imbalance would affect both sets similarly or the model might ignore the minority class, but would not typically produce such a large gap. Option B is wrong: underfitting would show poor performance on both sets (e.g., AUC around 0.5-0.6).

Option D is wrong: data leakage would inflate both training and validation metrics, not create a gap.

672
MCQhard

A company is using Amazon SageMaker to deploy a model for real-time inference. The endpoint receives variable traffic and the company wants to optimize cost while maintaining responsiveness. Which scaling policy should be used?

A.Target tracking scaling based on invocation count
B.Simple scaling with a cooldown period
C.Scheduled scaling
D.Manual scaling
AnswerA

Automatically adjusts to traffic.

Why this answer

Target tracking scaling based on invocation count is the correct choice because it automatically adjusts the number of instances in real-time based on a predefined metric (e.g., InvocationsPerInstance), maintaining responsiveness during variable traffic while optimizing cost by scaling down during low demand. This policy uses a target value (e.g., 1000 invocations per instance) and SageMaker Application Auto Scaling continuously monitors CloudWatch metrics to add or remove instances as needed, eliminating manual intervention.

Exam trap

The trap here is that candidates often confuse 'simple scaling' with 'dynamic scaling' and assume a cooldown period alone can handle variable traffic, but simple scaling lacks the continuous metric tracking and automatic adjustment that target tracking provides.

How to eliminate wrong answers

Option B is wrong because simple scaling with a cooldown period requires manual definition of step adjustments and cooldown timers, which can lead to over-provisioning or under-provisioning under variable traffic due to its rigid, non-adaptive nature. Option C is wrong because scheduled scaling only adjusts capacity at predetermined times, making it unsuitable for unpredictable, variable traffic patterns that do not follow a fixed schedule. Option D is wrong because manual scaling requires human intervention to change instance count, which cannot react quickly to variable traffic and defeats the purpose of cost optimization and responsiveness.

673
MCQeasy

A data scientist is building a regression model to predict house prices. The dataset contains features like 'number_of_rooms' (integer), 'sqft' (float), 'location' (categorical with 1000 unique values). Which feature engineering approach is BEST for the 'location' feature?

A.Remove the feature
B.Target encoding
C.One-hot encoding
D.Label encoding
AnswerB

Target encoding uses mean target per category, good for high cardinality.

Why this answer

Target encoding is the best approach for the 'location' feature because it has 1,000 unique categories, making one-hot encoding infeasible (would create 1,000 dummy columns) and label encoding inappropriate (imposes arbitrary ordinal relationships). Target encoding replaces each category with the mean of the target variable (house price) for that category, capturing the predictive signal of location while keeping the feature as a single numeric column. This balances model performance with dimensionality and avoids overfitting when regularized (e.g., with smoothing or cross-validation).

Exam trap

AWS often tests the trade-off between cardinality and encoding methods, and the trap here is that candidates default to one-hot encoding as the 'standard' categorical encoding without considering the practical infeasibility of high cardinality, or they choose label encoding thinking it is a simple numeric mapping, ignoring the ordinal assumption violation.

How to eliminate wrong answers

Option A is wrong because removing the 'location' feature discards a highly predictive signal — house prices are strongly influenced by location, and a model without it would likely underfit. Option C is wrong because one-hot encoding with 1,000 unique categories would create 999 dummy variables, drastically increasing dimensionality, memory usage, and risk of the curse of dimensionality, especially in regression models. Option D is wrong because label encoding assigns arbitrary integer labels (e.g., 1, 2, 3) to categories, implying an ordinal relationship that does not exist for location, which can mislead linear regression models into treating distant locations as numerically similar.

674
MCQhard

A data engineering team is building a real-time data pipeline using Amazon Kinesis Data Streams with AWS Lambda for processing. The pipeline ingests clickstream data from a mobile app. The team notices that occasionally, a Lambda function fails due to a transient error, and the failed record is not retried, leading to data loss. The Lambda function is configured with a batch size of 100 and a maximum retry count of 0. The team wants to ensure that all records are processed successfully, even if transient failures occur. They also want to minimize the impact of poison pill records that could block processing. Which combination of actions should the team take to address this issue?

A.Set the maximum retry count to 5 and configure a dead-letter queue on the Lambda function to capture failed records after retries.
B.Switch to using Amazon Kinesis Data Firehose to buffer data and use AWS Lambda for transformation with built-in retry logic.
C.Set the maximum retry count to 5, configure an on-failure destination Amazon SQS queue, and set up a dead-letter queue on that SQS queue for poison pills.
D.Reduce the batch size to 1 and increase the Lambda function timeout to handle transient errors.
AnswerC

This provides retries and isolates poison pills without blocking the main stream.

Why this answer

To address the issue of data loss due to transient errors and poison pill records, the team should increase the Lambda function's maximum retry count to 5 to allow retries on transient failures. However, even with retries, some records may fail repeatedly (poison pills) which can block the shard if not handled. Configuring an on-failure destination (such as an Amazon SQS queue) on the Lambda function sends all records that failed after retries to that queue.

Then, by setting up a dead-letter queue on that SQS queue, poison pill records are isolated and can be examined or reprocessed separately, preventing them from blocking the main processing pipeline. Option A is incorrect because a dead-letter queue on Lambda alone is not sufficient – it captures failures after retries if configured, but the key is to also have an on-failure destination to offload failures. Option B is incorrect because Kinesis Data Firehose is designed for streaming data to destinations like S3, not for real-time per-record Lambda processing with built-in retry logic; it would change the architecture.

Option D is incorrect because reducing batch size to 1 would increase costs and processing time, and may not fully resolve transient errors or poison pill issues.

675
MCQeasy

A company wants to use Amazon SageMaker to train a model using data that is updated daily. The training data is stored in an S3 bucket, and the team wants to automate the training process whenever new data arrives. Which AWS service should be used to trigger the SageMaker training job?

A.AWS Lambda triggered by S3 event notifications
B.Amazon CloudWatch Events
C.Amazon Simple Queue Service (SQS)
D.AWS Step Functions with a scheduled trigger
AnswerA

Lambda can be triggered by S3 events to start the training job.

Why this answer

AWS Lambda can be triggered by S3 event notifications (e.g., object creation). The Lambda function can then start the SageMaker training job using the AWS SDK, automating the process when new data arrives. Option B (Amazon CloudWatch Events) is incorrect because CloudWatch Events can schedule events based on time or AWS API calls but cannot directly react to S3 object creation without additional services.

Option C (Amazon SQS) is incorrect because SQS is a message queue service; it does not natively trigger from S3 events without an intermediary like Lambda, which would still be the trigger. Option D (AWS Step Functions with a scheduled trigger) is incorrect because a scheduled trigger is time-based, not event-driven; Step Functions would need an S3 event to start, and that event would typically come via Lambda.

Page 8

Page 9 of 23

Page 10