AWS Certified Machine Learning Engineer – Associate (MLA-C01) — Question 110
A company must install a custom script on any newly created Amazon SageMaker notebook instances.
Which solution will meet this requirement with the LEAST operational overhead?
Answer options
- A. Create a lifecycle configuration script to install the custom script when a new SageMaker notebook is created. Attach the lifecycle configuration to every new SageMaker notebook as part of the creation steps.
- B. Create a custom Amazon Elastic Container Registry (Amazon ECR) image that contains the custom script. Push the ECR image to a Docker registry. Attach the Docker image to a SageMaker Studio domain. Select the kernel to run as part of the SageMaker notebook.
- C. Create a custom package index repository. Use AWS CodeArtifact to manage the installation of the custom script. Set up AWS PrivateLink endpoints to connect CodeArtifact to the SageMaker instance. Install the script.
- D. Store the custom script in Amazon S3. Create an AWS Lambda function to install the custom script on new SageMaker notebooks. Configure Amazon EventBridge to invoke the Lambda function when a new SageMaker notebook is initialized.
Correct answer: A
Explanation
The correct answer is A, as creating a lifecycle configuration script allows for automatic execution of the script during the notebook's creation, minimizing manual intervention. Options B and C introduce more complexity by requiring additional resources like Docker images and CodeArtifact, while option D involves using Lambda and EventBridge, which adds unnecessary overhead for this specific requirement.