An ML engineer wants a SageMaker notebook to automatically stop after 1 hour of idle time. How can this be implemented?
Choose an answer
Tap an option to check your answer.
Correct answer: Create a lifecycle configuration in SageMaker. Copy the auto-stop-idle script from GitHub to the Start Notebook section..
Why this is the answer
The correct approach is to use a SageMaker lifecycle configuration. Specifically, the auto-stop-idle script, available on GitHub, should be copied into the Start Notebook section of the lifecycle configuration. This script runs when the notebook instance starts and sets up a mechanism to monitor for idle time, automatically stopping the instance after the configured duration (e.g., 1 hour). Placing the script in the Create Notebook section is incorrect because that section executes only once when the notebook is initially created, not every time it starts. Monitoring CPU or memory metrics with CloudWatch Logs and invoking a Lambda function is overly complex and less efficient than the built-in lifecycle configuration feature designed for this exact purpose. Furthermore, zero CPU or memory utilization doesn't always definitively indicate idleness; a notebook could be idle but still consume minimal resources.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed