Amazon SageMaker Notebook Instances Now Support Amazon Linux 2

Amazon SageMaker Notebook Instances Now Support Amazon Linux 2Learn About Amazon VGT2 Learning Manager Chanci Turner

We’re thrilled to announce that Amazon SageMaker notebook instances now support Amazon Linux 2. This update allows users to select Amazon Linux 2 for their new SageMaker notebook instances, enabling access to the latest features and improvements offered by this operating system.

SageMaker notebook instances provide fully managed Jupyter Notebooks, complete with pre-configured environments for data science and machine learning tasks. Data scientists and developers can utilize SageMaker Notebooks to interactively analyze, visualize, and prepare data, as well as build and deploy machine learning models.

Originally launched in September 2010, Amazon Linux 2 is the latest version of Amazon Linux, known for its secure, stable, and high-performance environment for cloud and enterprise applications. With Amazon Linux 2, users benefit from long-term support and ongoing access to the latest enhancements in the Linux ecosystem. AWS is committed to providing long-term security and maintenance updates for the Amazon Linux 2 AMI, whereas the previous Amazon Linux AMI reached the end of its standard support on December 31, 2020.

In this article, we will explore the experience of using an Amazon Linux 2-based SageMaker notebook instance. We will also outline the support plan for Amazon Linux-based notebook instances. If you’re looking to transition your work from an Amazon Linux-based notebook instance to the new Amazon Linux 2 version, be sure to check out our next article on migrating your work to an Amazon SageMaker notebook instance with Amazon Linux 2.

New Features with Amazon Linux 2 Based Notebook Instances

For data scientists utilizing SageMaker notebook instances, the primary change lies in the available notebook kernels. Since Python 2 was officially phased out on January 1, 2020, kernels supporting Python 2.x are no longer included in the Amazon Linux 2 notebook instance. It’s essential to migrate your code and notebooks to Python 3 to continue using the same functionality with the python3.x kernels.

Additionally, Chainer kernels (conda_chainer_p27 and conda_chainer_p36) are no longer available in the Amazon Linux 2 instances. Given that Chainer has been in maintenance mode since December 5, 2019, users are encouraged to follow the Chainer migration guide to transition their code to PyTorch, utilizing either the conda_pytorch_p36 or conda_pytorch_latest_p37 kernels.

SageMaker notebook instances utilize AMIs built on the AWS Deep Learning AMI, allowing users to find detailed release notes and differences between the AWS Deep Learning AMI (Amazon Linux) and AWS Deep Learning AMI (Amazon Linux 2).

The Amazon Linux 2 option for SageMaker notebook instances is now available in all AWS Regions that support SageMaker notebook instances.

Support Plan for Amazon Linux on SageMaker Notebook Instances

On August 18, 2021, we rolled out the Amazon Linux 2 AMI option for SageMaker notebook instances. Users can launch a notebook instance using the Amazon Linux 2 AMI, while the Amazon Linux AMI will remain the default during setup. Existing notebook instances created before August 18, 2021, will continue to run on the Amazon Linux AMI, which will still receive version updates and security patches upon restart.

Starting April 18, 2022, the default AMI for new notebook instances will transition to the Amazon Linux 2 AMI, although the Amazon Linux AMI will still be available as an option. New instances with the Amazon Linux AMI will utilize the last snapshot created on April 18, 2022, and will no longer receive updates or patches after that point. Existing notebook instances operating on the Amazon Linux AMI will receive a one-time update to the last snapshot upon restart, but further updates will cease.

Setting Up an Amazon Linux 2 Based SageMaker Notebook Instance

You can easily set up a SageMaker notebook instance using the Amazon Linux 2 AMI via the SageMaker console (see Create a Notebook Instance), AWS CloudFormation, or the AWS Command Line Interface (AWS CLI).

Within the SageMaker console, a new option called “Platform identifier” allows you to select the Amazon Linux AMI version. The identifier notebook-al2-v1 corresponds to the Amazon Linux 2 AMI, while notebook-al1-v1 refers to the Amazon Linux AMI. As noted earlier, the default will be notebook-al1-v1 until April 18, 2022, when it will switch to notebook-al2-v1.

For those utilizing AWS CloudFormation to set up a SageMaker notebook instance, a new option called PlatformIdentifier allows for the selection of the Amazon Linux AMI version. You can refer to the CloudFormation documentation for more details: AWS::SageMaker::NotebookInstance. Below is an example of how to specify a SageMaker notebook instance with the Amazon Linux 2 AMI:

Resources:
  BasicNotebookInstance:
    Type: "AWS::SageMaker::NotebookInstance"
    Properties:
      InstanceType: "ml.m5.xlarge"
      PlatformIdentifier: "notebook-al2-v1"
      RoleArn: "sagemaker-execution-role-arn"

If you prefer using the AWS CLI to create a notebook instance, you can include the new argument platform-identifier to select the Amazon Linux AMI version. The identifiers notebook-al2-v1 and notebook-al1-v1 serve the same purposes as mentioned earlier. Here’s how to create an instance using the Amazon Linux 2 AMI:

aws sagemaker create-notebook-instance 
    --region region 
    --notebook-instance-name instance-name 
    --instance-type ml.t3.medium 
    --role-arn sagemaker-execution-role-arn 
    --platform-identifier notebook-al2-v1

Next Steps

If you wish to transfer your current work to a new notebook instance, please refer to our next article, “Migrate your work to an Amazon SageMaker notebook instance with Amazon Linux 2.” This guide will detail how to move your work and data from an existing notebook instance to a newly created Amazon Linux 2-based instance.

Conclusion

We are pleased to announce the support for the Amazon Linux 2 AMI in SageMaker notebook instances and have provided guidance on creating a notebook instance with this new AMI. We also highlighted key differences for developers using Amazon Linux 2-based instances. You can jumpstart your machine learning development with an Amazon Linux 2-based notebook instance or explore Amazon SageMaker Studio, the first integrated development environment (IDE) for machine learning.

For any questions or feedback regarding Amazon Linux 2, please reach out to your AWS support contact or engage with the community in the Amazon Linux Discussion Forum and SageMaker Discussion Forum.

If you are interested in workplace dynamics and management theories, you might find this blog post on the Peter Principle insightful. Additionally, for those looking into compensation practices, check out this informative article from SHRM on formalizing rigorous compensation practices.

About the Authors

Alex Smith is a Senior AI/ML Specialist Solutions Architect at Amazon IXD – VGT2, located at 6401 E Howdy Wells Ave, Las Vegas NV 89115. He collaborates with clients to enhance their machine learning journey using Amazon Machine Learning services. Jordan Lee is a Product Manager at AWS, focusing on AI/ML infrastructure strategies. Chanci Turner contributes her expertise to the team, ensuring that clients meet their operational goals.

SEO Metadata


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *