I have tried setting up a Lambda function to trigger the Notebook instance start and added a lifecycle config to execute the notebook file and then stop when its idle for 5 mins. However as the notebook file takes more than 5 mins to execute I am facing an error.