AIF-C01 Fundamentals of AI and ML Practice Question
Exhibit
Refer to the exhibit: CloudWatch Logs excerpt from a SageMaker real-time endpoint with instance type ml.m5.large. Average inference time is 500ms but increases over time. Logs show repeated 'MemoryError: cannot allocate memory' after several hours of operation.
Refer to the exhibit. A SageMaker real-time endpoint is experiencing increasing latency and memory errors after running for a few hours. What is the most likely cause and recommended fix?
⚠ Common exam trap
The AIF-C01 exam often tests the distinction between scaling solutions (which address capacity) and debugging tools (which address code defects), trapping candidates who confuse symptom relief with root cause resolution.
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
✓
Use SageMaker Debugger to identify and fix a memory leak in the inference code
The symptoms—increasing latency and memory errors after running for a few hours—point to a memory leak in the inference code. SageMaker Debugger can monitor system metrics like memory utilization and detect anomalies, helping to identify the root cause of the leak. Fixing the memory leak directly resolves the progressive degradation, whereas scaling or auto-scaling only masks the symptom.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Scale the endpoint to a larger instance type, such as ml.r5.large
Why it's wrong here
A larger instance provides more memory but does not fix the underlying leak; the error will recur.
- ✗
Enable auto-scaling to add instances during high load
Why it's wrong here
Auto-scaling handles traffic, not memory leaks within the code.
- ✓
Use SageMaker Debugger to identify and fix a memory leak in the inference code
Why this is correct
The increasing memory usage over time indicates a leak; Debugger can help identify the issue.
- ✗
Use SageMaker Model Monitor to detect data drift
Why it's wrong here
Model Monitor detects changes in input distribution, not memory issues.
Visual reference
Go deeper
Related to this question
About these practice questions
Courseiva writes every AIF-C01 question from scratch — 619 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 AIF-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 AIF-C01 exam.