aws-samples / amazon-sagemaker-notebook-instance-lifecycle-config-samples

A collection of sample scripts to customize Amazon SageMaker Notebook Instances using Lifecycle Configurations
MIT No Attribution
422 stars 250 forks source link

Life cycle config took longer than 5 minutes #86

Closed sarat532 closed 2 years ago

sarat532 commented 2 years ago

Hi all,

I'm trying to migrate my notebook instance which is using AL1 to AL2. I found this help doc: https://aws.amazon.com/blogs/machine-learning/migrate-your-work-to-amazon-sagemaker-notebook-instance-with-amazon-linux-2/.

As per the article, I created a life cycle config and updated the on-start.sh. I started the instance and it didn't start. Below is the error:

Notebook Instance Lifecycle Config 'arn:aws:sagemaker:ap-south-1:account-no:notebook-instance-lifecycle-config/backup-ebs' for Notebook Instance 'arn:aws:sagemaker:ap-south-1:account-no:notebook-instance/test' took longer than 5 minutes. Please check your CloudWatch logs for more details if your Notebook Instance has Internet access.

CloudWatch logs say "/bin/bash: /tmp/OnStart_2022-05-05-21-43705z8lmx: /bin/bash^M: bad interpreter: No such file or directory"

Please help!

Best, Sarat

sarat532 commented 2 years ago

Manually typing the code or pasting line by line worked.