1 Answer
- Newest
- Most votes
- Most comments
4
The following article can give you an idea about it
Your steps are
Create a Snapshot
aws sagemaker stop-notebook-instance --notebook-instance-name <your-notebook-instance-name>
Stop Notebook instance
aws sagemaker describe-notebook-instance --notebook-instance-name <your-notebook-instance-name>
Create a SageMaker Notebook Instance lifecycle configuration script that copies the contents of the instance to an S3 bucket
#!/bin/bash
set -e
aws s3 sync /home/ec2-user/SageMaker/ s3://<your-s3-bucket>/path/to/backup/
Create a SageMaker Notebook Instance Lifecycle Configuration
aws sagemaker create-notebook-instance-lifecycle-config --notebook-instance-lifecycle-config-name <your-lifecycle-config-name> --on-start Content=$(base64 copy-to-s3-script.sh)
Attach the config
aws sagemaker update-notebook-instance --notebook-instance-name <your-notebook-instance-name> --lifecycle-config-name <your-lifecycle-config-name>
Start the notebook
aws sagemaker start-notebook-instance --notebook-instance-name <your-notebook-instance-name>
Relevant content
- asked a year ago
- asked a year ago
- asked 6 years ago
- AWS OFFICIALUpdated 21 days ago
- AWS OFFICIALUpdated 22 days ago
- AWS OFFICIALUpdated 9 months ago
- AWS OFFICIALUpdated 7 months ago