AWS Certified Machine Learning Engineer – Associate (MLA-C01) — Question 126
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?
Answer options
- A. Create a lifecycle configuration in SageMaker. Copy the auto-stop-idle script from GitHub to the Start Notebook section.
- B. Create a lifecycle configuration in SageMaker. Copy the auto-stop-idle script from GitHub to the Create Notebook section.
- C. Track the notebook's CPU metric by using Amazon CloudWatch Logs. Invoke an AWS Lambda function from CloudWatch Logs to shut down the notebook instance if CPU utilization becomes zero.
- D. Track the notebook's memory metric by using Amazon CloudWatch Logs. Invoke an AWS Lambda function from CloudWatch Logs to shut down the notebook instance if memory utilization becomes zero.
Correct answer: A
Explanation
The correct answer is A because creating a lifecycle configuration and placing the auto-stop-idle script in the Start Notebook section allows the notebook to check for idle time immediately upon starting. Options B, C, and D are incorrect as they either place the script in the wrong section or monitor metrics that don't directly relate to idle status.