Can we generate custom logs for Sagemaker notebook instance in CloudWatch?

Viewed 1411
1 Answers

Jupyter server emits logs to stdout. So for notebook instances at least you can access the logs from CloudWatch. These would be under the /aws/sagemaker/NotebookInstances log group.

You can follow the below steps to automatically log kernel level logs to CW -

  1. Choose Notebook instances.
  2. In the list of notebook instances, choose the notebook instance for which you want to view Jupyter logs by selecting the Notebook instance Name.
  3. This will bring you to the details page for that notebook instance.
  4. Under Monitor on the notebook instance details page, choose View logs.
  5. In the CloudWatch console, choose the log stream for your notebook instance. Its name is in the form NotebookInstanceName/jupyter.log.

Reference: https://docs.aws.amazon.com/sagemaker/latest/dg/jupyter-logs.html

Related