Courseiva

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

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

Page 20

Page 21 of 23

Page 22
1501
MCQmedium

An organization stores streaming data in Amazon Kinesis Data Streams. A data analyst wants to perform real-time exploratory data analysis on the incoming data to detect anomalies. Which AWS service should the analyst use to run SQL queries on the streaming data?

A.Amazon Kinesis Data Analytics
B.Amazon SageMaker
C.AWS Glue
D.Amazon Athena
AnswerA

Kinesis Data Analytics supports SQL queries on streaming data for real-time analysis.

Why this answer

Amazon Kinesis Data Analytics enables running SQL queries on streaming data in real-time, which is exactly what the data analyst needs for real-time exploratory data analysis and anomaly detection. Option B (Amazon SageMaker) is incorrect because it is a machine learning service for building and training models, not for running SQL on streaming data. Option C (AWS Glue) is incorrect because it is a serverless ETL service for batch processing, not real-time SQL.

Option D (Amazon Athena) is incorrect because it is an interactive query service for analyzing data in S3 using SQL, but it is designed for batch queries on static data, not streaming data.

1502
Multi-Selectmedium

A company is using Amazon SageMaker to run a hyperparameter tuning job. The tuning job uses Bayesian optimization. Which THREE statements about Bayesian optimization are correct? (Choose THREE.)

Select 3 answers
A.It can only handle a maximum of 5 hyperparameters
B.It works well for continuous hyperparameters
C.It selects hyperparameter combinations based on previous trial results
D.It often finds optimal hyperparameters in fewer trials than random search
E.It requires more trials than grid search to find optimal values
AnswersB, C, D

Bayesian optimization handles continuous parameters naturally.

Why this answer

Options B, C, and D are correct. Bayesian optimization uses past trial results to select hyperparameter combinations (C), it works well for continuous hyperparameters (B), and it typically finds optimal values in fewer trials than random search (D). Option A is false because Bayesian optimization can handle many hyperparameters, not just 5.

Option E is false because Bayesian optimization generally requires fewer trials than grid search, not more.

1503
MCQhard

A company uses Amazon SageMaker to train a model. The training job uses a custom Docker container. The job fails with the error 'CannotStartContainerError: API error (500).' Which of the following is the most likely cause?

A.The Docker image is built for a different CPU architecture.
B.The training script has a syntax error.
C.The S3 input data is missing.
D.The output path is not writable.
AnswerA

Incompatible architecture prevents container from running.

Why this answer

The error 'CannotStartContainerError: API error (500)' occurs when the Docker daemon on the SageMaker training instance fails to start the container. The most common cause is a CPU architecture mismatch: if the Docker image is built for a different architecture (e.g., ARM64) than the SageMaker training instance (which uses x86_64), the container cannot execute. SageMaker training instances are x86_64-based, so an image built for ARM64 will trigger this error at container launch time.

Exam trap

The trap here is that candidates confuse container start errors with runtime errors — they often pick 'syntax error' or 'missing data' because those are common training failures, but the specific Docker API error points to a pre-execution infrastructure issue, not a code or data problem.

How to eliminate wrong answers

Option B is wrong because a syntax error in the training script would cause a Python runtime error during execution, not a container start failure — the container would start successfully and then fail. Option C is wrong because missing S3 input data would result in a 'FileNotFoundError' or S3 access error during training, not a Docker API error at container start. Option D is wrong because an unwritable output path would cause a permission error or 'OSError' during the training job, not a container initialization failure — the container would start and then fail to write output.

1504
MCQmedium

A company has a time series dataset of daily sales for the past 5 years. They want to forecast sales for the next 30 days. The data shows weekly seasonality and a slight upward trend. Which Amazon SageMaker algorithm is most appropriate for this task?

A.DeepAR
B.Linear Learner
C.XGBoost
D.K-Means
AnswerA

DeepAR is a built-in SageMaker algorithm for time series forecasting that handles seasonality and trends.

Why this answer

DeepAR is purpose-built for time series forecasting with seasonal patterns and trends. It uses a recurrent neural network (RNN) to model the conditional distribution of future values given past observations, and it natively handles multiple time series, missing data, and known seasonal periods (e.g., weekly). The weekly seasonality and upward trend in the daily sales data are exactly the kind of patterns DeepAR is designed to capture.

Exam trap

The trap here is that candidates often pick XGBoost (Option C) because it is a powerful tree-based model, but they overlook that it lacks native time series capabilities and requires manual feature engineering to capture seasonality and trend, whereas DeepAR is the only option specifically designed for this forecasting task.

How to eliminate wrong answers

Option B (Linear Learner) is wrong because it is a general-purpose linear regression or classification algorithm that cannot model seasonality or temporal dependencies without extensive manual feature engineering (e.g., lag variables, Fourier terms). Option C (XGBoost) is wrong because while it can be used for time series via feature engineering, it is not a dedicated forecasting algorithm and does not natively handle temporal order, autocorrelation, or seasonality; it treats each prediction as an independent regression task. Option D (K-Means) is wrong because it is an unsupervised clustering algorithm that groups data points by similarity and has no mechanism for forecasting future values in a time series.

1505
MCQmedium

A company wants to deploy a machine learning model that performs real-time inference with sub-second latency. The model is a deep neural network with 500 MB of weights. The inference endpoint must scale to zero when not in use to minimize cost. Which AWS service should the company use?

A.Deploy the model as an AWS Lambda function with provisioned concurrency.
B.Use Amazon SageMaker Serverless Inference to host the model.
C.Host the model on Amazon ECS with Fargate and use a target tracking scaling policy.
D.Create an Amazon SageMaker real-time endpoint with automatic scaling policies.
AnswerB

SageMaker Serverless Inference automatically scales to zero when idle, reducing costs, and can handle sub-second latency for suitable workloads. It also supports large model sizes.

Why this answer

Amazon SageMaker Serverless Inference is designed for workloads with intermittent traffic patterns, automatically scaling to zero when idle and scaling up for real-time requests. It supports models up to 1 GB in size and provides sub-second latency for inference, making it ideal for this 500 MB deep neural network. This service eliminates the need to manage underlying infrastructure while meeting the latency and cost requirements.

Exam trap

The trap here is that candidates often confuse SageMaker Serverless Inference with SageMaker real-time endpoints, assuming automatic scaling can reduce costs to zero, but real-time endpoints always require a minimum instance count, whereas Serverless Inference truly scales to zero.

How to eliminate wrong answers

Option A is wrong because AWS Lambda has a maximum deployment package size of 250 MB (unzipped, including layers) and a 15-minute execution timeout, making it unsuitable for a 500 MB model and real-time inference with sub-second latency. Option C is wrong because Amazon ECS with Fargate does not natively scale to zero; it requires at least one running task to handle requests, and target tracking scaling policies maintain a baseline capacity, incurring costs even when idle. Option D is wrong because Amazon SageMaker real-time endpoints with automatic scaling policies cannot scale to zero; they maintain a minimum number of instances to ensure availability, leading to ongoing costs when not in use.

1506
MCQmedium

A machine learning team is deploying a model for real-time fraud detection. The model must make predictions with less than 100ms latency. The team uses SageMaker and the model is a large ensemble of decision trees. Which SageMaker hosting option is MOST suitable?

A.SageMaker Multi-model endpoint
B.SageMaker Serverless Inference
C.SageMaker Elastic Inference
D.SageMaker Batch Transform
AnswerB

Correct. SageMaker Serverless Inference provides automatic scaling and is ideal for real-time inference with low latency. For a constantly used model, cold starts are minimal, and the service handles the large ensemble efficiently.

Why this answer

SageMaker Serverless Inference is the most suitable option because it automatically scales to handle variable traffic and does not require managing underlying infrastructure. Although it may incur cold starts, for a constantly invoked fraud detection model the endpoint remains warm, achieving sub-100ms latency. The large ensemble of decision trees can be deployed as a single model on a Serverless endpoint, which is optimized for real-time inference with low latency and automatic scaling.

Exam trap

Candidates often select SageMaker Multi-model endpoint (Option A) thinking it is the only real-time option, but it is designed for hosting multiple independent models, not a single large ensemble. A regular real-time endpoint or Serverless Inference is more appropriate. Serverless avoids the overhead of managing instances and can achieve low latency when the endpoint is continuously invoked.

How to eliminate wrong answers

Option B (SageMaker Serverless Inference) is wrong because it has a cold start latency that can exceed 100ms, making it unsuitable for real-time fraud detection requiring consistent sub-100ms responses. Option C (SageMaker Elastic Inference) is wrong because it accelerates deep learning models by attaching GPU accelerators, but it does not benefit decision tree ensembles which are CPU-bound and do not leverage GPU acceleration. Option D (SageMaker Batch Transform) is wrong because it is designed for offline, asynchronous batch predictions on large datasets, not for real-time inference with low latency requirements.

1507
MCQmedium

A data scientist is analyzing a dataset with missing values. The missing data is not random and is correlated with other features. Which imputation method is most appropriate to minimize bias?

A.Last observation carried forward
B.Multiple imputation using MICE
C.Listwise deletion
D.Mean imputation
AnswerB

Correct: MICE models missing values using other features, suitable for non-random missingness.

Why this answer

Multiple Imputation by Chained Equations (MICE) accounts for relationships between features and preserves variability. Option A is wrong because last observation carried forward is only appropriate for time series data where missing values are filled with the previous observation; it does not handle non-random missing data correlated with other features. Option C is wrong because listwise deletion reduces sample size and may introduce bias when data is not missing completely at random.

Option D is wrong because mean imputation can bias estimates and reduce variability, especially when missingness is related to other features.

1508
MCQeasy

A data engineer needs to schedule an AWS Glue ETL job to run every hour. Which service should be used to trigger the job?

A.AWS Lambda
B.AWS Step Functions
C.Amazon CloudWatch Events (EventBridge)
D.AWS Data Pipeline
AnswerC

EventBridge can schedule cron jobs to trigger Glue.

Why this answer

Amazon CloudWatch Events (now part of Amazon EventBridge) is the correct service for scheduling AWS Glue ETL jobs on a recurring basis, such as every hour. It allows you to create a time-based rule using a cron or rate expression that triggers an AWS Glue job directly as a target, without needing additional compute or orchestration logic.

Exam trap

The trap here is that candidates often confuse AWS Lambda as a scheduler because it can be triggered by CloudWatch Events, but the question asks for the service that triggers the job, not the service that runs the trigger logic; EventBridge is the native scheduling service, while Lambda is a compute target.

How to eliminate wrong answers

Option A is wrong because AWS Lambda is a serverless compute service for running code in response to events, not a scheduling service; while you could use Lambda to invoke Glue, it adds unnecessary complexity and cost compared to a native scheduled trigger. Option B is wrong because AWS Step Functions is a workflow orchestration service designed for coordinating multiple AWS services and handling state, not for simple time-based scheduling; using it for a single hourly trigger would be over-engineering. Option D is wrong because AWS Data Pipeline is a batch data processing and orchestration service that is more heavyweight and designed for complex data workflows with dependencies, not for straightforward hourly job scheduling; it also requires managing pipeline definitions and resources that are unnecessary for this use case.

1509
MCQhard

You are a data engineer at a fintech company. The company processes real-time stock market data from multiple exchanges. The data is ingested via Amazon Kinesis Data Streams with 50 shards. Each record is about 1 KB, and the ingestion rate is 5,000 records per second. The data is consumed by a Java application running on Amazon ECS that performs real-time analytics and stores results in Amazon DynamoDB. Recently, the application has been experiencing high latency, and some records are stuck in the shards for minutes before being consumed. The CloudWatch metrics show that the application's CPU utilization is low, but the iterator age is increasing. The application uses the Kinesis Client Library (KCL) with a single worker. What is the most likely cause and how should it be fixed?

A.Increase the number of shards to 200 to provide more throughput.
B.Increase the CPU capacity of the ECS task by moving to a larger instance type.
C.Move the destination from DynamoDB to Amazon RDS to reduce write latency.
D.Scale the number of KCL workers to match the number of shards (e.g., 50 workers) to process shards in parallel.
AnswerD

A single worker can only process one shard at a time; with 50 shards, records in other shards wait. Multiple workers can process shards concurrently, reducing latency.

Why this answer

A single KCL worker processes all shards sequentially, causing high iterator age with 50 shards. Scaling to 50 workers (one per shard) enables parallel processing, reducing latency. Option A is incorrect because 50 shards provide up to 50 MB/s write capacity, far exceeding the actual ~5 MB/s (5000 records/sec * 1 KB).

Option B is incorrect because CPU utilization is low, indicating the bottleneck is not compute but parallelization. Option C is incorrect because DynamoDB write latency is not the issue; the problem is ingestion-side processing delay.

1510
MCQhard

An ML engineer is deploying a model on a SageMaker endpoint and wants to ensure that only authorized users and services can invoke the endpoint. The company uses AWS IAM for access control and requires that the endpoint be invoked only from within a specific VPC. What combination of actions should the engineer take? (Choose the single best answer.)

A.Use AWS CloudFront to restrict access based on IP addresses.
B.Use API Gateway in front of the SageMaker endpoint and attach a resource policy to API Gateway.
C.Create a VPC endpoint for Amazon SageMaker and attach a policy that only allows invocation from the VPC. Use IAM roles to restrict which users can invoke the endpoint.
D.Configure network ACLs on the VPC subnet to allow only the endpoint's security group.
AnswerC

VPC endpoint with policy ensures only traffic from the VPC can reach SageMaker API, and IAM controls user permissions.

Why this answer

It combines a VPC endpoint for SageMaker with an IAM policy to restrict invocation to authorized users and traffic originating from the specified VPC. A VPC endpoint (interface endpoint) uses AWS PrivateLink to allow private connectivity between the VPC and SageMaker without traversing the public internet, and attaching a resource-based policy to the endpoint ensures only requests from within the VPC are accepted. IAM roles then enforce user-level authorization, meeting both the VPC-only and IAM access control requirements.

Exam trap

The trap here is that candidates may confuse network-level controls (NACLs, security groups) with service-level access control (IAM and VPC endpoints), or assume that API Gateway is required to restrict VPC access, when SageMaker's native VPC endpoint with IAM policies directly satisfies the requirement without additional services.

How to eliminate wrong answers

Option A is wrong because AWS CloudFront is a content delivery network (CDN) that caches and distributes content at edge locations; it cannot front a SageMaker endpoint directly, and IP-based restrictions in CloudFront do not enforce VPC-origin traffic or integrate with SageMaker invocation. Option B is wrong because API Gateway in front of a SageMaker endpoint adds unnecessary latency and complexity, and its resource policies control API Gateway access, not SageMaker endpoint invocation; the requirement is to restrict the SageMaker endpoint itself, not to proxy through API Gateway. Option D is wrong because network ACLs (NACLs) are stateless firewalls that control traffic at the subnet level, but they cannot restrict invocation of a specific SageMaker endpoint; they also cannot enforce IAM-based authorization or ensure that only authorized users invoke the endpoint.

1511
MCQmedium

A data scientist is analyzing a dataset with missing values in a numeric column. The missing rate is 30% and the data is not missing completely at random. Which imputation method should the data scientist avoid to minimize bias?

A.Mean imputation
B.Model-based imputation using linear regression
C.k-Nearest Neighbors imputation
D.Multiple imputation using chained equations
AnswerA

Mean imputation can introduce bias and reduce variance, especially when data is not missing completely at random.

Why this answer

Mean imputation (Option A) should be avoided when data is not missing completely at random (NMAR) because it can introduce bias by underestimating variance and distorting the relationships between variables. Options B (model-based imputation), C (k-NN imputation), and D (multiple imputation) are more robust for non-random missing data as they account for patterns in the data and produce less biased estimates.

1512
MCQmedium

A company uses Amazon SageMaker to train a linear regression model. After training, the model shows high bias on the training set. Which action is MOST likely to reduce bias?

A.Add more features
B.Collect more training data
C.Apply L2 regularization
D.Deploy the model to a larger instance
AnswerA

More features can capture patterns better.

Why this answer

High bias indicates that the model is underfitting the training data, meaning it is too simple to capture the underlying patterns. Adding more features increases the model's capacity to learn complex relationships, directly addressing underfitting by reducing bias. In SageMaker, this can be done by engineering additional input columns or using feature transformations before training.

Exam trap

The trap here is that candidates confuse high bias with high variance and incorrectly choose regularization or more data, which are solutions for overfitting, not underfitting.

How to eliminate wrong answers

Option B is wrong because collecting more training data does not reduce bias; it primarily helps with high variance (overfitting) by providing more examples to generalize from. Option C is wrong because L2 regularization (ridge regression) penalizes large coefficients, which increases bias to reduce variance, making bias worse in an already underfit model. Option D is wrong because deploying the model to a larger instance affects inference performance (latency/throughput) but does not change the model's learned parameters or its bias-variance tradeoff.

1513
Multi-Selectmedium

A data scientist is exploring a dataset with 50 features and a binary target. The data scientist computes the correlation matrix and finds that two features, X1 and X2, have a correlation coefficient of 0.95. Which TWO actions should the data scientist consider? (Choose 2.)

Select 2 answers
A.Apply a log transformation to X1 and X2.
B.Remove one of the highly correlated features from the dataset.
C.Apply Principal Component Analysis (PCA) to the feature set.
D.Create an interaction term between X1 and X2.
E.Impute missing values for X1 and X2.
AnswersB, C

Removing one feature reduces multicollinearity.

Why this answer

Removing one of the highly correlated features reduces multicollinearity, which can stabilize model coefficients and improve interpretability. Option C is correct: Principal Component Analysis (PCA) transforms the correlated features into a set of uncorrelated components, effectively addressing multicollinearity. Option A is incorrect: Log transformation is used to handle skewness or scale differences, not correlation between features.

Option D is incorrect: Creating an interaction term would add a new feature that is highly correlated with the original ones, potentially increasing multicollinearity. Option E is incorrect: Imputing missing values is unrelated to feature correlation; missing value imputation addresses data completeness, not multicollinearity.

1514
Multi-Selecthard

Which THREE techniques can help reduce overfitting in a neural network? (Select THREE.)

Select 3 answers
A.Increase training epochs
B.Dropout
C.Early stopping
D.Increase the number of layers
E.L2 regularization
AnswersB, C, E

Dropout randomly drops units.

Why this answer

Dropout is correct because it randomly deactivates a fraction of neurons during training, forcing the network to learn redundant representations and preventing co-adaptation of features. This reduces overfitting by acting as an ensemble method without increasing computational cost at inference time.

Exam trap

AWS often tests the misconception that adding more capacity (layers/epochs) always improves performance, when in fact it increases overfitting without proper regularization.

1515
MCQmedium

A data science team needs to process streaming data from thousands of IoT devices and perform real-time anomaly detection. The data must be persisted in Amazon S3 for batch processing later. Which combination of AWS services should be used to meet these requirements?

A.Amazon Kinesis Data Streams for ingestion, Amazon Kinesis Data Analytics for anomaly detection, and Amazon Kinesis Data Firehose to deliver data to Amazon S3.
B.Amazon Kinesis Data Streams for ingestion, AWS Glue for anomaly detection, and Amazon S3 for storage.
C.AWS Lambda for both ingestion and anomaly detection, and Amazon S3 for storage.
D.Amazon Simple Queue Service (SQS) for ingestion, AWS Lambda for anomaly detection, and Amazon S3 for storage.
AnswerA

This combination provides real-time ingestion, analytics, and durable storage.

Why this answer

Amazon Kinesis Data Streams provides durable, real-time ingestion for high-throughput IoT data. Kinesis Data Analytics can perform SQL-based anomaly detection on the stream, and Kinesis Data Firehose reliably delivers the processed or raw data to Amazon S3 for batch processing. This combination meets all requirements for streaming ingestion, real-time analytics, and persistent storage.

Exam trap

The trap here is that candidates may confuse AWS Glue's batch processing capabilities with real-time streaming analytics, or assume Lambda can handle continuous high-throughput ingestion without considering its timeout and scaling limitations.

How to eliminate wrong answers

Option B is wrong because AWS Glue is a batch ETL service, not designed for real-time anomaly detection on streaming data. Option C is wrong because AWS Lambda has a maximum execution timeout of 15 minutes and is not suitable for continuous high-throughput ingestion from thousands of devices, nor does it natively support persistent streaming state for anomaly detection. Option D is wrong because Amazon SQS is a message queue for decoupled communication, not a streaming ingestion service, and it lacks the ordering and replay capabilities needed for real-time anomaly detection on IoT data streams.

1516
MCQmedium

A data scientist is working with a dataset containing 10,000 observations and 100 features. The scientist wants to detect outliers in the dataset. Which method is most appropriate for outlier detection in a high-dimensional space?

A.Use Z-score to identify points beyond 3 standard deviations
B.Use Isolation Forest
C.Use Mahalanobis distance
D.Use interquartile range (IQR) for each feature
AnswerB

Isolation Forest is designed for high-dimensional data and does not assume distribution.

Why this answer

Isolation Forest is the most appropriate method for outlier detection in high-dimensional space because it isolates anomalies by randomly splitting features, making it effective for high-dimensional data without assuming any underlying distribution. Option A is wrong because Z-score assumes normality and is univariate, unsuitable for high-dimensional data. Option C is wrong because Mahalanobis distance assumes multivariate normality and can be computationally expensive and sensitive to high dimensionality.

Option D is wrong because IQR is univariate and does not capture interactions between features in high-dimensional spaces.

1517
MCQmedium

A machine learning team needs to process a large dataset stored in Amazon S3 using Apache Spark. They want to minimize cost and avoid managing infrastructure. Which AWS service should they use?

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

Glue provides serverless Spark for ETL on S3 data.

Why this answer

AWS Glue is a fully managed, serverless Spark environment that eliminates infrastructure management. It directly meets the requirement to process large datasets in S3 with Apache Spark while minimizing cost, as you only pay for resources consumed during job execution. Glue also integrates natively with S3 and the broader AWS ecosystem, making it the optimal choice for this use case.

Exam trap

The trap here is that candidates often confuse Amazon EMR's managed cluster feature with 'serverless,' but EMR still requires provisioning and managing EC2 instances, whereas AWS Glue is truly serverless and infrastructure-free.

How to eliminate wrong answers

Option B (Amazon Athena) is wrong because it is a serverless query service for SQL-based analysis, not a platform for running Apache Spark jobs. Option C (Amazon EMR) is wrong because, while it supports Spark, it requires managing EC2 clusters and infrastructure, contradicting the 'avoid managing infrastructure' requirement. Option D (Amazon SageMaker) is wrong because it is a machine learning platform for building, training, and deploying models, not a general-purpose Spark processing service.

1518
Matchingmedium

Match each AWS service to its primary purpose in a machine learning pipeline.

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

Concepts
Matches

Build, train, and deploy ML models

ETL and data cataloging

Object storage for datasets and models

Serverless compute for preprocessing

Image and video analysis

Why these pairings

The correct matches associate each service with its primary ML pipeline role. SageMaker is for end-to-end ML, Lambda for serverless inference, S3 for data/model storage, Glue for data preparation. Distractors confuse these roles.

1519
MCQeasy

A company is building a data pipeline to process streaming data from IoT devices. The data must be ingested with low latency, transformed in real-time using custom logic, and stored in Amazon S3 partitioned by device ID and timestamp. Which combination of AWS services should the company use to meet these requirements?

A.Amazon Kinesis Data Firehose with direct S3 delivery
B.Amazon Managed Streaming for Apache Kafka (MSK) with Amazon S3 sink connector
C.Amazon DynamoDB Streams with AWS Lambda and Amazon S3
D.Amazon Kinesis Data Streams with AWS Lambda and Amazon S3
AnswerD

Kinesis Data Streams for ingestion, Lambda for real-time transformation, and S3 for storage with partitioning.

Why this answer

Amazon Kinesis Data Streams provides low-latency ingestion of streaming data, AWS Lambda can apply custom transformation logic in real-time, and the transformed data can be stored in Amazon S3 with partitioning by device ID and timestamp using AWS Lambda to write to S3 with appropriate prefix. Option A is incorrect because Kinesis Data Firehose does not support custom transformation without invoking a Lambda function and cannot partition on write at the level of granularity required (device ID and timestamp). Option B is incorrect because Amazon MSK adds operational overhead and is more complex than needed; although an S3 sink connector can write to S3, it does not easily support custom transformation and partitioning by device ID and timestamp without additional configuration.

Option C is incorrect because DynamoDB Streams is designed for change data capture from DynamoDB tables and is not suitable for direct ingestion of high-volume IoT streaming data.

1520
MCQhard

A data scientist uses Amazon SageMaker Data Wrangler to explore a dataset. The target column is 'price' (continuous). Which EDA analysis would best help decide between linear regression and tree-based models?

A.Compute variance inflation factor (VIF) for features
B.Check linear relationships between features and target
C.Detect outliers using Z-score
D.Identify class imbalance in the target
AnswerB

Checking linear relationships (e.g., scatter plots of features vs. target) helps determine whether linear regression is appropriate or if tree-based models (which capture non-linear patterns) would perform better.

Why this answer

Checking linear relationships (e.g., scatter plots of features vs. target) helps determine whether linear regression is appropriate or if tree-based models (which capture non-linear patterns) would perform better. Option A (VIF) is used to detect multicollinearity, which affects linear regression but does not directly guide model selection between linear and tree models. Option C (Z-score) identifies outliers, which is important but not the primary factor for deciding between these model types.

Option D (class imbalance) is relevant for classification problems, not regression.

1521
MCQmedium

A data engineer needs to continuously ingest streaming data from thousands of IoT devices and store the raw data in Amazon S3 for archival processing. The data volume varies significantly throughout the day, and the solution must be serverless, scalable, and cost-effective. Which AWS service should be used to capture and buffer the streaming data before writing to S3?

A.Amazon Kinesis Data Firehose
B.Amazon Kinesis Data Streams
C.AWS Glue
D.Amazon Simple Queue Service (SQS)
AnswerA

Kinesis Data Firehose is a serverless service that can directly deliver streaming data to S3 with buffering.

Why this answer

Amazon Kinesis Data Firehose is the correct choice because it is a fully managed, serverless service designed to reliably capture, buffer, and automatically load streaming data into Amazon S3 without requiring any custom code or infrastructure management. It handles variable data volumes by scaling automatically and provides built-in buffering (up to 128 MB or 900 seconds) before writing to S3, making it cost-effective for archival storage.

Exam trap

The trap here is that candidates confuse Kinesis Data Streams (a real-time processing layer requiring custom consumers) with Kinesis Data Firehose (a managed delivery service), and overlook that Firehose's built-in buffering and direct S3 integration make it the serverless, cost-effective choice for archival ingestion.

How to eliminate wrong answers

Option B (Amazon Kinesis Data Streams) is wrong because it is a real-time data streaming service that requires consumers to process and write data to S3, and it does not provide built-in buffering or automatic S3 delivery; it is designed for custom real-time processing, not direct archival ingestion. Option C (AWS Glue) is wrong because it is a serverless ETL service for batch data transformation and cataloging, not a streaming ingestion or buffering service; it cannot capture or buffer streaming data in real time. Option D (Amazon Simple Queue Service - SQS) is wrong because it is a message queue for decoupling application components, not a streaming data ingestion service; it lacks the throughput, buffering, and automatic S3 delivery capabilities needed for high-volume IoT data.

1522
MCQmedium

A company uses Amazon SageMaker Data Wrangler to perform exploratory data analysis. They want to detect outliers in a numerical column using the Interquartile Range (IQR) method. Which transformation should they apply in Data Wrangler?

A.Impute
B.Normalize
C.Handle outliers
D.Binning
AnswerC

This transform supports IQR method.

Why this answer

Amazon SageMaker Data Wrangler provides a 'Handle outliers' transform that supports IQR-based outlier detection. Option A (Impute) is used to fill missing values, not detect outliers. Option B (Normalize) scales data to a standard range.

Option D (Binning) groups continuous values into intervals. Therefore, the correct transform to apply for IQR outlier detection is 'Handle outliers'.

1523
Multi-Selectmedium

A data scientist is exploring a dataset with skewed numerical features. Which THREE transformations can help make the features more normally distributed?

Select 3 answers
A.Min-max scaling
B.Standardization (Z-score)
C.Yeo-Johnson transformation
D.Box-Cox transformation
E.Log transformation
AnswersC, D, E

Correct: Yeo-Johnson works for both positive and negative values.

Why this answer

Correct options: C, D, E. Yeo-Johnson transformation (C), Box-Cox transformation (D), and log transformation (E) are all effective for making skewed numerical features more normally distributed. Option A, min-max scaling, only rescales the feature to a fixed range and does not change the distribution shape.

Option B, standardization (Z-score), centers and scales the data but does not alter skewness.

1524
MCQeasy

A company uses Amazon SageMaker to deploy a model that predicts customer churn. The model is retrained weekly. The data scientist notices that the model's accuracy remains high, but the business reports that the model is not capturing new churn patterns. What is the most likely cause?

A.The model is underfitting the data
B.The model has data leakage from future data
C.The model is overfitting to the training data
D.The model is experiencing concept drift
AnswerD

Concept drift means the underlying data distribution changes, so the model's accuracy on old patterns remains high but it misses new patterns.

Why this answer

Concept drift occurs when the statistical properties of the target variable change over time, causing the model's predictions to become less relevant even if accuracy metrics remain high. In this scenario, the model is retrained weekly but still fails to capture new churn patterns because the underlying customer behavior has shifted—a classic sign of concept drift rather than a data or overfitting issue. Amazon SageMaker's built-in Model Monitor can detect such drift by comparing inference data distributions against a baseline.

Exam trap

The trap here is that candidates see 'accuracy remains high' and assume the model is overfitting or underfitting, but the key clue is 'not capturing new churn patterns'—which points to a shift in the underlying data distribution (concept drift), not a static model fit issue.

How to eliminate wrong answers

Option A is wrong because underfitting would manifest as consistently low accuracy on both training and test data, not as high accuracy with missed new patterns. Option B is wrong because data leakage from future data would cause unrealistically high performance during training and evaluation, not a failure to capture new churn patterns after deployment. Option C is wrong because overfitting would show high training accuracy but poor generalization on unseen data from the same distribution, whereas the problem here is that the data distribution itself has changed over time.

1525
MCQhard

A data scientist is using SageMaker to train a random forest model. The dataset has 100 features and 1 million rows. The training job fails with a 'ResourceLimitExceeded' error. What is the MOST likely cause?

A.The S3 bucket containing the training data is not in the same region.
B.The instance type selected does not have enough GPU memory.
C.The wrong algorithm was specified for the training job.
D.The account has reached its limit on the number of SageMaker training instances.
AnswerD

ResourceLimitExceeded indicates a service quota limit.

Why this answer

The 'ResourceLimitExceeded' error indicates that the account has reached its limit on the number of SageMaker training instances or vCPUs. Option A (S3 bucket region) would cause a different error, not a resource limit. Option B (GPU memory) is unlikely because random forest models typically use CPU instances.

Option C (wrong algorithm) would result in an algorithm-specific error, not a resource limit. Option D correctly identifies that the account limit has been exceeded.

1526
MCQmedium

A data scientist is training a deep learning model on Amazon SageMaker for image classification. The training is taking a long time and the GPU utilization is consistently below 30%. What should the data scientist do to improve GPU utilization and reduce training time?

A.Use early stopping to stop training earlier.
B.Increase the batch size.
C.Switch to a CPU-only instance.
D.Reduce the number of layers in the model.
AnswerB

Larger batches use GPU memory more efficiently and increase utilization.

Why this answer

Low GPU utilization (below 30%) indicates that the GPU is spending most of its time waiting for data to process, often due to small batch sizes that underutilize the GPU's parallel compute capacity. Increasing the batch size allows the GPU to process more samples per forward/backward pass, improving arithmetic intensity and hardware utilization, which directly reduces total training time on SageMaker.

Exam trap

The trap here is that candidates confuse 'low GPU utilization' with 'overfitting' or 'model complexity,' leading them to choose early stopping or reducing layers, when the real issue is insufficient data parallelism per batch.

How to eliminate wrong answers

Option A is wrong because early stopping halts training based on validation performance, but it does not address the root cause of low GPU utilization or improve hardware efficiency during each training step. Option C is wrong because switching to a CPU-only instance would drastically reduce computational throughput, making training even slower and further underutilizing resources. Option D is wrong because reducing the number of layers decreases model capacity and may harm accuracy, but it does not directly improve GPU utilization; the bottleneck is data throughput, not model depth.

1527
MCQhard

A data engineering team is designing a data pipeline to process large CSV files (10-50 GB each) stored in Amazon S3. The pipeline must transform the data using AWS Glue and load it into Amazon Redshift for analytics. The team wants to minimize costs while ensuring the pipeline can handle peak loads. Which approach is the most cost-effective?

A.Use AWS Lambda to process each file and load into Redshift.
B.Use Amazon EMR with Hive to transform the data and load into Redshift.
C.Use an AWS Glue Python shell job with a single r5.xlarge worker.
D.Use AWS Glue with Spark and dynamic frames, scaling the number of workers based on file size.
AnswerD

Correct: Glue Spark jobs handle large files efficiently; dynamic frames simplify schema handling.

Why this answer

AWS Glue with Spark and dynamic frames is the most cost-effective approach because it is serverless, automatically scales workers based on file size, and is optimized for ETL on large CSV files (10-50 GB) in S3. Dynamic frames provide built-in transformations and schema inference, reducing development effort, while the ability to adjust the number of workers allows handling peak loads without over-provisioning. This minimizes idle compute costs compared to always-on clusters like EMR.

Exam trap

The trap here is that candidates often choose AWS Lambda (Option A) for its low cost and simplicity, failing to recognize its strict execution limits (15-minute timeout, 10 GB memory) that make it impractical for multi-GB file processing, or they pick EMR (Option B) assuming it is always cheaper, ignoring the overhead of cluster management and idle costs.

How to eliminate wrong answers

Option A is wrong because AWS Lambda has a maximum execution timeout of 15 minutes and a 10 GB memory limit, making it unsuitable for processing 10-50 GB CSV files, and it lacks native support for complex transformations or direct Redshift loading at scale. Option B is wrong because Amazon EMR with Hive requires provisioning and managing a persistent cluster, incurring costs even when idle, and Hive is less performant for large-scale CSV transformations compared to Spark-based Glue jobs. Option C is wrong because an AWS Glue Python shell job runs on a single worker (r5.xlarge) with limited memory and no distributed processing, making it unable to handle 10-50 GB files efficiently, leading to out-of-memory errors or excessive runtime.

1528
Multi-Selecteasy

During EDA, a data scientist notices that a numeric feature 'age' has values ranging from 0 to 150, but expects adult ages between 18-100. Which TWO steps should the scientist take to investigate?

Select 2 answers
A.Remove all rows with age > 100
B.Compute summary statistics (min, max, percentiles)
C.Apply log transformation to normalize the distribution
D.Impute age values outside 18-100 with the mean
E.Create a box plot to visualize outliers
AnswersB, E

Correct because it helps identify the range and potential outliers.

Why this answer

Computing summary statistics (min, max, percentiles) helps identify the range and potential outliers in the 'age' feature. Option E is correct because a box plot visualizes the distribution and clearly shows outliers, allowing the data scientist to investigate further. Option A is incorrect because removing rows with age > 100 without understanding the context may discard valid data (e.g., errors or special cases).

Option C is incorrect because log transformation changes the scale but does not help in identifying outliers; it is used to handle skewed distributions. Option D is incorrect because imputing age values outside 18-100 with the mean would distort the distribution and is not appropriate for investigating outliers; it should only be considered after understanding the nature of the outliers.

1529
MCQeasy

A data scientist is exploring a dataset and wants to check for missing values. Which method is most appropriate to identify the percentage of missing values per column?

A.Use Amazon S3 Select to query missing values
B.Use Amazon Athena to run a SELECT COUNT(*) query
C.Use Amazon QuickSight to create a missing value dashboard
D.Use AWS Glue Crawler to detect missing values
E.Use pandas .isnull().sum() in a SageMaker notebook
AnswerE

This is a direct and efficient way to count missing values per column.

Why this answer

Using pandas .isnull().sum() in a SageMaker notebook is the most appropriate method because it directly provides the count (and thus the percentage when divided by total rows) of missing values per column, which is a standard exploratory data analysis technique. Option A is incorrect because Amazon S3 Select is used for filtering and retrieving subsets of data from S3 objects, not for computing missing values. Option B is incorrect because while Amazon Athena can run SQL queries like SELECT COUNT(*), it is less direct for per-column missing value analysis and requires a schema.

Option C is incorrect because Amazon QuickSight is a visualization tool, not designed for programmatic missing value detection. Option D is incorrect because AWS Glue Crawler discovers schema and partitions, not missing values.

1530
MCQmedium

A data scientist is training a binary classification model on a dataset with 100 features and 10,000 samples. The model achieves 99% accuracy on the training set but only 65% on the test set. Which technique should be applied first to address this issue?

A.Reduce the size of the training dataset
B.Increase the number of trees in a random forest
C.Apply L2 regularization to the model
D.Add more features to the model
AnswerC

L2 regularization penalizes large weights, reducing overfitting.

Why this answer

The symptoms indicate overfitting. Regularization (L1/L2) is a direct method to reduce overfitting by penalizing large coefficients. Option A is wrong because reducing the size of the training dataset would worsen overfitting.

Option B is wrong because increasing the number of trees in a random forest could help reduce overfitting in some cases, but it's not the first technique to apply; regularization is more direct. Option D is wrong because adding more features would increase model complexity and worsen overfitting.

1531
MCQmedium

A machine learning engineer is examining a dataset containing text reviews. They want to convert the text into numerical features for a model. During EDA, they notice that the word 'the' appears in almost every review, while words like 'excellent' appear rarely. Which of the following techniques should they use to reduce the impact of very common words?

A.Apply TF-IDF transformation.
B.Remove stopwords from the text.
C.Use word2vec embeddings.
D.Use a bag-of-words representation.
AnswerA

TF-IDF downweights common words across documents, reducing their impact.

Why this answer

TF-IDF transformation downweights common words (like 'the') and emphasizes rare but informative words (like 'excellent'). Option B (removing stopwords) is insufficient because it does not adjust for frequency beyond removing a predefined list; TF-IDF handles frequency weighting. Option C (word2vec embeddings) captures semantic relationships but does not specifically reduce the impact of common words.

Option D (bag-of-words) does not perform any weighting, so common words dominate.

1532
Multi-Selectmedium

A data scientist is building a text classification model using a bag-of-words approach. The dataset contains 100,000 documents with a vocabulary of 50,000 unique words. The model is overfitting. Which THREE techniques can help reduce overfitting? (Choose THREE.)

Select 3 answers
A.Increase max_features to include more words
B.Apply L1 or L2 regularization
C.Reduce the n-gram range to unigrams only
D.Use feature selection to remove rare words
E.Use TF-IDF instead of raw counts
AnswersB, C, D

Regularization penalizes large coefficients, reducing overfitting.

Why this answer

Regularization (L1/L2), reducing n-gram range to unigrams, and feature selection (removing rare words) all reduce model complexity and help prevent overfitting. Option A (increasing max_features) increases complexity and can worsen overfitting. Option E (TF-IDF) is a weighting scheme, not a regularization technique.

1533
MCQhard

A company runs a real-time recommendation system that uses Amazon SageMaker endpoints for inference. The system ingests user activity data from a mobile app via Amazon API Gateway and AWS Lambda, which writes events to an Amazon Kinesis Data Stream. A second Lambda function consumes the stream, calls a SageMaker endpoint to generate recommendations, and stores the results in Amazon DynamoDB. The system has been working well, but recently the team noticed an increase in latency from the time a user action occurs to when the recommendation is stored. The SageMaker endpoint shows increased invocation latency but no throttling. CloudWatch metrics show that the Kinesis stream's IteratorAgeMilliseconds is increasing, indicating the consumer is falling behind. The Lambda consumer's duration is within limits, but the number of invocations is lower than expected. The team suspects the issue is with the event source mapping. Which course of action should the team take to reduce the latency?

A.Increase the batch size in the event source mapping to process more records per invocation.
B.Increase the number of shards in the Kinesis data stream to increase parallelism.
C.Decrease the Lambda function's reserved concurrency to force it to scale down.
D.Replace the Lambda consumer with an Amazon Kinesis Data Firehose delivery stream.
AnswerA

Larger batches improve throughput by reducing overhead per invocation.

Why this answer

The increasing IteratorAgeMilliseconds indicates the consumer is falling behind. The Lambda consumer's duration is within limits but the number of invocations is lower than expected, suggesting that the event source mapping is not invoking the function often enough. Increasing the batch size allows each invocation to process more records per invocation, effectively increasing throughput without requiring more invocations.

This directly addresses the lag. Option B (increase shards) could help if the consumer had sufficient concurrency, but the root cause is low invocations per shard, not lack of shards. Option C (decrease reserved concurrency) would worsen the problem.

Option D (Firehose) does not solve the consumer lag and changes the architecture unnecessarily.

1534
MCQeasy

A data scientist is exploring a dataset with 100 features. The goal is to build a binary classification model. The dataset is highly imbalanced with 95% negative class and 5% positive class. The data scientist wants to understand the relationship between features and the target. Which technique is most appropriate for initial exploratory analysis?

A.Remove the minority class samples and analyze the majority class only.
B.Use stratified sampling to create a balanced subset for visualization and correlation analysis.
C.Use random sampling to select 10% of the data for EDA.
D.Apply SMOTE to the dataset before performing EDA.
AnswerB

Stratified sampling preserves the proportion of each class and ensures the minority class is included in the analysis.

Why this answer

Stratified sampling preserves the class proportions, ensuring that the minority class (5% positive) is adequately represented in the subset for visualization and correlation analysis. Option A is wrong because removing the minority class would prevent any analysis of the target relationship. Option C is wrong because random sampling could miss the rare positive class entirely, leading to biased insights.

Option D is wrong because SMOTE is a synthetic data generation technique intended for training, not for initial exploratory analysis.

1535
MCQhard

A company is using Amazon SageMaker to train a model with a custom algorithm. The training script reads data from an S3 bucket using boto3. The training job fails with an 'AccessDenied' error when trying to access the S3 bucket. The IAM role attached to the SageMaker notebook instance has full S3 access. What is the most likely cause?

A.The S3 bucket has a bucket policy that denies access from the SageMaker service.
B.The SageMaker execution role used for the training job does not have S3 access permissions.
C.The training script is using an incorrect S3 bucket name.
D.The SageMaker training job is not configured to use the S3 VPC endpoint.
AnswerB

The training job uses its own execution role, which must be granted S3 access.

Why this answer

The IAM role attached to the SageMaker notebook instance is used for interactive development, but training jobs run under a separate SageMaker execution role. Even if the notebook role has full S3 access, the training job's execution role must also have explicit S3 permissions. The 'AccessDenied' error indicates that the execution role lacks the necessary s3:GetObject or s3:ListBucket actions for the S3 bucket.

Exam trap

The trap here is that candidates confuse the IAM role attached to the SageMaker notebook instance with the execution role used by the training job, assuming they are the same or that permissions propagate automatically.

How to eliminate wrong answers

Option A is wrong because a bucket policy that denies SageMaker access would typically produce a different error (e.g., 'AccessDenied' with a specific denial message), and the question states the role has full S3 access, so a bucket policy conflict is less likely than a missing execution role permission. Option C is wrong because an incorrect bucket name would result in a 'NoSuchBucket' or '404' error, not an 'AccessDenied' error. Option D is wrong because a missing S3 VPC endpoint would cause a network timeout or connectivity error, not an IAM permission error, and SageMaker can access S3 over the public internet by default.

1536
Multi-Selectmedium

Which TWO of the following are valid techniques to handle missing data in a dataset?

Select 2 answers
A.Normalizing the data
B.Adding a constant value of 0
C.Mean imputation
D.Synthetic Minority Over-sampling (SMOTE)
E.Deleting rows with missing values
AnswersC, E

Replacing missing values with the mean is a standard technique.

Why this answer

Mean imputation (Option C) is a valid technique for handling missing data because it replaces missing values with the mean of the observed values for that feature, preserving the overall mean of the dataset. This approach is simple and effective for numerical data that is missing completely at random (MCAR), as it does not introduce bias in the mean estimate.

Exam trap

The MLS-C01 exam often tests the distinction between data preprocessing techniques (like imputation) and other unrelated techniques (like normalization or SMOTE), so the trap here is that candidates may confuse SMOTE or normalization as valid missing data handling methods because they are common preprocessing steps, but they serve entirely different purposes.

1537
MCQhard

A data scientist is performing EDA on a dataset with 100 features. They want to identify which features are most predictive of the target using a model-agnostic method. Which technique should they use?

A.Pearson correlation matrix
B.L1 regularization
C.SHAP values
D.Permutation feature importance
AnswerD

Permutation importance works with any model and measures drop in performance when a feature is shuffled.

Why this answer

Permutation feature importance is the correct model-agnostic method because it measures the increase in prediction error after permuting a feature's values, breaking the relationship with the target, and works with any model. Pearson correlation (A) is bivariate and only captures linear relationships. L1 regularization (B) is model-specific to linear models and embeds feature selection within the model.

SHAP values (C) are model-specific as they rely on game theory and require model outputs for calculation.

1538
Multi-Selectmedium

A company is building a data lake on Amazon S3 and wants to ensure that data is encrypted at rest using AWS KMS. Which TWO actions are required to achieve this? (Choose TWO.)

Select 2 answers
A.Configure the KMS key policy to allow the S3 service to use the key
B.Enable default encryption on the S3 bucket with SSE-KMS
C.Add a bucket policy that denies PutObject without encryption
D.Enable encryption in transit using HTTPS for all S3 API calls
E.Use client-side encryption on all data before uploading
AnswersA, B

The key policy must grant the S3 service principal permission to encrypt/decrypt.

Why this answer

AWS KMS uses key policies to control access to the KMS key. For S3 to use a KMS key for server-side encryption (SSE-KMS), the key policy must grant the S3 service principal (or the bucket owner's account) the necessary permissions, such as kms:Encrypt and kms:Decrypt. Without this policy, S3 cannot access the key to encrypt or decrypt objects at rest.

Option B is correct because enabling default encryption on the S3 bucket with SSE-KMS ensures that all objects uploaded to the bucket are automatically encrypted using the specified KMS key, meeting the requirement for encryption at rest.

Exam trap

The trap here is that candidates often confuse 'encryption at rest' with 'encryption in transit' or 'enforcing encryption via bucket policies,' and may select options like C or D, which address different security controls, instead of focusing on the specific mechanism (SSE-KMS) and the necessary KMS key policy configuration.

1539
Multi-Selectmedium

A company uses Amazon SageMaker to train a linear regression model. During evaluation, they observe that the model has high bias (underfitting). Which THREE actions can reduce bias?

Select 3 answers
A.Increase L2 regularization.
B.Add polynomial features.
C.Reduce the regularization strength.
D.Use a smaller training dataset.
E.Use a random forest model instead of linear regression.
AnswersB, C, E

Polynomial features increase model capacity, reducing bias.

Why this answer

Options B, C, and E are correct. Bias (underfitting) occurs when the model is too simple to capture patterns in the data. Adding polynomial features (B) increases model complexity, allowing the linear regression to fit non-linear relationships.

Reducing regularization strength (C) reduces the penalty on large coefficients, letting the model fit the training data more closely. Using a random forest model (E) is a more complex algorithm capable of capturing non-linear patterns, thus reducing bias. Option A (increasing L2 regularization) increases bias by penalizing large weights.

Option D (using a smaller training dataset) typically increases bias due to less data.

1540
Drag & Dropmedium

Drag and drop the steps to set up cross-validation in a SageMaker training job using the built-in XGBoost algorithm in the correct order.

Drag steps to the numbered slots on the right, or tap a step then tap a slot.

Steps
Order
1Step 1
2Step 2
3Step 3
4Step 4

Why this order

Cross-validation requires data splitting, job configuration with CV parameters, execution, and model selection.

1541
MCQmedium

A data scientist is performing EDA and observes that a feature 'purchase_amount' has many zeros and a long tail of positive values. What type of model would be appropriate for this target variable?

A.Zero-inflated negative binomial regression.
B.Linear regression after log transformation.
C.Logistic regression on binary indicator of purchase.
D.Poisson regression.
AnswerA

Zero-inflated negative binomial regression handles both the excess zeros and the overdispersion common in such data.

Why this answer

Zero-inflated negative binomial regression models are designed for count data with a high frequency of zeros, which matches the 'purchase_amount' feature having many zeros and a long tail of positive values. Option B is incorrect: Log transformation does not handle the zero-inflation problem; zeros become undefined or need adjustment. Option C is incorrect: Logistic regression is for binary outcomes, not continuous or count data.

Option D is incorrect: Poisson regression accommodates count data but assumes the variance equals the mean and does not handle excess zeros; zero-inflation violates this assumption.

1542
MCQmedium

A data scientist is training a text classification model using Amazon SageMaker's BlazingText algorithm. The dataset consists of 1 million documents, each labeled with one of 10 categories. The model achieves 92% accuracy on a held-out test set. However, when deployed, the model performs poorly on documents containing slang and typos. What should the data scientist do to improve model robustness?

A.Remove all documents with slang or typos from the training set.
B.Augment the training data by introducing common slang replacements and typos.
C.Increase the embedding dimension from 100 to 300.
D.Increase the number of training epochs.
AnswerB

Data augmentation exposes the model to realistic noise, improving robustness.

Why this answer

Data augmentation by introducing common slang replacements and typos into the training data increases the model's robustness to such variations, helping it generalize better to real-world text that contains slang and typos. Removing such documents (Option A) reduces the training data and does not teach the model to handle these variations. Increasing the embedding dimension (Option C) or number of epochs (Option D) does not directly address the issue of slang and typos.

1543
MCQeasy

A data scientist needs to run a one-time query on 10 TB of data stored in S3 using Amazon Athena. The query scans 5 TB and returns a small result set. Which approach minimizes cost?

A.Query the data directly in Athena without any preprocessing
B.Create an S3 Select query to filter data before Athena
C.Use Amazon Redshift Spectrum to query the data
D.Use AWS Glue to convert the data to Parquet format and repartition by date
AnswerA

For a one-time query, scanning 5 TB at $5 per TB is $25, which is minimal compared to preprocessing costs.

Why this answer

Athena charges based on the amount of data scanned per query. Since this is a one-time query on 10 TB of data that scans only 5 TB, querying directly in Athena without preprocessing is the most cost-effective approach because you pay only for the 5 TB scanned, with no additional costs for data conversion, storage, or cluster provisioning.

Exam trap

The trap here is that candidates assume data must be converted to a columnar format (like Parquet) to reduce costs, ignoring that for a one-time query, the cost of conversion and storage outweighs the savings from reduced scan size.

How to eliminate wrong answers

Option B is wrong because S3 Select is designed for filtering data within a single object (e.g., a CSV or JSON file) and cannot be used as a preprocessing step before Athena; it operates at the object level, not across multiple objects or as a query pipeline. Option C is wrong because Redshift Spectrum requires provisioning an Amazon Redshift cluster (even if serverless, it incurs compute costs) and is overkill for a one-time query, leading to higher costs than Athena's pay-per-scan model. Option D is wrong because converting the data to Parquet and repartitioning by date using AWS Glue would incur significant costs for the ETL job and storage, and is unnecessary for a one-time query where the cost of scanning 5 TB directly in Athena is lower than the combined conversion and storage costs.

1544
Multi-Selecteasy

A data scientist is exploring a dataset with a binary target variable. Which TWO metrics are appropriate for evaluating the balance of the target classes? (Choose two.)

Select 2 answers
A.Count plot of the target variable
B.Histogram of a feature
C.Scatter plot of two features colored by target
D.value_counts() on the target column
E.Correlation matrix of all features
AnswersA, D

Count plot shows frequency of each class.

Why this answer

Options A and D are correct. A count plot directly visualizes the frequency of each class in the target variable, making it easy to assess balance. Similarly, value_counts() returns the exact count of each class, providing a numeric measure of balance.

Option B (histogram) is designed for continuous variables; while it can depict the counts of two categories, it is not the standard or most appropriate method for evaluating binary class balance. Option C (scatter plot) is used to explore relationships between two numeric features and does not show class distribution. Option E (correlation matrix) measures linear relationships between numeric features and is irrelevant for assessing target class balance.

1545
MCQhard

A data scientist is analyzing a dataset with 500 features and 100,000 observations. The target variable is binary. The dataset contains highly correlated features and some categorical variables with high cardinality. Which combination of techniques should the data scientist use to reduce dimensionality while preserving interpretability for EDA?

A.Apply Principal Component Analysis (PCA) to all features and then train a model on the top 50 components.
B.Use mutual information to select top features and apply label encoding to categorical variables.
C.Use chi-squared test to select top features and one-hot encode categorical variables.
D.Apply correlation-based feature selection to remove highly correlated pairs, then use target encoding for high-cardinality categorical variables.
AnswerD

Correlation filter reduces redundancy; target encoding converts categoricals to numeric without increasing dimensionality.

Why this answer

Correlation-based feature selection removes highly correlated features, reducing redundancy without distorting the original feature space, and target encoding converts high-cardinality categorical variables into numeric values based on the target mean, which preserves interpretability and avoids dimensionality explosion. Option A is incorrect because PCA reduces interpretability by transforming features into principal components and does not handle categorical variables directly. Option B is incorrect because mutual information is a feature selection method, but label encoding for high-cardinality categoricals can impose arbitrary ordinal relationships.

Option C is incorrect because chi-squared test requires categorical features and is not suitable for high-dimensional numerical data; also, one-hot encoding high-cardinality categoricals leads to a drastic increase in dimensionality.

1546
MCQmedium

A data engineer is responsible for managing a data lake on Amazon S3. The data lake contains CSV files from various sources, totaling 10 TB. The engineer needs to make this data queryable using Amazon Athena. However, Athena queries are currently taking a long time and scanning large amounts of data. The engineer has noticed that the CSV files are not partitioned, and there are no indexes. The engineer wants to improve query performance and reduce costs. The data is accessed frequently for the last 30 days, but older data is rarely queried. The engineer also wants to minimize the amount of data scanned by Athena. What should the engineer do?

A.Convert the CSV files to JSON format and use Athena to query them.
B.Convert the CSV files to Parquet format and partition the data by date.
C.Create indexes on the S3 objects using AWS Glue.
D.Convert the CSV files to ORC format and create a view in Athena.
AnswerB

Parquet is columnar and compressed; partitioning by date allows partition pruning, reducing scan size.

Why this answer

The best choice. Converting CSV to Parquet reduces data scanned due to columnar storage and compression. Partitioning by date allows Athena to skip older data that is rarely queried, further minimizing scan size and cost.

Option A (JSON) does not improve performance significantly and still lacks partitioning. Option C is invalid because Athena does not support indexes. Option D (ORC) is columnar but without partitioning it performs worse than Parquet with partitioning, and views do not reduce scan size.

1547
MCQeasy

A company uses Amazon RDS for its transactional database and needs to export a daily snapshot of a table to Amazon S3 in Parquet format for analytics. Which AWS service can perform this export without writing custom code?

A.Amazon Redshift
B.AWS Database Migration Service (DMS)
C.Amazon Athena
D.AWS Glue
AnswerD

Glue can run scheduled ETL jobs to extract from RDS and write to S3 in Parquet.

Why this answer

AWS Glue is correct because it provides a fully managed ETL service that can natively read from Amazon RDS and write to Amazon S3 in Parquet format using a scheduled job, without requiring any custom code. Glue's built-in transform capabilities and crawlers can convert the data to columnar Parquet format efficiently for analytics workloads.

Exam trap

The trap here is that candidates often confuse AWS Glue's ETL capabilities with AWS DMS's migration focus, assuming DMS can handle scheduled format conversions like Parquet, but DMS primarily deals with ongoing replication and does not natively support Parquet output without custom transformation.

How to eliminate wrong answers

Option A is wrong because Amazon Redshift is a data warehouse service for querying structured data, not a tool for exporting data from RDS to S3 in Parquet format; it can load data from S3 but does not perform scheduled exports from RDS to S3. Option B is wrong because AWS DMS is designed for continuous database migration and replication, not for scheduled daily snapshots to S3 in Parquet format; while DMS can write to S3, it requires custom transformation tasks and does not natively output Parquet without additional configuration. Option C is wrong because Amazon Athena is an interactive query service for analyzing data in S3 using SQL, not a service for exporting or transforming data from RDS to S3; it cannot initiate data movement from RDS to S3.

1548
MCQeasy

A team is building a product recommendation system using matrix factorization in Amazon SageMaker. They notice that the model's training loss decreases steadily but validation loss starts increasing after 5 epochs. What is the most likely cause?

A.Underfitting
B.Not enough training data
C.Learning rate too high
D.Overfitting
AnswerD

The model is memorizing the training data.

Why this answer

In matrix factorization for recommendation systems, a decreasing training loss with an increasing validation loss after several epochs is a classic sign of overfitting. The model is memorizing the training data (including noise) rather than learning generalizable patterns, which degrades its performance on unseen validation data.

Exam trap

The trap here is that candidates may confuse the symptom of overfitting (training loss decreasing, validation loss increasing) with underfitting or a learning rate issue, but the key is the divergence between the two loss curves after a period of convergence.

How to eliminate wrong answers

Option A is wrong because underfitting would show high training loss that does not decrease sufficiently, not a diverging gap between training and validation loss. Option B is wrong because insufficient training data can contribute to overfitting, but the direct symptom described—training loss decreasing while validation loss increases—is the hallmark of overfitting, not a data quantity issue alone. Option C is wrong because a learning rate that is too high typically causes the loss to oscillate or diverge entirely, not a steady decrease in training loss with a later increase in validation loss.

1549
MCQhard

A SageMaker endpoint has a CloudWatch alarm configured as shown in the exhibit. The alarm fires when the p99 latency exceeds 500 ms for two consecutive minutes. Which action should the data scientist take to reduce latency?

A.Increase the number of instances behind the endpoint
B.Increase the batch size in the inference request
C.Use SageMaker asynchronous inference instead of real-time
D.Switch to GPU instances even if the model does not require GPU
AnswerA

More instances distribute load, reducing latency.

Why this answer

Increasing the number of instances behind the endpoint adds more compute capacity to handle the inference requests, which directly reduces the queuing and processing time for each request. Since the alarm triggers when p99 latency exceeds 500 ms for two consecutive minutes, scaling out horizontally distributes the load and lowers tail latency.

Exam trap

The trap here is that candidates may confuse latency reduction with throughput improvements, and incorrectly choose batch size increase or GPU switching, not realizing that scaling out is the direct remedy for high tail latency under sustained load.

How to eliminate wrong answers

Option B is wrong because increasing the batch size in the inference request would actually increase the processing time per request, potentially worsening latency rather than reducing it. Option C is wrong because SageMaker asynchronous inference is designed for large payloads and long processing times, not for reducing latency—it introduces additional queuing and storage overhead. Option D is wrong because switching to GPU instances when the model does not require GPU adds unnecessary cost and may not improve latency; GPU instances are beneficial only for models that can leverage parallel computation, and using them without need can even increase latency due to overhead.

1550
MCQeasy

During exploratory data analysis, a data scientist notices that a categorical feature 'city' has over 1,000 unique values. The dataset has 10,000 rows. Which technique should the scientist consider to reduce the cardinality of this feature?

A.Apply label encoding to assign numeric labels.
B.Group low-frequency categories into a single 'other' category.
C.Apply one-hot encoding to all categories.
D.Apply frequency encoding to replace each category with its frequency.
AnswerB

Grouping rare categories reduces cardinality effectively.

Why this answer

Grouping rare categories into an 'other' bucket is a common technique to reduce cardinality. Option A (label encoding) assigns numeric labels but still has 1000 unique values. Option B (grouping into 'other') reduces cardinality.

Option C (one-hot encoding) would create too many columns. Option D (frequency encoding) replaces categories with frequency but still has 1000 values.

1551
MCQhard

A data scientist is working on a customer churn prediction project for a telecom company. The dataset contains 50,000 records with 25 features, including 'tenure' (number of months customer stayed), 'monthly_charges', 'total_charges', 'contract_type' (month-to-month, one year, two year), 'payment_method', and a target 'churn' (Yes/No). The data is stored in an S3 bucket as a single CSV file. The scientist uses Amazon SageMaker Data Wrangler to perform EDA. After importing the data, the scientist notices that the 'total_charges' column has many missing values (about 20% of rows). The scientist suspects that missing values occur only for customers with tenure = 0 (new customers). After verifying that suspicion, the scientist wants to handle the missing values appropriately. Which course of action should the scientist take?

A.Use a regression model to predict total_charges based on other features.
B.Impute missing total_charges with the mean of non-missing values.
C.Drop all rows with missing total_charges to avoid bias.
D.Impute missing total_charges with 0, since missing values correspond to customers with tenure=0.
AnswerD

Given the pattern, total_charges should be 0 for new customers; imputing with 0 preserves data integrity.

Why this answer

If total_charges is missing only for tenure=0, it means those customers have not been billed yet, so total_charges should be 0. Imputing with 0 is appropriate. Option A is wrong because dropping rows with missing total_charges would remove all new customers, biasing the dataset.

Option B is wrong because imputing with mean would assign incorrect values to new customers. Option C is wrong because using a model to predict missing values is overkill and may introduce error when the true value is known to be 0.

1552
MCQhard

A data scientist is using SageMaker Autopilot to automatically build a classification model. The dataset is highly imbalanced (1% positive class). Which configuration should the scientist set to handle the class imbalance?

A.Set the problem_type to 'BinaryClassification' and enable 'balance_class_weights'.
B.Use the 'AutoMLJobObjective' with 'F1' metric.
C.Set the 'sample_weight' attribute in the input data.
D.Manually downsample the majority class before training.
AnswerB

Optimizing for F1 helps address class imbalance by balancing precision and recall.

Why this answer

SageMaker Autopilot does not support direct class weighting or sample weights for imbalanced datasets. By setting the objective metric to 'F1', Autopilot will optimize the model for the harmonic mean of precision and recall, which is more robust to class imbalance than accuracy. This encourages the model to pay attention to the minority (positive) class during training and hyperparameter tuning.

Exam trap

The trap here is that candidates assume SageMaker Autopilot supports common imbalance-handling techniques like class weighting or sample weights, but in reality, the only built-in way to influence Autopilot's handling of imbalance is via the objective metric, specifically F1 or other recall-focused metrics.

How to eliminate wrong answers

Option A is wrong because SageMaker Autopilot does not have a 'balance_class_weights' parameter; class weighting is not a configurable option in Autopilot's API. Option C is wrong because SageMaker Autopilot does not accept a 'sample_weight' attribute in the input data; it only supports tabular data without per-sample weight columns. Option D is wrong because manually downsampling the majority class is an external preprocessing step that contradicts Autopilot's goal of fully automated model building and may discard valuable data, reducing overall model performance.

1553
Multi-Selectmedium

A data engineer is building a streaming pipeline using Amazon Kinesis Data Streams and AWS Lambda. The Lambda function processes records and writes results to Amazon S3. The engineer notices that the Lambda function is experiencing throttling and some records are being dropped. Which TWO actions should the engineer take to improve the reliability of the pipeline?

Select 2 answers
A.Increase the number of shards in the Kinesis data stream.
B.Set a reserved concurrency on the Lambda function to prevent other functions from using its capacity.
C.Add a Dead Letter Queue to the Lambda function to capture failed records.
D.Decrease the batch size in the Lambda event source mapping.
E.Increase the Kinesis stream's retention period to 7 days.
AnswersA, B

More shards increase parallelism and throughput.

Why this answer

Increasing the number of shards in the Kinesis data stream directly increases the stream's throughput capacity. Each shard supports up to 1 MB/s write and 2 MB/s read, so more shards allow the stream to handle higher data volumes, reducing the likelihood of throttling and dropped records at the stream level.

Exam trap

The trap here is that candidates often confuse stream-level throttling with Lambda processing failures, leading them to choose a Dead Letter Queue (which handles processing failures) instead of addressing the root cause of insufficient throughput or concurrency.

1554
Multi-Selecthard

A company is deploying a machine learning model for real-time fraud detection. The model must have extremely low latency (<10 ms) and high throughput. Which THREE design choices meet these requirements? (Choose 3.)

Select 3 answers
A.Use GPU instances (e.g., ml.p3) for the endpoint.
B.Use one endpoint per model to avoid interference.
C.Use SageMaker Batch Transform for real-time predictions.
D.Use SageMaker multi-model endpoints to host multiple models on the same instance.
E.Use SageMaker Elastic Inference to attach GPU acceleration to a CPU instance.
AnswersA, D, E

GPU accelerates inference, reducing latency.

Why this answer

GPU instances like ml.p3 provide massively parallel compute capability that accelerates matrix operations common in deep learning models, enabling inference latencies under 10 ms. For real-time fraud detection, the GPU's high throughput and low latency are essential for processing thousands of transactions per second without bottlenecks.

Exam trap

The MLS-C01 exam often tests the misconception that batch processing services like Batch Transform can be used for real-time inference, but the key distinction is that Batch Transform is designed for offline, asynchronous workloads and cannot meet low-latency requirements.

1555
MCQeasy

A data engineer wants to stream clickstream data from a web application to Amazon S3 for near-real-time analytics. Which AWS service should be used to ingest and buffer the data before landing in S3?

A.Amazon AppFlow
B.Amazon Kinesis Data Streams
C.Amazon Kinesis Data Firehose
D.AWS Glue
AnswerC

Firehose can directly deliver streaming data to S3.

Why this answer

Amazon Kinesis Data Firehose is the correct choice because it is a fully managed service designed to ingest streaming data, buffer it, and reliably deliver it to destinations like Amazon S3 with near-real-time latency (typically 60 seconds). It handles automatic scaling, data transformation, and compression, making it ideal for clickstream data landing directly into S3 for analytics.

Exam trap

The trap here is that candidates confuse Amazon Kinesis Data Streams with Kinesis Data Firehose, not realizing that Data Streams requires a separate consumer to write to S3, while Firehose is purpose-built for direct, buffered delivery to S3.

How to eliminate wrong answers

Option A is wrong because Amazon AppFlow is a managed integration service for transferring data between SaaS applications (e.g., Salesforce, Slack) and AWS, not for streaming clickstream data from a web application. Option B is wrong because Amazon Kinesis Data Streams is a real-time data streaming service that requires custom consumers and does not natively buffer or deliver data to S3; it is intended for custom stream processing, not direct S3 ingestion. Option D is wrong because AWS Glue is a serverless ETL service for batch data preparation and cataloging, not a streaming ingestion or buffering service.

1556
MCQhard

A machine learning engineer is evaluating a dataset for building a fraud detection model. The dataset has 1 million transactions, but only 500 are fraudulent. The engineer wants to understand the distribution of fraudulent vs. non-fraudulent transactions over time. Which EDA visualization is most suitable?

A.Bar chart of transaction count per day with colors for fraud status
B.Scatter plot of transactions over time colored by fraud status
C.Box plot of transaction amount per month grouped by fraud status
D.Line plot of daily fraud rate and non-fraud rate
AnswerD

Why D is correct

Why this answer

A time series line plot with two lines (fraud vs. non-fraud) shows temporal patterns. Option A is wrong because bar chart of counts per day is less effective for two categories. Option B is wrong because scatter plot with 1 million points is overwhelming.

Option C is wrong because box plot shows distribution per time period but not temporal trend.

1557
Multi-Selecthard

Which TWO of the following are techniques used to reduce overfitting in a neural network?

Select 2 answers
A.Increase the number of layers
B.Batch normalization
C.L2 regularization
D.Dropout
E.Increase the learning rate
AnswersC, D

L2 regularization penalizes large weights.

Why this answer

Options C and D are correct. C (L2 regularization) is correct because it penalizes large weights, reducing model complexity and overfitting. D (dropout) is correct because it randomly drops units during training, preventing co-adaptation.

A is wrong because increasing the number of layers increases model complexity, which can worsen overfitting. B is wrong because batch normalization helps training stability but does not primarily reduce overfitting. E is wrong because increasing the learning rate may cause divergence, not reduce overfitting.

1558
MCQeasy

A data scientist is training a binary classification model on an imbalanced dataset where the positive class represents only 1% of the data. The model achieves 99% accuracy but fails to identify most positive cases. Which metric should the data scientist use to evaluate model performance?

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

F1 score balances precision and recall, suitable for imbalanced data.

Why this answer

The F1 score is the harmonic mean of precision and recall, making it ideal for imbalanced datasets where accuracy is misleading. Since the model achieves 99% accuracy by simply predicting the majority class (negative), it fails to capture positive cases; F1 score penalizes this by balancing false positives and false negatives, providing a more truthful performance measure.

Exam trap

The trap here is that candidates often default to accuracy as the primary metric, overlooking how imbalanced data can inflate accuracy while hiding poor positive class detection, which the F1 score directly addresses.

How to eliminate wrong answers

Option A is wrong because R-squared is a regression metric that measures the proportion of variance explained by the model, not applicable to binary classification. Option C is wrong because accuracy is misleading on imbalanced datasets; a model predicting all negatives achieves 99% accuracy but fails to identify any positives, so it does not reflect true performance. Option D is wrong because RMSE is a regression metric that measures the square root of the average squared differences between predicted and actual values, not suitable for binary classification outcomes.

1559
MCQeasy

A SageMaker endpoint configuration is shown in the exhibit. The company wants to deploy the model to a real-time endpoint. What is missing from this configuration to successfully create the endpoint?

A.The model name is missing
B.The endpoint name is not specified in the configuration
C.The initial instance count is missing
D.The accelerator type is missing
E.The data capture configuration is missing
AnswerB

Endpoint name is provided when creating the endpoint, not in the config.

Why this answer

The endpoint configuration must include an EndpointName parameter to uniquely identify the endpoint within the AWS account and region. Without it, the CreateEndpoint API call fails because the service cannot route traffic or manage the deployment. The exhibit shows a valid EndpointConfigName, but the endpoint itself is not named, which is a required field for real-time inference endpoints.

Exam trap

The trap here is that candidates often confuse the EndpointConfigName (which is present) with the EndpointName, assuming the configuration itself names the endpoint, but AWS requires an explicit separate EndpointName parameter in the CreateEndpoint call.

How to eliminate wrong answers

Option A is wrong because the model name is specified in the ModelName field within the ProductionVariants list, so it is not missing. Option C is wrong because the initial instance count is provided as InitialInstanceCount=1 in the ProductionVariants, satisfying the requirement. Option D is wrong because the accelerator type is optional; it is only needed if you want to use Elastic Inference, but it is not required for a basic endpoint creation.

Option E is wrong because data capture configuration is optional and only used for monitoring or auditing; it is not a prerequisite for deploying a real-time endpoint.

1560
MCQmedium

A company uses AWS Glue jobs with job bookmarks enabled to process incremental data. They notice that the job processes all data each time instead of only new data. What is the most likely reason?

A.The TempDir is not configured correctly.
B.The job bookmark option is set to 'job-bookmark-enable' but should be 'job-bookmark-disable'.
C.The source data does not have a column that can be used as a bookmark key.
D.The MaxConcurrentRuns is set to 3, which can cause bookmark conflicts.
AnswerD

Multiple concurrent runs can corrupt bookmark state.

Why this answer

Setting MaxConcurrentRuns to a value greater than 1 can cause job bookmark conflicts. When multiple concurrent runs of the same AWS Glue job attempt to update the bookmark state simultaneously, they can overwrite each other's progress, leading to inconsistent bookmark tracking. This results in the job reprocessing all data instead of only incremental data, as the bookmark fails to correctly record the last processed position.

Exam trap

The trap here is that candidates often overlook the impact of concurrent runs on bookmark state, assuming that parallelism only affects performance, not data integrity, and instead focus on superficial configuration issues like TempDir or bookmark key columns.

How to eliminate wrong answers

Option A is wrong because TempDir is used for temporary staging of data (e.g., for Spark shuffle operations or schema evolution), not for bookmark functionality; an incorrect TempDir would cause runtime errors, not reprocessing all data. Option B is wrong because 'job-bookmark-enable' is the correct parameter value to enable job bookmarks; setting it to 'job-bookmark-disable' would disable bookmarks entirely, which would cause full reprocessing, but the question states the job is intended to process incremental data, so this option misrepresents the correct configuration. Option C is wrong because AWS Glue job bookmarks do not require a specific column as a bookmark key; they use internal tracking mechanisms (e.g., file modification timestamps for S3, or primary key ordering for JDBC) to determine new data, and the absence of a suitable column would cause bookmarks to fail silently or process all data, but this is not the most likely reason given the symptom of reprocessing all data each time.

1561
MCQhard

An engineer runs the AWS CLI command in the exhibit to create a SageMaker endpoint configuration. The endpoint is created successfully, but when invoked, the inference response is slow. The engineer wants to test with a different instance type. Which action should the engineer take?

A.Create a new endpoint configuration and use it to create a new endpoint
B.Modify the existing endpoint directly using the update-endpoint API with a new instance type parameter
C.Delete the endpoint and create a new one with the desired instance type
D.Update the endpoint configuration with the new instance type and then update the endpoint
AnswerD

You can update the endpoint configuration and then call update-endpoint to apply changes.

Why this answer

To change the instance type for an existing SageMaker endpoint, you must first update the endpoint configuration with the new instance type, then update the endpoint to use the updated configuration. Option D describes this correct procedure. Option B is incorrect because the update-endpoint API does not directly accept an instance type parameter; it updates the endpoint to use a new endpoint configuration.

Option A creates a new endpoint, which is less efficient. Option C deletes the endpoint unnecessarily.

1562
MCQhard

A data scientist is analyzing a dataset with many categorical features. The target variable is binary. Which statistical test should be used to assess the association between each categorical feature and the target?

A.Pearson correlation coefficient
B.Chi-squared test of independence
C.ANOVA
D.Kolmogorov-Smirnov test
AnswerB

Chi-squared tests association between categorical variables.

Why this answer

The Chi-squared test of independence is the appropriate test to assess association between two categorical variables. Here, both the features (categorical) and the target (binary, which is categorical) are categorical, making the Chi-squared test the correct choice. Option A (Pearson correlation) is for continuous variables, not categorical.

Option C (ANOVA) compares means across groups for a continuous target, but our target is binary (categorical). Option D (Kolmogorov-Smirnov test) compares distributions of continuous variables, not categorical. Therefore, B is correct.

1563
MCQmedium

Refer to the exhibit. An IAM policy is attached to a data engineering team's role. The team needs to upload data to the 'confidential' prefix in the 'my-data-lake' bucket. However, they are receiving 'AccessDenied' errors. What is the likely cause?

A.The condition in the Deny statement requires the team to use a specific source IP address.
B.The Allow statement only grants GetObject and PutObject, but the team needs ListBucket.
C.The Deny statement with the condition explicitly denies access to the 'confidential' prefix for accounts other than 123456789012.
D.The Allow statement's resource does not include the 'confidential' prefix.
AnswerC

The Deny statement applies to all actions on the confidential prefix for accounts not matching 123456789012, overriding the Allow.

Why this answer

The Deny statement explicitly denies access to the 'confidential' prefix when the request comes from an AWS account other than 123456789012. Since the data engineering team's role likely belongs to a different account, the Deny condition matches and overrides any Allow statements, resulting in an 'AccessDenied' error. In IAM, an explicit Deny always takes precedence over an Allow, so even if the Allow statement grants PutObject, the Deny blocks the upload.

Exam trap

The AWS exam often tests the principle that an explicit Deny overrides any Allow, and candidates mistakenly focus on the Allow statement's permissions (like missing ListBucket) instead of recognizing that the Deny statement with a condition is the root cause of the 'AccessDenied' error.

How to eliminate wrong answers

Option A is wrong because the condition in the Deny statement uses 'StringNotEquals' with 'aws:SourceIp', which denies access if the source IP is not a specific value, but the exhibit shows the condition is on 'aws:SourceAccount', not source IP. Option B is wrong because the team is receiving 'AccessDenied' when uploading (PutObject), and ListBucket is not required for uploading objects; the error is not due to missing ListBucket permissions. Option D is wrong because the Allow statement's resource 'arn:aws:s3:::my-data-lake/confidential/*' does include the 'confidential' prefix, so the Allow is correctly scoped; the issue is the overriding Deny.

1564
MCQeasy

A company is building a binary classifier to predict customer churn. The dataset has 10,000 samples with 500 churners (5% positive class). After training a logistic regression model, the precision is 0.8 and recall is 0.2. Which metric should the data scientist focus on to improve the model's ability to identify churners while minimizing false positives?

A.Increase accuracy
B.Increase precision
C.Increase recall
D.Increase F1 score
AnswerC

Recall is low (0.2), so improving it will capture more churners.

Why this answer

The model's recall is very low (0.2), meaning it misses most churners. Since the goal is to identify churners (positive class), improving recall should be the primary focus. Option A (accuracy) is misleading due to class imbalance.

Option B (precision) is already high (0.8), so further improvement would likely reduce recall. Option D (F1 score) balances precision and recall, but the immediate need is to address the low recall, not to balance both.

1565
MCQeasy

An S3 event notification is configured to trigger a Lambda function when new objects are created. The Lambda function processes the event JSON shown. Which field should the function use to read the new object from S3?

A.s3.s3SchemaVersion
B.awsRegion
C.eventName
D.s3.bucket.arn and s3.object.key
AnswerD

These provide the bucket ARN and object key.

Why this answer

The Lambda function needs the bucket name and object key to retrieve the new object from S3. The `s3.bucket.arn` provides the bucket identifier, and `s3.object.key` provides the object path. Together, they allow the function to call `GetObject` on the S3 API.

Exam trap

The trap here is that candidates confuse metadata fields like `eventName` or `awsRegion` with the actual object location, overlooking that only the bucket ARN and object key together provide the necessary S3 coordinates for retrieval.

How to eliminate wrong answers

Option A is wrong because `s3.s3SchemaVersion` indicates the version of the S3 event notification schema, not the object location. Option B is wrong because `awsRegion` specifies the AWS region of the bucket, which is not sufficient to identify or read a specific object. Option C is wrong because `eventName` describes the type of S3 event (e.g., 'ObjectCreated:Put'), not the object identifier.

1566
MCQmedium

A machine learning engineer is deploying a PyTorch model on SageMaker for real-time inference. The model requires GPU for low latency. Which instance type and configuration should the engineer choose?

A.Deploy to an ml.c5.4xlarge instance with SageMaker batch transform.
B.Deploy to an ml.m5.large instance with a SageMaker model endpoint.
C.Deploy to an ml.p3.2xlarge instance with a SageMaker endpoint.
D.Deploy to an ml.p3.2xlarge instance with SageMaker batch transform.
AnswerC

p3 provides GPU; endpoint enables real-time inference.

Why this answer

SageMaker real-time endpoints support GPU instances like ml.p3.2xlarge. Option A (ml.c5.4xlarge with batch transform) is a CPU instance and batch transform is for offline inference, not real-time. Option B (ml.m5.large with endpoint) is a CPU instance and not suitable for GPU-accelerated inference.

Option D (ml.p3.2xlarge with batch transform) uses a GPU instance but batch transform is not real-time; a SageMaker endpoint is required for real-time inference.

1567
MCQhard

Refer to the exhibit. A data scientist is running an Amazon EMR Spark job for exploratory data analysis on a large dataset. The job fails with the error shown. What is the most appropriate action to resolve this?

A.Reduce the number of worker nodes.
B.Convert the input data to Parquet format.
C.Increase the executor memory in Spark configuration.
D.Increase the driver memory.
AnswerC

More memory per executor prevents heap overflow.

Why this answer

The error message indicates an OutOfMemoryError in the Spark executors. Increasing executor memory (option C) directly addresses this by providing more heap space for data processing. Option A (fewer nodes) reduces total cluster memory, worsening the problem.

Option B (Parquet format) can improve I/O performance but does not resolve insufficient memory allocation. Option D (increase driver memory) only helps the driver process, not the executors.

1568
MCQhard

A company uses Amazon SageMaker to train a custom TensorFlow model for image classification. The training job runs on a single ml.p3.2xlarge instance. The dataset contains 500,000 images stored in S3. The training time is too long (over 24 hours). The data scientist wants to reduce training time without changing the model architecture. The dataset is already in TFRecord format. The training script uses the default TensorFlow data pipeline. Which change will MOST significantly reduce training time?

A.Use SageMaker Pipe mode and increase the number of data files.
B.Use SageMaker's distributed data parallelism with multiple instances.
C.Switch the input mode from File to Pipe.
D.Optimize the data pipeline using tf.data.Dataset.prefetch and cache.
AnswerB

Distributed training across multiple GPUs significantly reduces wall-clock training time.

Why this answer

Using SageMaker's distributed data parallelism with multiple instances increases the number of GPUs and splits the training data across them, directly reducing the compute time. Option A is incorrect because simply increasing the number of data files does not reduce the computational workload, and Pipe mode primarily helps with streaming data but does not accelerate model training. Option C is incorrect because switching from File to Pipe mode improves data loading but does not address the core compute bottleneck.

Option D is incorrect because optimizing the data pipeline with tf.data.Dataset.prefetch and cache can improve I/O efficiency, but the most significant performance gain comes from scaling out the training across multiple GPUs.

1569
MCQhard

A media company uses SageMaker to train a neural network for content recommendation. The model uses embeddings for users and items. Training is slow and they want to reduce time. The dataset has 10 million users and 1 million items. They have a cluster of 8 p3.16xlarge instances. Which strategy is most likely to reduce training time?

A.Use data parallelism to replicate the model on each GPU and synchronize gradients
B.Reduce the embedding dimension from 256 to 64
C.Use SageMaker's model parallelism to split the embedding layers across GPUs
D.Use a smaller batch size to fit on each GPU
AnswerC

Model parallelism distributes large embedding tables across devices, reducing memory and enabling larger batches.

Why this answer

SageMaker's model parallelism splits the embedding layers across GPUs, which is essential when the embedding table is too large to fit into the memory of a single GPU. With 10 million users and 1 million items, even with a modest embedding dimension of 256, the embedding layer alone can exceed 10 GB, causing memory bottlenecks that slow training. Model parallelism distributes these large parameters across multiple GPUs, reducing per-GPU memory pressure and enabling larger batch sizes, which directly reduces training time.

Exam trap

The trap here is that candidates often default to data parallelism as the standard approach for distributed training, failing to recognize that when the model itself (especially embedding layers) exceeds GPU memory, model parallelism is required to scale out effectively.

How to eliminate wrong answers

Option A is wrong because data parallelism replicates the entire model on each GPU, which does not solve the memory bottleneck caused by the massive embedding table; it actually increases memory usage per GPU and can lead to out-of-memory errors. Option B is wrong because reducing the embedding dimension from 256 to 64 would degrade recommendation quality by losing representational capacity, and while it might reduce memory, it does not address the fundamental issue of scaling training across the cluster efficiently. Option D is wrong because using a smaller batch size reduces throughput and increases the number of gradient updates needed, which actually increases total training time, not reduces it.

1570
Multi-Selecthard

A machine learning team is deploying a real-time inference endpoint for a fraud detection model using Amazon SageMaker. The model is a LightGBM classifier trained on 1 GB of tabular data. The endpoint must respond within 100 ms for 99% of requests, with a throughput of 10 requests per second. During load testing, the team observes that the 99th percentile latency is 250 ms and the endpoint CPU utilization is consistently above 90%. The team has already selected an ml.c5.xlarge instance with auto scaling enabled. Which combination of actions should the team take to meet the latency requirement? (Choose 3.)

Select 3 answers
A.Upgrade the instance type to ml.c5.2xlarge to increase CPU resources per instance.
B.Reduce the number of trees in the LightGBM model to decrease inference time.
C.Enable SageMaker's data compression for endpoint input payloads.
D.Switch to using SageMaker Batch Transform instead of a real-time endpoint.
AnswersA, B, C

More CPU reduces per-request processing time, lowering latency.

Why this answer

(upgrading to ml.c5.2xlarge) provides more CPU resources per instance, reducing CPU utilization and thus latency. Option B (reducing the number of trees in the LightGBM model) decreases the computational complexity of inference, directly lowering inference time. Option C (enabling SageMaker's data compression for endpoint input payloads) reduces the data transfer size, which can lower I/O overhead and network latency.

Option D (switching to SageMaker Batch Transform) is unsuitable because it is not designed for real-time inference and would not meet the low-latency requirement. Together, options A, B, and C address the latency issue by improving compute capacity, reducing model complexity, and minimizing data transfer time.

1571
MCQeasy

A data scientist is using Amazon SageMaker to train a linear regression model. The training data contains 100 features and 1 million rows. The scientist notices that the model is overfitting, with training R² of 0.99 and validation R² of 0.65. The scientist has already tried adding L2 regularization and reducing the number of features. Which additional technique should the scientist try to reduce overfitting?

A.Increase the amount of training data
B.Increase the batch size
C.Increase the learning rate
D.Add more features
AnswerA

More data helps the model generalize better.

Why this answer

Increasing the amount of training data provides the model with more examples of the underlying distribution, which helps reduce variance and combat overfitting. With 1 million rows and 100 features, the model may still be memorizing noise; adding more diverse data forces the linear regression to generalize better, improving validation R² without changing the model's capacity.

Exam trap

The trap here is that candidates often confuse techniques that improve optimization (batch size, learning rate) with techniques that improve generalization (more data, stronger regularization), leading them to pick B or C instead of A.

How to eliminate wrong answers

Option B is wrong because increasing batch size stabilizes gradient estimates and can speed up training, but it does not directly reduce overfitting—it may even lead to sharper minima that generalize worse. Option C is wrong because increasing the learning rate can cause training to diverge or oscillate, and it does not address the fundamental bias-variance tradeoff; it may actually worsen overfitting by preventing convergence to a good solution. Option D is wrong because adding more features increases model complexity and the risk of overfitting, which is the opposite of what is needed when the model already has high variance.

1572
MCQmedium

A company uses Kinesis Data Streams to ingest real-time sensor data. The data is consumed by a Lambda function that writes to DynamoDB. During peak hours, the Lambda function throws ProvisionedThroughputExceededException. The team wants to decouple the write operation and improve resilience. What should they do?

A.Use Kinesis Firehose as a consumer of the stream, with a Lambda transformation to write to DynamoDB, and enable error handling.
B.Increase the Lambda function's reserved concurrency and provision more DynamoDB write capacity.
C.Place the Lambda function's output into an Amazon SQS queue, and have a second Lambda function write to DynamoDB.
D.Use Kinesis Data Analytics to process the stream and write results directly to DynamoDB.
AnswerA

Firehose buffers data, retries on failures, and decouples the producer from DynamoDB writes.

Why this answer

Kinesis Firehose can consume data from a Kinesis Data Stream and invoke a Lambda function for transformation before delivering to destinations like DynamoDB. By using Firehose with error handling, the team decouples the write operation from the Lambda consumer, allowing Firehose to buffer data and retry failed writes, which improves resilience against ProvisionedThroughputExceededException without losing data.

Exam trap

The trap here is that candidates often assume adding a queue (SQS) is the standard decoupling pattern, but in this context, Kinesis Firehose is purpose-built for stream ingestion with built-in error handling and Lambda integration, making it a more direct and efficient solution than introducing an additional queue layer.

How to eliminate wrong answers

Option B is wrong because increasing Lambda reserved concurrency and DynamoDB write capacity only scales the existing tightly coupled architecture, not decoupling it; it does not address the root cause of throttling during peak hours and may lead to higher costs without resilience. Option C is wrong because placing Lambda output into an SQS queue and having a second Lambda write to DynamoDB adds unnecessary complexity and latency, and SQS does not natively integrate with DynamoDB for batch writes; it also fails to leverage the existing Kinesis stream's ordered processing. Option D is wrong because Kinesis Data Analytics is designed for real-time analytics using SQL or Apache Flink, not for direct writes to DynamoDB; it cannot write results to DynamoDB natively and would require additional downstream processing, making it an inappropriate decoupling solution.

1573
MCQeasy

A data scientist is using SageMaker to train a linear learner algorithm. After training, the evaluation shows that the model has high bias. Which action is most likely to reduce bias?

A.Increase the L2 regularization strength
B.Reduce the amount of training data
C.Add feature crosses for categorical variables
D.Remove some features that have low variance
AnswerC

Adding feature crosses increases model capacity to capture interactions, reducing bias.

Why this answer

High bias indicates that the model is underfitting the data, meaning it is too simple to capture the underlying patterns. Adding feature crosses for categorical variables creates interaction features that allow the linear learner to model non-linear relationships, increasing model complexity and reducing bias. This is a standard technique in linear models to address underfitting without switching to a non-linear algorithm.

Exam trap

The trap here is that candidates often confuse bias with variance and incorrectly choose regularization (Option A) to fix underfitting, when regularization actually increases bias and is used to combat overfitting (high variance).

How to eliminate wrong answers

Option A is wrong because increasing L2 regularization strength penalizes large weights, which simplifies the model further and increases bias, not reduces it. Option B is wrong because reducing the amount of training data typically worsens underfitting by providing fewer examples for the model to learn from, increasing bias. Option D is wrong because removing low-variance features reduces the information available to the model, which can increase bias by discarding potentially useful signals.

1574
MCQeasy

A company uses Amazon Kinesis Data Firehose to deliver data to an Amazon S3 bucket. The data is organized by year/month/day/hour. The team needs to ensure that all data is encrypted at rest in S3 using an AWS KMS customer managed key (CMK). Which configuration should the team implement?

A.Configure the S3 bucket's default encryption to use the customer managed KMS key.
B.Use an AWS Lambda function to encrypt the data after it is delivered to S3.
C.In the Firehose delivery stream configuration, enable S3 destination encryption and select the customer managed KMS key.
D.Add a bucket policy that denies PutObject unless the request includes the correct KMS key.
AnswerC

Firehose supports SSE-KMS for the S3 destination directly.

Why this answer

The correct approach. Kinesis Data Firehose can be configured to encrypt data at rest in S3 using AWS KMS. In the Firehose delivery stream configuration, under S3 destination settings, you can enable encryption and select a customer managed KMS key.

This ensures all data written to S3 is encrypted with that key. Option A is incorrect because S3 default encryption applies to objects uploaded directly to S3, but Firehose writes objects using its own IAM role and can override default encryption; configuring encryption in Firehose is the recommended way. Option B is incorrect because using a Lambda function to encrypt after delivery adds unnecessary complexity and latency; Firehose can encrypt natively.

Option D is incorrect because a bucket policy denying PutObject without the correct KMS key would work but is not the simplest or most straightforward configuration; Firehose can handle encryption directly.

1575
MCQhard

A company is using Amazon SageMaker to train a large natural language processing model. The training job uses a GPU instance and is expected to take several hours. The data scientist wants to monitor GPU utilization in real-time. Which approach is MOST effective?

A.Use SageMaker Managed Spot Training to reduce cost and monitor utilization via spot instance status
B.Modify the training script to periodically log GPU utilization to a file in S3
C.Use SageMaker Debugger to capture GPU utilization tensors
D.Enable CloudWatch metrics for the training job and view GPU utilization in the CloudWatch console
AnswerD

SageMaker automatically publishes GPU metrics to CloudWatch.

Why this answer

Amazon SageMaker automatically publishes GPU utilization metrics (e.g., `GPUUtilization`, `GPUMemoryUtilization`) to Amazon CloudWatch for training jobs running on GPU instances. By enabling CloudWatch metrics (which is the default behavior for SageMaker training jobs), the data scientist can view real-time GPU utilization directly in the CloudWatch console without any code modifications. This is the most effective approach because it requires no changes to the training script and provides native, real-time monitoring.

Exam trap

The trap here is that candidates confuse SageMaker Debugger’s ability to capture tensors (which are model-internal data) with hardware monitoring metrics, leading them to choose C, when in fact CloudWatch is the correct service for infrastructure-level monitoring.

How to eliminate wrong answers

Option A is wrong because Managed Spot Training is a cost-saving mechanism that uses spare EC2 capacity, not a monitoring tool; spot instance status only indicates interruption risk, not GPU utilization. Option B is wrong because periodically logging to S3 introduces latency and is not real-time; it also requires modifying the training script, which is less efficient than using built-in CloudWatch metrics. Option C is wrong because SageMaker Debugger is designed to capture tensors and debug model training (e.g., gradients, weights), not to monitor hardware utilization like GPU usage; it does not emit GPU utilization metrics to CloudWatch.

Page 20

Page 21 of 23

Page 22