AWS Certified Machine Learning – Specialty — Question 102
A data scientist uses an Amazon SageMaker notebook instance to conduct data exploration and analysis. This requires certain Python packages that are not natively available on Amazon SageMaker to be installed on the notebook instance.
How can a machine learning specialist ensure that required packages are automatically available on the notebook instance for the data scientist to use?
Answer options
- A. Install AWS Systems Manager Agent on the underlying Amazon EC2 instance and use Systems Manager Automation to execute the package installation commands.
- B. Create a Jupyter notebook file (.ipynb) with cells containing the package installation commands to execute and place the file under the /etc/init directory of each Amazon SageMaker notebook instance.
- C. Use the conda package manager from within the Jupyter notebook console to apply the necessary conda packages to the default kernel of the notebook.
- D. Create an Amazon SageMaker lifecycle configuration with package installation commands and assign the lifecycle configuration to the notebook instance.
Correct answer: D
Explanation
The correct answer is D because creating an Amazon SageMaker lifecycle configuration allows you to specify commands that automatically run when the notebook instance starts, ensuring the required packages are installed. Options A and B involve manual processes that do not guarantee automatic installation upon instance startup, while option C requires manual execution within the notebook, which does not provide a persistent solution.