easyMultiple ChoiceObjective-mapped
MLA-C01 Practice Question: A startup is building a serverless inference API…
A startup is building a serverless inference API using AWS Lambda. They have a TensorFlow model that is 400 MB in size. They packaged the model and inference code into a Lambda function using a container image. When they test the function with a small input, it consistently times out after 3 seconds. The Lambda function has 512 MB of memory and a timeout of 30 seconds. The business requirement is that inference must complete in less than 5 seconds under normal conditions. What is the most likely cause of the slow performance, and which change should they make?
⚠ Common exam trap
A common mix-up: candidates confuse cold start latency with runtime performance issues, assuming provisioned concurrency (Option B) fixes all slow Lambda functions, when in fact memory/CPU insufficiency is the root cause for large model inference.
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 Lambda function memory is insufficient for the model size; increase memory to 1024 MB or higher.
The most likely cause is that the Lambda function's memory (512 MB) is insufficient to load the 400 MB TensorFlow model into memory, causing excessive swapping or out-of-memory errors that drastically slow inference. Increasing memory to 1024 MB or higher provides more CPU and memory resources, allowing the model to fit and inference to complete within the required 5 seconds.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
The function timeout is too low; increase the timeout to 60 seconds.
Why it's wrong here
The task requires under 5 seconds; 3 seconds is already below 5, so the timeout is not the issue; the function is slow due to memory.
- ✗
The function is experiencing a cold start; use provisioned concurrency to keep the container warm.
Why it's wrong here
Cold starts cause initial latency, but the 3-second timeout occurs on invocation, not on startup, and provisioned concurrency would not fix memory constraint.
- ✓
The Lambda function memory is insufficient for the model size; increase memory to 1024 MB or higher.
Why this is correct
Lambda allocates CPU proportionally to memory. More memory speeds up computation and reduces swapping.
- ✗
Use a Lambda function with a GPU container to accelerate inference.
Why it's wrong here
Lambda does not support GPU; it runs on CPU only.
Quick reference
Cloud Service Model Comparison
| Model | You Manage | Provider Manages | Examples |
|---|---|---|---|
| IaaS | OS, runtime, apps, data | Hardware, hypervisor, networking | EC2, Azure VMs, GCP Compute Engine |
| PaaS | Apps and data | OS, runtime, middleware, hardware | Elastic Beanstalk, Azure App Service |
| SaaS | Data and settings only | Everything else | Microsoft 365, Salesforce, Workday |
| FaaS / Serverless | Function code only | Infra, scaling, runtime | Lambda, Azure Functions, Cloud Run |
| CaaS | Containers and apps | Kubernetes, OS, hardware | EKS, AKS, GKE |
Go deeper
Related to this question
About these practice questions
Courseiva writes every MLA-C01 question from scratch — 835 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This MLA-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 MLA-C01 exam.