Amazon SageMaker
Developer Guide

Step 2.1: Create a Jupyter Notebook and Initialize Variables

Create a Jupyter notebook in your Amazon SageMaker notebook instance and initialize variables.

To create a Jupyter notebook

  1. Create the notebook.

    1. Sign in to the Amazon SageMaker console at

    2. Open the notebook instance, by choosing Open next to its name. The Jupyter notebook server page appears:

    3. To create a notebook, in the Files tab, choose New, and conda_python3. This pre-installed environment includes the default Anaconda installation and Python 3.

    4. In the Jupyter notebook, under File, choose Save as, and name the notebook.

  2. Copy the following Python code and paste it into your notebook. Add the name of the S3 bucket that you created in Set Up Amazon SageMaker, and run the code. The get_execution_role function retrieves the IAM role you created when you created your notebook instance.

    from sagemaker import get_execution_role role = get_execution_role() bucket = 'bucket-name' # Use the name of your s3 bucket here

Next Step

Step 2.2: Download, Explore, and Transform the Training Data

On this page: