Monitor notebook instances on cloudwatch dashboard

0

Is there any way to get the details of all notebook instances on a cloudwatch dashboard in the below format

Notebook instance Name | Status | start time | up time

experiment_instance | inService | 2023-0630 9:10:00 am | 2.5 hrs

app_instance | Stopped | 2022-06-29 9:10:00 am | 1 hrs

Lak
asked 10 months ago203 views
1 Answer
0

Hi Lak, To grab such details on SageMaker notebook instances, boto3 SageMaker client API, list_notebook_instances can be used. This API returns a list of notebook instances as below with their metadata as well.

{
    'NextToken': 'string',
    'NotebookInstances': [
        {
            'NotebookInstanceName': 'string',
            'NotebookInstanceArn': 'string',
            'NotebookInstanceStatus': 'Pending'|'InService'|'Stopping'|'Stopped'|'Failed'|'Deleting'|'Updating',
            'Url': 'string',
            'InstanceType': '',
            'CreationTime': datetime(2015, 1, 1),
            'LastModifiedTime': datetime(2015, 1, 1),
            'NotebookInstanceLifecycleConfigName': 'string',
            'DefaultCodeRepository': 'string',
            'AdditionalCodeRepositories': [
                'string',
            ]
        },
    ]
}
AWS
answered 9 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions