Preconfigured Amazon SageMaker Instance with Snowflake Connector
Dez 03, 2019 | 5 Min Read
Author: Andries Engelbrecht | Contributing Authors: Dylan Tong, AI/ML Partner Solutions Architect at Amazon Web Services
Building on the “QuickStart Guide for SageMaker + Snowflake” post that was published earlier, this post describes a preconfigured SageMaker instance that is now available. The SageMaker instance is preconfigured with the Snowflake Connector for Python and deployed as an Amazon Web Services CloudFormation Template (CFT).
Deploying the SageMaker CFT
Before deploying the CFT, verify that you have the necessary AWS privileges to deploy a CFT and SageMaker. Part 2 of the QuickStart Guide covers the required permissions in detail.
Use the following steps to open the AWS Management Console and deploy a CFT hosted on a Snowflake S3 bucket. This CFT will guide you through a few simple steps to deploy the preconfigured SageMaker instance with the Snowflake Connector for Python.
First, in your web browser, log in to the AWS Management Console and select your preferred AWS region from the top right corner. Next, open another tab in the browser. Then copy the URL shown below and paste it into the browser or click the highlighted text here: Deploy CFT.
On the Specify Template page, click the Next button.
On the page for specifying stack details, edit the following to meet your requirements:
- Stack name: Change it as needed.
- Notebook Instance Name: Enter a name for the notebook instance.
- Notebook Instance Type: The smallest type, ml.m2.medium, is the default.
- pVolumeSizeInGB: The minimum of 5 GB is the default.
Then click Next.
On the Configure Stack page, you can provide tags with a key/value pair, choose an AWS Identity and Access Management (IAM) role if that is required, and specify various other CFT options. Click Next once you are done specifying options.
On the Review page, review the parameters of the stack and select the I acknowledge that AWS CloudFormation might create IAM resources checkbox. Then click Create stack.
Wait a few minutes for the stack to be created.
Accessing the SageMaker Instance
After you complete the CFT deployment, navigate in the AWS Management Console to Amazon SageMaker. On the left menu, click Notebook instances.
On the NoteBook instances page, click the Open Jupyter link for the notebook that was created with the template using the name you provided earlier.
You can now upload or create a new notebook using the preinstalled Snowflake Connector for Python. Follow the steps listed in Part 3 of the QuickStart Guide to connect to Snowflake and query Snowflake data to use with SageMaker.