MLA-C01 · Question #139
MLA-C01 Question #139: Real Exam Question with Answer & Explanation
The correct answer is A: Create a lifecycle configuration in SageMaker. Copy the auto-stop-idle script from GitHub to the. Option A is correct because SageMaker lifecycle configurations are the native, AWS-recommended mechanism for customizing notebook behavior at startup and shutdown. AWS provides an official auto-stop-idle script in the AWS Samples GitHub repository, which you attach to a lifecycle
Question
An ML engineer wants an Amazon SageMaker notebook to automatically stop running after 1 hour of idle time. How can the ML engineer accomplish this goal?
Options
- ACreate a lifecycle configuration in SageMaker. Copy the auto-stop-idle script from GitHub to the
- BCreate a lifecycle configuration in SageMaker. Copy the auto-stop-idle script from GitHub to the
- CTrack the notebook's CPU metric by using Amazon CloudWatch Logs. Invoke an AWS Lambda
- DTrack the notebook's memory metric by using Amazon CloudWatch Logs. Invoke an AWS
Explanation
Option A is correct because SageMaker lifecycle configurations are the native, AWS-recommended mechanism for customizing notebook behavior at startup and shutdown. AWS provides an official auto-stop-idle script in the AWS Samples GitHub repository, which you attach to a lifecycle configuration's on-start script - this monitors kernel activity and stops the instance after a defined idle threshold (e.g., 1 hour).
Option B is a distractor that likely describes using the script incorrectly (e.g., attaching it to on-create instead of on-start, or referencing the wrong script), making it functionally ineffective. Options C and D are wrong because CloudWatch Logs + Lambda is an overly complex, indirect approach - CPU and memory metrics don't reliably indicate notebook idleness specifically (a kernel can sit idle while CPU/memory remain nonzero from background processes), and this pattern requires custom threshold logic that still won't match SageMaker's kernel-aware idle detection.
Memory tip: Think "Lifecycle = notebook lifecycle management." Anything controlling when a SageMaker notebook starts or stops belongs in a lifecycle configuration - it's the single right tool for notebook automation on SageMaker.
Topics
Community Discussion
No community discussion yet for this question.