We learned about Amazon SageMaker and Connecting AWS to Visual Studio Code in the previous articles, AWS SageMaker and How To Connect VS Code To AWS. In this article, we’ll learn to set up the notebook instance in Amazon SageMaker.
Notebook is the primary tool through which interaction is done with the SageMaker ecosystem. There are numerous other ways for the interaction to the functionalities of Amazon SageMaker with this approach widely used. Let us learn how to create the instance of the notebook within the Amazon SageMaker for the Machine Learning application’s modeling, training, and validation.
Step 1
Login into AWS. You’ll be taken to the welcome page of the AWS Management Console.
Step 2
Click on the Expansion button of All Services. Here you can find Amazon SageMaker under the Machine Learning.
You’ll then be taken to the Amazon SageMaker Page.
Step 3
On the left side, there is Notebook, Once you expand Click on Notebook Instances.
Step 4
Once you click on the Notebook instance, the following page with show up.
Click on the Create Notebook Instance button.
Step 5
Time for filing the settings for the notebook instance creation. Choose the Notebook instance name of your choice. The ml.t2.medium notebook instance type will work out fine for the notebook as discussed in our previous article, Amazon SageMaker. This provides the resource allocation for primary memory of 4GB, 2GB for vCPU, and low to moderate performance of network fit for running the notebooks.
Note, that the Notebook instance name can accept a maximum of 63 alphanumeric characters and can contain hyphens. However, spaces are not accepted.
You can set the other settings as follows for Elastic Inference and Platform identifier as of now.
Step 6
Under the Permissions and Encryptions, click on the arrow and choose to Create a New Role.
You can choose None for the S3 Bucket options for the IAM role. We’ll learn more about S3 buckets in articles to follow in the future.
Now, click on Create Role.
The Success Notification will pop up on the screen.
Step 7
Review all the settings as from the image below for confirmation.
Step 8
Now, click on Create Notebook Instance.
Step 9
You can check the status and other details as the creation process begins. Here, the status is pending as the set-up is happening in the background.
You can check more about the notebook instance by click the Name.
Step 10
Now, as the instance of the notebook is created, you can see in the Status as InService.
Check out by click under actions for Open Jupyter and Open JupyterLab.
The Notebooks look as follows.
Step 10
You can check recent activity and inservice functionalities under Amazon SageMaker as follows.
You can stop the Notebook instance by choosing the Action and Choosing the Stop Button. Once you stop the instance, it looks as follows.
Step 11
In order to Run the Notebook again, Click on Start under Actions. It is critical to know that, Amazon SageMaker charges for Notebook as per the runtime. Hence, when one is finished using the notebook instance, it is better to stop the instance to limit any possible charges to incur. Howsoever, no data will be lost for stopping the instance unless you delete the instance itself.
Conclusion
Thus, in this article, we learned about the thorough process with images with the hands-on experience walkthrough to create notebook instance in Amazon SageMaker. These can be used for creating models, testing them and evaluating it for numerous Machine Learning Applications. The articles to follow will expand more on this instance to create models for different machine learning problems.