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 Risposta
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
con risposta 10 mesi fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande