Courseiva

CCNA Machine Learning Implementation and Operations Questions

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

1
MCQmedium

A company uses Amazon SageMaker to train a model. The training job fails with an 'OutOfMemory' error. The training data is stored in S3 and the instance type is ml.m5.xlarge. What is the most efficient way to resolve this issue?

A.Enable managed spot training
B.Reduce the batch size in the training script
C.Increase the number of instances using distributed training
D.Use a larger instance type, such as ml.m5.2xlarge
AnswerD

Larger instance provides more memory.

Why this answer

The 'OutOfMemory' error indicates that the ml.m5.xlarge instance (4 vCPUs, 16 GiB memory) does not have enough RAM to hold the training data and model during processing. Upgrading to ml.m5.2xlarge (8 vCPUs, 32 GiB memory) directly increases available memory, resolving the issue without requiring code changes or architectural modifications. This is the most efficient solution because it requires no script alterations and leverages SageMaker's built-in instance scaling.

Exam trap

The trap here is that candidates often choose 'Reduce the batch size' (Option B) as a quick fix, but the question asks for the 'most efficient' solution—changing instance type requires no code changes and is faster to implement, whereas batch size reduction requires debugging and retesting the training script.

How to eliminate wrong answers

Option A is wrong because managed spot training reduces cost by using spare EC2 capacity but does not increase memory capacity; it can actually cause interruptions that exacerbate resource issues. Option B is wrong because reducing batch size decreases memory usage per step but may not resolve the OOM error if the model itself or the total dataset size exceeds instance memory; it also requires code changes and can slow convergence. Option C is wrong because increasing the number of instances via distributed training (e.g., data parallelism) does not increase the memory of a single instance; each instance still has only 16 GiB, so the OOM error would persist on each worker.

2
MCQmedium

A company has deployed a machine learning model on a SageMaker endpoint that serves predictions to a web application. The model uses a custom inference container that loads the model artifacts from an ECR repository. After updating the model with new training data, the data scientist creates a new model and updates the endpoint. However, some users report that they still get predictions from the old model. The data scientist confirms that the endpoint configuration points to the new model. What is the most likely cause?

A.The new model artifacts are not correctly uploaded to S3
B.The endpoint is behind a load balancer that is not updated
C.The inference container is cached and not pulling the new image
D.DNS caching on the client side is resolving to the old endpoint IP address
AnswerD

Correct. DNS caching at the client side can cause the endpoint's DNS name to resolve to an old IP address, particularly if the endpoint's underlying instance IPs have not changed, leading some users to still hit the old model.

Why this answer

DNS caching on the client side can cause the endpoint's DNS name to resolve to an old IP address, especially if the endpoint's underlying instances have not changed. This explains why some users still receive predictions from the old model even though the endpoint configuration points to the new model. Option A is incorrect because incorrect model artifacts would affect all users uniformly.

Option B is incorrect because SageMaker endpoints do not have load balancers in the traditional sense; the endpoint itself routes traffic to the instances. Option C is incorrect because SageMaker automatically handles container image updates when a new model is deployed to an endpoint.

3
MCQmedium

A data scientist is using Amazon SageMaker to train a model with a custom Docker container. The training script reads data from an S3 bucket and writes the model artifact to an S3 bucket. The training job fails with a 'NoSuchKey' error. What is the MOST likely cause?

A.The training script is not compatible with the Docker image.
B.The training data path specified in the input data channel is incorrect.
C.The Docker image is not available in Amazon ECR.
D.The SageMaker execution role does not have s3:GetObject permission.
AnswerB

NoSuchKey means the S3 key does not exist.

Why this answer

The 'NoSuchKey' error indicates that the specified key (file path) does not exist within the S3 bucket, which occurs when the training data path provided in the input data channel is incorrect. Option A is wrong because, while a script compatibility issue could cause errors, it would not manifest as a 'NoSuchKey' S3 error; it would likely result in a failure during container execution. Option C is wrong because if the Docker image were not available in Amazon ECR, SageMaker would fail with an 'ImageNotFoundException' or similar ECR-related error, not a 'NoSuchKey' S3 error.

Option D is wrong because insufficient S3 permissions (e.g., missing s3:GetObject) would result in an 'AccessDenied' error, not 'NoSuchKey'.

4
Multi-Selecthard

A machine learning engineer is designing an automated ML pipeline for training and deploying models. The pipeline must include data validation, model training, hyperparameter tuning, and model deployment. The engineer wants to use AWS services that integrate well and provide version control. Which THREE services should be combined to achieve this? (Choose THREE.)

Select 3 answers
A.AWS Glue
B.AWS Step Functions
C.AWS CodePipeline
D.Amazon EMR
E.Amazon SageMaker
AnswersB, C, E

Correct: Orchestrates the ML pipeline steps.

Why this answer

AWS Step Functions orchestrates the ML pipeline by coordinating data validation, model training, hyperparameter tuning, and deployment as a state machine. It integrates natively with Amazon SageMaker for training and tuning jobs, and with AWS CodePipeline for CI/CD, enabling version control and automated transitions between pipeline stages.

Exam trap

The MLS-C01 exam often tests the distinction between orchestration services (Step Functions) and data processing services (Glue, EMR), leading candidates to mistakenly choose Glue for pipeline orchestration because of its 'data validation' capability, ignoring its lack of ML-specific deployment and tuning features.

5
Multi-Selecthard

Which THREE actions can help reduce the inference latency of a SageMaker endpoint? (Choose three.)

Select 3 answers
A.Use a larger instance type with more CPU/GPU
B.Enable SageMaker Batch Transform to process predictions offline
C.Enable data compression to reduce payload size
D.Use a multi-model endpoint to share instances across models
E.Increase the number of instances in the endpoint
AnswersA, B, C

More compute power reduces per-request latency.

Why this answer

Using a larger instance type with more CPU or GPU resources directly increases the computational capacity available for inference. This reduces the time required to process each prediction request, thereby lowering inference latency. SageMaker endpoints scale horizontally and vertically, and vertical scaling (larger instances) is a straightforward way to improve per-request performance.

Exam trap

The MLS-C01 exam often tests the distinction between improving throughput (horizontal scaling) versus reducing latency (vertical scaling or optimization), and candidates mistakenly assume that adding more instances will speed up individual requests.

6
MCQmedium

You are deploying a PyTorch model to a SageMaker endpoint. The model is large (5 GB) and the endpoint is using an ml.c5.2xlarge instance. Inference latency is higher than required. Which change would most effectively reduce latency?

A.Reduce the batch size in the inference code
B.Decrease the number of model server workers
C.Enable SageMaker Elastic Inference
D.Use a GPU instance type such as ml.p3.2xlarge
AnswerD

GPU accelerates matrix operations in PyTorch.

Why this answer

The primary bottleneck for a large PyTorch model (5 GB) on a CPU instance (ml.c5.2xlarge) is the lack of GPU acceleration for matrix operations and tensor computations. Switching to a GPU instance like ml.p3.2xlarge (with NVIDIA V100 GPUs) offloads the heavy parallel computation to the GPU, drastically reducing per-inference latency for deep learning models, especially those with large parameter counts.

Exam trap

The trap here is that candidates often choose Elastic Inference (Option C) thinking it provides GPU-like acceleration at lower cost, but they overlook the model size limitation (max ~2 GB) and the added network latency, making it unsuitable for large models like a 5 GB PyTorch model.

How to eliminate wrong answers

Option A is wrong because reducing batch size decreases throughput and may increase per-request overhead, but it does not address the fundamental CPU compute bottleneck for a 5 GB model; latency per inference often remains high due to sequential CPU processing. Option B is wrong because decreasing the number of model server workers reduces concurrency and can increase queueing delay, but it does not accelerate the actual inference computation on the CPU. Option C is wrong because SageMaker Elastic Inference attaches a small, shared GPU accelerator for specific operations (e.g., matrix multiply), but it is not designed for models larger than ~2 GB and introduces network latency for data transfer between the CPU instance and the EI accelerator, making it ineffective for a 5 GB model.

7
MCQeasy

Refer to the exhibit. A SageMaker endpoint logs this error. What is the most likely cause?

A.The model is corrupted
B.There is a network connectivity issue
C.The input data type is incorrect
D.The input data has fewer features than the model expects
AnswerD

The error explicitly states shape mismatch: expected 10 features, got 8.

Why this answer

The error log indicates a mismatch between the number of features in the input data and the number of features the model was trained on. SageMaker's inference endpoint validates the input shape against the model's expected feature dimensions; when the input has fewer features, the model cannot perform the matrix operations required for prediction, resulting in this error. Option D correctly identifies this feature count mismatch as the root cause.

Exam trap

The trap here is that candidates may confuse a feature count mismatch with a data type error (Option C), because both involve input validation, but the error message specifically points to a shape or dimension mismatch rather than a type conversion failure.

How to eliminate wrong answers

Option A is wrong because a corrupted model would typically produce a model loading failure or a runtime error during deserialization, not a feature dimension mismatch during inference. Option B is wrong because a network connectivity issue would manifest as a timeout or connection refused error, not a model-level input validation error. Option C is wrong because an incorrect data type (e.g., string instead of float) would raise a type conversion error or a dtype mismatch, not a feature count error.

8
MCQmedium

A machine learning team is using SageMaker to train a model. They want to ensure that the training data is encrypted at rest in the S3 bucket and that the data is also encrypted during transit. Which configuration should they use?

A.Use client-side encryption and transfer data via HTTP
B.Use SSE-S3 encryption on the S3 bucket and enforce HTTPS
C.Use SSE-KMS encryption on the S3 bucket and disable HTTP
D.Use SSE-C encryption on the S3 bucket and HTTPS
E.Use no encryption on S3 but use HTTPS
AnswerB

SSE-S3 encrypts at rest; HTTPS encrypts in transit.

Why this answer

SSE-S3 provides server-side encryption at rest for objects in S3, and enforcing HTTPS ensures data is encrypted in transit using TLS. This combination meets the requirements for both encryption at rest and in transit without additional client-side complexity.

Exam trap

The trap here is that candidates often overthink encryption options and choose SSE-KMS or SSE-C, not realizing that SSE-S3 with HTTPS enforcement is the simplest and fully compliant solution for the stated requirements.

How to eliminate wrong answers

Option A is wrong because client-side encryption with HTTP does not encrypt data in transit (HTTP is plaintext), violating the transit encryption requirement. Option C is wrong because disabling HTTP entirely would break SageMaker's ability to communicate with S3 via HTTPS; SSE-KMS is valid for at-rest encryption but the statement 'disable HTTP' is impractical and unnecessary. Option D is wrong because SSE-C requires you to manage your own encryption keys, which adds operational overhead and is not the simplest configuration; HTTPS is correct for transit but SSE-C is not the best choice here.

Option E is wrong because no encryption at rest leaves data unencrypted in S3, failing the at-rest encryption requirement even though HTTPS provides transit encryption.

9
MCQmedium

A data scientist wants to use AWS Step Functions to orchestrate a machine learning workflow including data preprocessing, training, and evaluation. Which SageMaker integration is best suited for this purpose?

A.Implement each step as an AWS Lambda function and call Step Functions
B.Use the SageMaker SDK with Step Functions service integrations
C.Use SageMaker Pipelines to define the workflow
D.Use AWS Batch to run the steps sequentially
AnswerB

Step Functions has built-in integrations for SageMaker training, processing, and endpoints.

Why this answer

AWS Step Functions has a native service integration with SageMaker, allowing you to directly call SageMaker API actions (e.g., CreateTrainingJob, CreateModel, CreateEndpointConfig, CreateEndpoint) without needing intermediate Lambda functions. This integration supports both synchronous and asynchronous invocations, making it ideal for orchestrating a multi-step ML workflow with built-in error handling, retries, and state management.

Exam trap

The trap here is that candidates often confuse SageMaker Pipelines (a dedicated ML pipeline service) with Step Functions, but the question explicitly asks for a SageMaker integration with Step Functions, not a replacement for it.

How to eliminate wrong answers

Option A is wrong because implementing each step as an AWS Lambda function adds unnecessary complexity, cold start latency, and a 15-minute execution timeout that may not accommodate long-running training jobs; Step Functions can directly invoke SageMaker APIs without Lambda. Option C is wrong because SageMaker Pipelines is a purpose-built orchestration service for ML workflows, but the question specifically asks about using Step Functions, and Pipelines is a separate service, not an integration with Step Functions. Option D is wrong because AWS Batch is designed for batch computing jobs and lacks the native state machine orchestration, error handling, and direct SageMaker API integrations that Step Functions provides.

10
Multi-Selecthard

Which THREE measures can help reduce inference latency for a deep learning model deployed on SageMaker real-time endpoints? (Select THREE.)

Select 3 answers
A.Enable SageMaker Neo to compile the model.
B.Increase the batch size for inference.
C.Use GPU instances for inference.
D.Reduce the input data size (e.g., lower resolution images).
E.Use a multi-model endpoint to share the instance.
AnswersA, C, D

Neo optimizes models for target hardware, reducing latency.

Why this answer

A is correct because SageMaker Neo compiles the trained model into an optimized binary for the target hardware (e.g., CPU, GPU, or Inferentia), using Apache TVM to fuse operations and prune unused computations. This reduces inference latency by up to 2x without requiring code changes, making it a direct latency-reduction measure for real-time endpoints.

Exam trap

The MLS-C01 exam often tests the misconception that increasing batch size always reduces latency, but for real-time endpoints, larger batches increase per-request processing time, making it a throughput optimization, not a latency reduction technique.

11
MCQmedium

A data scientist is using SageMaker Ground Truth to create a labeled dataset for object detection. After the labeling job completes, the scientist notices that the output manifest file contains incorrect labels. What is the most efficient way to correct these labels?

A.Create an incremental labeling job that includes only the mislabeled items.
B.Delete the labeling job and start over with a different set of workers.
C.Use the SageMaker console to edit the incorrect labels directly in the manifest file.
D.Create a new labeling job with the same dataset and manually verify all labels.
AnswerA

Efficiently corrects only errors.

Why this answer

SageMaker Ground Truth supports incremental labeling jobs that allow you to provide a new manifest with only mislabeled items, and the job will correct only those labels without re-labeling correctly labeled data. Option B is wrong because deleting and starting over is inefficient and loses all progress. Option C is wrong because the SageMaker console does not allow direct editing of manifest files; labels are fixed only through re-labeling.

Option D is wrong because it would re-label the entire dataset, wasting time and resources.

12
Multi-Selectmedium

Which THREE actions should be taken to ensure data security when training a model using Amazon SageMaker with data stored in Amazon S3? (Choose 3.)

Select 3 answers
A.Use a VPC to isolate the SageMaker training job
B.Apply an S3 bucket policy that denies all access except from the SageMaker service
C.Attach an EBS volume for storing training data
D.Enable server-side encryption on the S3 bucket
E.Use an IAM role with least privilege permissions
AnswersA, D, E

Network isolation.

Why this answer

Using a VPC to isolate the SageMaker training job ensures that the training instance runs within a private network, preventing direct internet access and allowing traffic to flow only through controlled network interfaces. This reduces the attack surface and helps meet compliance requirements for data security.

Exam trap

The trap here is that candidates often confuse service-level bucket policies (like 'Deny all except SageMaker service') with IAM role-based access, leading them to select option B, which is technically invalid because SageMaker does not have a service principal for S3 access.

13
Multi-Selecteasy

A machine learning pipeline uses SageMaker Processing jobs for feature engineering. Which TWO are benefits of using SageMaker Processing over running a custom script on an EC2 instance?

Select 2 answers
A.Automatically manages the compute resources
B.Integrates with SageMaker Experiments for tracking
C.Provides a built-in VPC for network isolation
D.Allows use of custom Docker images from any registry
E.Supports multiple programming languages
AnswersA, B

SageMaker provisions and tears down resources.

Why this answer

SageMaker Processing automatically manages the underlying compute resources, including provisioning, scaling, and terminating instances. This eliminates the need for manual infrastructure management, which is required when running a custom script on an EC2 instance. Option B is correct because SageMaker Processing jobs natively integrate with SageMaker Experiments, allowing automatic tracking of parameters, metrics, and artifacts for reproducibility and comparison.

Exam trap

The trap here is that candidates often confuse SageMaker Processing's ability to use custom Docker images with support for any registry, but the service strictly requires images to be hosted in Amazon ECR.

14
Multi-Selectmedium

A data scientist needs to deploy a model with a custom inference container. Which THREE requirements must the container meet for SageMaker hosting?

Select 3 answers
A.Provide a training script at /opt/ml/input/data
B.Use the SageMaker Python SDK to load the model
C.Implement a /ping endpoint for health checks
D.Serve on port 8080
E.Implement a /invocations endpoint for predictions
AnswersC, D, E

SageMaker uses /ping to check container health.

Why this answer

SageMaker requires custom inference containers to implement the /ping endpoint for health checks (C), serve on port 8080 (D), and implement the /invocations endpoint for predictions (E). Option A is for training containers, not inference. Option B is unnecessary; the container can load the model using any method.

15
Multi-Selecthard

A data scientist is using SageMaker to train a model. The training job needs to access data in an S3 bucket in a different AWS account. The data scientist has set up proper S3 bucket policies and IAM roles. Which THREE steps are necessary to allow SageMaker to access the cross-account S3 bucket? (Select THREE.)

Select 3 answers
A.Configure the S3 bucket policy to grant access to the SageMaker execution role ARN from the training account
B.Create a VPC endpoint for S3 in the training account
C.Create an IAM role in the data account with permissions to read from the S3 bucket
D.Use an AWS KMS key to encrypt the data in transit
E.Configure the SageMaker execution role in the training account to assume the IAM role in the data account
AnswersA, C, E

Bucket policy must allow cross-account access.

Why this answer

The S3 bucket policy in the data account must explicitly grant the SageMaker execution role ARN from the training account the necessary permissions (e.g., s3:GetObject, s3:ListBucket). This is the foundational step for cross-account access, as S3 bucket policies are resource-based policies that can specify principals from other AWS accounts.

Exam trap

The trap here is that candidates often confuse VPC endpoints or KMS encryption as mandatory for cross-account access, when in fact the core requirement is proper IAM role chaining and bucket policy configuration.

16
MCQhard

A machine learning engineer is deploying a model using Amazon SageMaker. The model is a PyTorch model that performs real-time inference with low latency requirements. The engineer wants to use automatic scaling based on the number of concurrent requests. Which SageMaker feature should be used to achieve this?

A.Create an AWS Auto Scaling group for the SageMaker endpoint.
B.Enable Elastic Load Balancing for the endpoint.
C.Use Amazon SageMaker automatic scaling with a target tracking scaling policy.
D.Deploy the model behind Amazon API Gateway with a Lambda function.
AnswerC

This scales based on invocations per instance.

Why this answer

Amazon SageMaker automatic scaling with a target tracking scaling policy is the correct feature because it allows the endpoint to dynamically adjust the number of instances based on a predefined metric, such as the number of concurrent requests (e.g., using the SageMakerVariantInvocationsPerInstance metric). This directly meets the requirement for automatic scaling based on concurrent requests while maintaining low latency for real-time PyTorch inference.

Exam trap

The trap here is that candidates often confuse SageMaker's built-in scaling with generic AWS services like Auto Scaling groups or ELB, not realizing that SageMaker endpoints have their own integrated scaling mechanism via Application Auto Scaling.

How to eliminate wrong answers

Option A is wrong because AWS Auto Scaling groups are used for EC2 instances or other resources, not for SageMaker endpoints; SageMaker manages its own scaling mechanism. Option B is wrong because Elastic Load Balancing is not a feature of SageMaker endpoints; SageMaker endpoints use a built-in load balancer that distributes traffic across instances, but ELB is not separately configurable or required for scaling. Option D is wrong because deploying behind API Gateway with Lambda adds unnecessary latency and complexity for real-time inference, and it does not provide native SageMaker automatic scaling based on concurrent requests.

17
MCQmedium

A deployed SageMaker endpoint is returning high latency. The model is a scikit-learn Random Forest. Which action is most likely to reduce latency?

A.Reduce the number of trees in the ensemble
B.Prune decision trees in the model
C.Increase the number of instances behind the endpoint
D.Switch to a GPU instance type
AnswerA

Fewer trees reduce computation time per inference.

Why this answer

Reducing the number of trees in a Random Forest ensemble directly decreases the total number of decision paths that must be evaluated per inference request. Since each tree contributes additively to the prediction time, fewer trees means fewer sequential or parallel evaluations, which lowers the per-request latency at the cost of some model accuracy.

Exam trap

The trap here is that candidates often confuse latency (per-request time) with throughput (requests per second) and incorrectly choose scaling out instances (Option C), or assume GPU acceleration universally speeds up inference (Option D), ignoring that scikit-learn models are CPU-only.

How to eliminate wrong answers

Option B is wrong because pruning decision trees (reducing depth or removing branches) primarily reduces model size and memory footprint, but the latency bottleneck in a Random Forest is dominated by the number of trees, not individual tree depth—pruning has a minor effect on inference time compared to reducing tree count. Option C is wrong because increasing the number of instances behind the endpoint improves throughput (handling more concurrent requests) but does not reduce the latency of a single inference request; it may even add network overhead. Option D is wrong because switching to a GPU instance type does not benefit scikit-learn Random Forest inference, as scikit-learn does not leverage GPU acceleration for tree-based models; the overhead of GPU context switching can actually increase latency.

18
MCQhard

A machine learning engineer is deploying a TensorFlow model to an Amazon SageMaker endpoint. The endpoint is behind an Application Load Balancer (ALB) for A/B testing. The engineer notices that the new variant is not receiving any traffic. What is the most likely cause?

A.The new variant's health checks are failing.
B.The ALB target group weight for the new variant is set to 0.
C.The model is not compatible with the ALB's protocol.
D.The ALB is not configured to route to SageMaker endpoints.
AnswerB

Weight of 0 means no traffic is sent.

Why this answer

If the ALB target group weight for the new variant is set to 0, the ALB will not route any traffic to that target group, even if the endpoint is healthy. In A/B testing setups, weights control the proportion of traffic sent to each variant; a weight of 0 effectively disables the variant.

Exam trap

The trap here is that candidates may confuse health check failures with traffic routing weights, assuming that a failing health check is the only reason a variant receives no traffic, when in fact a weight of 0 explicitly prevents traffic regardless of health status.

How to eliminate wrong answers

Option A is wrong because failing health checks would cause the ALB to mark the target as unhealthy and stop routing traffic, but the question states the new variant is not receiving any traffic at all, which is more consistent with a weight of 0 rather than a health check failure (which would still allow traffic if the target is healthy). Option C is wrong because TensorFlow models deployed to SageMaker endpoints use HTTPS, which is fully compatible with ALB's supported protocols (HTTP, HTTPS, gRPC). Option D is wrong because ALB can route to any HTTP/HTTPS endpoint, including SageMaker endpoints, as long as the target group is configured with the correct endpoint URL and port; there is no inherent restriction preventing ALB from routing to SageMaker.

19
Multi-Selecteasy

A company wants to deploy a machine learning model on Amazon SageMaker and needs to monitor the model's performance in production. Which TWO AWS services can be used to set up monitoring?

Select 2 answers
A.Amazon CloudWatch
B.AWS X-Ray
C.Amazon Inspector
D.Amazon SageMaker Model Monitor
E.AWS Config
AnswersA, D

CloudWatch monitors endpoint metrics like latency and invocations.

Why this answer

Amazon CloudWatch is correct because it provides comprehensive monitoring for SageMaker endpoints, including metrics like latency, invocation counts, and error rates. It can also trigger alarms and dashboards for performance degradation. Amazon SageMaker Model Monitor is correct because it specifically detects data drift, feature attribution drift, and quality issues in production models by analyzing inference data against a baseline.

Exam trap

The trap here is that candidates may confuse AWS X-Ray (application tracing) or AWS Config (resource compliance) with model monitoring, but only CloudWatch and SageMaker Model Monitor directly address production ML performance and data quality monitoring.

20
Multi-Selectmedium

A data scientist is deploying a model to a SageMaker endpoint and needs to optimize for cost while maintaining low latency. Which TWO actions should the data scientist take?

Select 2 answers
A.Use a larger instance type
B.Deploy to a single instance
C.Switch to batch transform
D.Use SageMaker Serverless Inference
E.Enable Auto Scaling on the endpoint
AnswersD, E

Pay per inference, scales automatically, cost-effective.

Why this answer

SageMaker Serverless Inference (Option D) automatically scales compute resources based on request volume, charging only for the compute time used during inference. This eliminates the cost of idle provisioned instances, making it ideal for optimizing cost while maintaining low latency for variable or intermittent traffic patterns.

Exam trap

The trap here is that candidates often assume 'larger instances' or 'single instance' are cost-saving measures, but the exam tests understanding that cost optimization for variable traffic requires dynamic scaling (Auto Scaling) or fully serverless compute, not static instance choices.

21
MCQeasy

A company is using Amazon SageMaker to train a model. The training data is stored in an S3 bucket encrypted with AWS KMS. The SageMaker training role has the necessary permissions to decrypt the data. However, the training job fails with an access denied error. What is the most likely cause?

A.The S3 bucket policy does not grant access to the training role
B.The training image is not compatible with encrypted data
C.The training role does not have kms:Decrypt permission for the KMS key
D.CloudTrail logging is disabled
E.The training job is not in the same VPC as the S3 bucket
AnswerC

KMS requires explicit decrypt permission.

Why this answer

The error message 'access denied' during a SageMaker training job with KMS-encrypted S3 data typically indicates that the training role lacks the kms:Decrypt permission for the specific KMS key used to encrypt the S3 objects. Even if the role has S3 read permissions (s3:GetObject), SageMaker must decrypt the data before reading it, which requires explicit KMS key policy or IAM policy granting kms:Decrypt. Without this, the training job fails with an access denied error.

Exam trap

The MLS-C01 exam often tests the misconception that S3 bucket policies alone control access to encrypted data, but the trap here is that KMS decryption permissions are a separate, required layer — candidates may overlook the need for kms:Decrypt when the role already has s3:GetObject.

How to eliminate wrong answers

Option A is wrong because the S3 bucket policy does not need to grant access to the training role if the role already has an IAM policy allowing s3:GetObject; the error is specifically about decryption, not S3 access. Option B is wrong because training images are containerized environments that can read decrypted data from SageMaker's managed infrastructure; compatibility with encrypted data is not a factor — the decryption happens at the S3/KMS layer before the image reads the data. Option D is wrong because CloudTrail logging is an auditing feature that records API calls but does not affect permissions or cause access denied errors during training job execution.

Option E is wrong because SageMaker training jobs can access S3 buckets across different VPCs or even outside VPCs via internet or VPC endpoints; the training job does not need to be in the same VPC as the S3 bucket, and VPC mismatch does not cause access denied errors for KMS-decrypted data.

22
MCQeasy

A team is using SageMaker to train a model. They want to track hyperparameters, metrics, and model artifacts. Which SageMaker feature should they use?

A.SageMaker Pipelines
B.SageMaker Experiments
C.SageMaker Debugger
D.SageMaker Model Registry
AnswerB

Experiments track hyperparameters, metrics, and artifacts.

Why this answer

SageMaker Experiments is the correct choice because it is purpose-built for tracking hyperparameters, metrics, and model artifacts across training runs. It automatically captures input parameters, output metrics, and artifact locations (e.g., S3 paths) for each trial, enabling comparison and lineage tracking without manual logging.

Exam trap

AWS often tests the distinction between tracking (Experiments) and orchestration (Pipelines), leading candidates to choose Pipelines because they think 'tracking a workflow' is the same as 'tracking experiment details'.

How to eliminate wrong answers

Option A is wrong because SageMaker Pipelines is a CI/CD orchestration service for building end-to-end ML workflows (e.g., data processing, training, deployment), not a tool for tracking individual experiment runs or hyperparameters. Option C is wrong because SageMaker Debugger monitors training jobs in real time for issues like vanishing gradients or overfitting, but it does not log hyperparameters or store model artifacts for experiment comparison. Option D is wrong because SageMaker Model Registry is a catalog for managing model versions, approvals, and deployment metadata, not for tracking hyperparameters or metrics from training runs.

23
MCQeasy

A data scientist wants to deploy a PyTorch model for real-time inference with latency under 100 ms. Which AWS service is most suitable?

A.Amazon SageMaker real-time endpoint
B.Amazon SageMaker Processing
C.AWS Lambda with container image
D.Amazon SageMaker Batch Transform
AnswerA

Provides low-latency inference suitable for real-time applications.

Why this answer

Amazon SageMaker real-time endpoints are designed for low-latency inference, typically under 100 ms, by hosting a model behind an HTTPS endpoint that auto-scales based on traffic. They support PyTorch natively via pre-built containers or custom containers, making them the most suitable choice for this requirement.

Exam trap

The trap here is that candidates may confuse SageMaker Batch Transform or Lambda with real-time inference, but Batch Transform is asynchronous and Lambda has cold start overhead, neither of which guarantees sub-100 ms latency for PyTorch models.

How to eliminate wrong answers

Option B (Amazon SageMaker Processing) is wrong because it is a batch-oriented service for data processing and model training, not for real-time inference. Option C (AWS Lambda with container image) is wrong because Lambda has a maximum invocation duration of 15 minutes and cold start latency can exceed 100 ms, making it unsuitable for sub-100 ms real-time inference. Option D (Amazon SageMaker Batch Transform) is wrong because it is designed for asynchronous batch predictions on large datasets, not for real-time, low-latency inference.

24
MCQhard

A company's ML pipeline uses AWS Step Functions to orchestrate data preprocessing, training, and evaluation. The training step occasionally fails due to a transient error. What is the most robust way to handle this without manual intervention?

A.Implement a retry policy with exponential backoff on the training step in the state machine
B.Configure a CloudWatch alarm to notify the team when the step fails
C.Use a parallel state to run multiple training instances simultaneously
D.Use a custom Lambda function to catch the error and restart the training step
AnswerA

Step Functions supports retry policies for transient errors.

Why this answer

AWS Step Functions natively supports retry policies with exponential backoff, which automatically retries failed tasks after a delay that increases progressively. This handles transient errors (e.g., resource contention, network glitches) without manual intervention, making the pipeline robust and self-healing.

Exam trap

The trap here is that candidates often over-engineer solutions (like custom Lambda functions) or choose monitoring-only options, missing the fact that Step Functions has a built-in, declarative retry mechanism that is the simplest and most robust approach for transient failures.

How to eliminate wrong answers

Option B is wrong because a CloudWatch alarm only notifies the team of a failure; it does not automatically recover the step, requiring manual intervention to restart the pipeline. Option C is wrong because running multiple training instances in parallel does not handle a single step's failure; it increases cost and complexity without addressing transient errors in the specific failing step. Option D is wrong because using a custom Lambda function to catch errors and restart the step is an anti-pattern; Step Functions already provides built-in retry logic, and a Lambda adds unnecessary complexity, latency, and potential for additional failure points.

25
MCQhard

A team has deployed a SageMaker endpoint for a sentiment analysis model. The model was trained on text data from social media. After deployment, the team notices that the model's accuracy has dropped significantly after 3 months. Which action should the team take to detect and address this issue?

A.Use SageMaker A/B testing to compare with a new model.
B.Enable SageMaker Model Monitor to detect data drift and trigger a retraining pipeline.
C.Re-deploy the model using the same training script.
D.Create a CloudWatch alarm on invocation errors.
AnswerB

Model Monitor can detect drift and trigger automated retraining.

Why this answer

B is correct because SageMaker Model Monitor is specifically designed to detect data drift (changes in the input data distribution over time) and model drift (degradation in prediction quality). When a sentiment analysis model trained on social media text sees a drop in accuracy after months, it is likely due to shifts in language, slang, or topics. Model Monitor can continuously track the distribution of input features and predictions against a baseline, and when drift is detected, it can automatically trigger a retraining pipeline to update the model, directly addressing the root cause of the accuracy drop.

Exam trap

AWS often tests the distinction between monitoring for operational errors (CloudWatch alarms) versus monitoring for model performance degradation (Model Monitor), and candidates mistakenly choose CloudWatch because they associate 'alarms' with any problem, missing that accuracy drop is a data drift issue, not an invocation error.

How to eliminate wrong answers

Option A is wrong because SageMaker A/B testing is used to compare the performance of two different model variants (e.g., a new model vs. the current one) in real-time traffic, but it does not detect or diagnose the cause of accuracy degradation like data drift; it only helps choose the better model after the issue is already identified. Option C is wrong because re-deploying the model using the same training script will not fix the accuracy drop if the underlying data distribution has changed; the model will still be stale and produce poor predictions on the new data. Option D is wrong because a CloudWatch alarm on invocation errors monitors for infrastructure or runtime failures (e.g., timeouts, 5xx errors), not for model accuracy degradation or data drift; the model can still serve predictions without errors but with low accuracy.

26
MCQhard

A company uses SageMaker to train a model each night. The training data is stored in an S3 bucket with SSE-S3 encryption. The training job fails with an access denied error. Which configuration is needed?

A.Configure the training job to run in a VPC with S3 VPC Endpoint
B.Create an IAM role with S3 read access and assign it to the SageMaker training job
C.Enable SSE-KMS on the S3 bucket
D.Add a bucket policy allowing s3:GetObject for all principals
AnswerB

SageMaker needs a role with permissions to read S3 data.

Why this answer

The training job fails because SageMaker does not have the necessary permissions to read the data from S3. The solution is to create an IAM role with S3 read access (s3:GetObject) and assign it to the SageMaker training job. Option A is incorrect because VPC endpoints are not required for this error and are unrelated to encryption.

Option C is incorrect because SSE-S3 encryption is already enabled and does not require KMS. Option D is incorrect because a bucket policy allowing all principals is insecure and not the proper way to grant permissions to SageMaker.

27
Multi-Selectmedium

A company is deploying a machine learning model for real-time fraud detection using Amazon SageMaker. The model must have a p99 inference latency under 50ms. Which TWO actions should the ML team take to meet the latency requirement?

Select 2 answers
A.Use a multi-model endpoint to reduce cold starts.
B.Use SageMaker Neo to compile and optimize the model for the target instance type.
C.Use SageMaker Batch Transform for near-real-time inference.
D.Configure automatic scaling to add instances based on CPU utilization.
E.Select a GPU instance type such as ml.g4dn.xlarge.
AnswersB, E

Neo optimizes the model to run faster on specific hardware.

Why this answer

SageMaker Neo compiles and optimizes trained models for specific hardware targets, reducing inference latency by up to 2x without sacrificing accuracy. By applying hardware-specific optimizations such as kernel fusion and memory layout tuning, Neo ensures the model runs efficiently on the chosen instance type, directly helping to achieve sub-50ms p99 latency.

Exam trap

Candidates often assume that using a GPU instance (like ml.g4dn.xlarge) alone guarantees low latency. However, without model optimization (e.g., via SageMaker Neo), the overhead from unoptimized kernels and framework runtime can still cause p99 latency to exceed 50ms. Neo compiles the model specifically for the target instance, reducing inference time.

28
Multi-Selectmedium

A company is using Amazon SageMaker to train a model. The training data includes sensitive personally identifiable information (PII). The company needs to ensure that the training data is protected and that the trained model does not inadvertently expose PII. Which TWO actions should the company take? (Choose TWO.)

Select 2 answers
A.Encrypt the training data in S3 using AWS KMS
B.Use server-side encryption with S3-managed keys
C.Use SageMaker's data processing to redact PII before training
D.Enable AWS CloudTrail to log all access to the data
E.Grant public read access to the training data for faster access
AnswersA, C

Encryption protects data at rest.

Why this answer

Encrypting the training data in S3 using AWS KMS ensures that the data is protected at rest with customer-managed keys, providing a strong security control for sensitive PII. This encryption prevents unauthorized access to the raw data stored in S3, which is a fundamental requirement for data protection.

Exam trap

The trap here is that candidates often confuse logging (CloudTrail) with data protection, or assume that any form of S3 encryption (like SSE-S3) is sufficient, when the question specifically requires control over keys and PII redaction to prevent model exposure.

29
MCQmedium

A company is deploying a machine learning model using AWS Lambda for real-time inference. The model is a large ensemble model that takes approximately 500 MB of memory. The Lambda function is configured with 1024 MB of memory and a timeout of 15 seconds. The company observes that the function frequently times out during inference. The company wants to keep using Lambda for its serverless benefits. Which solution should the company implement to reduce inference time?

A.Increase the Lambda function memory to 3008 MB to provide more CPU resources.
B.Deploy the model on Amazon SageMaker hosting instead of Lambda.
C.Use AWS Step Functions to invoke the Lambda function asynchronously.
D.Use Amazon ElastiCache to cache model predictions and reduce computation.
AnswerA

Increasing memory to 3008 MB provides more CPU resources, reducing inference time.

Why this answer

Lambda has a maximum memory of 10,240 MB and a maximum timeout of 15 minutes. Increasing memory to 3008 MB gives more CPU power and reduces inference time. Option A is correct.

Option B (SageMaker) moves away from serverless, which the company wants to keep. Option C (Step Functions) adds orchestration overhead and does not directly reduce inference time. Option D (ElastiCache) adds latency and cost and does not address the timeout issue.

30
MCQeasy

A data scientist is training a neural network on a GPU instance in Amazon SageMaker. The training job fails with an 'OutOfMemoryError'. Which action should the data scientist take to resolve this issue?

A.Enable automatic hyperparameter tuning.
B.Switch to distributed training across multiple instances.
C.Use a smaller instance type with less GPU memory.
D.Reduce the batch size in the training script.
AnswerD

Smaller batch size reduces memory footprint.

Why this answer

An OutOfMemoryError during GPU training indicates that the GPU's memory is exhausted. Reducing the batch size directly decreases the memory footprint per training step, as fewer samples and their corresponding activations are stored simultaneously. This is the most immediate and effective fix without changing the instance type or training architecture.

Exam trap

The MLS-C01 exam often tests the misconception that scaling up hardware (distributed training) solves memory errors, but the correct approach is to reduce per-instance memory load, typically by lowering batch size.

How to eliminate wrong answers

Option A is wrong because hyperparameter tuning adjusts learning rates, optimizers, or network architecture, not the memory consumption per step; it does not resolve an out-of-memory error. Option B is wrong because switching to distributed training across multiple instances does not reduce per-GPU memory usage; it may even increase overhead from gradient synchronization and data parallelism. Option C is wrong because using a smaller instance type with less GPU memory would exacerbate the memory shortage, making the error more likely, not less.

31
Multi-Selectmedium

A data scientist is using Amazon SageMaker to train a model. The training job uses a custom Docker image stored in Amazon ECR. The training job fails with an error 'CannotPullContainerError'. Which TWO actions should the data scientist take to resolve this issue? (Choose TWO.)

Select 2 answers
A.Use a public Docker image instead of a custom one
B.Confirm that the image tag exists in the ECR repository
C.Verify that the IAM role used for training has permissions to pull from ECR
D.Increase the training job timeout
E.Ensure the training instance has internet access
AnswersB, C

A missing tag causes CannotPullContainerError.

Why this answer

Options B and C are correct because the error 'CannotPullContainerError' typically indicates that the container image cannot be pulled from ECR. This can occur if the image tag does not exist in the repository (B) or if the IAM role used by the SageMaker training job does not have the necessary permissions (e.g., ecr:GetDownloadUrlForLayer, ecr:BatchGetImage) to pull the image (C). Option A is not required; custom images can be used.

Option D, increasing the timeout, would not resolve a pull issue. Option E, internet access, is not necessary because SageMaker can access ECR within the AWS network.

32
MCQhard

A data scientist is training a deep learning model on Amazon SageMaker using a custom TensorFlow container. The training job fails with an OutOfMemory error. The instance type is ml.p3.2xlarge with 16 GB GPU memory and 61 GB system memory. The model uses mixed precision training. Which step should the data scientist take to resolve the issue without changing the instance type?

A.Reduce the batch size
B.Use gradient accumulation to simulate a larger batch size
C.Use model parallelism across multiple GPUs
D.Enable automatic mixed precision (AMP)
E.Increase the instance type to ml.p3.8xlarge
AnswerA

Smaller batch size reduces memory usage.

Why this answer

Reducing the batch size directly decreases the memory footprint per training step, which is the most straightforward way to resolve an OutOfMemory error without changing the instance type. Since the model already uses mixed precision training (which reduces memory usage via FP16), the remaining memory pressure is likely from the batch size being too large for the 16 GB GPU memory on the ml.p3.2xlarge instance.

Exam trap

The trap here is that candidates often confuse gradient accumulation (Option B) as a memory-saving technique, but it actually increases memory usage per step because it stores gradients across multiple micro-batches, whereas reducing batch size directly lowers peak memory consumption.

How to eliminate wrong answers

Option B is wrong because gradient accumulation simulates a larger batch size by accumulating gradients over multiple forward/backward passes, which actually increases memory usage per step (storing gradients) and does not reduce peak memory; it is used to improve convergence, not to fix OOM. Option C is wrong because model parallelism across multiple GPUs requires a multi-GPU instance (e.g., ml.p3.16xlarge) or a distributed setup, and the current instance has only one GPU; this would require changing the instance type. Option D is wrong because automatic mixed precision (AMP) is already enabled per the question, so enabling it again does nothing to resolve the OOM.

Option E is wrong because increasing the instance type to ml.p3.8xlarge changes the instance type, which violates the constraint of not changing the instance type.

33
Multi-Selectmedium

Which THREE of the following are valid ways to deploy a model using SageMaker? (Select THREE.)

Select 3 answers
A.Deploy to AWS Lambda
B.Deploy to a SageMaker batch transform job
C.Deploy to a SageMaker asynchronous endpoint
D.Deploy to a SageMaker real-time endpoint
E.Deploy to Amazon EC2 directly
AnswersB, C, D

Batch transform processes large batches of data asynchronously.

Why this answer

SageMaker batch transform jobs allow you to run inference on an entire dataset asynchronously, processing large batches of data without requiring a persistent endpoint. This is ideal for offline predictions where low latency is not needed, and the job automatically manages compute resources, scaling, and output storage.

Exam trap

AWS often tests the distinction between SageMaker's managed deployment options (real-time, asynchronous, batch) and external compute services like Lambda or EC2, expecting candidates to recognize that only SageMaker-native endpoints and jobs are considered valid deployment methods within the SageMaker ecosystem.

34
MCQmedium

Refer to the exhibit. A developer has this IAM policy attached to an IAM role used by SageMaker. When attempting to create an endpoint, the operation fails with an access denied error. What is the MOST likely cause?

A.The policy is missing ecr:DescribeRepositories.
B.The policy is missing s3:ListBucket on the model bucket.
C.The policy is missing sagemaker:DescribeEndpoint.
D.The policy is missing sagemaker:InvokeEndpoint.
AnswerB

SageMaker needs to list the bucket to access model artifacts.

Why this answer

The error occurs because SageMaker needs to list objects in the S3 bucket where the model artifacts are stored before it can download them to create the endpoint. The attached policy grants s3:GetObject but not s3:ListBucket, which is required for the initial validation and listing of model artifacts in the bucket. Without s3:ListBucket, the CreateEndpoint API call fails with an access denied error.

Exam trap

The trap here is that candidates often assume only s3:GetObject is needed for reading model artifacts, overlooking that SageMaker's internal validation process also requires s3:ListBucket to verify the artifact's location and existence.

How to eliminate wrong answers

Option A is wrong because ecr:DescribeRepositories is not required for creating a SageMaker endpoint; it is used for interacting with Amazon ECR repositories, which are not directly involved in endpoint creation from an S3 model artifact. Option C is wrong because sagemaker:DescribeEndpoint is a read-only action used to retrieve endpoint metadata, not a prerequisite for creating an endpoint. Option D is wrong because sagemaker:InvokeEndpoint is used for invoking a deployed endpoint for inference, not for the creation of the endpoint itself.

35
MCQmedium

A machine learning team is using SageMaker to train a model. The training data is stored in an S3 bucket encrypted with AWS KMS. The training job fails with an 'AccessDenied' error. Which IAM permission is MOST likely missing from the SageMaker execution role?

A.s3:GetObject
B.s3:ListBucket
C.kms:Decrypt
D.kms:GenerateDataKey
AnswerC

To read encrypted objects, SageMaker needs kms:Decrypt permission.

Why this answer

The training data is stored in an S3 bucket encrypted with AWS KMS. When SageMaker reads the encrypted data, the execution role must have permission to decrypt the KMS key. Without `kms:Decrypt`, the role cannot access the encrypted objects, resulting in an 'AccessDenied' error even if S3 read permissions are present.

Exam trap

The trap here is that candidates often assume S3 permissions alone are sufficient, overlooking that KMS-encrypted objects require explicit decryption permissions, and they may confuse `kms:Decrypt` with `kms:GenerateDataKey` which is used for encryption, not decryption.

How to eliminate wrong answers

Option A is wrong because `s3:GetObject` is necessary to read the objects from S3, but the error occurs specifically due to KMS encryption; without decryption permissions, GetObject alone will still fail with an AccessDenied error. Option B is wrong because `s3:ListBucket` is required to list objects in the bucket, but the training job typically accesses specific objects by key, and listing is not the cause of the decryption failure. Option D is wrong because `kms:GenerateDataKey` is used to create new data keys for encryption, not to decrypt existing encrypted data; the training job needs to decrypt, not generate new keys.

36
Multi-Selectmedium

A company is deploying a machine learning model using Amazon SageMaker. The model needs to be updated frequently with new data. Which TWO approaches can be used to update the model without downtime? (Choose TWO.)

Select 2 answers
A.Delete the existing endpoint and create a new one with the updated model.
B.Directly update the model artifact in the existing endpoint configuration.
C.Use SageMaker A/B testing to gradually shift traffic to the new model variant.
D.Stop the endpoint, update the model, and restart the endpoint.
E.Use a blue/green deployment by deploying the new model on a separate endpoint and then updating the DNS record.
AnswersC, E

A/B testing with production variants allows traffic shifting without downtime.

Why this answer

Amazon SageMaker supports deploying multiple model variants behind a single endpoint using production variants. By using A/B testing (traffic shifting), you can gradually route a percentage of inference requests to the new model variant while the old variant continues serving the majority of traffic, enabling updates with zero downtime.

Exam trap

The trap here is that candidates often think stopping or deleting the endpoint is acceptable for updates, but the exam emphasizes zero-downtime strategies like traffic shifting (A/B testing) and blue/green deployments, which avoid any service interruption.

37
MCQmedium

A data scientist needs to process a large dataset (100 TB) for training a machine learning model. The data is stored in Amazon S3. Which approach is most cost-effective and efficient for data processing?

A.Use AWS Glue ETL jobs.
B.Use Amazon EMR with Apache Spark.
C.Use Amazon Athena to run SQL queries.
D.Use Amazon SageMaker Processing with a single large instance.
AnswerB

Distributed processing is efficient for large data.

Why this answer

Amazon EMR with Apache Spark is the most cost-effective and efficient approach for processing 100 TB of data stored in S3 because it provides a managed, scalable cluster that can process large datasets in parallel using in-memory computation. EMR integrates natively with S3 via the EMRFS connector, allowing data to be read directly from S3 without the need for intermediate storage, and it supports auto-scaling and spot instances to reduce costs. For petabyte-scale data, Spark's distributed processing engine outperforms single-node solutions and is more flexible than SQL-only or ETL-only services.

Exam trap

The trap here is that candidates often choose AWS Glue (Option A) because it is marketed as a serverless ETL service, but they overlook that for 100 TB, Glue's per-DPU pricing and lack of distributed processing optimizations make it less cost-effective and slower than EMR with Spark, which is purpose-built for big data workloads.

How to eliminate wrong answers

Option A is wrong because AWS Glue ETL jobs are designed for smaller-scale, schema-on-read ETL tasks and may incur high costs and performance bottlenecks for 100 TB due to its serverless, per-DPU pricing model and lack of fine-grained control over cluster configuration. Option C is wrong because Amazon Athena is a serverless query engine that charges per TB of data scanned, and scanning 100 TB repeatedly for training data preparation would be prohibitively expensive and inefficient for iterative processing or complex transformations. Option D is wrong because Amazon SageMaker Processing with a single large instance cannot efficiently handle 100 TB due to vertical scaling limits (max instance storage and network throughput), leading to long processing times and higher costs compared to distributed processing with EMR.

38
MCQeasy

A company wants to use Amazon SageMaker to host a model that was trained using a custom algorithm. The model artifact is stored in Amazon S3. The company wants to ensure that the endpoint can automatically scale based on the number of incoming requests. Which configuration should the company use?

A.Create a SageMaker multi-model endpoint with automatic scaling.
B.Create a SageMaker real-time endpoint and configure automatic scaling using a target tracking policy.
C.Use SageMaker Serverless Inference which scales automatically.
D.Use SageMaker Batch Transform with a scheduled job.
AnswerB

Real-time endpoints with auto-scaling adjust instance count based on load.

Why this answer

A SageMaker real-time endpoint with automatic scaling using a target tracking policy allows the endpoint to dynamically adjust the number of instances based on the incoming request load. This configuration is ideal for hosting a custom algorithm model artifact stored in S3, as it provides low-latency inference and can scale out or in based on a target metric like average CPU utilization or request count per instance.

Exam trap

The trap here is that candidates often confuse SageMaker Serverless Inference with real-time endpoints, assuming serverless automatically handles all scaling needs, but they overlook the limitations of serverless (e.g., model size limits, cold starts, and concurrency caps) that make it unsuitable for many custom algorithms, especially those requiring high throughput or large artifacts.

How to eliminate wrong answers

Option A is wrong because a multi-model endpoint is designed to host multiple models on a single endpoint to reduce costs, but it does not inherently provide automatic scaling based on request load; scaling must be configured separately, and the question specifically asks for automatic scaling based on incoming requests. Option C is wrong because SageMaker Serverless Inference automatically scales to zero and handles burst traffic, but it is not suitable for all custom algorithms, especially those with large model artifacts or high memory requirements, and it has a maximum concurrency limit that may not meet the company's scaling needs. Option D is wrong because SageMaker Batch Transform is for offline, asynchronous inference on batches of data, not for real-time request handling, and a scheduled job does not provide automatic scaling based on incoming request volume.

39
MCQeasy

A data scientist needs to perform hyperparameter optimization for a gradient boosting model. Which built-in Amazon SageMaker feature should they use?

A.Amazon SageMaker Automatic Model Tuning
B.Amazon SageMaker Clarify
C.Amazon SageMaker Debugger
D.Amazon SageMaker Neo
AnswerA

Performs hyperparameter optimization.

Why this answer

Amazon SageMaker Automatic Model Tuning (A) is the built-in feature specifically designed for hyperparameter optimization. It automates the search for the best combination of hyperparameters by launching multiple training jobs with different hyperparameter values, using strategies like Bayesian optimization, random search, or Hyperband. This directly addresses the data scientist's need to optimize a gradient boosting model's hyperparameters.

Exam trap

The trap here is that candidates may confuse SageMaker Debugger's monitoring capabilities (e.g., capturing loss curves) with the active optimization of hyperparameters, but Debugger only observes and reports, it does not suggest or iterate on hyperparameter values.

How to eliminate wrong answers

Option B is wrong because Amazon SageMaker Clarify is designed for bias detection and model explainability, not for hyperparameter optimization. Option C is wrong because Amazon SageMaker Debugger monitors training jobs in real-time, captures metrics, and detects anomalies like overfitting or vanishing gradients, but it does not perform hyperparameter tuning. Option D is wrong because Amazon SageMaker Neo optimizes trained models for deployment on specific hardware targets (e.g., ARM, Intel, NVIDIA) by compiling them, not for hyperparameter search.

40
Multi-Selectmedium

A data scientist is using SageMaker to build a model for fraud detection. The dataset is highly imbalanced. Which THREE techniques should be applied to address class imbalance?

Select 3 answers
A.Train the model only on the majority class.
B.Use accuracy as the evaluation metric.
C.Apply SMOTE to generate synthetic samples of the minority class.
D.Use class weights in the loss function.
E.Undersample the majority class.
AnswersC, D, E

SMOTE creates synthetic examples to balance classes.

Why this answer

SMOTE (Synthetic Minority Oversampling Technique) generates synthetic samples for the minority class by interpolating between existing minority instances, which helps balance the dataset without simply duplicating data. This is effective for fraud detection because it provides the model with more diverse examples of fraudulent transactions, reducing the bias toward the majority class.

Exam trap

AWS exams often test the misconception that accuracy is a valid metric for imbalanced data, when in fact precision, recall, F1-score, or AUC-ROC are more appropriate.

41
MCQmedium

A data scientist is training a deep learning model on Amazon SageMaker using the built-in Object Detection algorithm. The training job is failing with a 'ResourceLimitExceeded' error when trying to launch multiple GPU instances. Which of the following is the MOST likely cause?

A.The training script has a syntax error.
B.The dataset is too large for the selected instance type.
C.The account has reached the limit for the number of GPU instances in the current AWS Region.
D.The S3 bucket containing the training data has insufficient permissions.
AnswerC

ResourceLimitExceeded indicates service limit reached; contact AWS to increase limits.

Why this answer

The 'ResourceLimitExceeded' error indicates that the account has exceeded its service limit for the number of GPU instances (or any SageMaker training instances) in the current AWS Region. Option A is incorrect because a syntax error would result in a different error (e.g., 'ModuleNotFoundError' or 'SyntaxError'). Option B is incorrect because the dataset size does not directly cause a resource limit error; it might cause out-of-memory issues but not a resource limit exceeded.

Option D is incorrect because insufficient S3 bucket permissions would cause an 'AccessDenied' error, not 'ResourceLimitExceeded'.

42
MCQmedium

A data scientist creates a model resource in SageMaker using the JSON configuration in the exhibit. When creating an endpoint, the deployment fails with an error 'ModelError: Cannot find inference code'. What is the MOST likely cause?

A.The model.tar.gz file is missing the model weights
B.The ECR image does not exist
C.The inference container environment does not specify SAGEMAKER_PROGRAM
D.The training container does not have the SAGEMAKER_PROGRAM variable
AnswerC

The inference container needs the SAGEMAKER_PROGRAM variable to point to the inference script.

Why this answer

The error 'Cannot find inference code' occurs because SageMaker requires the `SAGEMAKER_PROGRAM` environment variable in the inference container to specify the entry-point script (e.g., `inference.py`) inside the `model.tar.gz`. Without this variable, SageMaker does not know which script to execute for inference, causing the deployment to fail. Option C correctly identifies this missing environment variable as the root cause.

Exam trap

The trap here is that candidates confuse missing model weights (Option A) with missing inference code, but SageMaker's error message explicitly states 'Cannot find inference code', which points to the entry-point script, not the model artifacts.

How to eliminate wrong answers

Option A is wrong because missing model weights would cause a runtime error during inference (e.g., 'Unable to load model'), not a deployment failure about missing inference code. Option B is wrong because if the ECR image did not exist, SageMaker would return a different error such as 'ImageNotFoundException' or 'RepositoryNotFoundException', not 'Cannot find inference code'. Option D is wrong because the training container's environment variables are irrelevant to the inference endpoint; the inference container is a separate container that must have its own `SAGEMAKER_PROGRAM` set.

43
MCQmedium

A data scientist is deploying a PyTorch model to Amazon SageMaker for real-time inference. The model runs on a large instance but inference latency is too high. Which action is MOST likely to reduce latency without sacrificing accuracy?

A.Compile the model using SageMaker Neo
B.Switch from a GPU instance to a CPU instance
C.Quantize the model weights from FP32 to INT8
D.Deploy the model to a multi-model endpoint
AnswerA

Neo optimizes the model for the target hardware, reducing latency without retraining or accuracy loss.

Why this answer

SageMaker Neo compiles the trained model into an optimized runtime using Apache TVM, applying graph-level optimizations, operator fusion, and memory layout transformations specifically tuned for the target hardware. This reduces inference latency by improving computational efficiency without altering the model's weights or architecture, thus preserving accuracy.

Exam trap

The trap here is that candidates often confuse model quantization (which reduces accuracy) with model compilation (which optimizes execution without changing weights), leading them to choose quantization as a latency fix despite the 'without sacrificing accuracy' constraint.

How to eliminate wrong answers

Option B is wrong because switching from a GPU instance to a CPU instance would typically increase latency for deep learning inference, as GPUs are designed for parallel matrix operations that accelerate neural network computations. Option C is wrong because quantizing model weights from FP32 to INT8 reduces numerical precision, which can introduce accuracy degradation, especially for models sensitive to low-precision arithmetic. Option D is wrong because deploying to a multi-model endpoint is designed to improve resource utilization and cost efficiency by sharing an instance across multiple models, but it does not inherently reduce the inference latency of a single model; it may even increase latency due to contention.

44
MCQeasy

A company uses SageMaker to host a real-time inference endpoint. The endpoint is receiving a large number of requests, but the latency is higher than expected. The data scientist observes that the CPU utilization is low but memory utilization is high. Which action should be taken to reduce latency?

A.Switch to an instance type with more memory or optimize the model to reduce memory footprint.
B.Enable VPC traffic mirroring to diagnose network issues.
C.Use an instance type with more vCPUs.
D.Increase the number of instances in the endpoint.
AnswerA

Addresses memory bottleneck.

Why this answer

High memory utilization indicates the model is memory-bound. Increasing instance memory or optimizing the model to reduce memory footprint can reduce latency. Option B is wrong because VPC traffic mirroring is used for network diagnostics, not for addressing memory bottlenecks.

Option C is wrong because CPU utilization is low, so adding more vCPUs would not help; the bottleneck is memory, not CPU. Option D is wrong because increasing the number of instances can improve throughput but does not directly reduce per-request latency for a memory-bound model; it may also increase cost.

45
MCQeasy

A company is using Amazon SageMaker to train a model and wants to track hyperparameter tuning jobs. Which AWS service is BEST suited to store and query metadata such as tuning job configurations and results?

A.Amazon CloudWatch Logs
B.Amazon S3 with Amazon Athena
C.Amazon SageMaker Experiments
D.Amazon DynamoDB
AnswerC

SageMaker Experiments is the native solution for tracking tuning jobs and their results.

Why this answer

Amazon SageMaker Experiments is purpose-built for tracking, organizing, and querying metadata from machine learning training runs, including hyperparameter tuning jobs. It automatically captures configurations, metrics, and results, and provides a Python SDK and SDK API to search and compare trials, making it the best choice for this use case.

Exam trap

The trap here is that candidates often confuse CloudWatch Logs for tracking metadata because it is the default logging service, but it is designed for unstructured logs, not structured experiment metadata, and lacks the search and comparison capabilities of SageMaker Experiments.

How to eliminate wrong answers

Option A is wrong because Amazon CloudWatch Logs stores unstructured log data, not structured metadata like tuning job configurations and results, and lacks native query capabilities for comparing hyperparameter trials. Option B is wrong because while Amazon S3 with Athena can store and query metadata, it requires manual setup to log tuning job data and does not integrate natively with SageMaker's hyperparameter tuning jobs, adding unnecessary complexity. Option D is wrong because Amazon DynamoDB is a NoSQL database that can store metadata but lacks built-in integration with SageMaker tuning jobs, requiring custom code to capture and query the metadata, and does not provide the experiment tracking and comparison features of SageMaker Experiments.

46
MCQeasy

A company is using Amazon SageMaker to train a model and wants to automatically retrain the model every week using new data. Which AWS service should be used to orchestrate the retraining pipeline?

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

Step Functions can orchestrate multiple SageMaker API calls and handle retries.

Why this answer

AWS Step Functions is the correct choice because it provides a serverless workflow orchestration service that can coordinate multiple AWS services (e.g., SageMaker training jobs, Lambda functions, and data processing) into a state machine. It supports scheduling via Amazon EventBridge (formerly CloudWatch Events) to trigger the pipeline weekly, and it can handle retries, error handling, and parallel execution, making it ideal for automating a retraining pipeline.

Exam trap

The trap here is that candidates often confuse a scheduling service (CloudWatch Events) with a workflow orchestrator (Step Functions), or assume that a single Lambda function can handle the entire pipeline, overlooking the need for state management, error handling, and multi-step coordination.

How to eliminate wrong answers

Option A is wrong because Amazon CloudWatch Events (now Amazon EventBridge) is a scheduling and event notification service, not a workflow orchestrator; it can trigger a Lambda function or Step Functions on a schedule, but it cannot itself orchestrate the multi-step retraining pipeline. Option B is wrong because AWS Lambda is a serverless compute service for running code in response to events, but it lacks built-in workflow orchestration, state management, and error handling for complex multi-step pipelines; using Lambda alone would require custom code to manage retries, sequencing, and monitoring. Option D is wrong because AWS Data Pipeline is designed for batch data processing and movement (e.g., ETL jobs), not for orchestrating machine learning training workflows; it does not natively integrate with SageMaker training jobs or provide the state machine capabilities needed for retraining pipelines.

47
Multi-Selectmedium

A company is deploying a machine learning model using Amazon SageMaker. The model needs to be updated frequently. Which THREE practices should the company implement for model versioning and deployment?

Select 3 answers
A.Use AWS CodePipeline to automate the training and deployment pipeline.
B.Use the SageMaker Model Registry to catalog model versions.
C.Manually update the endpoint configuration each time.
D.Store all training datasets in a single S3 bucket without versioning.
E.Deploy new model versions using canary deployments with SageMaker endpoints.
AnswersA, B, E

CodePipeline automates CI/CD.

Why this answer

AWS CodePipeline is correct because it enables continuous integration and continuous delivery (CI/CD) for machine learning models, automating the build, train, test, and deploy stages. By integrating with SageMaker, CodePipeline can trigger retraining on new data, run evaluation steps, and automatically update the endpoint, ensuring frequent model updates are reliable and repeatable.

Exam trap

The trap here is that candidates may think manual endpoint updates (Option C) are acceptable for small-scale deployments, but the exam emphasizes automation and reproducibility for frequent updates, making manual steps a clear anti-pattern.

48
MCQmedium

A data scientist is deploying a machine learning model using SageMaker and wants to automate the retraining pipeline. The training data is updated daily in an S3 bucket. Which combination of AWS services should the data scientist use to trigger a new training job when new data arrives?

A.Amazon SQS queue to store S3 events and a cron job to poll and start training
B.Use SageMaker Pipelines with a schedule to check for new data every hour
C.Amazon S3 event notification to directly start a SageMaker training job
D.Amazon CloudWatch Events to run an AWS Step Functions state machine that starts a SageMaker training job
E.Amazon CloudWatch Events to invoke an AWS Lambda function that starts a SageMaker training job
AnswerE

CloudWatch Events can capture S3 events and invoke Lambda to start training.

Why this answer

Amazon S3 event notifications can be sent to Amazon CloudWatch Events (via Amazon EventBridge), which then triggers an AWS Lambda function. The Lambda function contains code to start a SageMaker training job using the boto3 SDK. This serverless architecture provides a fully automated, event-driven pipeline that responds immediately when new data arrives in the S3 bucket, without polling or manual intervention.

Exam trap

AWS often tests the misconception that S3 event notifications can directly invoke SageMaker actions, but in reality, S3 events can only trigger Lambda, SQS, SNS, or EventBridge — a middleman service is always required to call the SageMaker API.

How to eliminate wrong answers

Option A is wrong because using an SQS queue with a cron job to poll introduces latency, complexity, and unnecessary cost; it is not a real-time event-driven solution and violates the principle of automation. Option B is wrong because SageMaker Pipelines with a schedule checks for new data on a fixed interval (e.g., every hour), which is not event-driven and may miss data arriving between checks or cause unnecessary runs when no new data exists. Option C is wrong because Amazon S3 event notifications cannot directly start a SageMaker training job; S3 events can only target Lambda, SQS, SNS, or EventBridge, not SageMaker API actions directly.

Option D is wrong because while CloudWatch Events can trigger Step Functions, this adds unnecessary orchestration complexity when a single Lambda function can directly start the training job; Step Functions is overkill for a simple trigger-and-run pattern.

49
MCQeasy

A data scientist is deploying a model using Amazon SageMaker for real-time inference. The model is memory-intensive and requires a GPU. Which instance type should be selected for the endpoint?

A.i3.2xlarge
B.c5.2xlarge
C.r5.2xlarge
D.p3.2xlarge
AnswerD

GPU instance suitable for memory-intensive models.

Why this answer

The p3.2xlarge instance is correct because it provides a GPU (NVIDIA Tesla V100) with high memory bandwidth, which is essential for memory-intensive deep learning models requiring GPU acceleration for real-time inference. SageMaker endpoints for GPU-based models must use instance types from the P or G families, as CPU-only instances like i3, c5, or r5 lack the parallel processing capabilities needed for efficient GPU inference.

Exam trap

The MLS-C01 exam often tests the distinction between CPU-optimized instance families (c5, r5, i3) and GPU-accelerated families (p3, g4dn), where candidates mistakenly assume that high RAM (r5) or high compute (c5) can substitute for a GPU, ignoring the fundamental hardware requirement for GPU-based inference.

How to eliminate wrong answers

Option A (i3.2xlarge) is wrong because it is a storage-optimized instance with NVMe SSD storage, designed for high I/O workloads, not for GPU-accelerated inference. Option B (c5.2xlarge) is wrong because it is a compute-optimized instance with only CPUs, lacking a GPU, which is explicitly required for the memory-intensive model. Option C (r5.2xlarge) is wrong because it is a memory-optimized instance with high RAM but no GPU, making it unsuitable for GPU-dependent inference tasks.

50
Multi-Selectmedium

A company uses SageMaker to train a model. The training job is taking too long and the data scientist wants to speed it up. Which THREE strategies should the data scientist consider? (Select THREE.)

Select 3 answers
A.Reduce the number of training epochs
B.Use a GPU instance type like ml.p3.2xlarge
C.Use distributed training with multiple instances
D.Use Pipe input mode to stream data from S3
E.Increase the batch size in the training script
AnswersB, C, D

GPUs accelerate training for deep learning.

Why this answer

GPU instances like ml.p3.2xlarge are optimized for parallel computation, significantly accelerating the training of deep learning models by handling matrix operations more efficiently than CPUs. SageMaker supports a range of GPU instances (e.g., ml.p3, ml.p4, ml.g5) that can reduce training time for compute-intensive workloads.

Exam trap

The trap here is that candidates may incorrectly select 'Increase the batch size' (Option E) as a guaranteed speed-up, overlooking that it requires hyperparameter tuning and can cause convergence problems, while the question asks for strategies that are directly and reliably effective.

51
Multi-Selecthard

A data science team is training a large deep learning model using Amazon SageMaker. The training job is taking a long time because the model has many layers and the dataset is large. The team wants to reduce training time by distributing the training across multiple GPUs on a single instance, as well as across multiple instances. Which TWO actions should the team take? (Choose two.)

Select 2 answers
A.Use SageMaker's distributed data parallelism (SMDDP) library to shard the model across GPUs.
B.Configure the training job to use SageMaker's model parallelism (SMP) library for pipeline or tensor parallelism.
C.Use SageMaker's managed training with a single instance containing multiple GPUs and enable data parallelism.
D.Use Horovod for data parallelism across multiple instances.
E.Set the instance type to a single GPU instance and rely on automatic model parallelism.
AnswersB, D

SMP allows splitting the model across multiple GPUs and instances, reducing memory footprint per GPU and enabling training of large models that would otherwise not fit. This complements data parallelism.

Why this answer

The SageMaker model parallelism (SMP) library is specifically designed to split large deep learning models across multiple GPUs using pipeline or tensor parallelism. This allows the team to train models that are too large to fit on a single GPU and to reduce training time by parallelizing computation across devices within and across instances.

Exam trap

The trap here is that candidates often confuse data parallelism (which shards data) with model parallelism (which shards the model), and assume that simply using multiple GPUs on a single instance automatically distributes the model, when in fact explicit model parallelism libraries like SMP are required for large models that do not fit in GPU memory.

52
MCQmedium

A data scientist is using SageMaker Debugger to monitor a training job. The training loss is not decreasing as expected. Which Debugger feature can help identify the issue?

A.Automatic hyperparameter tuning
B.Saving tensors every step
C.Deploying a model endpoint for real-time monitoring
D.Built-in rules to detect training anomalies
AnswerD

Rules like vanishing gradient can pinpoint issues.

Why this answer

SageMaker Debugger's built-in rules are designed to automatically monitor training jobs for common issues such as vanishing gradients, overfitting, and loss not decreasing. When the training loss plateaus or fails to decrease, a rule like 'LossNotDecreasing' can trigger a CloudWatch alarm or stop the training job, providing immediate insight into the problem without manual inspection of tensors.

Exam trap

The MLS-C01 exam often tests the distinction between Debugger's monitoring and analysis features versus its data capture capabilities, so the trap here is that candidates confuse 'saving tensors' (a data collection mechanism) with 'built-in rules' (the actual analysis engine that detects anomalies).

How to eliminate wrong answers

Option A is wrong because automatic hyperparameter tuning (SageMaker Automatic Model Tuning) is a separate feature that searches for optimal hyperparameters, not a Debugger feature for monitoring training anomalies. Option B is wrong because saving tensors every step is a Debugger configuration detail that enables data capture but does not itself analyze or identify issues; it merely provides raw data for later analysis. Option C is wrong because deploying a model endpoint for real-time monitoring is unrelated to Debugger; it is a SageMaker hosting feature for inference, not for diagnosing training problems.

53
Multi-Selecteasy

A machine learning team is using Amazon SageMaker to train a model. The training job uses spot instances to reduce cost. However, the training job is frequently interrupted. Which TWO actions can help mitigate the impact of spot interruptions? (Choose TWO.)

Select 2 answers
A.Increase the number of training instances.
B.Use a larger instance type that is less likely to be interrupted.
C.Use managed spot training with SageMaker's 'ManagedSpotTraining' parameter set to True.
D.Enable checkpointing to save intermediate results to Amazon S3.
E.Switch to on-demand instances.
AnswersC, D

Managed spot training handles interruptions.

Why this answer

Managed spot training (C) automatically manages the lifecycle of spot instances, including saving checkpoints and relaunching training when capacity becomes available. Checkpointing (D) saves model state periodically to Amazon S3, allowing training to resume from the last checkpoint after an interruption, minimizing progress loss. Option A (increasing instances) does not prevent interruptions and raises cost.

Option B (larger instance type) does not guarantee lower interruption rates and is cost-inefficient. Option E (on-demand instances) avoids interruptions but defeats the purpose of cost reduction.

54
MCQmedium

A company deploys a machine learning model on Amazon SageMaker for real-time inference. The model receives requests with large payloads (up to 5 MB) and the inference latency is high. Which configuration change would MOST likely reduce latency?

A.Pre-load multiple model containers on the same endpoint
B.Reduce the batch size for inference requests
C.Use a larger instance type with more memory and compute
D.Enable payload compression using SageMaker built-in compression
AnswerC

Larger instances can process large payloads faster.

Why this answer

Increasing the instance type to one with more memory and compute directly addresses the bottleneck caused by large payloads (up to 5 MB) and high inference latency. SageMaker real-time endpoints process requests synchronously, so a larger instance provides more CPU/GPU and memory bandwidth to serialize/deserialize and process the payload faster, reducing overall latency.

Exam trap

The trap here is that candidates often confuse batch size (relevant for batch transform jobs) with real-time inference request size, or assume that multi-model endpoints improve single-request latency, when in fact they add overhead.

How to eliminate wrong answers

Option A is wrong because pre-loading multiple model containers on the same endpoint (multi-model endpoints) does not reduce latency for a single large payload; it is designed to serve multiple models from a shared endpoint, which can actually increase per-request overhead due to container switching. Option B is wrong because reducing batch size is irrelevant for real-time inference where each request is processed individually (batch size is typically 1); this option confuses batch inference with real-time inference. Option D is wrong because SageMaker does not have a built-in compression feature for real-time inference payloads; compression would need to be implemented manually in the inference code, and even then, the overhead of compressing/decompressing a 5 MB payload could increase latency rather than reduce it.

55
Multi-Selecthard

A company is using SageMaker to train a model and wants to ensure that the training data is encrypted at rest and in transit, and that the trained model artifacts are also encrypted. Which THREE actions should the company take?

Select 3 answers
A.Specify a KMS key in the SageMaker training job configuration to encrypt the ML storage volume
B.Enable SageMaker model encryption using a KMS key
C.Configure the training job to run in a VPC with no internet access
D.Enable AWS CloudTrail to log all API calls
E.Enable S3 server-side encryption (SSE-KMS) on the training data bucket
AnswersA, B, E

Encrypts the training instance's storage volume.

Why this answer

Options A, B, and E are correct. A: Specifying a KMS key in the SageMaker training job configuration encrypts the ML storage volume used during training. B: Enabling SageMaker model encryption with a KMS key encrypts the model artifacts.

E: Enabling S3 server-side encryption (SSE-KMS) on the training data bucket encrypts the data at rest in S3 and in transit (when SageMaker accesses it). Option C (VPC with no internet access) provides network isolation but not encryption. Option D (CloudTrail) is for auditing API calls, not encryption.

56
MCQmedium

A company is using Amazon SageMaker to train a XGBoost model on a large dataset. The training job is taking a long time. The data scientist wants to reduce training time without sacrificing model accuracy. The dataset is 100 GB in CSV format stored in S3. What is the most effective approach?

A.Reduce the number of instances to avoid communication overhead.
B.Use Pipe mode to stream data from S3 instead of downloading it first.
C.Use random sampling to reduce the dataset size to 10 GB.
D.Use SageMaker Managed Spot Training to reduce cost, but training time may increase due to interruptions.
AnswerB

Pipe mode reduces I/O time by streaming data directly to the algorithm.

Why this answer

SageMaker's Pipe mode streams data directly from S3 to the training algorithm without writing it to disk, eliminating the I/O bottleneck of downloading the full 100 GB dataset. This reduces training time significantly by overlapping data loading with computation, while preserving model accuracy since the entire dataset is still used.

Exam trap

The trap here is that candidates often confuse cost optimization (Spot Training) with performance optimization, or incorrectly assume that reducing instances or data size is the only way to speed up training, ignoring SageMaker's specialized data streaming capability.

How to eliminate wrong answers

Option A is wrong because reducing the number of instances increases per-instance data load and can increase training time due to less parallelism, and communication overhead is negligible compared to I/O for large datasets. Option C is wrong because random sampling reduces dataset size, which sacrifices model accuracy by discarding potentially important data patterns, and the goal is to reduce time without sacrificing accuracy. Option D is wrong because SageMaker Managed Spot Training reduces cost, not training time; interruptions can actually increase training time due to checkpoint restarts, making it ineffective for the stated goal.

57
MCQmedium

A media company uses SageMaker to deploy a real-time inference endpoint for content recommendation. The model is a PyTorch model that uses GPU. The endpoint is deployed with an ml.p3.2xlarge instance. Over time, the endpoint's latency increases significantly during peak hours. The company has enabled auto scaling based on CPU utilization. However, the latency spikes occur even when CPU utilization is low. The model is stateless and the inference code is efficient. What is the MOST likely cause of the latency spikes?

A.The model uses stateful processing that accumulates requests
B.Auto scaling is configured based on CPU utilization, but the bottleneck is GPU utilization
C.The inference container has a memory leak that causes gradual slowdown
D.The instance type is too small for the model
AnswerB

GPU metrics should be used for auto scaling.

Why this answer

The model runs on GPU, so the bottleneck is GPU utilization, not CPU. Auto scaling based on CPU utilization does not help when the GPU is saturated. The latency spikes during peak hours suggest that the GPU is overloaded, but auto scaling is not triggered because CPU utilization remains low.

58
MCQeasy

A team needs to automatically retrain a model every week using new data. Which SageMaker feature is designed to schedule and automate this workflow?

A.SageMaker Pipelines
B.SageMaker Automatic Model Tuning
C.SageMaker Model Monitor
D.SageMaker Data Wrangler
AnswerA

Pipelines can define and schedule training workflows.

Why this answer

SageMaker Pipelines enables building, automating, and scheduling end-to-end ML workflows, making it suitable for weekly retraining. Option A is correct. Option B, SageMaker Automatic Model Tuning, is for hyperparameter optimization, not scheduling.

Option C, SageMaker Model Monitor, is for monitoring model quality and drift, not scheduling. Option D, SageMaker Data Wrangler, is for data preparation and feature engineering, not scheduling.

59
MCQhard

A company is using Amazon SageMaker to train a deep learning model for image classification. The training job is using a single p3.2xlarge instance and takes 10 hours. The data scientist wants to reduce training time using distributed training. Which SageMaker feature should be used?

A.Use the SageMaker distributed data parallelism library with multiple p3.2xlarge instances.
B.Use SageMaker Managed Spot Training to reduce cost, but training time remains the same.
C.Use SageMaker Hyperparameter Tuning to find optimal hyperparameters faster.
D.Use the SageMaker distributed model parallelism library with a single p3dn.24xlarge instance.
AnswerA

Data parallelism divides the batch across GPUs and synchronizes gradients, scaling training.

Why this answer

The goal is to reduce training time, and the SageMaker distributed data parallelism library is designed to split the mini-batch across multiple GPU instances, enabling synchronous or asynchronous gradient updates that scale near-linearly with the number of instances. By adding more p3.2xlarge instances, the effective throughput increases, directly reducing wall-clock training time for the image classification model.

Exam trap

The trap here is confusing distributed data parallelism (which reduces time by adding more instances) with model parallelism (which handles large models but not necessarily faster training) or with cost-saving features like Spot Training that do not affect training duration.

How to eliminate wrong answers

Option B is wrong because Managed Spot Training reduces cost by using spare EC2 capacity, but it does not change the training time — the job still runs for the same duration on a single instance. Option C is wrong because Hyperparameter Tuning optimizes model accuracy by searching hyperparameter combinations, not by parallelizing the training computation across instances to reduce time. Option D is wrong because distributed model parallelism splits the model layers across devices, which is beneficial for models too large to fit on one GPU, but using a single p3dn.24xlarge instance does not distribute the workload across multiple instances and thus does not reduce training time through data parallelism.

60
MCQhard

A company is running a real-time inference endpoint on Amazon SageMaker. The endpoint is using an ml.c5.xlarge instance. Over the past month, the CPU utilization has been consistently below 10%, and the latency is well within requirements. The company wants to reduce costs. What should they do?

A.Use a smaller instance type
B.Set up a scaling policy to scale down to zero
C.Switch to a multi-model endpoint
D.Use a batch transform job instead
E.Move to a serverless inference endpoint
AnswerA

A smaller instance can reduce cost while meeting performance.

Why this answer

The CPU utilization is consistently below 10%, indicating significant over-provisioning. Downgrading to a smaller instance type (e.g., ml.c5.large or ml.t3.medium) directly reduces the per-hour cost while still meeting the latency requirements. This is the most straightforward cost optimization when the current instance is underutilized and performance is already satisfactory.

Exam trap

The trap here is that candidates may overcomplicate the solution by considering advanced AWS features like multi-model endpoints or serverless inference, when the simplest and most effective fix is to right-size the instance based on the observed utilization metrics.

How to eliminate wrong answers

Option B is wrong because scaling down to zero would cause the endpoint to have no capacity to serve requests, resulting in 503 Service Unavailable errors for any incoming traffic; SageMaker endpoints do not support scaling to zero instances. Option C is wrong because switching to a multi-model endpoint reduces costs by hosting multiple models on a single instance, but the problem is about a single model with low CPU utilization, so the simpler fix is to downsize the instance. Option D is wrong because batch transform jobs are asynchronous and not suitable for real-time inference; the requirement is for a real-time endpoint, and batch processing would break the latency SLA.

Option E is wrong because moving to a serverless inference endpoint could introduce cold start latency and is not necessary when the current latency is already acceptable; the issue is simply over-provisioned compute capacity.

61
MCQhard

A company is using Amazon SageMaker Ground Truth to create labeled datasets for a text classification task. The labeling job uses a private workforce of 10 annotators. After labeling 10,000 items, the quality of labels is inconsistent. Which approach will MOST effectively improve labeling consistency?

A.Remove annotations from annotators with low agreement after the job completes.
B.Increase the number of annotators to 20 to average out inconsistencies.
C.Configure the labeling job to use annotation consolidation with majority voting and require multiple annotations per item.
D.Use active learning to automatically label the most confident samples and only send uncertain ones to annotators.
AnswerC

Consensus from multiple annotators and majority voting yields more consistent labels.

Why this answer

Requiring multiple annotations per item and using annotation consolidation with majority voting directly improves labeling consistency by reducing individual annotator bias and ensuring that the final label is based on consensus. Option A is incorrect because removing annotations from low-agreement annotators after the job completes does not improve the quality of labels already assigned; it may also discard valid data. Option B is incorrect because simply increasing the number of annotators does not guarantee consistency; it may introduce more variance without a consolidation mechanism.

Option D is incorrect because active learning is used to select which items to label, not to improve the consistency of labeling; it does not address the inconsistency in the labeling process itself.

62
MCQeasy

A data scientist is deploying a model using Amazon SageMaker. The model endpoint needs to handle real-time inference requests with low latency. The model is a large ensemble of 10 deep learning models, each approximately 500 MB. What is the most cost-effective deployment strategy that meets the low-latency requirement?

A.Deploy each model to a separate endpoint and use a load balancer.
B.Use a single endpoint with multiple instances behind it.
C.Use a SageMaker batch transform job to process inference requests in batches.
D.Use a SageMaker multi-model endpoint to host all models on one or more instances.
AnswerD

Multi-model endpoints efficiently host multiple models on shared instances, reducing cost.

Why this answer

A SageMaker multi-model endpoint (MME) allows hosting multiple models on a single or few instances, dynamically loading them from Amazon S3 into memory as needed. This is the most cost-effective option for a large ensemble of 500 MB models because it avoids the expense of separate endpoints or multiple instances per model, while still supporting low-latency real-time inference by keeping frequently used models cached.

Exam trap

The trap here is that candidates may confuse multi-model endpoints with multi-container endpoints or assume that a single endpoint cannot host multiple models, leading them to choose the expensive separate-endpoint approach (Option A) or the memory-inefficient single-endpoint approach (Option B).

How to eliminate wrong answers

Option A is wrong because deploying each model to a separate endpoint and using a load balancer would incur high costs (10 endpoints × instance costs) and add network latency from the load balancer, making it neither cost-effective nor optimal for low latency. Option B is wrong because a single endpoint with multiple instances behind it would require all 10 models to be loaded on every instance, consuming excessive memory (5 GB per instance) and increasing cost without leveraging model-sharing efficiencies. Option C is wrong because SageMaker batch transform is designed for asynchronous, offline inference on large datasets, not for real-time requests, and would introduce unacceptable latency for live inference.

63
Multi-Selectmedium

A data scientist is training a model using SageMaker and wants to use spot instances to reduce costs. Which THREE considerations should the scientist evaluate? (Choose THREE.)

Select 3 answers
A.Spot instances have a fixed, lower price than on-demand.
B.The training job must support checkpointing to save progress.
C.Spot instances are only available for inference, not training.
D.The training algorithm must be fault-tolerant to handle interruptions.
E.Spot instances can be reclaimed with a two-minute notice.
AnswersB, D, E

Needed to resume after interruption.

Why this answer

SageMaker managed spot training requires checkpointing to save model state at regular intervals. If a spot instance is interrupted, the training job can resume from the last checkpoint rather than starting from scratch, which is essential for long-running or expensive training jobs.

Exam trap

The MLS-C01 exam often tests the misconception that spot instances have a fixed lower price, when in reality the price is dynamic and based on a bidding model, and that spot instances are only for inference, whereas they are widely used for training to reduce costs.

64
MCQhard

A company uses Amazon SageMaker to deploy a model for real-time predictions. The model is updated weekly. The company wants to ensure that the new model version is gradually rolled out to a small percentage of traffic before full deployment, and that it can be rolled back quickly if issues are detected. Which deployment strategy should be used?

A.Blue/green deployment
B.A/B testing with a holdout group
C.Canary deployment using SageMaker endpoint variants
D.Rolling deployment across multiple endpoints
AnswerC

Canary deployment allows sending a small percentage of traffic to the new variant and can be rolled back by shifting traffic back.

Why this answer

Amazon SageMaker endpoint variants support canary deployments, where you can shift a small percentage of traffic to a new model version (e.g., 5%) while the majority remains on the old version. This allows gradual rollout and immediate rollback by simply adjusting the traffic distribution weights or deleting the new variant, meeting the requirement for quick rollback without redeploying.

Exam trap

The trap here is that candidates confuse A/B testing (a statistical evaluation method) with canary deployment (a traffic management strategy), leading them to select Option B even though SageMaker's endpoint variants directly support gradual traffic shifting and rollback.

How to eliminate wrong answers

Option A is wrong because blue/green deployment typically involves switching all traffic at once from the old (blue) to the new (green) environment, which does not provide a gradual rollout to a small percentage of traffic before full deployment. Option B is wrong because A/B testing with a holdout group is a statistical method for comparing model performance, not a deployment strategy for gradually shifting traffic with rollback capability; it requires manual intervention to route traffic and does not inherently support quick rollback via endpoint variants. Option D is wrong because rolling deployment across multiple endpoints would require managing separate endpoints and DNS routing, which is more complex and does not leverage SageMaker's built-in traffic shifting and variant management for gradual rollout and rollback.

65
MCQeasy

A data scientist needs to create a SageMaker notebook instance with access to a private S3 bucket. The bucket uses SSE-KMS encryption. Which additional configuration is required?

A.Add a lifecycle configuration script
B.Modify the bucket policy to allow s3:GetObject
C.Place the notebook instance in a VPC
D.Attach a policy to the notebook's IAM role that allows kms:Decrypt
AnswerD

Needed to decrypt objects encrypted with SSE-KMS.

Why this answer

When an S3 bucket uses SSE-KMS encryption, the SageMaker notebook instance's IAM role must include a policy that allows the kms:Decrypt action. This is necessary because SageMaker needs to decrypt the data using the KMS key when reading objects from the bucket. Without this permission, the notebook instance will fail to access the encrypted S3 objects, even if the bucket policy allows s3:GetObject.

Exam trap

The trap here is that candidates often assume that modifying the bucket policy (Option B) or placing the notebook in a VPC (Option C) is sufficient, overlooking the fact that SSE-KMS requires explicit KMS key permissions in the IAM role, not just S3-level access controls.

How to eliminate wrong answers

Option A is wrong because lifecycle configuration scripts are used to automate notebook instance setup (e.g., installing packages or cloning repositories) and do not grant access to encrypted S3 buckets. Option B is wrong because modifying the bucket policy to allow s3:GetObject addresses S3-level permissions but does not grant the necessary KMS key permissions required for decrypting SSE-KMS encrypted objects. Option C is wrong because placing the notebook instance in a VPC controls network access but does not provide the IAM permissions needed to decrypt SSE-KMS encrypted data.

66
MCQmedium

A data scientist is using SageMaker to train a model using the built-in XGBoost algorithm. The training job fails with the error 'AlgorithmError: Framework error: No module named 'xgboost''. What is the most likely cause?

A.The training data is not in CSV format.
B.The training job is using a custom container that does not have XGBoost installed.
C.The IAM role does not have permission to access SageMaker.
D.The S3 output path is incorrect.
AnswerB

Missing module indicates container issue.

Why this answer

The built-in XGBoost algorithm requires the 'xgboost' Python package; SageMaker's built-in algorithms provide the necessary environment, but if the container is overridden or the wrong image is used, the module may be missing. Option A is wrong because the error is about missing module, not data format. Option C is wrong because the error is not about permissions.

Option D is wrong because the error is not about output path.

67
Multi-Selectmedium

A company is using SageMaker Autopilot to automatically build ML models. They want to ensure that the generated models are reproducible. Which TWO settings should they configure?

Select 2 answers
A.Set a random seed.
B.Specify a validation split.
C.Use multiple trials.
D.Enable early stopping.
E.Enable automatic feature engineering.
AnswersA, B

Random seeds make train/test split and model initialization deterministic.

Why this answer

Setting a random seed (Option A) ensures that the stochastic processes in model training (e.g., weight initialization, data shuffling, and hyperparameter sampling) produce identical results across runs. SageMaker Autopilot uses algorithms like XGBoost and linear learners that rely on randomness; fixing the seed guarantees reproducibility of the final model.

Exam trap

AWS often tests the misconception that enabling automatic feature engineering or using multiple trials inherently ensures reproducibility, when in fact only controlling randomness via a seed and fixing the data split guarantees identical results.

68
MCQmedium

A company is using Amazon SageMaker to train a model. The training job is taking too long. The data scientist notices that the GPU utilization is low. Which action should be taken to improve training performance?

A.Increase the number of training instances.
B.Use spot instances to reduce cost.
C.Decrease the batch size to reduce memory usage.
D.Increase the batch size in the training script.
AnswerD

Larger batch size keeps GPU busy.

Why this answer

Low GPU utilization during training typically indicates that the GPU is waiting for data, often due to a small batch size that underutilizes the GPU's parallel processing capacity. Increasing the batch size allows the GPU to process more samples per step, improving computational efficiency and throughput, which directly addresses the low utilization issue.

Exam trap

AWS often tests the misconception that low GPU utilization is caused by insufficient compute resources, leading candidates to choose increasing instances (Option A) instead of recognizing it as a data pipeline or batch size issue.

How to eliminate wrong answers

Option A is wrong because increasing the number of training instances (distributed training) adds communication overhead and does not solve the root cause of low GPU utilization per instance; it may even exacerbate the problem if the batch size per GPU remains small. Option B is wrong because using spot instances reduces cost but does not affect GPU utilization or training speed; it can introduce interruptions that degrade performance. Option C is wrong because decreasing the batch size reduces memory usage but further lowers GPU utilization by making each step process fewer samples, worsening the underutilization problem.

69
MCQmedium

A data science team is using Amazon SageMaker to train a model. The training job is failing with an 'OutOfMemory' error. The team is using a p3.2xlarge instance with 61 GB of memory. They need to resolve this issue as quickly as possible. Which action should they take?

A.Use a larger instance type, such as p3.8xlarge
B.Reduce the batch size in the training script
C.Use a spot instance to save costs
D.Enable distributed training across multiple instances
AnswerA

Larger instance types have more memory and can handle the workload.

Why this answer

The 'OutOfMemory' error indicates the training job requires more memory than the 61 GB available on the p3.2xlarge instance. The fastest resolution is to scale vertically by using a larger instance type, such as the p3.8xlarge, which provides 244 GB of memory. This directly addresses the memory shortage without requiring code changes or architectural modifications, minimizing downtime.

Exam trap

The trap here is that candidates may overthink optimization strategies (like reducing batch size or enabling distributed training) when the simplest and fastest solution is to increase instance memory, as the question explicitly asks for the quickest resolution.

How to eliminate wrong answers

Option B is wrong because reducing the batch size may lower memory usage but requires modifying the training script and retesting, which is not the quickest fix; it also may not resolve the issue if the model or data itself exceeds memory limits. Option C is wrong because using a spot instance does not change the instance's memory capacity and could introduce interruptions, making it irrelevant to an OutOfMemory error. Option D is wrong because enabling distributed training across multiple instances requires code changes (e.g., using SageMaker's distributed data parallelism or model parallelism) and adds complexity, which is slower than simply using a larger instance.

70
Matchingmedium

Match each SageMaker built-in algorithm to its primary use case.

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

Concepts
Matches

Gradient boosted trees for regression and classification

Word2Vec and text classification

Learning embeddings for pairs of objects

Anomaly detection in IP traffic

Time series forecasting

Why these pairings

Correct matches: Linear Learner → regression/classification, Object Detection → image object detection. Common confusions: swapping XGBoost (gradient boosting) with BlazingText (text vectors).

71
MCQhard

A machine learning team is using Amazon SageMaker to train a PyTorch model on a dataset that is 500 GB in size. The training job runs on a single ml.p3.2xlarge instance, but the training takes over 48 hours, which exceeds the maximum allowed time. The team wants to reduce training time to under 24 hours. They are open to using multiple instances and have budget for up to 4 instances. The dataset is stored in Amazon S3 and can be split into shards by a key. The model architecture must remain unchanged. What should the team do?

A.Use SageMaker distributed data parallelism with 4 ml.p3.2xlarge instances.
B.Use SageMaker Processing to split the data and train separate models.
C.Change the instance type to ml.p3.16xlarge.
D.Switch to Pipe input mode to stream data faster.
AnswerA

Distributed training can reduce time proportionally with data parallelism.

Why this answer

SageMaker's distributed data parallelism library (SMDDP) efficiently splits the dataset across multiple GPUs, allowing the training to complete in approximately 1/4 of the time (assuming near-linear scaling). This directly addresses the timeout issue. Option B is incorrect: SageMaker Processing is for data preprocessing, not model training; training separate models would not produce a single model.

Option C is incorrect: upgrading to a single larger instance (ml.p3.16xlarge) may provide up to 8x more GPU power but may not reduce training time to under 24 hours due to memory and I/O bottlenecks, and it exceeds the budget limitation of using up to 4 instances. Option D is incorrect: Pipe input mode reduces data loading latency but does not reduce the computation required for training, so it would not sufficiently decrease training time.

72
Multi-Selecthard

You are building a CI/CD pipeline for SageMaker using AWS CodePipeline. Which THREE components are essential for a fully automated model training and deployment pipeline?

Select 3 answers
A.AWS CodeCommit to store the training script and model code
B.AWS CodeBuild to run the training job as a build step
C.AWS Lambda function to create or update the SageMaker endpoint
D.AWS CodeDeploy to deploy the model to an endpoint
E.AWS CloudFormation to define the infrastructure
AnswersA, B, C

Source control is essential for CI/CD.

Why this answer

AWS CodeCommit is essential because it provides a secure, scalable Git repository to store the training script and model code, which serves as the source stage in the CI/CD pipeline. This ensures version control and triggers the pipeline automatically on code changes, enabling a fully automated workflow.

Exam trap

The trap here is that candidates often assume AWS CodeDeploy is the standard deployment service for all AWS resources, but SageMaker endpoints require the SageMaker API, making a Lambda function the correct choice for endpoint updates.

73
MCQhard

A machine learning engineer is deploying a model using SageMaker and wants to use automatic scaling for the endpoint based on the number of concurrent requests. The engineer has defined a scaling policy using the SageMakerVariantInvocationsPerInstance metric. However, the scaling is not triggering as expected. What could be the issue?

A.A scheduled scaling action must be created first.
B.The scaling policy does not have a cooldown period configured, or the cooldown period is too long.
C.The metric must be published to CloudWatch manually.
D.The metric is not available for automatic scaling.
AnswerB

Cooldown prevents scaling actions from triggering too frequently.

Why this answer

A missing or excessively long cooldown period can prevent the scaling policy from triggering. Cooldown periods (default 300 seconds) allow metrics to stabilize before initiating another scaling activity. Option A is incorrect because scheduled scaling actions are separate from dynamic scaling policies and are not required.

Option C is incorrect because the SageMakerVariantInvocationsPerInstance metric is automatically published to CloudWatch. Option D is incorrect because this metric is specifically designed for automatic scaling.

74
MCQeasy

A data scientist is using Amazon SageMaker to train a model using a built-in algorithm. The training job uses a large dataset stored in Amazon S3, and the scientist wants to use pipe mode to stream the data directly from S3 to the training instance, reducing the time needed to download the data. The training job is configured with 'InputMode' set to 'Pipe'. However, the training job fails with an error indicating that the algorithm does not support pipe mode. What should the scientist do to resolve this issue?

A.Change the 'InputMode' to 'File'
B.Use a different instance type that supports pipe mode
C.Use AWS Glue to stream the data to the training instance
D.Switch to a different built-in algorithm that supports pipe mode
AnswerA

Changing InputMode to 'File' resolves the issue because the algorithm works with file mode, which downloads the data fully before training. This is the simplest fix.

Why this answer

When a built-in algorithm does not support pipe mode, the simplest solution is to change the InputMode to 'File', which downloads the entire dataset before training. Option B is incorrect because pipe mode support depends on the algorithm, not the instance type. Option C is incorrect because AWS Glue is used for ETL and cannot directly stream data to a SageMaker training job.

Option D is incorrect because while switching to an algorithm that supports pipe mode is possible, it may be unnecessary if the current algorithm works well with file mode, and changing the input mode is a simpler fix without altering the algorithm.

75
MCQeasy

A team uses AWS Glue ETL jobs to preprocess data for SageMaker training. The job runs successfully but the output data is empty. What is the most likely cause?

A.There is a data type mismatch between source and target
B.The source data is partitioned and only a subset of partitions is read
C.The filter transformation condition is too restrictive, removing all rows
D.The Glue job runs out of memory and fails silently
AnswerC

Filtering all rows results in empty output.

Why this answer

A filter transformation in AWS Glue ETL jobs can remove all rows if the condition is too restrictive, resulting in an empty output dataset. This is a common logic error where the filter predicate (e.g., `df.filter("value > 100")`) matches no records, causing the DynamicFrame to be empty after transformation. The job succeeds because no runtime error occurs, but the output is empty.

Exam trap

The trap here is that candidates assume empty output must be caused by a failure or resource issue (like memory or partitioning), rather than a logical error in the transformation logic that silently removes all data.

How to eliminate wrong answers

Option A is wrong because a data type mismatch between source and target typically causes a job failure or data truncation, not a successful job with empty output; Glue would raise a schema mismatch error or convert types implicitly. Option B is wrong because reading only a subset of partitions would produce a non-empty output (the subset data), not an empty output, unless the subset itself has no data, which is a different scenario. Option D is wrong because if the Glue job runs out of memory, it would fail with an out-of-memory error (e.g., Java heap space or container killed), not succeed silently with empty output.

Page 1 of 5 · 338 questions totalNext →

Ready to test yourself?

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