Creating Notebook Instance In Amazon SageMaker

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.

Creating Notebook Instance In Amazon SageMaker

Step 2

Click on the Expansion button of All Services. Here you can find Amazon SageMaker under the Machine Learning.

Creating Notebook Instance in Amazon SageMaker

You’ll then be taken to the Amazon SageMaker Page.

Creating Notebook Instance in Amazon SageMaker

Step 3

On the left side, there is Notebook, Once you expand Click on Notebook Instances.

Creating Notebook Instance in Amazon SageMaker

Step 4

Once you click on the Notebook instance, the following page with show up.

Creating Notebook Instance in Amazon SageMaker

Click on the Create Notebook Instance button.

Creating Notebook Instance in Amazon SageMaker

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.

Creating Notebook Instance in Amazon SageMaker

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.

Creating Notebook Instance in Amazon SageMaker

Step 6

Under the Permissions and Encryptions, click on the arrow and choose to Create a New Role.

Creating Notebook Instance in Amazon SageMaker

Creating Notebook Instance in Amazon SageMaker

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.

Creating Notebook Instance in Amazon SageMaker

Now, click on Create Role.

Creating Notebook Instance in Amazon SageMaker

The Success Notification will pop up on the screen.

Creating Notebook Instance in Amazon SageMaker

Step 7

Review all the settings as from the image below for confirmation.

Creating Notebook Instance in Amazon SageMaker

Step 8

Now, click on Create Notebook Instance.

Creating Notebook Instance in Amazon SageMaker

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.

Creating Notebook Instance in Amazon SageMaker

You can check more about the notebook instance by click the Name.

Creating Notebook Instance in Amazon SageMaker

Step 10

Now, as the instance of the notebook is created, you can see in the Status as InService.

Creating Notebook Instance in Amazon SageMaker

Check out by click under actions for Open Jupyter and Open JupyterLab.

Creating Notebook Instance in Amazon SageMaker

The Notebooks look as follows.

Creating Notebook Instance in Amazon SageMaker

Creating Notebook Instance in Amazon SageMaker

Creating Notebook Instance in Amazon SageMaker

Step 10

You can check recent activity and inservice functionalities under Amazon SageMaker as follows. 

Creating Notebook Instance in Amazon SageMaker

You can stop the Notebook instance by choosing the Action and Choosing the Stop Button. Once you stop the instance, it looks as follows.

Creating Notebook Instance in Amazon SageMaker

Creating Notebook Instance in Amazon SageMaker

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.

Creating Notebook Instance in Amazon SageMaker

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.


Similar Articles