Table Of Contents

Feedback

User Guide

First time using the AWS CLI? See the User Guide for help getting started.

[ aws . sagemaker ]

create-notebook-instance

Description

Creates an Amazon SageMaker notebook instance. A notebook instance is an ML compute instance running on a Jupyter notebook.

In a create-notebook-instance request, you specify the type of ML compute instance that you want to run. Amazon SageMaker launches the instance, installs common libraries that you can use to explore datasets for model training, and attaches an ML storage volume to the notebook instance.

Amazon SageMaker also provides a set of example notebooks. Each notebook demonstrates how to use Amazon SageMaker with a specific an algorithm or with a machine learning framework.

After receiving the request, Amazon SageMaker does the following:

  • Creates a network interface in the Amazon SageMaker VPC.
  • (Option) If you specified subnet-id , creates a network interface in your own VPC, which is inferred from the subnet ID that you provide in the input. When creating this network interface, Amazon SageMaker attaches the security group that you specified in the request to the network interface that it creates in your VPC.
  • Launches an EC2 instance of the type specified in the request in the Amazon SageMaker VPC. If you specified subnet-id of your VPC, Amazon SageMaker specifies both network interfaces when launching this instance. This enables inbound traffic from your own VPC to the notebook instance, assuming that the security groups allow it.

After creating the notebook instance, Amazon SageMaker returns its Amazon Resource Name (ARN).

After Amazon SageMaker creates the notebook instance, you can connect to the Jupyter server and work in Jupyter notebooks. For example, you can write code to explore a dataset that you can use for model training, train a model, host models by creating Amazon SageMaker endpoints, and validate hosted models.

For more information, see How It Works .

See also: AWS API Documentation

See 'aws help' for descriptions of global parameters.

Synopsis

  create-notebook-instance
--notebook-instance-name <value>
--instance-type <value>
[--subnet-id <value>]
[--security-group-ids <value>]
--role-arn <value>
[--kms-key-id <value>]
[--tags <value>]
[--cli-input-json <value>]
[--generate-cli-skeleton <value>]

Options

--notebook-instance-name (string)

The name of the new notebook instance.

--instance-type (string)

The type of ML compute instance to launch for the notebook instance.

Possible values:

  • ml.t2.medium
  • ml.m4.xlarge
  • ml.p2.xlarge

--subnet-id (string)

The ID of the subnet in a VPC to which you would like to have a connectivity from your ML compute instance.

--security-group-ids (list)

The VPC security group IDs, in the form sg-xxxxxxxx. The security groups must be for the same VPC as specified in the subnet.

Syntax:

"string" "string" ...

--role-arn (string)

When you send any requests to AWS resources from the notebook instance, Amazon SageMaker assumes this role to perform tasks on your behalf. You must grant this role necessary permissions so Amazon SageMaker can perform these tasks. The policy must allow the Amazon SageMaker service principal (sagemaker.amazonaws.com) permissions to assume this role. For more information, see Amazon SageMaker Roles .

--kms-key-id (string)

If you provide a AWS KMS key ID, Amazon SageMaker uses it to encrypt data at rest on the ML storage volume that is attached to your notebook instance.

--tags (list)

A list of tags to associate with the notebook instance. You can add tags later by using the CreateTags API.

Shorthand Syntax:

Key=string,Value=string ...

JSON Syntax:

[
  {
    "Key": "string",
    "Value": "string"
  }
  ...
]

--cli-input-json (string) Performs service operation based on the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, the CLI values will override the JSON-provided values.

--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command.

See 'aws help' for descriptions of global parameters.

Output

NotebookInstanceArn -> (string)

The Amazon Resource Name (ARN) of the notebook instance.