NotebookInstance

class NotebookInstance : KotlinCustomResource

Provides a SageMaker Notebook Instance resource.

Example Usage

Basic usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.sagemaker.NotebookInstance;
import com.pulumi.aws.sagemaker.NotebookInstanceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var ni = new NotebookInstance("ni", NotebookInstanceArgs.builder()
.roleArn(aws_iam_role.role().arn())
.instanceType("ml.t2.medium")
.tags(Map.of("Name", "foo"))
.build());
}
}

Code repository usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.sagemaker.CodeRepository;
import com.pulumi.aws.sagemaker.CodeRepositoryArgs;
import com.pulumi.aws.sagemaker.inputs.CodeRepositoryGitConfigArgs;
import com.pulumi.aws.sagemaker.NotebookInstance;
import com.pulumi.aws.sagemaker.NotebookInstanceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new CodeRepository("example", CodeRepositoryArgs.builder()
.codeRepositoryName("my-notebook-instance-code-repo")
.gitConfig(CodeRepositoryGitConfigArgs.builder()
.repositoryUrl("https://github.com/github/docs.git")
.build())
.build());
var ni = new NotebookInstance("ni", NotebookInstanceArgs.builder()
.roleArn(aws_iam_role.role().arn())
.instanceType("ml.t2.medium")
.defaultCodeRepository(example.codeRepositoryName())
.tags(Map.of("Name", "foo"))
.build());
}
}

Import

SageMaker Notebook Instances can be imported using the name, e.g.,

$ pulumi import aws:sagemaker/notebookInstance:NotebookInstance test_notebook_instance my-notebook-instance

Properties

Link copied to clipboard

A list of Elastic Inference (EI) instance types to associate with this notebook instance. See Elastic Inference Accelerator for more details. Valid values: ml.eia1.medium, ml.eia1.large, ml.eia1.xlarge, ml.eia2.medium, ml.eia2.large, ml.eia2.xlarge.

Link copied to clipboard

An array of up to three Git repositories to associate with the notebook instance. These can be either the names of Git repositories stored as resources in your account, or the URL of Git repositories in AWS CodeCommit or in any other Git repository. These repositories are cloned at the same level as the default repository of your notebook instance.

Link copied to clipboard
val arn: Output<String>

The Amazon Resource Name (ARN) assigned by AWS to this notebook instance.

Link copied to clipboard

The Git repository associated with the notebook instance as its default code repository. This can be either the name of a Git repository stored as a resource in your account, or the URL of a Git repository in AWS CodeCommit or in any other Git repository.

Link copied to clipboard

Set to Disabled to disable internet access to notebook. Requires security_groups and subnet_id to be set. Supported values: Enabled (Default) or Disabled. If set to Disabled, the notebook instance will be able to access resources only in your VPC, and will not be able to connect to Amazon SageMaker training and endpoint services unless your configure a NAT Gateway in your VPC.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard

Information on the IMDS configuration of the notebook instance. Conflicts with instance_metadata_service_configuration. see details below.

Link copied to clipboard
val instanceType: Output<String>

The name of ML compute instance type.

Link copied to clipboard
val kmsKeyId: Output<String>?

The AWS Key Management Service (AWS KMS) key that Amazon SageMaker uses to encrypt the model artifacts at rest using Amazon S3 server-side encryption.

Link copied to clipboard

The name of a lifecycle configuration to associate with the notebook instance.

Link copied to clipboard
val name: Output<String>

The name of the notebook instance (must be unique).

Link copied to clipboard

The network interface ID that Amazon SageMaker created at the time of creating the instance. Only available when setting subnet_id.

Link copied to clipboard

The platform identifier of the notebook instance runtime environment. This value can be either notebook-al1-v1, notebook-al2-v1, or notebook-al2-v2, depending on which version of Amazon Linux you require.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val roleArn: Output<String>

The ARN of the IAM role to be used by the notebook instance which allows SageMaker to call other services on your behalf.

Link copied to clipboard
val rootAccess: Output<String>?

Whether root access is Enabled or Disabled for users of the notebook instance. The default value is Enabled.

Link copied to clipboard
val securityGroups: Output<List<String>>

The associated security groups.

Link copied to clipboard
val subnetId: Output<String>?

The VPC subnet ID.

Link copied to clipboard
val tags: Output<Map<String, String>>?

A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Link copied to clipboard
val tagsAll: Output<Map<String, String>>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Link copied to clipboard
val url: Output<String>

The URL that you use to connect to the Jupyter notebook that is running in your notebook instance.

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard
val volumeSize: Output<Int>?

The size, in GB, of the ML storage volume to attach to the notebook instance. The default value is 5 GB.