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

1 Antwort
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
beantwortet vor einem Jahr

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen