📘 Free MLA-C02 Sample Questions
Case Study
A company is building a web-based AI application by using Amazon SageMaker. The application will
provide the following capabilities and features: ML experimentation, training, a central model registry,
model deployment, and model monitoring.
The application must ensure secure and isolated use of training data during the ML lifecycle. The training
data is stored in Amazon S3.
The company needs to use the central model registry to manage different versions of models in the
application.
Which action will meet this requirement with the LEAST operational overhead?
A
Create a separate Amazon Elastic Container Registry (Amazon ECR) repository for each model.
B
Use Amazon Elastic Container Registry (Amazon ECR) and unique tags for each model version.
C
Use the SageMaker Model Registry and model groups to catalog the models.
D
Use the SageMaker Model Registry and unique tags for each model version.
Correct Answer:
C. Use the SageMaker Model Registry and model groups to catalog the models.
Explanation:
Amazon SageMaker Model Registry is a feature designed to manage machine learning (ML) models
throughout their lifecycle. It allows users to catalog, version, and deploy models systematically, ensuring
efficient model governance and management.
Key Features of SageMaker Model Registry:
Centralized Cataloging: Organizes models into Model Groups, each containing multiple versions.
Version Control: Maintains a history of model iterations, making it easier to track changes.
Metadata Association: Attach metadata such as training metrics and performance evaluations to models.
Approval Status Management: Allows setting statuses like PendingManualApproval or Approved to
ensure only vetted models are deployed.
Seamless Deployment: Direct integration with SageMaker deployment capabilities for real-time inference
or batch processing.
Implementation Steps:
Create a Model Group: Organize related models into groups to simplify management and versioning.
Register Model Versions: Each model iteration is registered as a version within a specific Model Group.
Set Approval Status: Assign approval statuses to models before deploying them to ensure quality control.
Deploy the Model: Use SageMaker endpoints for deployment once the model is approved.
Benefits:
Centralized Management: Provides a unified platform to manage models efficiently.
Streamlined Deployment: Facilitates smooth transitions from development to production.
Governance and Compliance: Supports metadata association and approval processes.
By leveraging the SageMaker Model Registry, the company can ensure organized management of
models, version control, and efficient deployment workflows with minimal operational overhead.
AWS Documentation: SageMaker Model Registry
AWS Blog: Model Registry Features and Usage
Case Study
A company is building a web-based AI application by using Amazon SageMaker. The application will
provide the following capabilities and features: ML experimentation, training, a central model registry,
model deployment, and model monitoring.
The application must ensure secure and isolated use of training data during the ML lifecycle. The training
data is stored in Amazon S3.
The company is experimenting with consecutive training jobs.
How can the company MINIMIZE infrastructure startup times for these jobs?
A
Use Managed Spot Training.
B
Use SageMaker managed warm pools.
C
Use SageMaker Training Compiler
D
Use the SageMaker distributed data parallelism (SMDDP) library.
Correct Answer:
B. Use SageMaker managed warm pools.
Explanation:
When running consecutive training jobs in Amazon SageMaker, infrastructure provisioning can introduce
latency, as each job typically requires the allocation and setup of compute resources. To minimize this
startup time and enhance efficiency, Amazon SageMaker offers Managed Warm Pools.
Key Features of Managed Warm Pools:
Reduced Latency: Reusing existing infrastructure significantly reduces startup time for training jobs.
Configurable Retention Period: Allows retention of resources after training jobs complete, defined by the
KeepAlivePeriodInSeconds parameter.
Automatic Matching: Subsequent jobs with matching configurations (e.g., instance type) can reuse
retained infrastructure.
Implementation Steps:
Request Warm Pool Quota Increase: Increase the default resource quota for warm pools through AWS
Service Quotas.
Configure Training Jobs:
Set KeepAlivePeriodInSeconds for the first training job to retain resources.
Ensure subsequent jobs match the retained pool's configuration to enable reuse.
Monitor Warm Pool Usage: Track warm pool status through the SageMaker console or API to confirm
resource reuse.
Considerations:
Billing: Resources in warm pools are billable during the retention period.
Matching Requirements: Jobs must have consistent configurations to use warm pools effectively.
Alternative Options:
Managed Spot Training: Reduces costs by using spare capacity but doesn’t address startup latency.
SageMaker Training Compiler: Optimizes training time but not infrastructure setup.
SageMaker Distributed Data Parallelism Library: Enhances training efficiency but doesn’t reduce setup
time.
By using Managed Warm Pools, the company can significantly reduce startup latency for consecutive
training jobs, ensuring faster experimentation cycles with minimal operational overhead.
AWS Documentation: Managed Warm Pools
AWS Blog: Reduce ML Model Training Job Startup Time
Case Study
A company is building a web-based AI application by using Amazon SageMaker. The application will
provide the following capabilities and features: ML experimentation, training, a central model registry,
model deployment, and model monitoring.
The application must ensure secure and isolated use of training data during the ML lifecycle. The training
data is stored in Amazon S3.
The company must implement a manual approval-based workflow to ensure that only approved models
can be deployed to production endpoints.
Which solution will meet this requirement?
A
Use SageMaker Experiments to facilitate the approval process during model registration.
B
Use SageMaker ML Lineage Tracking on the central model registry. Create tracking entities for the
approval process.
C
Use SageMaker Model Monitor to evaluate the performance of the model and to manage the
approval.
D
Use SageMaker Pipelines. When a model version is registered, use the AWS SDK to change the
approval status to "Approved."
Correct Answer:
D. Use SageMaker Pipelines. When a model version is registered, use the AWS SDK to change the
approval status to "Approved."
Explanation:
To implement a manual approval-based workflow ensuring that only approved models are deployed to
production endpoints, Amazon SageMaker provides integrated tools such as SageMaker Pipelines and
the SageMaker Model Registry.
SageMaker Pipelines is a robust service for building, automating, and managing end-to-end machine
learning workflows. It facilitates the orchestration of various steps in the ML lifecycle, including data
preprocessing, model training, evaluation, and deployment. By integrating with the SageMaker Model
Registry, it enables seamless tracking and management of model versions and their approval statuses.
Implementation Steps:
Define the Pipeline:
Create a SageMaker Pipeline encompassing steps for data preprocessing, model training, evaluation,
and registration of the model in the Model Registry.
Incorporate a Condition Step to assess model performance metrics. If the model meets predefined
criteria, proceed to the next step; otherwise, halt the process.
Register the Model:
Utilize the RegisterModel step to add the trained model to the Model Registry.
Set the ModelApprovalStatus parameter to PendingManualApproval during registration. This status
indicates that the model awaits manual review before deployment.
Manual Approval Process:
Notify the designated approver upon model registration. This can be achieved by integrating Amazon
EventBridge to monitor registration events and trigger notifications via AWS Lambda functions.
The approver reviews the model's performance and, if satisfactory, updates the model's status to
Approved using the AWS SDK or through the SageMaker Studio interface.
Deploy the Approved Model:
Configure the pipeline to automatically deploy models with an Approved status to the production
endpoint. This can be managed by adding deployment steps conditioned on the model's approval status.
Advantages of This Approach:
Automated Workflow: SageMaker Pipelines streamline the ML workflow, reducing manual interventions
and potential errors.
Governance and Compliance: The manual approval step ensures that only thoroughly evaluated models
are deployed, aligning with organizational standards.
Scalability: The solution supports complex ML workflows, making it adaptable to various project
requirements.
By implementing this solution, the company can establish a controlled and efficient process for deploying
models, ensuring that only approved versions reach production environments.
Reference: Automate the machine learning model approval process with Amazon SageMaker Model
Registry and Amazon SageMaker Pipelines
Update the Approval Status of a Model - Amazon SageMaker
Case Study
A company is building a web-based AI application by using Amazon SageMaker. The application will
provide the following capabilities and features: ML experimentation, training, a central model registry,
model deployment, and model monitoring.
The application must ensure secure and isolated use of training data during the ML lifecycle. The training
data is stored in Amazon S3.
The company needs to run an on-demand workflow to monitor bias drift for models that are deployed to
real-time endpoints from the application.
Which action will meet this requirement?
A
Configure the application to invoke an AWS Lambda function that runs a SageMaker Clarify job.
B
Invoke an AWS Lambda function to pull the sagemaker-model-monitor-analyzer built-in SageMaker
image.
C
Use AWS Glue Data Quality to monitor bias.
D
Use SageMaker notebooks to compare the bias.
Correct Answer:
A. Configure the application to invoke an AWS Lambda function that runs a SageMaker Clarify job.
Explanation:
Monitoring bias drift in deployed machine learning models is crucial to ensure fairness and accuracy over
time. Amazon SageMaker Clarify provides tools to detect bias in ML models, both during training and
after deployment. To monitor bias drift for models deployed to real-time endpoints, an effective approach
involves orchestrating SageMaker Clarify jobs using AWS Lambda functions.
Implementation Steps:
Set Up Data Capture:
Enable data capture on the SageMaker endpoint to record input data and model predictions. This
captured data serves as the basis for bias analysis.
Develop a Lambda Function:
Create an AWS Lambda function configured to initiate a SageMaker Clarify job. This function will process
the captured data to assess bias metrics.
Schedule or Trigger the Lambda Function:
Configure the Lambda function to run on-demand or at scheduled intervals using Amazon CloudWatch
Events or EventBridge. This setup allows for regular bias monitoring as per the application's
requirements.
Analyze and Respond to Results:
After each Clarify job completes, review the generated bias reports. If bias drift is detected, take
appropriate actions, such as retraining the model or adjusting data preprocessing steps.
Advantages of This Approach:
Automation: Utilizing AWS Lambda for orchestrating Clarify jobs enables automated and scalable bias
monitoring without manual intervention.
Cost-Effectiveness: AWS Lambda's serverless nature ensures that you only pay for the compute time
consumed during the execution of the function, optimizing resource usage.
Flexibility: The solution can be tailored to specific monitoring needs, allowing for adjustments in
monitoring frequency and analysis parameters.
By implementing this solution, the company can effectively monitor bias drift in real-time, ensuring
that the AI application maintains fairness and accuracy throughout its lifecycle.
Reference: Bias drift for models in production - Amazon SageMaker Schedule Bias Drift Monitoring Jobs - Amazon SageMaker
HOTSPOT
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.
A
Correct Answer:
A.
Explanation:
Step 1: Use AWS Glue crawlers to infer the schemas and available columns.
Step 2: Use AWS Glue DataBrew for data cleaning and feature engineering.
Step 3: Store the resulting data back in Amazon S3.
Step 1: Use AWS Glue Crawlers to Infer Schemas and Available Columns
Why? The data is stored in .csv files with unlabeled columns, and Glue Crawlers can scan the raw data
in Amazon S3 to automatically infer the schema, including available columns, data types, and any
missing or incomplete entries.
How? Configure AWS Glue Crawlers to point to the S3 bucket containing the .csv files, and run the
crawler to extract metadata. The crawler creates a schema in the AWS Glue Data Catalog, which can
then be used for subsequent transformations.
Step 2: Use AWS Glue DataBrew for Data Cleaning and Feature Engineering
Why? Glue DataBrew is a visual data preparation tool that allows for comprehensive cleaning and
transformation of data. It supports imputation of missing values, renaming columns, feature
engineering, and more without requiring extensive coding.
How? Use Glue DataBrew to connect to the inferred schema from Step 1 and perform data cleaning and
feature engineering tasks like filling in missing rows/columns, renaming unlabeled columns, and creating
derived features.
Step 3: Store the Resulting Data Back in Amazon S3
Why? After cleaning and preparing the data, it needs to be saved back to Amazon S3 so that it can be
used for training machine learning models.
How? Configure Glue DataBrew to export the cleaned data to a specific S3 bucket location. This ensures
the processed data is readily accessible for ML workflows.
Order Summary:
Use AWS Glue crawlers to infer schemas and available columns.
Use AWS Glue DataBrew for data cleaning and feature engineering.
Store the resulting data back in Amazon S3.
This workflow ensures that the data is prepared efficiently for ML model training while leveraging AWS
services for automation and scalability.
HOTSPOT
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.
A
Correct Answer:
A.
Explanation:
Step 1: Create a feature group.
Step 2: Ingest the records.
Step 3: Access the store to build datasets for training.
Step 1: Create a Feature Group
Why? A feature group is the foundational unit in SageMaker Feature Store, where features are defined,
stored, and organized. Creating a feature group specifies the schema (name, data type) for the features
and the primary keys for data identification.
How? Use the SageMaker Python SDK or AWS CLI to define the feature group by specifying its name,
schema, and S3 storage location for offline access.
Step 2: Ingest the Records
Why? After creating the feature group, the raw data must be ingested into the Feature Store. This step
populates the feature group with data, making it available for both real-time and offline use.
How? Use the SageMaker SDK or AWS CLI to batch-ingest historical data or stream new records into
the feature group. Ensure the records conform to the feature group schema.
Step 3: Access the Store to Build Datasets for Training
Why? Once the features are stored, they can be accessed to create training datasets. These datasets
combine relevant features into a single format for machine learning model training.
How? Use the SageMaker Python SDK to query the offline store or retrieve real-time features using the
online store API. The offline store is typically used for batch training, while the online store is used for
inference.
Order Summary:
Create a feature group.
Ingest the records.
Access the store to build datasets for training.
This process ensures the features are properly managed, ingested, and accessible for model training
using Amazon SageMaker Feature Store.
HOTSPOT
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.)
• An S3 event notification invokes the pipeline when new data is uploaded.
• S3 Lifecycle rule invokes the pipeline when new data is uploaded.
• SageMaker retrains the model by using the data in the S3 bucket.
• The pipeline deploys the model to a SageMaker endpoint.
• The pipeline deploys the model to SageMaker Model Registry.
A
Correct Answer:
A.
Explanation:
Step 1: An S3 event notification invokes the pipeline when new data is uploaded.
Step 2: SageMaker retrains the model by using the data in the S3 bucket.
Step 3: The pipeline deploys the model to a SageMaker endpoint.
Step 1: An S3 Event Notification Invokes the Pipeline When New Data is Uploaded
Why? The CI/CD pipeline should be triggered automatically whenever new training data is uploaded to
Amazon S3. S3 event notifications can be configured to send events to AWS services like Lambda,
which can then invoke AWS CodePipeline.
How? Configure the S3 bucket to send event notifications (e.g., s3:ObjectCreated:*) to AWS Lambda,
which in turn triggers the CodePipeline.
Step 2: SageMaker Retrains the Model by Using the Data in the S3 Bucket
Why? The uploaded data is used to retrain the ML model to incorporate new information and maintain
performance. This step is critical to updating the model with fresh data.
How? Define a SageMaker training step in the CI/CD pipeline, which reads the training data from the S3
bucket and retrains the model.
Step 3: The Pipeline Deploys the Model to a SageMaker Endpoint
Why? Once retrained, the updated model must be deployed to a SageMaker endpoint to make it
available for real-time inference.
How? Add a deployment step in the CI/CD pipeline, which automates the creation or update of the
SageMaker endpoint with the retrained model.
Order Summary:
An S3 event notification invokes the pipeline when new data is uploaded.
SageMaker retrains the model by using the data in the S3 bucket.
The pipeline deploys the model to a SageMaker endpoint.
This configuration ensures an automated, efficient, and scalable CI/CD pipeline for continuous retraining
and deployment of the ML model in Amazon SageMaker.
8. HOTSPOT
An ML engineer is building a generative Al application on Amazon Bedrock by using large language
models (LLMs).
Select the correct generative Al 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
A
Correct Answer:
A.
Explanation:
Text representation of basic units of data processed by LLMs: Token
High-dimensional vectors that contain the semantic meaning of text: Embedding
Enrichment of information from additional data sources to improve a generated response: Retrieval
Augmented Generation (RAG)
Comprehensive Detailed Explanation
Token:
Description: A token represents the smallest unit of text (e.g., a word or part of a word) that an LLM
processes.
For example, "running" might be split into two tokens: "run" and "ing."
Why? Tokens are the fundamental building blocks for LLM input and output processing, ensuring that the
model can understand and generate text efficiently.
Embedding:
Description: High-dimensional vectors that encode the semantic meaning of text. These vectors are
representations of words, sentences, or even paragraphs in a way that reflects their relationships and
meaning.
Why? Embeddings are essential for enabling similarity search, clustering, or any task requiring semantic
understanding. They allow the model to "understand" text contextually.
Retrieval Augmented Generation (RAG):
Description: A technique where information is enriched or retrieved from external data sources (e.g.,
knowledge bases or document stores) to improve the accuracy and relevance of a model's generated
responses.
Why? RAG enhances the generative capabilities of LLMs by grounding their responses in factual and
up-to-date information, reducing hallucinations in generated text.
By matching these terms to their respective descriptions, the ML engineer can effectively leverage these
concepts to build robust and contextually aware generative AI applications on Amazon Bedrock.
HOTSPOT
An ML engineer is working on an ML model to predict the prices of similarly sized homes. The model will
base predictions on several features.
The ML engineer will use the following feature engineering techniques to estimate the prices of the
homes:
• Feature splitting
• Logarithmic transformation
• One-hot encoding
• Standardized distribution
Select the correct feature engineering techniques for the following list of features. Each feature
engineering technique should be selected one time or not at all (Select three.)
A
Correct Answer:
A.
Explanation:
City (name): One-hot encoding
Type_year (type of home and year the home was built): Feature splitting
Size of the building (square feet or square meters): Standardized distribution
City (name): One-hot encoding
Why? The "City" is a categorical feature (non-numeric), so one-hot encoding is used to transform it into a
numeric format. This encoding creates binary columns for each unique category (e.g., cities like "New
York" or "Los Angeles"), which the model can interpret.
Type_year (type of home and year the home was built): Feature splitting
Why? "Type_year" combines two pieces of information into one column, which could confuse the model.
Feature splitting separates this column into two distinct features: "Type of home" and "Year built,"
enabling the model to process each feature independently.
Size of the building (square feet or square meters): Standardized distribution
Why? Size is a continuous numerical variable, and standardization (scaling the feature to have a mean
of 0 and a standard deviation of 1) ensures that the model treats it fairly compared to other features,
avoiding bias from differences in feature scale.
By applying these feature engineering techniques, the ML engineer can ensure that the input data is
correctly formatted and optimized for the model to make accurate predictions.
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.
Which AWS service or feature can aggregate the data from the various data sources?
A
Amazon EMR Spark jobs
B
Amazon Kinesis Data Streams
C
Amazon DynamoDB
D
AWS Lake Formation
Correct Answer:
A. Amazon EMR Spark jobs
Explanation:
Problem Description:
The dataset includes multiple data sources:
Transaction logs and customer profiles in Amazon S3.
Tables in an on-premises MySQL database.
There is a class imbalance in the dataset and interdependencies among features that need to be
addressed.
The solution requires data aggregation from diverse sources for centralized processing.
Why AWS Lake Formation?
AWS Lake Formation is designed to simplify the process of aggregating, cataloging, and securing data
from various sources, including S3, relational databases, and other on-premises systems.
It integrates with AWS Glue for data ingestion and ETL (Extract, Transform, Load) workflows, making it a
robust choice for aggregating data from Amazon S3 and on-premises MySQL databases.
How It Solves the Problem:
Data Aggregation: Lake Formation collects data from diverse sources, such as S3 and MySQL, and
consolidates it into a centralized data lake.
Cataloging and Discovery: Automatically crawls and catalogs the data into a searchable catalog, which
the ML engineer can query for analysis or modeling.
Data Transformation: Prepares data using Glue jobs to handle preprocessing tasks such as addressing
class imbalance (e.g., oversampling, undersampling) and handling interdependencies among features.
Security and Governance: Offers fine-grained access control, ensuring secure and compliant data
management.
Steps to Implement Using AWS Lake Formation:
Step 1: Set up Lake Formation and register data sources, including the S3 bucket and on-premises
MySQL database.
Step 2: Use AWS Glue to create ETL jobs to transform and prepare data for the ML pipeline.
Step 3: Query and access the consolidated data lake using services such as Athena or SageMaker for
further ML processing.
Why Not Other Options?
Amazon EMR Spark jobs: While EMR can process large-scale data, it is better suited for complex big
data analytics tasks and does not inherently support data aggregation across sources like Lake
Formation.
Amazon Kinesis Data Streams: Kinesis is designed for real-time streaming data, not batch data
aggregation across diverse sources.
Amazon DynamoDB: DynamoDB is a NoSQL database and is not suitable for aggregating data from
multiple sources like S3 and MySQL.
Conclusion: AWS Lake Formation is the most suitable service for aggregating data from S3 and on
premises MySQL databases, preparing the data for downstream ML tasks, and addressing challenges
like class imbalance and feature interdependencies.
AWS Lake Formation Documentation
AWS Glue for Data Preparation
Questions: 1-10 out of 357
Continue Full Practice..
GET ALL 357 QUESTIONS