MLA-C01 sample exam questions

15 exam-style questions for AWS MLA-C01: Machine Learning Engineer Associate, with answers and explanations. Take them as a timed practice exam first if you want a score out of 1000.

  1. Question 1HotspotData Preparation for Machine Learning
    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.)
    City (name)Feature splitting / Logarithmic transformation / One-hot encoding / Standardized distribution
    Type_year (type of home and year the home was built)Feature splitting / Logarithmic transformation / One-hot encoding / Standardized distribution
    Size of the building (square feet or square meters)Feature splitting / Logarithmic transformation / One-hot encoding / Standardized distribution
    Show answer
    • 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) Logarithmic transformation
    Why

    City is a category, so it needs one-hot encoding. Type_year holds two values, so feature splitting separates them. Building size is a numeric value that often has a skewed distribution, and a logarithmic transformation reduces that skew.

  2. Question 2Single choiceML Solution Monitoring, Maintenance, and Security
    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?
    1. A
      Create a single IAM role that has the necessary permissions. Attach the role to each notebook instance that the team uses.
    2. B
      Create a single IAM group. Add the data scientists to the group. Associate the group with each notebook instance that the team uses.
    3. C
      Create a single IAM user. Attach the AdministratorAccess AWS managed IAM policy to the user. Configure each notebook instance to use the IAM user.
    4. D
      Create a single IAM group. Add the data scientists to the group. Create an IAM role. Attach the AdministratorAccess AWS managed IAM policy to the role. Associate the role with the group. Associate the group with each notebook instance that the team uses.
    Show answer

    Correct answer: A

    Why

    One IAM role attached to each notebook instance centralizes permissions in one place. IAM groups cannot be associated with notebook instances, and a user with AdministratorAccess is too broad and uses long-term credentials.

  3. Question 3Single choiceML Model Development
    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?
    1. A
      Introduce early stopping.
    2. B
      Increase the size of the test set.
    3. C
      Increase the learning rate.
    4. D
      Decrease the learning rate.
    Show answer

    Correct answer: D

    Why

    Oscillating loss usually means the learning rate is too high, so a lower rate helps training converge. Early stopping addresses overfitting, a larger test set does not change training, and a higher rate makes this worse.

  4. Question 4Single choiceOther
    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 analyze 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?
    1. 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.
    2. 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.
    3. 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.
    4. 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.
    Show answer

    Correct answer: C

    Why

    Partitions by date let Athena read only the days it needs, and a lifecycle policy archives older data with no code. No partitions means full scans, copying to separate buckets adds work, and Athena is not designed around a separate bucket for each day.

  5. Question 5Single choiceDeployment and Orchestration of ML Workflows
    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?
    1. A
      Create an S3 Lifecycle rule to transfer the data to the SageMaker training instance and to initiate training.
    2. B
      Create an AWS Lambda function that scans the S3 bucket. Program the Lambda function to initiate the pipeline when new data is uploaded.
    3. C
      Create an Amazon EventBridge rule that has an event pattern that matches the S3 upload. Configure the pipeline as the target of the rule.
    4. D
      Use Amazon Managed Workflows for Apache Airflow (Amazon MWAA) to orchestrate the pipeline when new data is uploaded.
    Show answer

    Correct answer: C

    Why

    An EventBridge rule on S3 uploads can target the SageMaker pipeline directly, with no code. Lifecycle rules do not start training, a function that scans the bucket adds work, and MWAA is more than this needs.

  6. Question 6Multiple responseML Model Development
    A manufacturing company uses an ML model to determine whether products meet a standard for quality. The model produces an output of "Passed" or "Failed." Robots separate the products into the two categories by using the model to analyze photos on the assembly line.

    Which metrics should the company use to evaluate the model's performance? (Choose two.)
    1. A
      Precision and recall
    2. B
      Root mean square error (RMSE) and mean absolute percentage error (MAPE)
    3. C
      Accuracy and F1 score
    4. D
      Bilingual Evaluation Understudy (BLEU) score
    5. E
      Perplexity
    Show answer

    Correct answer: A, C

    Why

    This is a binary classification model, so precision, recall, accuracy and F1 score are suitable. RMSE and MAPE are for regression, while BLEU and perplexity are for language models.

  7. Question 7Single choiceData Preparation for Machine Learning
    A company is using Amazon EMR. The company has a large dataset in Amazon S3 that needs to be ingested into Amazon SageMaker Feature Store. The dataset contains historical data and real-time streaming data.

    The company must ensure that the Feature Store online store is updated with the most recent data as soon as the data becomes available. The company also must maintain a complete Feature Store offline store for batch processing.

    Which solution will meet these requirements?
    1. A
      Use the PutRecord API in Feature Store Runtime to ingest all the data into the online store.
    2. B
      Use the PutRecord API in Feature Store Runtime to ingest all the data into the offline store.
    3. C
      Use the Feature Store Spark connector to ingest the data as Spark DataFrames with the online store and offline store enabled.
    4. D
      Use the Feature Store Spark connector to ingest the data as Spark DataFrames with only the online store enabled.
    Show answer

    Correct answer: C

    Why

    The Feature Store Spark connector ingests large datasets from EMR, and enabling both stores keeps the online store current and the offline store complete. PutRecord for all this data is less efficient, and a single store misses one of the requirements.

  8. Question 8Single choiceData Preparation for Machine Learning
    A company’s ML engineer is creating a classification model. The ML engineer explores the dataset and notices a column that is named day_of_week. The column’s data consists of the following values: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, and Sunday.

    Which technique should the ML engineer use to convert this column’s data to binary values?
    1. A
      Binary encoding
    2. B
      Label encoding
    3. C
      One-hot encoding
    4. D
      Tokenization
    Show answer

    Correct answer: C

    Why

    One-hot encoding creates a 0 or 1 column for each day, with no false order between days. Label encoding assigns integers that imply an order, binary encoding packs values into combined bits that lose each day's clear meaning, and tokenization is for text.

  9. Question 9Single choiceDeployment and Orchestration of ML Workflows
    A company has built, trained, and tuned two new ML models:

    • Model A detects if a transaction is fraudulent based on the IP address, location, and user credentials. This model will be accessed every time a transaction occurs.
    • Model B forecasts sales totals for the next month based on historical sales data. This model will be accessed one time each month.

    The company must deploy both models to production by using Amazon SageMaker AI.

    Which hosting solution for the models should the company use to meet these requirements?
    1. A
      Host both models in one container behind one real-time endpoint.
    2. B
      Host Model A with an asynchronous endpoint. Host Model B with a real-time endpoint.
    3. C
      Host Model A with a real-time endpoint. Use batch transform for Model B.
    4. D
      Use batch transform for Model A. Host Model B with an asynchronous endpoint.
    Show answer

    Correct answer: C

    Why

    Fraud checks on each transaction need immediate responses, which suits a real-time endpoint. A monthly forecast suits batch transform, which uses compute only when it runs. Keeping an endpoint running for one monthly use wastes money, and batch or asynchronous inference is too slow for fraud checks.

  10. Question 10HotspotData Preparation for Machine Learning
    HOTSPOT

    A company develops an ML model to classify products. The model uses textual data and visual data to classify the products into a hierarchical taxonomy. An ML engineer must use specific strategies to enhance the model’s accuracy and handle class imbalances.

    Select the correct strategy from the following list for each use case. Select each strategy one time. (Choose five.)

    • Categorical cross-entropy
    • Fallback metric
    • Hierarchical loss
    • General oversampling
    • Synthetic Minority Oversampling Technique (SMOTE) for text

    Evaluate predictions with tolerance for broader category matches.Categorical cross-entropy / Fallback metric / Hierarchical loss / General oversampling / Synthetic Minority Oversampling Technique (SMOTE) for text
    Balance the training data by increasing the presence of minority categories.Categorical cross-entropy / Fallback metric / Hierarchical loss / General oversampling / Synthetic Minority Oversampling Technique (SMOTE) for text
    Enhance the model’s ability to recognize nested structures within product categories.Categorical cross-entropy / Fallback metric / Hierarchical loss / General oversampling / Synthetic Minority Oversampling Technique (SMOTE) for text
    Enhance textual data representation for underrepresented categories.Categorical cross-entropy / Fallback metric / Hierarchical loss / General oversampling / Synthetic Minority Oversampling Technique (SMOTE) for text
    Show answer
    • Evaluate predictions with tolerance for broader category matches. Fallback metric
    • Balance the training data by increasing the presence of minority categories. General oversampling
    • Enhance the model’s ability to recognize nested structures within product categories. Hierarchical loss
    • Enhance textual data representation for underrepresented categories. Synthetic Minority Oversampling Technique (SMOTE) for text
    Why

    A fallback metric gives credit for matches at a broader category level, general oversampling increases minority categories, hierarchical loss teaches nested category structure, and SMOTE for text adds text examples for underrepresented categories. The question says five uses, but its image shows only four, so categorical cross-entropy has no use case here.

  11. Question 11Single choiceML Solution Monitoring, Maintenance, and Security
    An ML engineer is using an Amazon SageMaker Studio notebook to train a neural network by creating an estimator. The estimator runs a Python training script that uses Distributed Data Parallel (DDP) on a single instance that has more than one GPU.

    The ML engineer discovers that the training script is underutilizing GPU resources. The ML engineer must identify the point in the training script where resource utilization can be optimized.

    Which solution will meet this requirement?
    1. A
      Use Amazon CloudWatch metrics to create a report that describes GPU utilization over time.
    2. B
      Add SageMaker Profiler annotations to the training script. Run the script and generate a report from the results.
    3. C
      Use AWS CloudTrail to create a report that describes GPU utilization and GPU memory utilization over time.
    4. D
      Create a default monitor in Amazon SageMaker Model Monitor and suggest a baseline. Generate a report based on the constraints and statistics the monitor generates.
    Show answer

    Correct answer: B

    Why

    SageMaker Profiler annotations mark sections of the training script, and its report shows GPU use against those sections, which finds the exact point to optimize. CloudWatch shows use over time rather than by code, CloudTrail records API activity, and Model Monitor is for deployed models.

  12. Question 12Drag and drop: orderML Model Development
    HOTSPOT

    An ML engineer needs to use Amazon SageMaker to develop an ML solution for a company. The solution will use streaming video from cameras to count the number of people who walk past the company’s store every day.

    Select and order the steps from the following list to implement the first version of the algorithm. Each step should be selected one time. (Select and order three.)

    • Choose a built-in algorithm or pre-trained model.
    • Decide the data input format and apply data augmentation if necessary.
    • Determine if the challenge is a classification, detection, or segmentation problem.

    Arrange 3 of these in the correct order:

    • Choose a built-in algorithm or pre-trained model.
    • Decide the data input format and apply data augmentation if necessary.
    • Determine if the challenge is a classification, detection, or segmentation problem.
    Show answer
    1. Determine if the challenge is a classification, detection, or segmentation problem.
    2. Choose a built-in algorithm or pre-trained model.
    3. Decide the data input format and apply data augmentation if necessary.
    Why

    First define the problem type, because this determines which algorithms apply. Then choose a built-in algorithm or pre-trained model. Finally decide the input format and any augmentation, which depend on the chosen algorithm.

  13. Question 13Single choiceOther
    An ML engineering team is spread across multiple locations. When the lead ML engineer opens an Amazon SageMaker Al notebook, the ML engineer does not see the latest merged notebook made by other team members from a Git repository.

    The lead ML engineer must see the latest SageMaker AI notebook updates.

    Which solution will meet this requirement?
    1. A
      Run the !git pull origin master command.
    2. B
      Run the !git commit command.
    3. C
      Run the !git push origin master command.
    4. D
      Run the !git branch command.
    Show answer

    Correct answer: A

    Why

    git pull fetches and merges the latest changes from the remote repository into the local copy. Commit records local changes, push sends local changes to the remote, and branch only lists or manages branches.

  14. Question 14HotspotDeployment and Orchestration of ML Workflows
    HOTSPOT

    A company has multiple models that are hosted on Amazon SageMaker AI. The models need to be re-trained. The requirements for each model are different, so the company needs to choose different deployment strategies to transfer all requests to a new model.

    Select the correct strategy from the following list for each requirement. Select each strategy one time.

    • Canary traffic shifting
    • Linear traffic shifting guardrail
    • All at once traffic shifting

    Simultaneous calls to the endpoint must reach models with the same configuration.Canary traffic shifting / Linear traffic shifting guardrail / All at once traffic shifting
    The new model must receive only a fraction of the requests for validation before receiving all the traffic.Canary traffic shifting / Linear traffic shifting guardrail / All at once traffic shifting
    Traffic to the new model must increase gradually to ensure that pipelines that rely on the endpoint do not fail because of changes in latency.Canary traffic shifting / Linear traffic shifting guardrail / All at once traffic shifting
    Show answer
    • Simultaneous calls to the endpoint must reach models with the same configuration. All at once traffic shifting
    • The new model must receive only a fraction of the requests for validation before receiving all the traffic. Canary traffic shifting
    • Traffic to the new model must increase gradually to ensure that pipelines that rely on the endpoint do not fail because of changes in latency. Linear traffic shifting guardrail
    Why

    All at once moves every request to the new model together, so simultaneous calls reach the same configuration. Canary sends a fraction for validation before all traffic. Linear shifting with guardrails increases traffic gradually and can roll back if latency causes problems.

  15. Question 15HotspotML Model Development
    HOTSPOT

    A company uses a training job on Amazon SageMaker AI to train a neural network. The job first trains a model and then evaluates the model's performance against a test dataset. The company uses the results from the evaluation phase to decide if the trained model will go to production.

    The training phase takes too long. The company needs solutions that can shorten training time without decreasing the model's final performance.

    Select the correct solutions from the following list to meet the requirements for each description. Select each solution one time or not at all. (Choose three.)

    • Change the epoch count.
    • Choose an Amazon EC2 Spot Fleet.
    • Change the batch size.
    • Use early stopping on the training job.
    • Use the SageMaker AI distributed data parallelism (SMDDP) library.
    • Stop the training job.

    Change the number of samples used in each iteration of training.Change the epoch count. / Choose an Amazon EC2 Spot Fleet. / Change the batch size. / Use early stopping on the training job. / Use the SageMaker AI distributed data parallelism (SMDDP) library. / Stop the training job.
    Increase the number of instances used during training.Change the epoch count. / Choose an Amazon EC2 Spot Fleet. / Change the batch size. / Use early stopping on the training job. / Use the SageMaker AI distributed data parallelism (SMDDP) library. / Stop the training job.
    Stop training before the maximum number of epochs are reached if performance is sufficient and not improving.Change the epoch count. / Choose an Amazon EC2 Spot Fleet. / Change the batch size. / Use early stopping on the training job. / Use the SageMaker AI distributed data parallelism (SMDDP) library. / Stop the training job.
    Show answer
    • Change the number of samples used in each iteration of training. Change the batch size.
    • Increase the number of instances used during training. Use the SageMaker AI distributed data parallelism (SMDDP) library.
    • Stop training before the maximum number of epochs are reached if performance is sufficient and not improving. Use early stopping on the training job.
    Why

    Batch size is the number of samples in each iteration. The SMDDP library spreads training across more instances. Early stopping ends training before the maximum epochs when performance stops improving. Stopping the job manually does not meet the goal, and Spot capacity lowers cost rather than time.