Courseiva
Machine Learning Implementation and OperationsmediumMultiple ChoiceObjective-mapped

MLS-C01 Practice Question: Machine Learning Implementation and Operations

A machine learning engineer is deploying a model using AWS Lambda for real-time inference. The model is a scikit-learn RandomForestClassifier with 100 trees, serialized as a pickle file of 150 MB. The Lambda function has 3 GB memory allocated. However, the inference requests are timing out after 30 seconds. What is the most likely cause?

⚠ Common exam trap

The MLS-C01 exam often tests the misconception that Lambda timeouts are always the root cause of slow inference, when in fact the real issue is inefficient resource initialization (like loading large models from S3 on every call) that can be fixed by architectural changes rather than simply increasing the timeout.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

The model is loaded from S3 on every invocation, causing high latency.

The default behavior of loading a model from S3 on every Lambda invocation introduces significant latency. Each invocation must download the 150 MB pickle file from S3 over the network, deserialize it, and then run inference, which easily exceeds the 30-second timeout. The model should be loaded once outside the handler (in global scope) and reused across invocations to avoid this overhead.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • scikit-learn is not compatible with AWS Lambda.

    Why it's wrong here

    scikit-learn is compatible if included in the deployment package or layer.

  • The Lambda function does not have enough memory to load the model.

    Why it's wrong here

    3 GB is more than enough for 150 MB model.

  • The model is loaded from S3 on every invocation, causing high latency.

    Why this is correct

    Lambda should load the model outside the handler to reuse across invocations, but even then, cold starts with a large model are slow.

  • The Lambda function timeout is set too low; increase it to 5 minutes.

    Why it's wrong here

    Increasing timeout may help, but loading a 150 MB model each time is the root cause.

Quick reference

AWS S3 Storage Class Comparison

Storage ClassMin DurationRetrievalUse Case
S3 StandardNoneImmediateFrequently accessed data
S3 Standard-IA30 daysImmediateInfrequent access, rapid retrieval
S3 One Zone-IA30 daysImmediateNon-critical infrequent data
S3 Intelligent-TieringNoneImmediate–hoursUnknown or changing access patterns
S3 Glacier Instant90 daysMillisecondsArchive with instant retrieval
S3 Glacier Flexible90 daysMinutes–hoursArchive, flexible retrieval
S3 Glacier Deep Archive180 daysHoursLong-term compliance archive

About these practice questions

One of 1,672 original MLS-C01 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This MLS-C01 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the MLS-C01 exam.