Official Exam Details: (MLA-C01)
MLA-C01
70%
315 Verified Questions
120 Minutes
Exam Format & Question Types
This certification exam features multiple-choice questions (single and multi-select), interactive Hotspots, Hot Areas, and Drag-and-Drop scenario configurations designed to test real-world technical competency.
MLA-C01 Certification Study Guide & Architectural Master Blueprint
1. Exam Overview & Profile
The MLA-C01: AWS Certified Machine Learning – Specialty certification validates advanced technical skills in designing, implementing, deploying, and maintaining ML solutions on AWS. Targeted at ML engineers, data scientists, and developers with 2+ years of hands-on experience, the exam typically comprises 65 questions (multiple choice/multiple response) over 180 minutes. A passing score around 750 on a scaled score of 100-1000 signifies deep understanding of core ML concepts and their practical application within the AWS ecosystem.
2. Deep-Dive Domain Breakdown
Success on MLA-C01 requires a comprehensive understanding of these architectural domains:
- Data Engineering (20%): Focus on building robust, scalable data pipelines.
- Data Ingestion & Storage: Design solutions leveraging Amazon S3 for data lakes (raw, processed, curated zones), Amazon Kinesis (Data Streams, Firehose) for real-time streaming, and AWS Glue for ETL operations and Data Cataloging. Understand partitioning, data formats (Parquet, ORC).
- Feature Engineering: Utilize Amazon SageMaker Processing jobs and AWS Glue ETL for data transformations. Manage and serve features consistently for training and inference with Amazon SageMaker Feature Store.
- Exploratory Data Analysis (EDA) (24%): Master data understanding and preparation.
- Data Analysis & Visualization: Employ Amazon SageMaker Notebook Instances (Jupyter) for interactive exploration, statistical analysis, and visualization using libraries like Pandas. Use Amazon Athena for ad-hoc querying of S3 data and Amazon Redshift for complex analytics.
- Data Cleaning & Preprocessing: Implement strategies for handling missing values, outliers, normalization, and encoding categorical features. Address data bias detection.
- Modeling (36%): This is the core ML domain, emphasizing algorithm selection, training, and evaluation.
- Algorithm Selection & Training: Choose appropriate algorithms (e.g., linear, tree-based, neural networks) for problem types (regression, classification). Proficiently use Amazon SageMaker built-in algorithms (XGBoost, Linear Learner) and frameworks (TensorFlow, PyTorch) for custom models via SageMaker training jobs.
- Hyperparameter Optimization (HPO) & Evaluation: Implement HPO using Amazon SageMaker Automatic Model Tuning (Bayesian, Random Search). Understand regularization, early stopping, and key evaluation metrics (accuracy, precision, recall, F1, RMSE, MAE, R-squared). Address overfitting/underfitting.
- ML Implementation & Operations (MLOps) (20%): Focus on model deployment, monitoring, and security.
- Model Deployment: Deploy models for real-time inference using Amazon SageMaker Endpoints (multi-model, A/B testing, serverless) and batch inference via Amazon SageMaker Batch Transform. Understand scaling and instance types.
- Monitoring & Security: Implement Amazon SageMaker Model Monitor for detecting data drift and model drift. Utilize Amazon CloudWatch for logging and alerting. Secure solutions with AWS IAM for access control, AWS KMS for encryption, and Amazon VPC for network isolation. Use SageMaker Pipelines for MLOps CI/CD.
3. High-Yield Exam Tips & Scenario Traps
- Prioritize Managed Services: In scenarios, opt for AWS managed services (SageMaker, Kinesis, Glue) over self-managed EC2 unless specific, advanced customization is required.
- SageMaker’s Full Suite: Understand the purpose of all SageMaker components: Ground Truth (labeling), Feature Store, Processing, Clarify (bias/explainability), Model Monitor, and Pipelines.
- Managed AI Services vs. Custom ML: Distinguish when to use a pre-trained AWS AI Service (e.g., Rekognition, Comprehend, Forecast) versus building a custom model with SageMaker. If a managed service fits the need, it’s often the better choice.
- Security Best Practices: Always consider IAM for authorization, KMS for encryption (at rest and in transit), and VPC for network segmentation and isolation.
- Cost Optimization: Look for opportunities to optimize, such as using SageMaker Spot instances for training, S3 Intelligent-Tiering, and right-sizing compute resources for endpoints.
- Data Drift vs. Model Drift: Clearly differentiate these concepts. Data drift involves changes in input data distribution, while model drift indicates decaying model performance over time. SageMaker Model Monitor is key here.
4. Frequently Asked Questions (FAQ)
Q1: What is the best approach to gain practical experience for MLA-C01?
A1: Leverage an AWS Free Tier account. Build end-to-end ML pipelines using SageMaker: ingest data (S3, Kinesis), preprocess (Glue, SageMaker Processing), train models (SageMaker notebooks/training jobs), deploy endpoints, and set up monitoring. Focus on understanding the configuration and interaction of services.
Q2: How should I tackle complex scenario questions involving multiple AWS services?
A2: Deconstruct the problem into logical ML stages: data acquisition, preparation, modeling, deployment, and monitoring. For each stage, identify the optimal AWS service based on constraints like real-time requirements, cost, scalability, and data volume. Ensure the chosen services integrate seamlessly and securely.
Q3: Is deep knowledge of specific ML algorithms and frameworks necessary?
A3: Yes, a solid grasp of common ML algorithms (e.g., linear regression, classification algorithms, clustering) and their appropriate use cases is critical. You must understand their principles and how to configure them within SageMaker. Familiarity with high-level concepts of TensorFlow and PyTorch for custom model development on SageMaker is also beneficial.
Free MLA-C01 Sample Practice Questions
Test your knowledge with these sample scenario questions complete with verified explanations:
General Practice Questions
QUESTION 1
A company has trained an ML model in Amazon SageMaker. The company needs to host the model to provide inferences in a production environment.
The model must be highly available and must respond with minimum latency. The size of each request will be between 1 KB and 3 MB. The model will receive unpredictable bursts of requests during the day. The inferences must adapt proportionally to the changes in demand.
How should the company deploy the model into production to meet these requirements?
- A. Create a SageMaker real-time inference endpoint, Configure auto scaling. Configure the endpoint to present the existing model.
- B. Deploy the model on an Amazon Elastic Container Service (Amazon ECS) cluster. Use ECS scheduled scaling that is based on the CPU of the ECS cluster.
- C. Install SageMaker Operator on an Amazon Elastic Kubernetes Service (Amazon EKS) cluster. Deploy the model in Amazon EKS. Set horizontal pod auto scaling to scale replicas based on the memory metric.
- D. Use Spot Instances with a Spot Fleet behind an Application Load Balancer (ALB) for inferences. Use the ALB Request Count Per Target metric as the metric for auto scaling.
Click to View Verified Solution & Explanation
Correct Option: A
Description: Amazon SageMaker real-time inference endpoints are fully managed HTTP(S) endpoints designed for low-latency, high-throughput inference requests. They are suitable for applications that require immediate responses, typically within milliseconds. These endpoints integrate directly with Amazon Application Auto Scaling, allowing them to automatically adjust the number of instances based on demand, using metrics like invocations per instance, CPU utilization, or custom metrics. The process involves creating a SageMaker Model resource from a trained model artifact (e.g., stored in S3) and then deploying it to an endpoint configuration, which specifies the instance types and initial instance count.
Why this fits: This choice directly addresses the need for real-time inference with auto-scaling capabilities for an existing model. SageMaker real-time endpoints are purpose-built for this use case, offering managed infrastructure, integrated auto-scaling, and straightforward deployment of pre-trained models. The ability to configure auto-scaling for an existing model ensures that the solution is cost-effective and performs optimally under varying load conditions.
Example: An e-commerce website deploys a recommendation model to a SageMaker real-time endpoint. When a user views a product, the website sends a real-time request to the SageMaker endpoint to get immediate product recommendations. During peak shopping seasons, auto-scaling automatically provisions more instances to handle the increased query load, scaling down during off-peak hours to save costs.
QUESTION 2
An ML engineer needs to use Amazon SageMaker to fine-tune a large language model (LLM) for text summarization. The ML engineer must follow a low-code no-code (LCNC) approach.
Which solution will meet these requirements?
- A. Use SageMaker Studio to fine-tune an LLM that is deployed on Amazon EQ instances.
- B. Use SageMaker Autopilot to fine-tune an LLM that is deployed by a custom API endpoint.
- C. Use SageMaker Autopilot to fine-tune an LLM that is deployed on Amazon EQ instances.
- D. Use SageMaker Autopilot to fine-tune an LLM that is deployed by SageMaker JumpStart.
Click to View Verified Solution & Explanation
Correct Option: D
Description: Amazon SageMaker Autopilot automates the process of building, training, and tuning machine learning models. While it excels with tabular data, it can also assist with hyperparameter optimization for custom training jobs, which could include the fine-tuning of a Large Language Model (LLM). Amazon SageMaker JumpStart provides a comprehensive hub for pre-trained models, including foundation models (LLMs), and offers streamlined deployment capabilities, as well as workflows for fine-tuning these models.
Why this fits: This option describes a technically plausible workflow. SageMaker Autopilot can be used to optimize the hyperparameters of an LLM fine-tuning job, thereby improving its performance. Once fine-tuned, SageMaker JumpStart is an ideal service for deploying the LLM, as it simplifies the deployment of foundation models and provides an easy-to-use interface for managing model endpoints. The other options contain inaccuracies: Choices A and C mention "Amazon EQ instances," which is not a recognized AWS service for deploying ML models. Choice B’s "custom API endpoint" is generic, whereas SageMaker JumpStart offers a specific, managed, and highly relevant service for LLM deployment within the AWS ecosystem.
Example: A company wants to fine-tune a publicly available LLM for customer support responses. They leverage SageMaker JumpStart to access the pre-trained LLM. To optimize the fine-tuning process on their proprietary customer interaction dataset, they use SageMaker Autopilot to automatically find the best learning rate and number of epochs for their fine-tuning script. After successful fine-tuning, the specialized LLM is then deployed as a managed endpoint directly through SageMaker JumpStart, making it available for integration with their customer support applications.
QUESTION 3
An ML engineer is developing a fraud detection model by using the Amazon SageMaker XGBoost algorithm. The model classifies transactions as either fraudulent or legitimate.
During testing, the model excels at identifying fraud in the training dataset. However, the model is inefficient at identifying fraud in new and unseen transactions.
What should the ML engineer do to improve the fraud detection for new transactions?
- A. Increase the learning rate.
- B. Remove some irrelevant features from the training dataset.
- C. Increase the value of the max_depth hyperparameter.
- D. Decrease the value of the max_depth hyperparameter.
Click to View Verified Solution & Explanation
Correct Option: D
Description: The
max_depth hyperparameter in tree-based machine learning models (such as decision trees, random forests, and gradient boosting machines like XGBoost) controls the maximum number of splits or levels allowed from the root to the deepest node in any tree. A higher max_depth allows the model to learn more complex relationships within the data, potentially creating a very intricate decision boundary.
Why this fits: Overfitting occurs when a model learns the training data too well, capturing noise and specific patterns that do not generalize to unseen data. In tree-based models, a common cause of overfitting is allowing the trees to grow too deep (max_depth is too high). This leads to a highly complex model that perfectly memorizes the training examples, resulting in low training error but high validation/test error. Decreasing the max_depth constrains the tree’s growth, making it simpler and less capable of fitting every training data point exactly. This regularization technique helps to reduce the model’s variance, thereby mitigating overfitting and improving its ability to generalize to new, unseen data.
Example: Suppose you are training an XGBoost model on a dataset to predict house prices. If your model is overfitting, evidenced by very low training RMSE but significantly higher validation RMSE, one effective strategy would be to decrease the max_depth from, say, 10 to 5. This forces the individual trees in the ensemble to be shallower and less specific, encouraging them to learn more general patterns in the data rather than memorizing individual data points and their noise.
QUESTION 4
A company has an ML model that needs to run one time each night to predict stock values. The model input is 3 MB of data that is collected during the current day. The model produces the predictions for the next day. The prediction process takes less than 1 minute to finish running.
How should the company deploy the model on Amazon SageMaker to meet these requirements?
- A. Use a multi-model serverless endpoint. Enable caching.
- B. Use an asynchronous inference endpoint. Set the Initiallnstance Count parameter to 0.
- C. Use a real-time endpoint. Configure an auto scaling policy to scale the model to 0 when the model is not in use.
- D. Use a serverless inference endpoint. Set the Max Concurrency parameter to
Click to View Verified Solution & Explanation
Correct Option: D
Description: AWS SageMaker serverless inference is a deployment option designed for workloads with intermittent or unpredictable traffic patterns. It automatically scales the compute capacity based on demand, including scaling to zero when no requests are being processed. This eliminates the need to select instance types or manage underlying infrastructure. The
Max Concurrency parameter for a serverless endpoint specifies the maximum number of concurrent inference requests that the endpoint can process simultaneously, providing a control mechanism for throughput and resource allocation.
Why this fits: Serverless inference is a highly cost-effective solution for models that experience variable or infrequent invocation patterns, as billing is based solely on the inference duration and the amount of data processed, not on idle compute time. By automatically scaling to zero, it minimizes costs during periods of inactivity. The Max Concurrency parameter allows fine-tuning of the endpoint’s behavior under load, enabling the endpoint to efficiently handle bursts of requests while controlling resource consumption and potential costs. This approach directly addresses the need for efficient scaling, particularly to zero, for cost optimization and simplified operational management.
Example: A startup deploys a new fraud detection model that is invoked only when a suspicious transaction occurs. These transactions are infrequent and unpredictable. By using a SageMaker serverless inference endpoint and setting an appropriate Max Concurrency, they ensure that the model is always available when needed, can handle occasional simultaneous requests, and costs are minimized during periods of low or no activity because the endpoint scales down to zero.
QUESTION 5
A company has used Amazon SageMaker to deploy a predictive ML model in production. The company is using SageMaker Model Monitor on the model. After a model update, an ML engineer notices data quality issues in the Model Monitor checks.
What should the ML engineer do to mitigate the data quality issues that Model Monitor has identified?
- A. Adjust the model's parameters and hyperparameters.
- B. Initiate a manual Model Monitor job that uses the most recent production data.
- C. Create a new baseline from the latest dataset. Update Model Monitor to use the new baseline for evaluations.
- D. Include additional data in the existing training set for the model. Retrain and redeploy the model.
Click to View Verified Solution & Explanation
Correct Option: C
Description: AWS SageMaker Model Monitor uses baselines to detect data and model quality drift. A baseline is a set of statistical constraints and/or Amazon S3 objects generated from a known good dataset (typically the training data). It defines the expected range and distribution of features and predictions. When the underlying data characteristics change significantly over time (concept drift), the original baseline may no longer accurately represent the "normal" operating conditions.
Why this fits: If the "latest dataset" reflects a new normal for the data that the model will encounter, then the existing baseline is outdated. Continuing to use an outdated baseline will lead to either frequent false positive alerts (if the new normal data falls outside the old baseline’s constraints) or missed true drift events (if the old baseline is too broad or irrelevant to the new data patterns). Creating a new baseline from this latest representative dataset and updating Model Monitor to use it ensures that drift detection is based on the most current and accurate understanding of the expected data and model behavior. This allows Model Monitor to effectively identify true anomalies and maintain relevant monitoring.
Example: Consider a financial fraud detection model. Initially, fraudulent transactions had specific patterns (baseline 1). Over time, fraudsters evolve their methods, and legitimate transactions also change due to new financial products or user behaviors. If Model Monitor continues to use baseline 1, it might incorrectly flag new legitimate transactions as drift or miss new fraudulent patterns. By creating a new baseline from recent, validated legitimate transactions and known fraudulent ones (baseline 2), Model Monitor can accurately learn the current operational landscape and effectively detect future deviations relevant to the updated context.
QUESTION 6
A company wants to develop an ML model by using tabular data from its customers. The data contains meaningful ordered features with sensitive information that should not be discarded. An ML engineer must ensure that the sensitive data is masked before another team starts to build the model.
Which solution will meet these requirements?
- A. Use Amazon Macie to categorize the sensitive data.
- B. Prepare the data by using AWS Glue DataBrew.
- C. Run an AINS Batch job to change the sensitive data to random values.
- D. Run an Amazon EMR job to change the sensitive data to random values.
Click to View Verified Solution & Explanation
Correct Option: B
Description: AWS Glue DataBrew is a visual data preparation tool that allows data analysts and data scientists to clean, normalize, transform, and prepare data for analytics and machine learning without writing any code. It provides over 250 pre-built transformations to automate various data preparation tasks.
Why this fits: Data preparation is a crucial step in the machine learning workflow, involving cleaning, transforming, and often anonymizing or masking sensitive information before training models. AWS Glue DataBrew is specifically designed for this purpose, offering a user-friendly, visual interface to perform complex data transformations, including identifying, masking, and de-identifying sensitive data, handling missing values, and standardizing data formats. This makes it an ideal service for preparing diverse datasets efficiently for machine learning model training, ensuring data quality and compliance.
Example: A data scientist needs to prepare a dataset containing customer personally identifiable information (PII) for training a recommendation engine. Using AWS Glue DataBrew, they can visually define transformations to mask customer names and email addresses, impute missing values in transaction amounts, and normalize date formats, creating a clean and compliant dataset ready for model training.
QUESTION 7
A company uses Amazon Athena to query a dataset in Amazon S3. The dataset has a target variable that the company wants to predict.
The Company needs to use the dataset in a solution to determine if a model can predict the target variable,
Which solution will provide this information with the LEAST development effort?
- A. Create a new model by using Amazon SageMaker Autopilot. Repot the model's achieved performance.
- B. Implement custom scripts to perform data pre-processing, multiple linear regression, and performance evaluation. Run the scripts on Amazon EC2 instances.
- C. Configure Amazon Macie to analyse the dataset and to create a model. Report the model's achieved performance.
- D. Select a model from Amazon Bedrock. Tune the model with free data. Report the model's achieved performance .
Click to View Verified Solution & Explanation
Correct Option: A
Description: Amazon SageMaker Autopilot is an automated machine learning (AutoML) capability within Amazon SageMaker. It simplifies the process of building, training, and tuning the best machine learning models for classification or regression problems. Autopilot automatically explores different machine learning algorithms, preprocesses data, and tunes hyperparameters to find the best model for a given dataset, making it accessible even to users with limited ML expertise. It generates a leaderboard of candidate models along with their performance metrics.
Why this fits: This choice directly addresses the need to "create a new model" and "report the model’s achieved performance" in an efficient and automated manner. SageMaker Autopilot is specifically designed for this purpose, providing an end-to-end solution that handles the complexities of model development and evaluation. For an AWS Certified Machine Learning Engineer – Associate, leveraging managed services like SageMaker Autopilot is a key skill for building effective ML solutions, as it reduces the operational overhead and time required compared to manual approaches. The output of Autopilot inherently includes the performance metrics needed for reporting.
Example: An e-commerce company wants to predict customer churn. They can upload their historical customer data to Amazon S3, point SageMaker Autopilot to the dataset, and specify the churn column as the target. Autopilot will then automatically perform data engineering, select algorithms (e.g., XGBoost, Linear Learner), train multiple models, and tune their hyperparameters. Finally, it presents a ranked list of models based on metrics like accuracy, F1-score, or AUC, allowing the user to select the best-performing model for deployment.
QUESTION 8
A company has historical data that shows whether customers needed long-term support from company staff. The company needs to develop an ML model to predict whether new customers will require long-term support.
Which modeling approach should the company use to meet this requirement?
- A. Anomaly detection
- B. Linear regression
- C. Logistic regression
- D. Semantic segmentation
Click to View Verified Solution & Explanation
Correct Option: C
Description: Logistic regression is a statistical model primarily used for binary classification tasks, although it can be extended to multi-class classification. It estimates the probability that an instance belongs to a particular class by fitting data to a logistic function (also known as a sigmoid function). The output is a probability value between 0 and 1, which can then be mapped to a discrete class label based on a threshold (e.g., if probability > 0.5, classify as positive). Unlike linear regression, which predicts a continuous outcome, logistic regression predicts a categorical outcome.
Why this fits: In the context of machine learning, classification problems are common, and logistic regression is a foundational algorithm for addressing them. It is widely used when the target variable is categorical (e.g., yes/no, true/false, spam/not spam). AWS services like Amazon SageMaker provide built-in algorithms, and custom models developed within SageMaker often leverage logistic regression for various business problems requiring probabilistic classification. It’s a key concept for an AWS Machine Learning Engineer to understand for tasks involving predicting discrete outcomes.
Example: An e-commerce company wants to predict whether a customer will click on a specific advertisement (click/no-click). They can use logistic regression, trained on historical user data (demographics, browsing history, past interactions), to output the probability of a click. Based on this probability, they can decide whether to display the ad to a particular user or optimize ad placement strategies.
QUESTION 9
An ML engineer needs to use an ML model to predict the price of apartments in a specific location.
Which metric should the ML engineer use to evaluate the model’s performance?
- A. Accuracy
- B. Area Under the ROC Curve (AUC)
- C. F1 score
- D. Mean absolute error (MAE)
Click to View Verified Solution & Explanation
Correct Option: D
✅ Mean absolute error (MAE)
Description: Mean Absolute Error (MAE) is an evaluation metric used in machine learning to measure the average magnitude of the errors in a set of predictions, without considering their direction. It is calculated as the average of the absolute differences between the predicted values and the actual values. MAE is particularly useful for regression tasks because it directly represents the average absolute error in the same units as the target variable, making it highly interpretable.
Why this fits: The provided choices indicate the question is about selecting an appropriate evaluation metric for a machine learning model. Accuracy, Area Under the ROC Curve (AUC), and F1 score are all standard metrics primarily used for classification problems, where the model predicts discrete categories. In contrast, Mean Absolute Error (MAE) is a fundamental and widely used metric for regression problems, where the model predicts continuous numerical values. Therefore, for MAE to be the correct answer among these options, the underlying question must be pertaining to the evaluation of a regression model’s performance.
Example: Consider a machine learning model built to predict a continuous variable, such as the electricity consumption of a household (in kWh). If the model predicts 250 kWh for a day and the actual consumption was 240 kWh, the absolute error for that specific prediction is $|250 – 240| = 10$ kWh. MAE would represent the average of these absolute errors across all predictions made by the model, indicating on average how many kWh the model’s predictions deviate from the actual consumption.
Reference: https://aws.amazon.com/what-is/machine-learning-model-evaluation/
QUESTION 10
A company uses a hybrid cloud environment. A model that is deployed on premises uses data in Amazon S3 to provide customers with a live conversational engine.
The model is using sensitive data. An ML engineer needs to implement a solution to identify and remove the sensitive data.
Which solution will meet these requirements with the LEAST operational overhead?
- A. Deploy the model on Amazon SageMaker. Create a set of AWS Lambda functions to identify and remove the sensitive data.
- B. Deploy the model on an Amazon Elastic Container Service (Amazon ECS) cluster that uses AWS Fargate. Create an AMIS Batch job to identify and remove the sensitive data.
- C. Use Amazon Macie to identify the sensitive data. Create a set of AWS Lambda functions to remove the sensitive data.
- D. Use Amazon Comprehend to identify the sensitive data. Launch Amazon EC2 instances to remove the sensitive data.
Click to View Verified Solution & Explanation
Correct Option: C
Description: Amazon Macie is a data security and data privacy service that uses machine learning and pattern matching to discover and protect sensitive data in AWS. It can automatically detect a large and growing list of sensitive data types, including Personally Identifiable Information (PII), financial data, and more. AWS Lambda is a serverless, event-driven compute service that lets you run code for virtually any type of application or backend service without provisioning or managing servers.
Why this fits: This approach leverages Amazon Macie’s specialized capabilities to efficiently and accurately identify sensitive data within data stores, such as Amazon S3 buckets. Once Macie identifies sensitive data, its findings can be integrated with AWS EventBridge or other notification services. An AWS Lambda function can then be triggered by these events to programmatically access, redact, or remove the identified sensitive data, providing a scalable, automated, and cost-effective solution for data sanitization. This combination aligns with AWS best practices for data privacy and processing at scale.
Example: An organization stores customer feedback in Amazon S3. They configure Amazon Macie to continuously monitor these buckets for sensitive data like customer names, email addresses, and phone numbers. When Macie discovers such data, it generates a finding that triggers an AWS Lambda function. This Lambda function processes the specific object identified by Macie, redacting or removing the sensitive PII fields before the data is used for downstream machine learning model training or analytics.
QUESTION 11
A company needs to run a batch data-processing job on Amazon EC2 instances. The job will run during the weekend and will take 90 minutes to finish running. The processing can handle interruptions. The company will run the job every weekend for the next 6 months.
Which EC2 instance purchasing option will meet these requirements MOST cost-effectively?
- A. Spot Instances
- B. Reserved Instances
- C. On-Demand Instances
- D. Dedicated Instances
Click to View Verified Solution & Explanation
Correct Option: A
Description: Amazon EC2 Spot Instances allow you to request unused EC2 capacity at a significant discount compared to On-Demand prices. These instances can be interrupted by AWS with a two-minute warning if AWS needs the capacity back, making them suitable for flexible, fault-tolerant workloads.
Why this fits: For many machine learning workloads, such as large-scale model training, hyperparameter tuning, and batch inference, cost optimization is a critical factor. Spot Instances offer the most substantial cost savings for compute power, which often represents the largest portion of ML infrastructure costs. These types of workloads can frequently be designed to be fault-tolerant, allowing them to checkpoint progress and resume from an interruption or restart without significant data loss. This characteristic makes them exceptionally well-suited for leveraging the cost efficiency of Spot Instances.
Example: A data science team is running a large-scale hyperparameter optimization experiment that involves training hundreds of different model configurations in parallel. By using Spot Instances for these training jobs, the team can significantly reduce the overall compute cost. If an instance is interrupted, the experiment management system can automatically restart the specific trial on a new Spot Instance, potentially from the last checkpoint, minimizing both cost and disruption.
QUESTION 12
An ML engineer has trained a neural network by using stochastic gradient descent (SGD). The neural network performs poorly on the test set, The values for training loss and validation loss remain high and show an oscillating pattern. The values decrease for a few epochs and then increase for a few epochs before repeating the same cycle.
What should the ML engineer do to improve the training process?
- A. Introduce early stopping.
- B. Increase the size of the test set.
- C. Increase the learning rate.
- D. Decrease the learning rate.
Click to View Verified Solution & Explanation
Correct Option: D
Description: The learning rate is a crucial hyperparameter in optimization algorithms, like gradient descent, that determines the step size taken in the direction of the negative gradient of the loss function during model training. It dictates how quickly or slowly the model’s weights are updated.
Why this fits: When a model exhibits divergence or instability during training (e.g., loss increasing significantly, oscillating wildly, or not converging), it often indicates that the learning rate is too high. A high learning rate causes the optimization algorithm to take overly large steps, potentially overshooting the optimal solution, bouncing between valleys in the loss landscape, or even diverging entirely. Decreasing the learning rate allows for smaller, more controlled adjustments to the model’s weights, promoting a smoother convergence path, reducing oscillations, and helping the model settle into a more stable and potentially better minimum of the loss function. This aligns with best practices for training deep learning models, where fine-tuning hyperparameters like the learning rate is essential for stable and effective training.
Example: Consider a neural network whose training loss is erratically jumping up and down or even increasing during epochs. This behavior suggests that the current learning rate is too aggressive. By reducing the learning rate from, for example, 0.01 to 0.001, the training process often stabilizes, and the loss function begins to consistently decrease towards convergence, leading to a more robust model.
QUESTION 13
A company runs an Amazon SageMaker domain in a public subnet of a newly created VPC. The network is configured properly, and ML engineers can access the SageMaker domain.
Recently, the company discovered suspicious traffic to the domain from a specific IP address. The company needs to block traffic from the specific IP address.
Which update to the network configuration will meet this requirement?
- A. Create a security group inbound rule to deny traffic from the specific IP address. Assign the security group to the domain.
- B. Create a network ACL inbound rule to deny traffic from the specific IP address. Assign the rule to the default network ACL for the subnet where the domain is located.
- C. Create a shadow variant for the domain. Configure SageMaker Inference Recommender to send traffic from the specific IP address to the shadow endpoint.
- D. Create a VPC route table to deny inbound traffic from the specific IP address. Assign the route table to the domain.
Click to View Verified Solution & Explanation
Correct Option: B
Description: Network Access Control Lists (NACLs) are stateless firewalls that operate at the subnet level, controlling traffic in and out of the subnet. Unlike security groups, NACLs support both ALLOW and DENY rules. Each subnet in a VPC must be associated with a NACL.
Why this fits: To deny traffic from a specific IP address to resources within a subnet, a NACL is the appropriate mechanism. An inbound DENY rule can be added to the NACL associated with the subnet. This rule will explicitly block traffic originating from the specified IP address before it reaches any instances or endpoints within that subnet, including a SageMaker endpoint’s underlying infrastructure.
Example: To deny traffic from IP 203.0.113.45, you would create an inbound rule in the NACL associated with the subnet (e.g., rule number 100, type ALL Traffic, source 203.0.113.45/32, DENY). This ensures that any network packets from 203.0.113.45 attempting to enter the subnet are dropped.
QUESTION 14
A company has a team of data scientists who use Amazon SageMaker notebook instances to test ML models. When the data scientists need new permissions, the company attaches the permissions to each individual role that was created during the creation of the SageMaker notebook instance.
The company needs to centralize management of the team’s permissions.
Which solution will meet this requirement?
- A. Create a single IAM role that has the necessary permissions. Attach the role to each notebook instance that the team uses.
- B. Create a single IAM group. Add the data scientists to the group. Associate the group with each notebook instance that the team uses.
- C. Create a single IAM user. Attach the Administrator Access AWS managed IAM policy to the user. Configure each notebook instance to use the IAM user.
- D. Create a single IAM group. Add the data scientists to the group. Create an IAM role. Attach the Administrator Access AWS managed IAM policy to the role. Associate the role with the group. Associate the group with each notebook instance that the team uses.
Click to View Verified Solution & Explanation
Correct Option: A
Description: An IAM role is an IAM identity that you can create in your account that has specific permissions. It is similar to an IAM user, but instead of being uniquely associated with one person, a role is intended to be assumable by anyone or any service that needs it. When an IAM role is associated with an AWS service (like Amazon SageMaker notebook instances), that service can assume the role and temporarily obtain the permissions defined in the role.
Why this fits: This approach aligns with AWS best practices for granting permissions to AWS services. By attaching an IAM role to the Amazon SageMaker notebook instances, the instances themselves assume the role and gain the necessary permissions to interact with other AWS services (e.g., S3 for data, CloudWatch for logs) without requiring individual users to manage credentials directly on the instances. This is secure, scalable, and adheres to the principle of least privilege if the role’s permissions are scoped correctly. Creating a single role and attaching it to multiple instances centralizes permission management for the team’s notebooks.
Example: A data science team uses Amazon SageMaker notebook instances to train models. These notebooks need to read data from an S3 bucket and write model artifacts back to S3. Instead of embedding AWS credentials within the notebook code or directly associating IAM users, an IAM role with s3:GetObject and s3:PutObject permissions for specific buckets is created. This role is then attached to all SageMaker notebook instances the team uses, allowing the notebooks to securely access S3 on behalf of the underlying service.
QUESTION 15
A company is using Amazon SageMaker and millions of files to train an ML model. Each file is several megabytes in size. The files are stored in an Amazon S3 bucket. The company needs to improve training performance.
Which solution will meet these requirements in the LEAST amount of time?
- A. Transfer the data to a new S3 bucket that provides S3 Express One Zone storage. Adjust the training job to use the new S3 bucket.
- B. Create an Amazon FSx for Lustre file system. Link the file system to the existing S3 bucket. Adjust the training job to read from the file system.
- C. Create an Amazon Elastic File System (Amazon EFS) file system. Transfer the existing data to the file system. Adjust the training job to read from the file system.
- D. Create an Amazon ElastiCache (Redis OSS) cluster. Link the Redis OSS cluster to the existing S3 bucket. Stream the data from the Redis OSS cluster directly to the training job.
Click to View Verified Solution & Explanation
Correct Option: B
Description: Amazon FSx for Lustre is a high-performance file system optimized for compute-intensive workloads such as machine learning, high-performance computing (HPC), and media processing. It provides sub-millisecond latencies and high throughput, making it ideal for I/O-intensive applications. It can be linked bi-directionally with Amazon S3, enabling it to transparently read data from and write data back to S3 buckets.
Why this fits: When training machine learning models, particularly deep learning models with large datasets, the speed at which data can be accessed (I/O performance) often becomes a significant bottleneck. While Amazon S3 offers high durability and scalability, its object storage access patterns and latencies can be higher than what a high-performance file system provides. FSx for Lustre addresses this by caching data from S3, providing a POSIX-compliant file system interface with extremely low latency and very high throughput. This significantly accelerates data loading during training, leading to faster epoch completion times and reduced overall training duration. The ability to link directly to an existing S3 bucket means there’s no need for explicit data migration, simplifying the process and ensuring data consistency.
Example: A deep learning engineer is training a computer vision model using a dataset of millions of images stored in an S3 bucket. The existing training job is experiencing slow data loading times, making each training epoch lengthy. By creating an FSx for Lustre file system and linking it to the S3 bucket, the training job can then mount the FSx for Lustre file system. The model training framework can now access the image data with significantly reduced latency and higher throughput, as the data is served from the high-performance file system, effectively eliminating the I/O bottleneck and accelerating training.
QUESTION 16 (Multi-Select)
An ML engineer is training a simple neural network model. The ML engineer tracks the performance of the model over time on a validation dataset. The model is performance improves substantially at first and then degrades after a specific number of epochs.
Which solutions will mitigate this problem? (Select TWO.)
- A. Enable early stopping on the model.
- B. Increase dropout in the layers.
- C. Increase the number of layers.
- D. Increase the number of neurons.
- E. Investigate and reduce the sources of model bias.
Click to View Verified Solution & Explanation
Correct Option: A,B
Description: Early stopping is a regularization technique used during model training to prevent overfitting. It involves monitoring the model’s performance on a separate validation dataset. If the model’s performance on the validation set starts to degrade (e.g., validation loss increases or validation accuracy plateaus/decreases) while its performance on the training set continues to improve, training is halted. The model weights from the epoch with the best validation performance are then used.
Why this fits: Overfitting occurs when a model learns the training data too well, including noise and specific patterns that do not generalize to unseen data. Early stopping directly combats this by stopping the learning process at the point where the model’s ability to generalize starts to worsen, effectively preventing it from memorizing the training data.
Example: When training a deep neural network for sentiment analysis, you might observe that after 10 epochs, the training loss continues to decrease, but the accuracy on a held-out validation set begins to fluctuate or even drop. Implementing early stopping would stop training at or around epoch 10, saving the model from further overfitting.
QUESTION 17
A company is using an AWS Lambda function to monitor the metrics from an ML model. An ML engineer needs to implement a solution to send an email message when the metrics breach a threshold.
Which solution will meet this requirement?
- A. Log the metrics from the Lambda function to AWS CloudTrail. Configure a CloudTrail trail to send the email message.
- B. Log the metrics from the Lambda function to Amazon CloudFront, Configure an Amazon CloudWatch alarm to send the email message.
- C. Log the metrics from the Lambda function to Amazon CloudWatch. Configure a CloudWatch alarm to send the email message.
- D. Log the metrics from the Lambda function to Amazon CloudWatch. Configure an Amazon CloudFront rule to send the email message.
Click to View Verified Solution & Explanation
Correct Option: C
Description: Amazon CloudWatch is a monitoring and observability service that provides data and actionable insights for AWS, hybrid, and on-premises applications and resources. AWS Lambda automatically integrates with CloudWatch, sending function metrics (like invocations, errors, duration, throttles) and logs to CloudWatch. CloudWatch Alarms enable you to watch a single metric or the result of a math expression based on multiple metrics and perform one or more actions based on the value of the metric or expression relative to a threshold over a number of time periods. These actions can include sending notifications via Amazon Simple Notification Service (SNS), which can then deliver emails.
Why this fits: This choice directly leverages the native integration between AWS Lambda and Amazon CloudWatch. Lambda automatically pushes its operational metrics and logs to CloudWatch. CloudWatch can then be used to create alarms based on these metrics (e.g., error rate exceeding a threshold). A CloudWatch alarm can be configured to publish a message to an Amazon SNS topic, which can in turn be configured to send an email notification to subscribed recipients. This is the standard and most efficient AWS-native solution for monitoring Lambda function metrics and receiving email alerts.
Example: An AWS Lambda function processing images fails due to an invalid input for 5 consecutive minutes. CloudWatch automatically collects the Errors metric for this Lambda function. A CloudWatch alarm is configured to trigger when the Errors metric goes above 0 for more than one minute. When the alarm state changes to ALARM, it publishes a message to an SNS topic. This SNS topic has an email subscription configured, resulting in an email notification being sent to the operations team detailing the Lambda function’s elevated error rate.
QUESTION 18
A company needs to host a custom ML model to perform forecast analysis. The forecast analysis will occur with predictable and sustained load during the same 2-hour period every day. Multiple invocations during the analysis period will require quick responses. The company needs AWS to manage the underlying infrastructure and any auto scaling activities.
Which solution will meet these requirements?
- A. Schedule an Amazon SageMaker batch transform job by using AWS Lambda.
- B. Configure an Auto Scaling group of Amazon EQ instances to use scheduled scaling.
- C. Use Amazon SageMaker Serverless Inference with provisioned concurrency.
- D. Run the model on an Amazon Elastic Kubernetes Service (Amazon EKS) cluster on Amazon EC2 with pod auto scaling,
Click to View Verified Solution & Explanation
Correct Option: C
Description: Amazon SageMaker Serverless Inference is a dedicated inference option for deploying machine learning models without managing any underlying infrastructure. It automatically scales compute capacity based on traffic patterns. Provisioned concurrency allows you to pre-provision a specified number of invocations for an endpoint, ensuring consistently low latency and high availability for a predictable baseline load, while still leveraging the serverless model’s ability to scale beyond that provisioned level for unexpected spikes.
Why this fits: This choice offers a highly scalable, cost-effective, and fully managed solution for deploying ML models for inference. It eliminates the operational overhead of managing EC2 instances, Auto Scaling groups, or Kubernetes clusters. Provisioned concurrency directly addresses the need for predictable low latency for critical or baseline traffic, a common requirement in many production ML applications, while maintaining the flexibility of serverless scaling for variable loads.
Example: An e-commerce platform uses an ML model for real-time product recommendations. While traffic fluctuates, there’s always a guaranteed baseline of active users who require instant recommendations. SageMaker Serverless Inference with provisioned concurrency ensures these baseline requests are served with minimal latency and no cold starts, while the serverless nature handles peak shopping events by automatically scaling capacity up and down.
QUESTION 19
An ML engineer needs to deploy ML models to get inferences from large datasets in an asynchronous manner. The ML engineer also needs to implement scheduled monitoring of the data quality of the models. The ML engineer must receive alerts when changes in data quality occur.
Which solution will meet these requirements?
- A. Deploy the models by using scheduled AWS Glue jobs. Use Amazon CloudWatch alarms to monitor the data quality and to send alerts.
- B. Deploy the models by using scheduled AWS Batch jobs. Use AWS CloudTrail to monitor the data quality and to send alerts.
- C. Deploy the models by using Amazon Elastic Container Service (Amazon ECS) on AVVS Fargate. use Amazon EventBridge to monitor the data quality and to send alerts.
- D. Deploy the models by using Amazon SageMaker batch transform. Use SageMaker Model Monitor to monitor the data quality and to send alerts.
Click to View Verified Solution & Explanation
Correct Option: D
Description: Amazon SageMaker Batch Transform is a fully managed service that allows you to process large datasets and get inferences from your machine learning models in a batch fashion. It is ideal for scenarios where real-time inference is not required, and you need to process data offline. SageMaker Model Monitor is a capability within Amazon SageMaker that automatically monitors the quality of machine learning models in production. It can detect drift in data quality, model quality, and feature attribution, sending alerts when issues are identified.
Why this fits: This choice directly addresses both requirements: deploying models for inference and monitoring data quality. SageMaker Batch Transform is the dedicated service for batch inference, providing scalability and integration within the SageMaker ecosystem. SageMaker Model Monitor is specifically designed for monitoring ML model quality and data quality post-deployment, making it the most appropriate and robust solution for detecting data drift or other issues that could impact model performance in production. The combination of these services provides a comprehensive and managed solution for batch ML pipelines with robust monitoring.
Example: A company needs to process daily customer transaction data to predict potential fraud cases. They run a batch job every night to score millions of transactions. SageMaker Batch Transform is used to run the fraud detection model against the new daily data. Simultaneously, SageMaker Model Monitor is configured to analyze the input transaction data for any changes in schema, missing values, or statistical distribution shifts that could indicate a data pipeline issue or data drift, alerting the ML team if anomalies are detected.
QUESTION 20
An ML engineer needs to use AWS services to identify and extract meaningful unique keywords from documents.
Which solution will meet these requirements with the LEAST operational overhead?
- A. Use the Natural Language Toolkit (NLTK) library on Amazon EC2 instances for text pre-processing. Use the Latent Dirichlet Allocation (LDA) algorithm to identify and extract relevant keywords.
- B. Use Amazon SageMaker and the BlazingText algorithm. Apply custom pre-processing steps for stemming and removal of stop words. Calculate term frequency-inverse document frequency (TF-IDF) scores to identify and extract relevant keywords.
- C. Store the documents in an Amazon S3 bucket. Create AWS Lambda functions to process the documents and to run Python scripts for stemming and removal of stop words. Use bigram and trigram techniques to identify and extract relevant keywords.
- D. Use Amazon Comprehend custom entity recognition and key phrase extraction to identify and extract relevant keywords.
Click to View Verified Solution & Explanation
Correct Option: D
Description: Amazon Comprehend is a fully managed natural language processing (NLP) service that uses machine learning to uncover valuable insights and connections in text. It offers various functionalities, including key phrase extraction, which identifies the main points and phrases in a document, and custom entity recognition, allowing users to train the service to recognize specific types of entities relevant to their domain.
Why this fits: This choice directly leverages a purpose-built AWS managed service for NLP tasks, specifically key phrase extraction and entity recognition. Amazon Comprehend’s key phrase extraction feature is designed precisely to identify and extract relevant keywords from text without requiring users to build, train, or deploy their own machine learning models. Custom entity recognition further enhances this capability by enabling the identification of domain-specific keywords. This approach is highly scalable, serverless, and reduces operational overhead compared to implementing a custom solution.
Example: An e-commerce company wants to analyze customer reviews to understand product feedback. They can use Amazon Comprehend’s key phrase extraction to quickly identify recurring terms like "battery life," "screen quality," or "customer service." If they also need to identify specific product model numbers or competitor names that aren’t standard entities, they can train a custom entity recognizer within Comprehend to extract those particular keywords.
QUESTION 21
An ML engineer needs to use AWS CloudFormation to create an ML model that an Amazon SageMaker endpoint will host.
Which resource should the ML engineer declare in the CloudFormation template to meet this requirement?
- A. AWS: :SageMaker: : Model
- B. AWS: :SageMaker: : Endpoint
- C. AWS: :SageMaker: : Notebooklnstance
- D. AWS: :SageMaker: : Pipeline
Click to View Verified Solution & Explanation
Correct Option: A
Description: In AWS SageMaker, a "Model" resource (
AWS::SageMaker::Model or model in an ARN) represents a trained machine learning model artifact and its associated inference container definition. It encapsulates the core components needed to serve predictions: the S3 location of the model artifacts and the Docker image that SageMaker uses to host the model for inference. This resource is created after a model has been trained and evaluated, and it serves as the blueprint for deploying an endpoint or for batch transformations.
Why this fits: This choice directly refers to the SageMaker construct that defines a trained machine learning model ready for deployment or use. When interacting with the core model definition—for instance, to register it in the Model Registry, or to prepare it for hosting—the Model resource type is the appropriate identifier. The other options represent different stages or components in the ML workflow (Endpoint for deployment, NotebookInstance for development, Pipeline for orchestration), but not the model’s core definition itself.
Example: An IAM policy granting permissions to create or manage model definitions would specify AWS: :SageMaker: : Model as the resource type. For example, to allow creating new model definitions, the policy might include "Resource": "arn:aws:sagemaker:us-east-1:123456789012:model/*" and "Action": "sagemaker:CreateModel".
QUESTION 22
A company is gathering audio, video, and text data in various languages. The company needs to use a large language model (LLM) to summarize the gathered data that is in Spanish.
Which solution will meet these requirements in the LEAST amount of time?
- A. Train and deploy a model in Amazon SageMaker to convert the data into English text. Train and deploy an LLM in SageMaker to summarize the text.
- B. Use Amazon Transcribe and Amazon Translate to convert the data into English text. Use Amazon Bedrock with the Jurassic model to summarize the text.
- C. Use Amazon Rekognition and Amazon Translate to convert the data into English text. Use Amazon Bedrock with the Anthropic Claude model to summarize the text.
- D. Use Amazon Comprehend and Amazon Translate to convert the data into English text. Use Amazon Bedrock with the Stable Diffusion model to summarize the text.
Click to View Verified Solution & Explanation
Correct Option: B
Description: This choice leverages fully managed AWS AI services for each stage of the data processing workflow. Amazon Transcribe is an automatic speech recognition (ASR) service that converts audio into text. Amazon Translate is a neural machine translation service that delivers fast, high-quality, and affordable language translation. Amazon Bedrock is a fully managed service that makes foundational models (FMs) from Amazon and leading AI companies available through an API, allowing for tasks like text summarization using models such as AI21 Labs’ Jurassic series.
Why this fits: The first part of the task is to "convert the data into English text." If the "data" implies audio or video in another language, Transcribe is the appropriate service to convert speech to text, and Translate is then used to convert that text into English. If the data is text in another language, Translate would be sufficient. The second part is to "summarize the text." Amazon Bedrock provides access to powerful large language models (LLMs) like the Jurassic models, which are highly capable of generating concise summaries from input text. This combination offers a robust, scalable, and serverless solution for the described task without requiring custom model training.
Example: An organization has customer support call recordings in Spanish. They use Amazon Transcribe to convert the Spanish audio into Spanish text. Then, they use Amazon Translate to convert the Spanish text into English text. Finally, they use Amazon Bedrock, invoking the Jurassic-2 Mid model, to summarize the key points and issues from the English transcription of the call.
QUESTION 23
A company wants to predict the success of advertising campaigns by considering the color scheme of each advertisement. An ML engineer is preparing data for a neural network model. The dataset includes color information as categorical data.
Which technique for feature engineering should the ML engineer use for the model?
- A. Apply label encoding to the color categories. Automatically assign each color a unique integer.
- B. Implement padding to ensure that all color feature vectors have the same length.
- C. Perform dimensionality reduction on the color categories.
- D. One-hot encode the color categories to transform the color scheme feature into a binary matrix.
Click to View Verified Solution & Explanation
Correct Option: D
Description: One-hot encoding is a technique used in feature engineering to convert nominal categorical variables into a numerical format that machine learning algorithms can process effectively. For each unique category within a feature, it creates a new binary (0 or 1) column. A ‘1’ indicates the presence of that category for a given data point, and a ‘0’ indicates its absence. This transforms the single categorical feature into a sparse binary matrix.
Why this fits: For nominal categorical features like "color categories" or "color schemes," where there is no inherent ordinal relationship (e.g., red is not "greater" or "less" than blue), one-hot encoding is the standard and most robust approach. It avoids implying any false sense of order or magnitude that could be introduced by label encoding (e.g., assigning Red=1, Blue=2, Green=3). By representing each category as an independent binary feature, one-hot encoding prevents machine learning models from making incorrect assumptions about the relationships between categories, thereby improving model performance and interpretability. This is crucial for models that are sensitive to feature scaling and relationships, such as linear models, support vector machines, and neural networks.
Example: Suppose a dataset has a ‘Color’ feature with values ‘Red’, ‘Blue’, and ‘Green’. One-hot encoding would transform this into three new features: ‘Color_Red’, ‘Color_Blue’, and ‘Color_Green’. A data point with ‘Red’ would be represented as [1, 0, 0], ‘Blue’ as [0, 1, 0], and ‘Green’ as [0, 0, 1].
QUESTION 24
A company wants to reduce the cost of its containerized ML applications. The applications use ML models that run on Amazon EC2 instances, AWS Lambda functions, and an Amazon Elastic Container Service (Amazon ECS) cluster. The EC2 workloads and ECS workloads use Amazon Elastic Block Store (Amazon EBS) volumes to save predictions and artifacts.
An ML engineer must identify resources that are being used inefficiently. The ML engineer also must generate recommendations to reduce the cost of these resources.
Which solution will meet these requirements with the LEAST development effort?
- A. Create code to evaluate each instance's memory and compute usage.
- B. Add oost allocation tags to the resources, Activate the tags in AWS Billing and Cost Management.
- C. Check AWS CloudTrail event history for the creation of the resources.
- D. Run AWS Compute Optimizer.
Click to View Verified Solution & Explanation
Correct Option: D
Description: AWS Compute Optimizer is an AWS service that helps you identify optimal AWS resources for your workloads to reduce costs and improve performance by recommending optimal AWS resources. It analyzes historical utilization metrics for resources such as EC2 instances, EBS volumes, Lambda functions, Amazon ECS services on Fargate, and more.
Why this fits: The primary goal is to identify idle or underutilized resources to reduce costs. AWS Compute Optimizer is specifically designed for this purpose. It automatically analyzes resource configurations and utilization metrics over time to provide actionable recommendations for right-sizing or terminating resources that are not being fully utilized, directly addressing the need for cost optimization through resource efficiency.
Example: An MLOps engineer might use AWS Compute Optimizer to analyze a fleet of EC2 instances used for model training or inference. Compute Optimizer could recommend downsizing several instances from c5.xlarge to c5.large if their average CPU utilization is consistently low, or even terminating instances that have been idle for an extended period, leading to significant cost savings.
QUESTION 25
A company has deployed an ML model that detects fraudulent credit card transactions in real time in a banking application. The model uses Amazon SageMaker Asynchronous Inference. Consumers are reporting delays in receiving the inference results.
An ML engineer needs to implement a solution to improve the inference performance. The solution also must provide a notification when a deviation in model quality occurs.
Which solution will meet these requirements?
- A. Use SageMaker real-time inference for inference. Use SageMaker Model Monitor for notifications about model quality.
- B. use SageMaker batch transform for inference. Use SageMaker Model Monitor for notifications about model quality.
- C. Use SageMaker Serverless Inference for inference. Use SageMaker Inference Recommender for notifications about model quality.
- D. Keep using SageMaker Asynchronous Inference for inference. Use SageMaker Inference Recommender for notifications about model quality.
Click to View Verified Solution & Explanation
Correct Option: A
Description: Amazon SageMaker real-time inference is designed for workloads that require low-latency responses, typically within milliseconds. It provisions an endpoint that is always active and ready to serve predictions, making it suitable for interactive applications or systems requiring immediate feedback. Amazon SageMaker Model Monitor is a capability within SageMaker that allows you to continuously monitor the quality of machine learning models in production. It automatically detects data drift, concept drift, and other model quality issues, and can trigger alerts or notifications when anomalies are detected, ensuring that models perform as expected over time.
Why this fits: This choice directly addresses two critical requirements:
- Real-time inference: For scenarios where immediate predictions are needed. SageMaker real-time endpoints provide the necessary low-latency performance.
- Notifications about model quality: SageMaker Model Monitor is explicitly designed for this purpose, providing continuous monitoring and alerting capabilities for various model and data quality metrics.
Example: An e-commerce recommendation engine that needs to provide product suggestions to users in real-time as they browse would use SageMaker real-time inference. If the model’s recommendations start to become less relevant due to changes in user behavior or product catalog, SageMaker Model Monitor would detect this degradation and send a notification to data scientists for investigation.
QUESTION 26 [HOT_AREA]
A company wants to host an ML model on Amazon SageMaker. An ML engineer is configuring a continuous integration and continuous delivery (Cl/CD) pipeline in AWS CodePipeline to deploy the model. The pipeline must run automatically when new training data for the model is uploaded to an Amazon S3 bucket.
Select and order the pipeline’s correct steps from the following list. Each step should be selected one time or not at all. (Select and order three.)
Click to View Verified Solution & Explanation
Reasoning: In an MLOps pipeline, an Amazon S3 event notification (e.g.,
s3:ObjectCreated:*) is the most appropriate mechanism to automatically trigger a SageMaker pipeline whenever new data is uploaded to a specified S3 bucket. This ensures the pipeline is invoked immediately to process the fresh data for subsequent ML operations. An S3 Lifecycle rule is used for managing storage tiers or deleting objects, not for initiating ML pipelines.
✅ Step 2: SageMaker retrains the model by using the data in the S3 bucket.
Reasoning: After new data is uploaded and the pipeline is invoked, a common step in an MLOps pipeline for continuous integration/continuous deployment (CI/CD) is to retrain the existing model. SageMaker pipelines orchestrate this process, leveraging the newly available data in the S3 bucket to update the model and ensure it remains current and performs optimally.
✅ Step 3: The pipeline deploys the model to a SageMaker endpoint.
Reasoning: Upon successful retraining and validation of the model within the pipeline, the next logical action is to deploy it for real-time inference. Deploying the model to an Amazon SageMaker endpoint provides a fully managed, scalable, and high-availability inference service, allowing applications to consume predictions from the updated model. While SageMaker Model Registry is crucial for model versioning and cataloging, deploying to an endpoint directly makes the model available for live inference requests.
QUESTION 27
A credit card company has a fraud detection model in production on an Amazon SageMaker endpoint. The company develops a new version of the model.
The company needs to assess the new model’s performance by using live data and without affecting production end users.
Which solution will meet these requirements?
- A. Set up SageMaker Debugger and create a custom rule.
- B. Set up blue/green deployments with all-at-once traffic shifting.
- C. Set up blue/green deployments with canary traffic shifting.
- D. Set up shadow testing with a shadow variant of the new model.
Click to View Verified Solution & Explanation
Correct Option: D
Description: Shadow testing, also known as dark launching, is a technique used to validate a new model in a production environment without impacting end-users. It involves duplicating a portion or all of the live production traffic and sending it to a new, "shadow" variant of the model. This shadow model processes the requests and generates predictions, which are then logged and compared against the existing production model’s predictions. The results of the shadow model are never returned to the end-users.
Why this fits: This approach allows for a safe and non-intrusive evaluation of the new model’s performance, latency, resource utilization, and accuracy under real-world, live traffic conditions. It helps identify potential issues or regressions that might not have been detected in offline testing or staging environments before the model is fully deployed and serving actual users. It provides critical confidence in the new model’s stability and correctness before it goes live.
Example: An e-commerce company wants to update its product recommendation engine. They deploy the new model as a shadow variant alongside their existing production model on an Amazon SageMaker endpoint. All incoming requests for product recommendations are duplicated; the existing model serves the actual recommendations to customers, while the new shadow model processes the same requests in parallel. The predictions and performance metrics from the shadow model are collected and analyzed to ensure it meets the required performance and accuracy standards before a full rollout.
QUESTION 28
A company has a Retrieval Augmented Generation (RAG) application that uses a vector database to store embeddings of documents. The company must migrate the application to AWS and must implement a solution that provides semantic search of text files. The company has already migrated the text repository to an Amazon S3 bucket.
Which solution will meet these requirements?
- A. Use an AWS Batch job to process the files and generate embeddings. Use AWS Glue to store the embeddings. Use SQL queries to perform the semantic searches.
- B. Use a custom Amazon SageMaker notebook to run a custom script to generate embeddings. Use SageMaker Feature Store to store the embeddings. Use SQL queries to perform the semantic searches.
- C. Use the Amazon Kendra S3 connector to ingest the documents from the S3 bucket into Amazon Kendra. Query Amazon Kendra to perform the semantic searches.
- D. Use an Amazon Textract asynchronous job to ingest the documents from the S3 bucket. Query Amazon Textract to perform the semantic searches.
Click to View Verified Solution & Explanation
Correct Option: C
Description: Amazon Kendra is an intelligent enterprise search service that uses machine learning to provide highly accurate answers to natural language queries. It can ingest data from various sources, including documents stored in Amazon S3, and then allows users to perform semantic searches, meaning it understands the context and meaning of the query rather than just matching keywords.
Why this fits: This choice directly addresses the requirement for semantic search on documents stored in S3. Amazon Kendra is specifically designed for this purpose, abstracting away the complexity of building, training, and maintaining machine learning models for natural language understanding and information retrieval. Its S3 connector simplifies the process of ingesting large volumes of documents.
Example: A company stores thousands of support documents, FAQs, and product manuals in an S3 bucket. Instead of manually searching through these files or relying on simple keyword searches, an employee can use Amazon Kendra to ask a question like "How do I troubleshoot a connectivity issue with my printer?" and Kendra will return the most relevant passages or documents based on the semantic meaning of the question, even if the exact words aren’t present in the documents.
QUESTION 29
A company has a binary classification model in production. An ML engineer needs to develop a new version of the model.
The new model version must maximize correct predictions of positive labels and negative labels. The ML engineer must use a metric to recalibrate the model to meet these requirements.
Which metric should the ML engineer use for the model recalibration?
- A. Accuracy
- B. Precision
- C. Recall
- D. Specificity
Click to View Verified Solution & Explanation
Correct Option: A
Description: Accuracy is a common classification metric that measures the proportion of total predictions that were correct. It is calculated as the number of correct predictions (True Positives + True Negatives) divided by the total number of predictions made (True Positives + True Negatives + False Positives + False Negatives).
Why this fits: Without the specific question context, ‘Accuracy’ is the most general and fundamental metric for evaluating the overall performance of a classification model. It provides a straightforward indication of how often the model makes a correct prediction across all classes, representing the overall correctness of the model’s output.
Example: In a spam detection model that correctly identifies 95 out of 100 emails (either as spam or not spam), the model’s accuracy would be 95%. This indicates that 95% of its predictions were correct.
QUESTION 30
A company uses Amazon Sagemaker for its ML workloads. The company’s ML engineer receives a 50 MB Apache Parquet data file to build a fraud detection model. The file includes several correlated columns that are not required.
What should the ML engineer do to drop the unnecessary columns in the file with the LEAST effort?
- A. Download the file to a local workstation. Perform one-hot encoding by using a custom Python script.
- B. Create an Apache Spark job that uses a custom processing script on Amazon EMR.
- C. Create a SageMaker processing job by calling the SageMaker Python SDK.
- D. Create a data flow in SageMaker Data Wrangler. Configure a transform step.
Click to View Verified Solution & Explanation
Correct Option: D
Description: Amazon SageMaker Data Wrangler is a service within Amazon SageMaker that provides a unified interface to prepare data for machine learning. It enables users to visually inspect, clean, transform, and combine data from various sources with minimal coding. A "data flow" is a directed acyclic graph representing a series of data preparation steps, and a "transform step" is a specific operation or transformation applied to the data within this flow, such as one-hot encoding, normalization, or handling missing values.
Why this fits: SageMaker Data Wrangler is explicitly designed for data preparation and feature engineering, which includes common transformations like one-hot encoding. It offers a visual, low-code/no-code environment that simplifies and accelerates the data preparation phase of an ML workflow. This approach is highly efficient and integrates seamlessly with other SageMaker services for model training and deployment, making it the most appropriate and purpose-built AWS service for this task in a managed ML environment.
Example: An ML engineer needs to convert categorical features in their dataset (e.g., ‘Color’: Red, Green, Blue) into a numerical format suitable for a machine learning model. They can import the dataset into SageMaker Data Wrangler, select the ‘Color’ column, and then add a "one-hot encode" transform step in their data flow. Data Wrangler then automatically generates new binary columns (e.g., ‘Color_Red’, ‘Color_Green’, ‘Color_Blue’) for the transformed dataset.
QUESTION 31
An ML engineer needs to use an Amazon EMR cluster to process large volumes of data in batches. Any data loss is unacceptable.
Which instance purchasing option will meet these requirements MOST cost-effectively?
- A. Run the primary node, core nodes, and task nodes on On-Demand Instances.
- B. Run the primary node, core nodes, and task nodes on Spot Instances.
- C. Run the primary node on an On-Demand Instance. Run the core nodes and task nodes on Spot Instances.
- D. Run the primary node and core nodes on On-Demand Instances. Run the task nodes on Spot Instances.
Click to View Verified Solution & Explanation
Correct Option: D
Description: Amazon EMR clusters utilize different node types: primary, core, and task nodes, each serving specific functions. AWS offers various instance purchasing options like On-Demand, which provides consistent, uninterruptible capacity, and Spot Instances, which offer significant cost savings for interruptible, fault-tolerant workloads.
Why this fits: This configuration represents a best practice for Amazon EMR, balancing cost-efficiency with high availability and data durability.
- Primary Node (On-Demand): The primary node is critical for cluster management, job orchestration, and overall stability. Its interruption would lead to cluster failure. Running it on an On-Demand Instance ensures its continuous availability.
- Core Nodes (On-Demand): Core nodes store data in HDFS (Hadoop Distributed File System) and perform computational tasks. Interruptions to core nodes, especially when HDFS is in use, can lead to data loss or require significant re-processing, impacting job reliability and potentially increasing overall costs. Using On-Demand Instances for core nodes provides the necessary stability for data persistence and computation.
- Task Nodes (Spot Instances): Task nodes are purely for computational processing and do not store persistent data in HDFS. Workloads executed on task nodes (e.g., Spark tasks, MapReduce reducers) are typically fault-tolerant and can recover from interruptions by rescheduling tasks on other available nodes. Leveraging Spot Instances for task nodes drastically reduces compute costs without compromising data integrity or overall cluster stability, as their compute capacity is expendable.
Example: For a large-scale data processing pipeline using an Amazon EMR cluster, this setup ensures that the critical control plane (primary node) and data storage/core computation (core nodes) remain stable. Concurrently, the bulk of the parallel processing is handled by cost-optimized Spot Instances on task nodes, allowing for significant cost savings on large, distributed jobs like ETL (Extract, Transform, Load) or machine learning model training.
QUESTION 32
An ML engineer needs to implement a solution to host a trained ML model. The rate of requests to the model will be inconsistent throughout the day.
The ML engineer needs a scalable solution that minimizes costs when the model is not in use, The solution also must maintain the model is capacity to respond to requests during times of peak usage.
Which solution will meet these requirements?
- A. Create AWS Lambda functions that have fixed concurrency to host the model. Configure the Lambda functions to automatically scale based on the number of requests to the model.
- B. Deploy the model on an Amazon Elastic Container Service (Amazon ECS) cluster that uses AWS Fargate. Set a static number of tasks to handle requests during times of peak usage.
- C. Deploy the model to an Amazon SageMaker endpoint. Deploy multiple copies of the model to the endpoint. Create an Application Load Balancer to route traffic between the different copies of the model at the endpoint.
- D. Deploy the model to an Amazon SageMaker endpoint. Create SageMaker endpoint auto scaling policies that are based on Amazon CloudWatch metrics to adjust the number of instances dynamically.
Click to View Verified Solution & Explanation
Correct Option: D
Description: Amazon SageMaker provides a fully managed service for deploying machine learning models into production for real-time inference. When deploying a model to a SageMaker endpoint, you can configure it to use SageMaker endpoint auto scaling, which is a feature built on AWS Application Auto Scaling. This allows the endpoint to automatically adjust the number of instances provisioned for the model based on defined scaling policies and observed metrics.
Why this fits: This approach directly addresses the need for dynamic scaling of an ML model. By using SageMaker endpoint auto scaling, you can define target tracking or step scaling policies based on Amazon CloudWatch metrics such as InvocationsPerInstance, CPUUtilization, or MemoryUtilization. SageMaker will then automatically add more instances when demand increases (e.g., higher invocations per instance) and remove instances when demand decreases, optimizing both performance and cost without manual intervention. This is the recommended, managed, and most efficient way to achieve dynamic scaling for real-time ML inference on AWS.
Example: An e-commerce website deploys a recommendation model on a SageMaker endpoint. During holiday sales, the traffic to the recommendation service spikes significantly. With SageMaker endpoint auto scaling configured to maintain an average of 50 invocations per instance, the endpoint automatically provisions more instances to handle the increased load, ensuring low latency for customer recommendations. After the sales period, as traffic returns to normal, SageMaker automatically scales down the instances, reducing operational costs.
QUESTION 33
A company stores time-series data about user clicks in an Amazon S3 bucket. The raw data consists of millions of rows of user activity every day. ML engineers access the data to develop their ML models.
The ML engineers need to generate daily reports and analyse click trends over the past 3 days by using Amazon Athena. The company must retain the data for 30 days before archiving the data,
Which solution will provide the HIGHEST performance for data retrieval?
- A. Keep all the time-series data without partitioning in the S3 bucket. Manually move data that is older than 30 days to separate S3 buckets.
- B. Create AWS Lambda functions to copy the time-series data into separate S3 buckets. Apply S3 Lifecycle policies to archive data that is older than 30 days to S3 Glacier Flexible Retrieval.
- C. Organize the time-series data into partitions by date prefix in the S3 bucket. Apply S3 Lifecycle policies to archive partitions that are older than 30 days to S3 Glacier Flexible Retrieval.
- D. Put each day's time-series data into its own S3 bucket. Use S3 Lifecycle policies to archive S3 buckets that hold data that is older than 30 days to S3 Glacier Flexible Retrieval.
Click to View Verified Solution & Explanation
Correct Option: C
Description: Amazon S3 object prefixes allow you to organize data hierarchically within a bucket, effectively creating logical partitions. For time-series data, common partitioning strategies involve using date-based prefixes (e.g.,
YYYY/MM/DD/). S3 Lifecycle policies enable automated management of objects throughout their lifecycle. These policies can transition objects to different storage classes (like S3 Glacier Flexible Retrieval for cost-effective archiving) or expire them after a defined period, based on object age, prefix, or object tags.
Why this fits: This approach leverages the native capabilities of Amazon S3 for efficient data management and cost optimization for time-series data. Partitioning by date prefix (e.g., s3://your-bucket/data/2023/10/26/) allows for granular control. S3 Lifecycle policies can then be applied directly to these specific prefixes or object age. This means entire date partitions (e.g., all data for October 26, 2023) can be automatically transitioned to S3 Glacier Flexible Retrieval once they are older than 30 days, without needing manual intervention or custom Lambda functions. This is a highly scalable, automated, and cost-effective solution compared to manual processes or creating numerous separate S3 buckets.
Example: For data arriving daily, you might store it in s3://my-time-series-data/2023/10/26/data_file.json, s3://my-time-series-data/2023/10/27/data_file.json, and so on. An S3 Lifecycle policy can then be configured on the my-time-series-data/ bucket to apply to objects with any prefix, stating that objects older than 30 days should be transitioned to S3 Glacier Flexible Retrieval. This will automatically move all files within prefixes like 2023/09/26/ (and older) to the archive tier once they cross the 30-day threshold.
QUESTION 34
A company has deployed an XGBoost prediction model in production to predict if a customer is likely to cancel a subscription. The company uses Amazon SageMaker Model Monitor to detect deviations in the Fl score.
During a baseline analysis of model quality, the company recorded a threshold for the Fl score. After several months of no change, the model’s Fl score decreases significantly.
What could be the reason for the reduced Fl score?
- A. Concept drift occurred in the underlying customer data that was used for predictions.
- B. The model was not sufficiently complex to capture all the patterns in the original baseline data.
- C. The original baseline data had a data quality issue of missing values.
- D. Incorrect ground truth labels were provided to Model Monitor during the calculation of the baseline. Ask Al Assistant Summarize this document By using Al Assistant, you agree to Generative Al User Guidelit
Click to View Verified Solution & Explanation
Correct Option: A
Description: Concept drift is a phenomenon where the statistical properties of the target variable, which the model is trying to predict, change over time in unforeseen ways. This change can affect the relationship between input features and the target variable, or the distribution of the input features themselves. When concept drift occurs, a model that was accurate at one point in time can become less accurate because the data it processes in production no longer matches the data it was trained on or the assumptions made during training.
Why this fits: AWS SageMaker Model Monitor is specifically designed to detect various forms of model degradation, including concept drift. If a model’s performance degrades after deployment, and Model Monitor identifies a significant shift in the distribution of incoming data compared to the baseline data, or a change in the model’s quality metrics, concept drift is a primary suspect. This option directly addresses a common reason for model performance degradation in real-world scenarios that Model Monitor is built to detect and alert on, helping maintain model accuracy over time.
Example: An e-commerce recommendation system trained on user behavior during a period of stable economic conditions might experience concept drift if a major global event (e.g., a pandemic, a significant economic downturn) drastically alters consumer purchasing habits and product preferences. The original model would then make less relevant recommendations because the underlying patterns of user behavior (the "concept") have shifted. Model Monitor would flag this by comparing the current input features and potentially the observed click-through rates or conversion rates against its baseline.
QUESTION 35
An advertising company uses AWS Lake Formation to manage a data lake. The data lake contains structured data and unstructured data. The company’s ML engineers are assigned to specific advertisement campaigns.
The ML engineers must interact with the data through Amazon Athena and by browsing the data directly in an Amazon S3 bucket. The ML engineers must have access to only the resources that are specific to their assigned advertisement campaigns.
Which solution will meet these requirements in the MOST operationally efficient way?
- A. Configure IAM policies on an AWS Glue Data Catalog to restrict access to Athena based on the ML engineers' campaigns.
- B. Store users and campaign information in an Amazon DynamoDB table. Configure DynamoDB Streams to invoke an AWS Lambda function to update S3 bucket policies.
- C. Use Lake Formation to authorize AWS Glue to access the S3 bucket. Configure Lake Formation tags to map ML engineers to their campaigns.
- D. Configure S3 bucket policies to restrict access to the S3 bucket based on the ML engineers' campaigns.
Click to View Verified Solution & Explanation
Correct Option: C
Description: AWS Lake Formation is a service that helps build, secure, and manage data lakes. It provides a centralized security model for data stored in Amazon S3 and cataloged in the AWS Glue Data Catalog. A key feature is its ability to implement fine-grained access control using a permissions model that integrates with AWS Identity and Access Management (IAM) and supports attribute-based access control (ABAC) through tags.
Why this fits: This approach directly addresses the requirement for fine-grained access control based on user attributes (ML engineers’ campaigns). By registering the S3 bucket with Lake Formation and granting permissions through it, Lake Formation becomes the authoritative source for access. Lake Formation’s tag-based access control (TBAC) allows administrators to define tags (e.g., campaign:campaignA, campaign:campaignB) on Glue Data Catalog resources (databases, tables, columns) or S3 prefixes. ML engineers can then be granted permissions to data resources that share specific tags associated with their campaigns, simplifying permission management at scale. This allows different ML engineers to access different subsets of the data without requiring complex, individual IAM or S3 bucket policies for every user and data segment.
Example: An S3 data lake stores campaign-specific data, and an AWS Glue Data Catalog table customer_segments has columns campaign_id, customer_id, features. You can apply a Lake Formation tag campaign:A to rows (via a view) or partitions related to ‘Campaign A’ in the customer_segments table. An ML engineer working on ‘Campaign A’ is granted Lake Formation permissions to query data tagged with campaign:A. When this ML engineer queries the customer_segments table via Athena (which integrates with Lake Formation), they will only see data relevant to ‘Campaign A’.
QUESTION 36 [HOT_AREA]
An ML engineer is building a generative AI application on Amazon Bedrock by using large language models (LLMs).
Select the correct generative AI term from the following list for each description. Each term should be selected one time or not at all. (Select three.)
• Embedding
• Retrieval Augmented Generation (RAG)
• Temperature
• Token
Click to View Verified Solution & Explanation
✅ Text representation of basic units of data processed by LLMs: Token
Reasoning: In the context of Large Language Models (LLMs), a token is a fundamental unit of text, such as a word, subword, or character, into which input text is broken down for processing. LLMs operate on these tokens to understand and generate human-like text.
✅ High-dimensional vectors that contain the semantic meaning of text: Embedding
Reasoning: Embeddings are dense, high-dimensional numerical vector representations of text (or other data types) that capture the semantic meaning and relationships. They allow LLMs to process linguistic nuances, identify similarities, and understand context more effectively than raw text.
✅ Enrichment of information from additional data sources to improve a generated response: Retrieval Augmented Generation (RAG)
Reasoning: Retrieval Augmented Generation (RAG) is a technique used to enhance the performance and accuracy of LLMs by enabling them to retrieve relevant information from an external knowledge base or data source (e.g., a document store, database) and integrate it into their generated responses. This helps to ground the LLM’s output in factual, up-to-date information, reducing hallucinations and improving contextual relevance.
QUESTION 37 [HOT_AREA]
An ML engineer needs to use Amazon SageMaker Feature Store to create and manage features to train a model.
Select and order the steps from the following list to create and use the features in Feature Store. Each step should be selected one time. (Select and order three.)
• Access the store to build datasets for training.
• Create a feature group.
• Ingest the records.
Click to View Verified Solution & Explanation
✅
The correct sequence for utilizing AWS SageMaker Feature Store for machine learning workflows involves defining the feature structure, populating it with data, and then retrieving that data for model development.
✅ Step 1: Create a feature group.
Reasoning: Before features can be stored and managed, a feature group must be defined. This involves specifying the schema (feature names, data types, record identifier, and event time feature) and storage configuration for the features within AWS SageMaker Feature Store. This foundational step ensures data consistency and proper organization. Service: AWS SageMaker Feature Store. Primary Function: Define and manage a schema for real-time and batch features, ensuring consistency and reusability.
✅ Step 2: Ingest the records.
Reasoning: Once a feature group is created, feature data (records) can be ingested into it. This populates the feature group with the actual feature values, making them available for both online (real-time inference) and offline (batch training) access. Service: AWS SageMaker Feature Store. Primary Function: Populate the feature group with feature data, making it available for retrieval.
✅ Step 3: Access the store to build datasets for training.
Reasoning: With features stored and updated in the feature group, data scientists and ML engineers can then query and retrieve these features to create datasets for model training. This step leverages the organized and versioned features for model development, ensuring feature consistency between training and inference. Service: AWS SageMaker Feature Store. Primary Function: Retrieve feature data from the feature group to create training and inference datasets.
QUESTION 38
A company is using ML to predict the presence of a specific weed in a farmer’s field. The company is using the Amazon SageMaker linear leamer built-in algorithm with a value of multiclass classifier for the predictor type hyperparameter.
What should the company do to MINIMIZE false positives?
- A. Set the value of the weight decay hyperparameter to zero.
- B. Increase the number of training epochs.
- C. Increase the value of the target precision hyperparameter.
- D. Change the value of the predictor type hyperparameter to regressor.
Click to View Verified Solution & Explanation
Correct Option: C
Description: The F1-score is the harmonic mean of precision and recall, often used as a single metric to evaluate binary classification models, especially with imbalanced classes. Precision measures the proportion of positive identifications that were actually correct (True Positives / (True Positives + False Positives)). A "target precision hyperparameter," while not universally named as such across all frameworks, conceptually refers to a configurable setting that influences a model’s training process or decision-making threshold to prioritize achieving a higher precision score. This is typically accomplished by adjusting class weights, modifying the cost function to penalize false positives more heavily, or raising the classification confidence threshold.
Why this fits: If a model’s F1-score is suboptimal, and the underlying issue is a low precision score (i.e., the model is making too many false positive predictions), then adjusting the model to prioritize precision would be a correct strategy. Increasing the value of a hyperparameter designed to achieve "target precision" would push the model to be more conservative in its positive predictions, thereby reducing false positives and increasing precision. Since F1-score balances precision and recall, improving a deficient precision component can directly lead to an improvement in the overall F1-score.
Example: Consider a medical diagnostic model where a positive prediction means a patient has a rare disease. If the model frequently misidentifies healthy patients as having the disease (low precision), its F1-score will suffer. If the training framework allows setting a "precision_priority" or similar hyperparameter, increasing its value would guide the model to be more stringent with positive diagnoses, reducing false positives, increasing precision, and thus improving the F1-score, assuming recall does not drop disproportionately.
QUESTION 39
A company has trained and deployed an ML model by using Amazon SageMaker. The company needs to implement a solution to record and monitor all the API call events for the SageMaker endpoint. The solution also must provide a notification when the number of API call events breaches a threshold.
Which solution will meet these requirements?
- A. Use SageMaker Debugger to track the inferences and to report metrics. Create a custom rule to provide a notification when the threshold is Breached.
- B. Use SageMaker Debugger to track the inferences and to report metrics. Use the tensor variance built-in rule to provide a notification when the threshold is breached.
- C. Log all the endpoint invocation API events by using AWS CloudTrail. Use an Amazon CloudWatch dashboard for monitoring. Set up a CloudWatch alarm to provide notification when the threshold is breached.
- D. Add the Invocations metric to an Amazon CloudWatch dashboard for monitoring. Set up a CloudWatch alarm to provide notification when the threshold is breached.
Click to View Verified Solution & Explanation
Correct Option: C
Description: AWS CloudTrail is a service that enables governance, compliance, operational auditing, and risk auditing of your AWS account. With CloudTrail, you can log, continuously monitor, and retain account activity related to actions across your AWS infrastructure, including API calls made to AWS services like Amazon SageMaker. Amazon CloudWatch is a monitoring and observability service that provides data and actionable insights to monitor your applications, respond to system-wide performance changes, and optimize resource utilization. CloudWatch dashboards display metrics graphically, and CloudWatch Alarms can be set on these metrics to trigger notifications when a specified threshold is violated.
Why this fits: The core requirement of "logging all the endpoint invocation API events" is directly met by AWS CloudTrail. CloudTrail records every API call, including InvokeEndpoint operations, providing a detailed audit trail of when and by whom an endpoint was invoked. These CloudTrail logs can be sent to CloudWatch Logs, from which CloudWatch metrics can be extracted (e.g., a count of InvokeEndpoint events). Alternatively, the general CloudWatch service already collects metrics like Invocations for SageMaker endpoints. Regardless of the exact source of the metric (directly from SageMaker or derived from CloudTrail logs via CloudWatch Logs), Amazon CloudWatch is the appropriate service for creating dashboards for monitoring these invocation activities and setting up alarms to provide notifications when an invocation threshold is breached. This combination ensures comprehensive event logging, centralized monitoring, and proactive alerting.
Example: A data scientist deploys a SageMaker model and wants to ensure that the production endpoint is not being over-invoked or under-invoked by external applications. By configuring CloudTrail to log all SageMaker API calls, they can track every InvokeEndpoint event. A CloudWatch metric filter on these CloudTrail logs (or the native SageMaker Invocations metric) can count the number of invocations per minute. A CloudWatch dashboard displays this metric, and an alarm is configured to notify the operations team via SNS if the invocation rate exceeds 1000 requests per minute or drops below 10 requests per minute for a sustained period.
QUESTION 40
An ML engineer receives datasets that contain missing values, duplicates, and extreme outliers. The ML engineer must consolidate these datasets into a single data frame and must prepare the data for ML.
Which solution will meet these requirements?
- A. Use Amazon SageMaker Data Wrangler to import the datasets and to consolidate them into a single data frame. Use the cleansing and enrichment functionalities to prepare the data.
- B. Use Amazon SageMaker Ground Truth to import the datasets and to consolidate them into a single data frame. Use the human-in-the-loop capability to prepare the data.
- C. Manually import and merge the datasets. Consolidate the datasets into a single data frame. Use Amazon Q Developer to generate code snippets that will prepare the data.
- D. Manually import and merge the datasets. Consolidate the datasets into a single data frame. Use Amazon SageMaker data labeling to prepare the data.
Click to View Verified Solution & Explanation
Correct Option: A
Description: Amazon SageMaker Data Wrangler is a fully managed service that allows data scientists and engineers to aggregate and prepare data from various sources for machine learning. It provides a visual interface for data preparation, including over 300 built-in data transformations, and allows users to import data from various AWS data stores and third-party SaaS applications.
Why this fits: This option directly addresses all aspects of the data preparation challenge. Data Wrangler is specifically designed to import data from multiple sources, consolidate them into a single data frame, and then apply a wide range of cleansing, transformation, and enrichment steps. Its capabilities align perfectly with the need to prepare data efficiently for machine learning model training.
Example: A data scientist needs to combine customer transaction data from an Amazon S3 data lake with product catalog information from an Amazon RDS database. They can use Data Wrangler to visually connect to both data sources, join them into a unified dataset, identify and remove duplicate records, handle missing values, and engineer new features (e.g., total purchase amount per customer) before exporting the clean, prepared dataset for model training in SageMaker.
QUESTION 41
A company has a large, unstructured dataset. The dataset includes many duplicate records across several key attributes.
Which solution on AWS will detect duplicates in the dataset with the LEAST code development?
- A. Use Amazon Mechanical Turk jobs to detect duplicates.
- B. Use Amazon QuickSight ML Insights to build a custom deduplication model.
- C. Use Amazon SageMaker Data Wrangler to pre-process and detect duplicates.
- D. Use the AWS Glue FindMatches transform to detect duplicates.
Click to View Verified Solution & Explanation
Correct Option: D
Description: The AWS Glue FindMatches transform is a machine learning-powered capability within AWS Glue Studio and AWS Glue DataBrew that identifies and links records that refer to the same real-world entity, even if they have inconsistencies, missing information, or variations in their values (e.g., "IBM Corp." and "International Business Machines"). It uses ML to perform fuzzy matching, record linkage, and deduplication across datasets.
Why this fits: For an AWS Certified Machine Learning Engineer, identifying duplicates in datasets is a crucial data quality step. The AWS Glue FindMatches transform is purpose-built for this exact task, leveraging machine learning to efficiently detect fuzzy duplicates at scale within an ETL pipeline. It is a managed service that handles the complexity of building and training a matching model, making it a highly effective and recommended solution for data deduplication in an AWS ML context.
Example: A company aggregates customer data from various sources. Due to different data entry formats, "John Doe, 123 Main St" might appear as "J. Doe, 123 Main Street" or "John Doe, Main St.". Using the AWS Glue FindMatches transform, an ML Engineer can configure the service to learn patterns and group these records as belonging to the same individual, thereby creating a cleaner, deduplicated dataset for analytics or model training.
QUESTION 42
A company has AWS Glue data processing jobs that are orchestrated by an AWS Glue workflow. The AWS Glue jobs can run on a schedule or car launched manually.
The company is developing pipelines in Amazon SageMaker Pipelines for ML model development. The pipelines will use the output of the AWS Gli during the data processing phase of model development. An ML engineer needs to implement a solution that integrates the AWS Glue jobs with pipelines.
Which solution will meet these requirements with the LEAST operational overhead?
- A. Use AVVS Step Functions for orchestration of the pipelines and the AWS Glue jobs.
- B. Use processing steps in SageMaker Pipelines. Configure inputs that point to the Amazon Resource Names (ARNs) of the AWS Glue job
- C. Use Callback steps in SageMaker Pipelines to start the AWS Glue workflow and to stop the pipelines until the AWS Glue jobs finish run
- D. Use Amazon EventBridge to invoke the pipelines and the AWS Glue jobs in the desired order.
Click to View Verified Solution & Explanation
Correct Option: B
Description: SageMaker Pipelines enable you to define and orchestrate end-to-end machine learning workflows. A
ProcessingStep within a SageMaker Pipeline is designed to execute a SageMaker Processing Job. These jobs can run custom scripts or containers for tasks like data preprocessing, feature engineering, and model evaluation. The scripts running within a SageMaker Processing Job have access to the AWS SDK (Boto3), allowing them to interact with other AWS services.
Why this fits: To integrate an existing AWS Glue job into a SageMaker Pipeline, a ProcessingStep can be configured to run a Python script that acts as a wrapper. This script will use the AWS SDK (Boto3) to programmatically invoke the AWS Glue job using its Amazon Resource Name (ARN) and then poll its status until the Glue job completes. By performing the start_job_run and get_job_job operations within the ProcessingStep‘s script, the SageMaker Pipeline can directly control and await the completion of the Glue job before proceeding to subsequent steps. This method effectively embeds the Glue job’s execution directly into the pipeline’s sequential flow.
Example: Consider a SageMaker Pipeline where raw data must be transformed by an AWS Glue ETL job before model training. A ProcessingStep would be defined in the pipeline. This step would execute a Python script that uses boto3.client('glue').start_job_run() with the Glue job’s ARN and then enters a loop to call boto3.client('glue').get_job_run() periodically. The ProcessingStep only completes successfully once the Glue job’s state indicates SUCCEEDED, thus ensuring the ETL process is finished before downstream SageMaker steps like training begin.
QUESTION 43
A financial company receives a high volume of real-time market data streams from an external provider. The streams consist of thousands of JSON records every second.
The company needs to implement a scalable solution on AMIS to identify anomalous data points.
Which solution will meet these requirements with the LEAST operational overhead?
- A. Ingest real-time data into Amazon Kinesis data streams. Use the built-in RANDOM_CUT_FOREST function in Amazon Managed Service for Apache Flink to process the data streams and to detect data anomalies.
- B. Ingest real-time data into Amazon Kinesis data streams. Deploy an Amazon SageMaker endpoint for real-time outlier detection. Create an AWS Lambda function to detect anomalies. Use the data streams to invoke the Lambda function.
- C. Ingest real-time data into Apache Kafka on Amazon EC2 instances. Deploy an Amazon SageMaker endpoint for real-time outlier detection. Create an AMIS Lambda function to detect anomalies. Use the data streams to invoke the Lambda function.
- D. Send real-time data to an Amazon Simple Queue Service (Amazon SQS) FIFO queue. Create an AWS Lambda function to consume the queue messages. Program the Lambda function to start an AWIS Glue extract, transform, and load (ETL) job for batch processing and anomalydetection.
Click to View Verified Solution & Explanation
Correct Option: A
Description: This approach leverages Amazon Kinesis Data Streams for highly scalable and durable real-time data ingestion. Amazon Managed Service for Apache Flink (formerly Amazon Kinesis Data Analytics for Apache Flink) provides a fully managed service to process streaming data using Apache Flink. It includes built-in functions, such as
RANDOM_CUT_FOREST, which is an unsupervised algorithm specifically designed for real-time anomaly detection on streaming data.
Why this fits: This solution is ideal for real-time anomaly detection because it combines services designed for streaming data processing with a specialized algorithm. Kinesis Data Streams efficiently collects high-volume, real-time data. Amazon Managed Service for Apache Flink processes this data continuously, applying the RANDOM_CUT_FOREST function directly to the data stream to identify deviations from the norm as they occur. This fully managed, serverless, and real-time architecture minimizes operational overhead while providing low-latency anomaly detection. The RANDOM_CUT_FOREST algorithm is particularly effective for this use case as it does not require pre-labeled data and can adapt to evolving data patterns.
Example: An e-commerce company wants to detect fraudulent transactions as they happen. They can ingest real-time transaction data into Kinesis Data Streams. An Amazon Managed Service for Apache Flink application then consumes this data and uses the RANDOM_CUT_FOREST function to identify transactions that deviate significantly from typical patterns, flagging them for immediate review.
QUESTION 44
A company is building a deep leaming model on Amazon SageMaker. The company uses a large amount of data as the training dataset. The company needs to optimize the model’s hyperparameters to minimize the loss function on the validation dataset.
Which hyperparameter tuning strategy will accomplish this goal with the LEAST computation time?
- A. Hyperband
- B. Grid search
- C. Bayesian optimization
- D. Random search
Click to View Verified Solution & Explanation
Correct Option: A
Description: Hyperband is an iterative, early-stopping optimization algorithm designed for hyperparameter tuning. It works by intelligently allocating computational resources (like epochs or training data) to a set of randomly sampled hyperparameter configurations. It prioritizes evaluating many configurations with minimal resources initially, then progressively prunes unpromising ones and allocates more resources to the best-performing configurations, effectively combining successive halving with randomized search.
Why this fits: Hyperband is highly efficient for hyperparameter optimization, particularly when the search space is large and computational resources are a concern. It significantly reduces the time and cost required to find optimal hyperparameters compared to traditional methods like Grid Search or Random Search by intelligently stopping poor-performing configurations early. This makes it a superior choice for services like AWS SageMaker Hyperparameter Tuning when aiming for resource efficiency and faster convergence to good hyperparameter sets.
Example: An MLOps engineer is tuning a new deep learning model on Amazon SageMaker. Instead of running a Random Search for a fixed number of trials, which might waste resources on subpar combinations, or a Grid Search which is computationally expensive, they configure SageMaker Hyperparameter Tuning to use the Hyperband strategy. SageMaker will then launch multiple training jobs for various hyperparameter combinations with few epochs, identify the most promising ones, terminate the poor performers, and dedicate more resources (e.g., longer training runs) to the top contenders, ultimately finding an optimized set of hyperparameters much faster.
QUESTION 45
An ML engineer is using a training job to fine-tune a deep learning model in Amazon SageMaker Studio. The ML engineer previously used the same pre-trained model with a similar dataset. The ML engineer expects vanishing gradient, underutilized GPU, and overfitting problems.
The ML engineer needs to implement a solution to detect these issues and to react in predefined ways when the issues occur. The solution also must
provide comprehensive real-time metrics during the training.
Which solution will meet these requirements with the LEAST operational overhead?
- A. Use TensorBoard to monitor the training job. Publish the findings to an Amazon Simple Notification Service (Amazon SNS) topic. Create an AWS Lambda function to consume the findings and to initiate the predefined actions.
- B. Use Amazon Cloud Match default metrics to gain insights about the training job. Use the metrics to invoke an AWS Lambda function to initiate the predefined actions.
- C. Expand the metrics in Amazon CloudWatch to include the gradients in each training step. Use the metrics to invoke an AWS Lambda function to initiate the predefined actions.
- D. Use SageMaker Debugger built-in rules to monitor the training job. Configure the rules to initiate the predefined actions.
Click to View Verified Solution & Explanation
Correct Option: D
Description: Amazon SageMaker Debugger is a powerful capability that allows data scientists and machine learning engineers to debug and analyze training jobs in real-time. It automatically captures, analyzes, and stores the tensors (e.g., losses, gradients, weights) emitted during training, helping to identify common issues such as vanishing/exploding gradients, overfitting, or loss not decreasing. It comes with built-in rules designed to detect these problems.
Why this fits: This choice directly addresses the need for monitoring a training job and initiating predefined actions. SageMaker Debugger’s built-in rules are specifically designed to detect common training issues without requiring extensive custom metric instrumentation. When a rule is triggered, SageMaker Debugger can automatically publish an event to Amazon EventBridge (formerly CloudWatch Events), which can then be used to trigger various predefined actions, such as stopping the training job, sending notifications via Amazon SNS, or invoking an AWS Lambda function for custom logic. This provides a robust and integrated solution for proactive training job management.
Example: A data scientist wants to prevent model training from continuing if the loss stops decreasing, indicating the model might be stuck or converged. They can configure a SageMaker Debugger built-in rule like LossNotDecreasing for their training job. If this rule is triggered, Debugger can automatically stop the training job and send an email notification, saving compute resources and alerting the team to the issue.
QUESTION 46
Case study –
An ML engineer is developing a fraud detection model on AWS. The training dataset includes transaction logs, customer profiles, and tables from an on-premises MySQL database. The transaction logs and customer profiles are stored in Amazon S3.
The dataset has a class imbalance that affects the learning of the model’s algorithm. Additionally, many of the features have interdependencies. The algorithm is not capturing all the desired underlying patterns in the data.
The ML engineer needs to use an Amazon SageMaker built-in algorithm to train the model.
Which algorithm should the ML engineer use to meet this requirement?
- A. LightGBM
- B. Linear learner
- C. К-means clustering
- D. Neural Topic Model (NTM)
Click to View Verified Solution & Explanation
Correct Option: D
Description: The Neural Topic Model (NTM) is an unsupervised learning algorithm provided by Amazon SageMaker that is used to discover the hidden semantic structures (topics) in a collection of documents. Unlike traditional topic models, NTM leverages neural networks to identify patterns of words that frequently co-occur, representing a topic. It can handle large datasets and capture more complex relationships between words and topics.
Why this fits: NTM is specifically designed for topic modeling, which involves extracting abstract "topics" from a collection of documents. It’s an unsupervised learning method, ideal for scenarios where you want to understand the underlying themes or subjects within a text corpus without pre-defined labels. This makes it a highly effective choice for tasks like document organization, information retrieval, and content recommendation based on thematic relevance.
Example: A marketing department wants to analyze thousands of customer feedback comments to identify common themes related to product features, customer service, or user experience without manually labeling each comment. Using the SageMaker NTM algorithm, they can automatically discover latent topics such as "billing issues," "feature requests," or "app performance," helping them prioritize improvements.
QUESTION 47
Case Study
An ML engineer is developing a fraud detection model on AWS. The training dataset includes transaction logs, customer profiles, and tables from an on- premises MySQL database, The transaction logs and customer profiles are stored in Amazon S3.
The dataset has a class imbalance that affects the learning of the modelis algorithm. Additionally, many of the features have interdependencies. The algorithm is not capturing all the desired underlying patterns in the data.
After the data is aggregated, the ML engineer must implement a solution to automatically detect anomalies in the data and to visualize the result.
Which solution will meet these requirements?
- A. Use Amazon Athena to automatically detect the anomalies and to visualize the result.
- B. Use Amazon Redshift Spectrum to automatically detect the anomalies. Use Amazon QuickSight to visualize the result.
- C. Use Amazon SageMaker Data Wrangler to automatically detect the anomalies and to visualize the result.
- D. Use AWS Batch to automatically detect the anomalies. Use Amazon QuickSight to visualize the result.
Click to View Verified Solution & Explanation
Correct Option: C
Description: Amazon SageMaker Data Wrangler is a capability of Amazon SageMaker designed to simplify and accelerate data preparation for machine learning. It provides a visual interface that allows data scientists and engineers to explore, prepare, and transform data from various sources, including applying over 300 built-in transformations and analyses, such as anomaly detection.
Why this fits: Data Wrangler offers specific, pre-built transformations for anomaly detection, such as Detect Anomalies (Isolation Forest) or Detect Anomalies (One-Class SVM), which can automatically identify outliers or unusual patterns in datasets without requiring manual coding of complex algorithms. Furthermore, Data Wrangler’s integrated data flow interface includes robust visualization capabilities, allowing users to immediately inspect the results of these transformations, including the identified anomalies, directly within the service. This fulfills both the requirement to automatically detect anomalies and to visualize the outcome within a single, ML-centric tool.
Example: A machine learning engineer needs to identify fraudulent transactions in a large financial dataset. They ingest the data into SageMaker Data Wrangler, apply the Detect Anomalies (Isolation Forest) transformation, and then use Data Wrangler’s built-in visualizations to quickly see which transactions have been flagged as anomalous, thereby enabling targeted investigation or further model training.
QUESTION 48
Case Study
An ML engineer is developing a fraud detection model on AWS. The training dataset includes transaction logs, customer profiles, and tables from an on-premises MySQL database. The transaction logs and customer profiles are stored in Amazon S3.
The dataset has a class imbalance that affects the learning of the model’s algorithm. Additionally, many of the features have interdependencies. The algorithm is not capturing all the desired underlying patterns in the data.
The training dataset includes categorical data and numerical data. The ML engineer must prepare the training dataset to maximize the accuracy of the model.
Which action will meet this requirement with the LEAST operational overhead?
- A. Use AWS Glue to transform the categorical data into numerical data.
- B. Use AWS Glue to transform the numerical data into categorical data.
- C. Use Amazon SageMaker Data Wrangler to transform the categorical data into numerical data.
Click to View Verified Solution & Explanation
Correct Option: C
Description: Amazon SageMaker Data Wrangler is a data preparation capability within Amazon SageMaker that provides a visual interface and a wide array of built-in transformations to aggregate, prepare, and clean data for machine learning. It specifically offers numerous encoding methods (e.g., One-Hot Encoding, Ordinal Encoding) to convert categorical features into numerical formats suitable for machine learning algorithms.
Why this fits: For machine learning workflows, most algorithms require numerical input. Categorical data (like text labels or distinct categories) must be transformed into a numerical representation. Amazon SageMaker Data Wrangler is purpose-built for this type of data preparation within the SageMaker ecosystem. Its visual flow and extensive library of pre-built ML-specific transformations make it an efficient and appropriate tool for tasks like encoding categorical features into numerical ones, directly addressing a common preprocessing requirement for machine learning models. While AWS Glue can perform general ETL, Data Wrangler is optimized for the specific nuances of ML data preparation, offering a more streamlined and integrated experience for data scientists and ML engineers.
Example: Consider a dataset for a fraud detection model with a feature called ‘TransactionType’ (e.g., ‘Online’, ‘POS’, ‘ATM’). Before feeding this data to a machine learning model, Data Wrangler can be used to apply One-Hot Encoding, converting ‘TransactionType’ into numerical binary features like ‘TransactionType_Online’, ‘TransactionType_POS’, and ‘TransactionType_ATM’.
QUESTION 49
Case Study
An ML engineer is developing a fraud detection model on AWS. The training dataset includes transaction logs, customer profiles, and tables from an on- premises MySQL database. The transaction logs and customer profiles are stored in Amazon S3.
The dataset has a class imbalance that affects the learning of the model’s algorithm. Additionally, many of the features have interdependencies. The algorithm is not capturing all the desired underlying patterns in the data.
Before the ML engineer trains the model, the ML engineer must resolve the issue of the imbalanced data.
Which solution will meet this requirement with the LEAST operational effort?
- A. Use Amazon Athena to identify patterns that contribute to the imbalance. Adjust the dataset accordingly.
- B. Use Amazon SageMaker Studio Classic built-in algorithms to process the imbalanced dataset.
- C. Use AWS Glue DataBrew built-in features to oversample the minority class.
- D. Use the Amazon SageMaker Data Wrangler balance data operation to oversample the minority class.
Click to View Verified Solution & Explanation
Correct Option: D
Description: Amazon SageMaker Data Wrangler is a service that simplifies the process of data aggregation and preparation for machine learning. It provides a visual interface and a wide range of built-in data transformations, including operations specifically designed for feature engineering and handling common machine learning data challenges, such as class imbalance.
Why this fits: Data Wrangler includes a specific "Balance Data" operation among its transformations. This operation allows users to address imbalanced datasets by either oversampling the minority class or undersampling the majority class. Oversampling the minority class is a common technique to mitigate the bias that imbalanced datasets can introduce into machine learning models, ensuring that the model has sufficient examples of the less frequent class to learn from effectively. This makes Data Wrangler the most direct and efficient tool within the AWS ecosystem for this specific task.
Example: An ML engineer is preparing a dataset for a fraud detection model, where fraudulent transactions (minority class) are significantly outnumbered by legitimate transactions (majority class). Using SageMaker Data Wrangler, they can import the dataset, add a "Balance Data" transformation step, select the target column, and configure it to oversample the minority class, creating synthetic samples or duplicating existing ones to achieve a more balanced distribution before training their model.
QUESTION 50
Case Study
An ML engineer is developing a fraud detection model on AWS. The training dataset includes transaction logs, customer profiles, and tables from an on-premises MySQL database. The transaction logs and customer profiles are stored in Amazon S3.
The dataset has a class imbalance that affects the learning of the model’s algorithm. Additionally, many of the features have interdependencies. The algorithm is not capturing all the desired underlying patterns in the data.
The ML engineer needs to use an Amazon SageMaker built-in algorithm to train the model.
Which algorithm should the ML engineer use to meet this requirement?
- A. LightGBM
- B. Linear learner
- C. K-means clustering
- D. Neural Topic Model (NTM)
Click to View Verified Solution & Explanation
Correct Option: B
Description: The Amazon SageMaker Linear Learner is a supervised learning algorithm that can solve both classification and regression problems. It trains linear models using stochastic gradient descent (SGD) and can be configured to use various loss functions and optimizers. It is particularly effective for large datasets due to its scalability and efficiency.
Why this fits: Linear Learner is a highly versatile and general-purpose algorithm. For classification, it can handle binary, multi-class, and multi-label problems, while for regression, it can predict continuous values. Its performance is often competitive with more complex models on tabular data, and it serves as an excellent baseline or first-pass algorithm for many supervised learning tasks, especially when interpretability and training speed are important.
Example: A company wants to predict whether a customer will churn (binary classification) based on their usage patterns and demographics, or predict a customer’s lifetime value (regression) based on historical purchase data. The Linear Learner can be used for both these scenarios.
QUESTION 51 (Multi-Select)
A company wants to improve the sustainability of its ML operations.
Which actions will reduce the energy usage and computational resources that are associated with the company’s training jobs? (Select TWO.)
- A. Use Amazon SageMaker Debugger to stop training jobs when non-converging conditions are detected.
- B. Use Amazon SageMaker Ground Truth for data labeling.
- C. Deploy models by using AWS Lambda functions.
- D. Use AWS Trainium instances for training.
- E. Use PyTorch or TensorFlow with the distributed training option.
Click to View Verified Solution & Explanation
Correct Option: A,D
Description: Amazon SageMaker Debugger is a capability within SageMaker that allows for real-time monitoring of training jobs. It can detect common issues like vanishing/exploding gradients, gradient vanishing, non-converging models, and data drift by analyzing tensors during training.
Why this fits: Detecting and automatically stopping non-converging training jobs directly addresses efficiency and cost optimization by preventing wasted compute resources on ineffective training runs. This is a critical aspect of machine learning engineering.
Example: A data scientist configures SageMaker Debugger with a built-in rule to monitor the LossNotDecreasing condition. If the training loss plateaus for a specified period without significant improvement, SageMaker Debugger automatically stops the job, preventing further resource consumption for a non-converging model.
✅ Use AWS Trainium instances for training.
Description: AWS Trainium is an AWS-designed machine learning accelerator specifically optimized for high-performance deep learning training. Instances powered by Trainium, such as the trn1 family, offer significant improvements in cost-performance for training complex and large-scale deep learning models.
Why this fits: Utilizing specialized hardware like AWS Trainium instances is a direct and highly effective method for accelerating the training process and reducing the cost of training large machine learning models. This is a core aspect of optimizing machine learning workloads, directly relevant to an ML Engineer’s role.
Example: An ML engineer needs to train a large transformer model. By choosing an AWS Trainium-powered instance type (e.g., trn1.32xlarge) for their SageMaker training job, they can complete the training in less time and at a lower cost compared to using general-purpose GPU instances.
QUESTION 52
An ML engineer needs to use data with Amazon SageMaker Canvas to train an ML model. The data is stored in Amazon S3 and is complex in structure. The ML engineer must use a file format that minimizes processing time for the data.
Which file format will meet these requirements?
- A. CSV files compressed with Snappy
- B. JSON objects in JSONL format
- C. JSON files compressed with gzip
- D. Apache Parquet files
Click to View Verified Solution & Explanation
Correct Option: D
Description: Apache Parquet is an open-source, columnar storage file format designed for efficient data storage and retrieval. It is highly optimized for analytical workloads, providing efficient data compression and encoding schemes that improve performance when handling complex data in bulk.
Why this fits: For machine learning datasets, especially large ones often stored in data lakes (like Amazon S3), efficiency in storage, I/O, and query performance is crucial. Parquet’s columnar nature means that when a machine learning model or data processing job only needs a subset of features (columns), it can read only those specific columns from storage. This significantly reduces I/O operations and improves data loading and processing performance, making it ideal for feature engineering, model training, and inferencing on large datasets. It also supports schema evolution and is widely compatible with big data processing frameworks (e.g., Apache Spark) and AWS analytics services (e.g., AWS Glue, Amazon Athena, Amazon EMR, and SageMaker Processing Jobs).
Example: If you have a dataset with hundreds of features stored in Parquet format, and your current SageMaker Processing job only requires 10 specific features for a data transformation task, the processing engine (like Spark) can read only those 10 columns directly from S3, rather than reading all columns and then filtering them. This drastically speeds up data retrieval and reduces the computational resources needed.
QUESTION 53
A company regularly receives new training data from the vendor of an ML model. The vendor delivers cleaned and prepared data to the company’s Amazon S3 bucket every 3—4 days.
The company has an Amazon SageMaker pipeline to retrain the model. An ML engineer needs to implement a solution to run the pipeline when new data is uploaded to the S3 bucket.
Which solution will meet these requirements with the LEAST operational effort?
- A. Create an S3 Lifecycle rule to transfer the data to the SageMaker training instance and to initiate training.
- B. Create an AWS Lambda function that scans the S3 bucket. Program the Lambda function to initiate the pipeline when new data is uploaded.
- C. Create an Amazon EventBridge rule that has an event pattem that matches the S3 upload. Configure the pipeline as the target of the rule.
- D. Use Amazon Managed VVorkflows for Apache Airflow (Amazon MWAA) to orchestrate the pipeline when new data is uploaded.
Click to View Verified Solution & Explanation
Correct Option: C
Description: Amazon EventBridge is a serverless event bus that makes it easier to connect applications together by routing events from various sources (AWS services, custom applications, or SaaS applications) to targets. It allows you to build event-driven architectures by creating rules with specific event patterns to filter and route events.
Why this fits: This is the most idiomatic and efficient serverless solution for this requirement. EventBridge can directly listen for specific S3 events, such as Object Created (All), within a designated bucket or prefix. When an object is uploaded to S3, EventBridge matches this event to its configured rule. The target of this rule can be an AWS Step Functions state machine (which is commonly used to orchestrate ML pipelines), an AWS CodePipeline, or even a SageMaker Pipeline directly. This approach provides a decoupled, scalable, and fully managed way to automatically initiate an ML pipeline as soon as new data arrives in S3, without requiring custom polling logic or Lambda code just for event routing.
Example: A data engineer uploads a new dataset file, new_sales_data.csv, to an S3 bucket named data-ingestion-bucket/raw/. An EventBridge rule is configured to detect detail-type: AWS API Call via CloudTrail and eventSource: s3.amazonaws.com with eventName: PutObject for objects within data-ingestion-bucket/raw/. When new_sales_data.csv is uploaded, EventBridge triggers a pre-configured AWS Step Functions workflow that processes the data, trains a model, and deploys it.
QUESTION 54
A company has a conversational AI assistant that sends requests through Amazon Bedrock to an Anthropic Claude large language model (LLM). Users report that when they ask similar questions multiple times, they sometimes receive different answers. An ML engineer needs to improve the responses to be more consistent and less random.
Which solution will meet these requirements?
- A. Increase the temperature parameter and the top_k
- B. increase the temperature parameter. Decrease the top_k parameter.
- C. Decrease the temperature parameter. Increase the top_k parameter.
- D. Decrease the temperature parameter and the top_k parameter.
Click to View Verified Solution & Explanation
Correct Option: D
Description: In Large Language Models (LLMs) and generative AI,
temperature and top_k are crucial sampling parameters that influence the determinism and diversity of the model’s output.
- Temperature: This parameter controls the randomness of the model’s predictions. A higher temperature (e.g., 1.0) makes the output more creative, diverse, and potentially unexpected, as it assigns more uniform probabilities across possible next tokens. A lower temperature (e.g., 0.1) makes the output more deterministic, focused, and predictable, concentrating probabilities on the most likely next tokens.
- Top_k: This parameter limits the sampling of the next token to the
kmost probable tokens in the vocabulary. Iftop_kis 1, only the single most probable token is chosen. A highertop_kallows for a wider selection of tokens, leading to more varied output. A lowertop_krestricts the selection to only the most probable candidates, resulting in more focused and less diverse text.
Why this fits: When aiming for a more deterministic, precise, and less ‘creative’ or ‘hallucinatory’ output from an LLM, reducing both the temperature and top_k parameters is the appropriate strategy.
- Decreasing temperature makes the model more confident in its highest-probability predictions, reducing the likelihood of it selecting less probable (and potentially less relevant or accurate) tokens. This steers the model towards more conventional and expected responses.
- Decreasing top_k further narrows the pool of potential next tokens to only the most statistically probable ones. By considering fewer high-probability options, the model’s choices become more constrained and predictable, minimizing the introduction of unexpected or irrelevant information.
Combining both actions results in an output that is highly focused, consistent, and adheres closely to the most probable and relevant token sequences, which is often desirable for tasks requiring accuracy and consistency, such as factual question answering, summarization, or code generation.
Example: If an LLM is being used to generate specific SQL queries based on a natural language request, decreasing the temperature and top_k would help ensure the model generates syntactically correct and highly relevant queries by sticking to the most probable and common SQL constructs, rather than exploring creative or less common variations that might introduce errors or incorrect logic.
QUESTION 55 [HOT_AREA]
A company stores historical data in .csv files in Amazon S3. Only some of the rows and columns in the .csv files are populated. The columns are not labeled. An ML engineer needs to prepare and store the data so that the company can use the data to train ML models.
Select and order the correct steps from the following list to perform this task. Each step should be selected one time or not at all. (Select and order three.)
• Create an Amazon SageMaker batch transform job for data cleaning and feature engineering.
• Store the resulting data back in Amazon S3.
• Use Amazon Athena to infer the schemas and available columns.
• Use AWS Glue crawlers to infer the schemas and available columns.
• Use AWS Glue DataBrew for data cleaning and feature engineering.
Click to View Verified Solution & Explanation
✅ Step 1: Use AWS Glue crawlers to infer the schemas and available columns.
Reasoning: AWS Glue crawlers automatically discover and infer metadata (schemas, data types, and available columns) from data stored in various data sources, such as Amazon S3, and register it in the AWS Glue Data Catalog. This is a foundational step in preparing data for analysis and machine learning.
✅ Step 2: Use AWS Glue DataBrew for data cleaning and feature engineering.
Reasoning: AWS Glue DataBrew is a visual data preparation tool that enables data analysts and data scientists to clean, normalize, and transform data without writing code. It provides over 250 built-in functions to facilitate data cleaning and feature engineering tasks, making it efficient for preparing data for machine learning models.
✅ Step 3: Store the resulting data back in Amazon S3.
Reasoning: Amazon S3 provides highly scalable, durable, and secure object storage. After data cleaning and feature engineering, storing the processed data back in S3 is a common practice, allowing it to be easily accessed by other AWS services for model training, inference, or further analysis, serving as a reliable data lake for refined datasets.
QUESTION 56
A company that has hundreds of data scientists is using Amazon SageMaker to create ML models. The models are in model groups in the SageMaker Model Registry.
The data scientists are grouped into three categories: computer vision, natural language processing (NLP)t and speech recognition. An ML engineer needs to implement a solution to organize the existing models into these groups to improve model discoverability at scale. The solution must not affect the integrity of the model artifacts and their existing groupings.
Which solution will meet these requirements?
- A. Create a custom tag for each of the three categories. Add the tags to the model packages in the SageMaker Model Registry.
- B. Create a model group for each category. Move the existing models into these category model groups.
- C. Use SageMaker ML Lineage Tracking to automatically identify and tag which model groups should contain the models.
- D. Create a Model Registry collection for each of the three categories. Move the existing model groups into the collections.
Click to View Verified Solution & Explanation
Correct Option: A
Description: AWS Tags are key-value pairs that you can assign to AWS resources, including Amazon SageMaker model packages. They consist of a case-sensitive key and an optional case-sensitive value. Tags are a flexible way to organize, categorize, manage, and filter your AWS resources based on different criteria like project, owner, environment, or in this case, a specific model category.
Why this fits: SageMaker Model Registry allows you to register model packages, which are deployable units representing a trained model. To categorize these model packages by different types (e.g., "fraud detection", "recommendation engine", "image classification"), using custom tags is the standard and most flexible AWS practice. By assigning a consistent tag (e.g., Category: Fraud Detection) to relevant model packages, you can easily filter, search, and manage your model inventory within the Model Registry based on these categories. This method does not impose structural constraints like model groups, which are primarily designed for managing versions of a single logical model.
Example: If you have model packages for an "Online Fraud Detector", a "Product Recommender", and an "Image Labeler", you would add tags such as Category: Fraud Detection to the fraud model’s packages, Category: Recommendation Engine to the recommender’s packages, and Category: Image Classification to the image model’s packages. You can then use the AWS Management Console, AWS CLI, or SDKs to filter all model packages tagged with Category: Fraud Detection.
QUESTION 57
A company needs to give its ML engineers appropriate access to training data, The ML engineers must access training data from only their own business group. The ML engineers must not be allowed to access training data from other business groups.
The company uses a single AWS account and stores all the training data in Amazon S3 buckets. AJI ML model training occurs in Amazon SageMaker.
Which solution will provide the ML engineers with the appropriate access?
- A. Enable S3 bucket versioning.
- B. Configure S3 Object Lock settings for each user.
- C. Add cross-origin resource sharing (CORS) policies to the S3 buckets.
- D. Create IAM policies. Attach the policies to IAM users or IAM roles.
Click to View Verified Solution & Explanation
Correct Option: D
Description: AWS Identity and Access Management (IAM) is a web service that helps you securely control access to AWS resources. IAM policies are JSON documents that define permissions. These permissions specify what actions are allowed or denied, on which AWS resources, and under what conditions. IAM users are individual identities for people or applications, while IAM roles are temporary identities that can be assumed by trusted entities, such as AWS services (e.g., Amazon SageMaker, EC2 instances) or federated users.
Why this fits: To manage access to S3 buckets, especially for machine learning workloads that often involve sensitive data, IAM policies provide the most robust and granular control. By creating specific IAM policies, you can define precise permissions (e.g., read-only, write, list) for particular S3 buckets, objects, or prefixes. Attaching these policies to IAM users grants humans direct access, while attaching them to IAM roles allows AWS services or applications to securely access S3 resources without storing long-term credentials. This approach directly addresses access control by defining who can do what with your S3 data, adhering to the principle of least privilege. The other options (A, B, C) relate to specific S3 features (versioning, object lock for data protection, and CORS for browser security) but do not primarily define user or service-level access permissions.
Example: For a SageMaker notebook instance, an IAM role would be created with a policy allowing
s3:GetObject on the S3 bucket containing training data and s3:PutObject on an S3 bucket designated for model artifacts. This IAM role would then be assigned to the SageMaker notebook instance, granting it the necessary permissions to read data and save outputs without giving it broader, unnecessary access to other AWS resources or S3 buckets.
QUESTION 58
A company is planning to use Amazon SageMaker to make classification ratings that are based on images. The company has 6 TB of training data that is stored on an Amazon FSx for NetApp ONTAP system viftual machine (SVM). The SVM is in the same VPC as SageMaker.
An ML engineer must make the training data accessible for ML models that are in the SageMaker environment.
Which solution will meet these requirements?
- A. Mount the FSx for ONTAP file system as a volume to the SageMaker instance.
- B. Create an Amazon S3 bucket. Use Mountpoint for Amazon S3 to link the S3 bucket to the FSx for ONTAP file system.
- C. Create a catalog connection from SageMaker Data Wrangler to the FSx for ONTAP file system.
- D. Create a direct connection from SageMaker Data Wrangler to the FSx for ONTAP file system.
Click to View Verified Solution & Explanation
Correct Option: A
Description: Amazon FSx for ONTAP provides fully managed shared storage that is accessible via industry-standard protocols like NFS, SMB, and iSCSI. To make data stored on an FSx for ONTAP file system directly available to an Amazon SageMaker instance (e.g., a SageMaker Studio notebook or a SageMaker training job), the file system can be mounted as a network file system (NFS) volume. This integrates the file system into the instance’s local directory structure, allowing SageMaker to read and write data as if it were local storage.
Why this fits: This approach directly addresses the need for SageMaker to access data from FSx for ONTAP. By mounting the file system as a volume, SageMaker instances can interact with the data using standard file system operations, which is efficient and straightforward for data processing, model training, and inference. This eliminates the need for intermediate data transfers or complex integration layers, providing high-performance, shared storage directly to the compute environment.
Example: A data scientist is developing a machine learning model in SageMaker Studio. Their training dataset is stored on an FSx for ONTAP file system. They would configure their SageMaker Studio domain or specific instance to mount the FSx for ONTAP file system. Once mounted, they can access the dataset directly via its mount path within their Studio notebooks, e.g., /mnt/fsx_ontap/data/training_set.csv, for feature engineering and model training.
QUESTION 59
An ML engineer normalized training data by using min-max normalization in AWS Glue DataBrew. The ML engineer must normalize the production inference data in the same way as the training data before passing the production inference data to the model for predictions.
Which solution will meet this requirement?
- A. Apply statistics from a well-known dataset to normalize the production samples.
- B. Keep the min-max normalization statistics from the training set. Use these values to normalize the production samples.
- C. Calculate a new set of min-max normalization statistics from a batch of production samples. Use these values to normalize all the production samples.
- D. Calculate a new set of min-max normalization statistics from each production sample. Use these values to normalize all the production samples.
Click to View Verified Solution & Explanation
Correct Option: B
Description: Min-max normalization (or scaling) transforms features to a specific range, typically [0, 1]. This transformation involves identifying the minimum and maximum values of a feature within a given dataset. Once a machine learning model is trained, these specific minimum and maximum values used during the training phase become parameters of the pre-processing step.
Why this fits: In machine learning, it is crucial to apply the exact same pre-processing steps and parameters to new, unseen data (production samples) as were applied to the training data. If you calculate new normalization statistics from production data, the distribution of the normalized features presented to the model will likely differ from the distribution the model learned during training. This inconsistency, known as "data drift" or "distribution shift" in the input features, can severely degrade the model’s performance and accuracy in production. By reusing the statistics (min and max values) from the training set, you ensure that the production data is transformed consistently with how the model was trained, maintaining the integrity of the learned relationships.
Example: Suppose during training, a ‘customer_age’ feature had a minimum of 18 and a maximum of 90. The model was trained on these normalized values. In production, if a new customer with age 45 comes in, you would use (45 – 18) / (90 – 18) to normalize their age, not calculate new min/max values from the current batch of production data. This ensures the model interprets the normalized age 45 consistently with its training.
QUESTION 60
A company is planning to use Amazon Redshift ML in its primary AWS account. The source data is in an Amazon S3 bucket in a secondary account.
An ML engineer needs to set up an ML pipeline in the primary account to access the S3 bucket in the secondary account. The solution must not require public IPv4 addresses.
Which solution will meet these requirements?
- A. Provision a Redshift cluster and Amazon SageMaker Studio in a VPC with no public access enabled in the primary account. Create a VPC peering connection between the accounts. Update the VPC route tables to remove the route to 0.0.0.0/0.
- B. Provision a Redshift cluster and Amazon SageMaker Studio in a VPC with no public access enabled in the primary account. Create an AWS Direct Connect connection and a transit gateway. Associate the VPCs from both accounts with the transit gateway, Update the VPC route tablesto remove the route to 0.0.0.0/0.
- C. Provision a Redshift cluster and Amazon SageMaker Studio in a VPC in the primary account. Create an AIMS Site-to-Site VPN connection with two encrypted IPsec tunnels between the accounts. Set up interface VPC endpoints for Amazon S3.
- D. Provision a Redshift cluster and Amazon SageMaker Studio in a VPC in the primary account. Create an S3 gateway endpoint. Update the S3 bucket policy to allow IAM principals from the primary account. Set up interface VPC endpoints for SageMaker and Amazon Redshift.
Click to View Verified Solution & Explanation
Correct Option: D
Description: This choice outlines the correct and secure method for provisioning AWS services like Amazon Redshift and Amazon SageMaker Studio within a Virtual Private Cloud (VPC) and ensuring private access to other AWS services, specifically Amazon S3, SageMaker APIs, and Redshift APIs, without traversing the public internet.
Why this fits:
- VPC Deployment: Deploying Redshift and SageMaker Studio within a VPC is a fundamental security best practice, isolating these resources from the public internet.
- S3 Gateway Endpoint: For Amazon S3, a gateway VPC endpoint is the standard, cost-effective, and secure way to allow instances in a VPC to access S3 buckets without needing an internet gateway or a NAT device. It provides a direct route to S3 from within the AWS network.
- S3 Bucket Policy: Even with a VPC endpoint, S3 bucket policies are crucial for controlling access at the bucket level. Updating the policy to specifically allow IAM principals from the primary account ensures that only authorized entities can access the data, adhering to the principle of least privilege.
- Interface VPC Endpoints (PrivateLink): For most other AWS services, including Amazon SageMaker (for API calls and other control plane operations) and Amazon Redshift (for cluster management and API calls), interface VPC endpoints (powered by AWS PrivateLink) are used. These create private IP addresses within your VPC, allowing secure and private communication with the service endpoints without leaving the Amazon network. This ensures all communication for data processing and model training remains highly secure and private.
Example: An AWS Certified Machine Learning Engineer associate needs to ensure that a SageMaker Studio environment and a Redshift data warehouse, both running in a private VPC, can securely access data in S3 for training and analytics. By configuring an S3 gateway endpoint and specific interface endpoints for SageMaker and Redshift, all data ingress and egress to these services remain within the AWS private network, fulfilling compliance and security requirements for sensitive data.
QUESTION 61
An ML engineer needs to create data ingestion pipelines and ML model deployment pipelines on AWS. All the raw data is stored in Amazon S3 buckets.
Which solution will meet these requirements?
- A. Use Amazon Data Firehose to create the data ingestion pipelines. Use Amazon SageMaker Studio Classic to create the model deployment pipelines.
- B. Use AWS Glue to create the data ingestion pipelines. Use Amazon SageMaker Studio Classic to create the model deployment pipelines.
- C. Use Amazon Redshift ML to create the data ingestion pipelines. Use Amazon SageMaker Studio Classic to create the model deployment pipelines.
- D. Use Amazon Athena to create the data ingestion pipelines. Use an Amazon SageMaker notebook to create the model deployment pipelines.
Click to View Verified Solution & Explanation
Correct Option: B
Description: AWS Glue is a fully managed, serverless extract, transform, and load (ETL) service that makes it easy to prepare and load your data for analytics and machine learning. It supports various data sources and transformations, making it ideal for robust data ingestion pipelines. Amazon SageMaker Studio Classic is a web-based integrated development environment (IDE) for machine learning, providing comprehensive tools for every step of the ML workflow, including orchestrating and managing model deployment pipelines.
Why this fits: AWS Glue is an excellent choice for creating data ingestion pipelines due to its ability to connect to diverse data sources, perform complex data transformations (ETL), and catalog data for subsequent use by machine learning services. It provides a scalable and serverless environment for data preparation. Amazon SageMaker Studio Classic offers a unified interface for the entire ML lifecycle, encompassing data preparation, model building, training, and crucially, deployment. It facilitates the creation of automated model deployment pipelines using features like SageMaker Pipelines, MLOps templates, and programmatic access to SageMaker’s deployment capabilities, ensuring reproducibility and efficient model management.
Example: An e-commerce company wants to predict customer churn. They use AWS Glue to build a data ingestion pipeline that extracts customer transaction data from a relational database, website clickstream data from S3, and loyalty program data from a data warehouse. Glue transforms and cleans this data, then stores it in a curated S3 bucket. A data scientist then uses Amazon SageMaker Studio Classic to develop, train, and deploy a churn prediction model. Within Studio Classic, they orchestrate a model deployment pipeline that automatically registers new model versions, tests them, and deploys the best-performing model to an inference endpoint whenever the model is retrained with fresh data.
QUESTION 62
An ML engineer has an Amazon Comprehend custom model in Account A in the us-east-I Region. The ML engineer needs to copy the model to Account B in the same Region.
Which solution will meet this requirement with the LEAST development effort?
- A. Use Amazon S3 to make a copy of the model. Transfer the copy to Account
- C. Use AVIS DataSync to replicate the model from Account A to Account
- D. Create an AIMS Site-to-Site VPN connection between Account A and Account B to transfer the model.
Click to View Verified Solution & Explanation
Correct Option: B
Description: An Amazon SageMaker Model resource encapsulates the definition of a machine learning model, including references to its stored artifacts (e.g., trained weights, inference code) in Amazon S3 and the Docker image used for inference. To "transfer" a model between AWS accounts in a managed service context like SageMaker typically means ensuring the underlying model artifacts are accessible to the target account and then establishing a new SageMaker Model resource in the target account that points to these artifacts.
Why this fits: This method is a robust and efficient way to share or replicate an AWS Machine Learning model (specifically, an Amazon SageMaker Model) between accounts. By leveraging Amazon S3’s cross-account access capabilities (e.g., S3 bucket policies or IAM roles), Account B can securely access the model artifacts stored in Account A’s S3 bucket without needing to duplicate the potentially large dataset. Account B then creates its own SageMaker Model resource, pointing to the original S3 artifacts. This approach maintains a single source of truth for the model artifacts while allowing independent deployment and management of the SageMaker Model resource in the destination account. Options A, C, and D are less suitable as they either focus solely on raw data transfer (A, C, which doesn’t fully represent a SageMaker "model" resource), or provide a network-level solution that doesn’t directly facilitate service-level resource replication (D).
Example: An MLOps team in Account A has developed and stored a fraud detection model’s artifacts (model.tar.gz) in an S3 bucket named s3://account-a-ml-models. To allow a separate business unit in Account B to deploy this model for inferencing, Account A configures a bucket policy on s3://account-a-ml-models to grant s3:GetObject permissions to an IAM role in Account B. A data scientist in Account B can then create a new SageMaker Model resource, specifying the container image for inference and providing the S3 URI (s3://account-a-ml-models/fraud-detection/model.tar.gz). The execution role attached to this new SageMaker Model in Account B must have the necessary permissions to access s3://account-a-ml-models.
QUESTION 63
A company uses Amazon SageMaker Studio to develop an ML model. The company has a single SageMaker Studio domain. An ML engineer needs to implement a solution that provides an automated alert when SageMaker compute costs reach a specific threshold.
Which solution will meet these requirements?
- A. Add resource tagging by editing the SageMaker user profile in the SageMaker domain. Configure AWS Cost Explorer to send an alert when the threshold is reached.
- B. Add resource tagging by editing the SageMaker user profile in the SageMaker domain. Configure AWS Budgets to send an alert when the threshold is reached.
- C. Add resource tagging by editing each user's LAM profile. Configure AWS Cost Explorer to send an alert when the threshold is reached.
- D. Add resource tagging by editing each user's IAM profile. Configure AWS Budgets to send an alert when the threshold is reached.
Click to View Verified Solution & Explanation
Correct Option: B
Description: AWS SageMaker Domains provide a centralized management interface for SageMaker users and resources. Within a SageMaker Domain, each user has a "user profile." These user profiles can be tagged with AWS resource tags. When a user launches resources (e.g., SageMaker Studio applications, notebooks, training jobs, endpoints) through their user profile, these tags are automatically propagated to the created resources. AWS Budgets is a service that allows organizations to set custom cost and usage budgets and receive alerts when actual or forecasted costs exceed a defined threshold. Budgets can be configured to monitor costs based on specific AWS tags.
Why this fits: This choice correctly identifies the most effective and granular method for attributing costs to individual users or teams within Amazon SageMaker Studio: by tagging the SageMaker user profile. These tags then apply to the resources provisioned by that user. Furthermore, AWS Budgets is the dedicated service for setting up proactive cost alerts based on these tags, enabling organizations to monitor and control spending effectively. AWS Cost Explorer is primarily an anlaysis tool, while AWS Budgets is designed for proactive notifications. Tagging the SageMaker user profile ensures that all related SageMaker resources launched by that user are consistently tagged for cost allocation.
Example: An MLOps team manages a SageMaker domain for data scientists. To track spending by individual data scientists, an administrator tags each data scientist’s SageMaker user profile (e.g., Owner: alice.smith, Project: marketing_campaign). An AWS Budget is then configured to monitor costs for resources tagged Owner: alice.smith and sends an email alert to her manager if her monthly SageMaker usage exceeds $500. This setup allows the organization to attribute and manage costs directly to Alice’s work within SageMaker.
Need the Full Exam Simulator?
Practice the complete question bank in a realistic, timed environment with advanced tracking.
