We recommend new projects start with resources from the AWS provider.
published on Monday, Sep 28, 2026 by Pulumi
We recommend new projects start with resources from the AWS provider.
published on Monday, Sep 28, 2026 by Pulumi
Resource Type definition for AWS::SageMaker::NotebookInstance
Example Usage
Example
using System;
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AwsNative = Pulumi.AwsNative;
return await Deployment.RunAsync(() =>
{
var basicNotebookInstanceLifecycleConfig = new AwsNative.SageMaker.NotebookInstanceLifecycleConfig("basicNotebookInstanceLifecycleConfig", new()
{
OnStart = new[]
{
new AwsNative.SageMaker.Inputs.NotebookInstanceLifecycleConfigNotebookInstanceLifecycleHookArgs
{
Content = Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes("echo 'hello'")),
},
},
});
var executionRole = new AwsNative.Iam.Role("executionRole", new()
{
AssumeRolePolicyDocument = new Dictionary<string, object?>
{
["version"] = "2012-10-17",
["statement"] = new[]
{
new Dictionary<string, object?>
{
["effect"] = "Allow",
["principal"] = new Dictionary<string, object?>
{
["service"] = new[]
{
"sagemaker.amazonaws.com",
},
},
["action"] = new[]
{
"sts:AssumeRole",
},
},
},
},
Path = "/",
Policies = new[]
{
new AwsNative.Iam.Inputs.RolePolicyArgs
{
PolicyName = "root",
PolicyDocument = new Dictionary<string, object?>
{
["version"] = "2012-10-17",
["statement"] = new[]
{
new Dictionary<string, object?>
{
["effect"] = "Allow",
["action"] = "*",
["resource"] = "*",
},
},
},
},
},
});
var basicNotebookInstance = new AwsNative.SageMaker.NotebookInstance("basicNotebookInstance", new()
{
InstanceType = "ml.t2.medium",
RoleArn = executionRole.Arn,
LifecycleConfigName = basicNotebookInstanceLifecycleConfig.NotebookInstanceLifecycleConfigName,
});
return new Dictionary<string, object?>
{
["basicNotebookInstanceId"] = basicNotebookInstance.Id,
["basicNotebookInstanceLifecycleConfigId"] = basicNotebookInstanceLifecycleConfig.Id,
};
});
package main
import (
"encoding/base64"
"github.com/pulumi/pulumi-aws-native/sdk/go/aws/iam"
"github.com/pulumi/pulumi-aws-native/sdk/go/aws/sagemaker"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
basicNotebookInstanceLifecycleConfig, err := sagemaker.NewNotebookInstanceLifecycleConfig(ctx, "basicNotebookInstanceLifecycleConfig", &sagemaker.NotebookInstanceLifecycleConfigArgs{
OnStart: sagemaker.NotebookInstanceLifecycleConfigNotebookInstanceLifecycleHookArray{
&sagemaker.NotebookInstanceLifecycleConfigNotebookInstanceLifecycleHookArgs{
Content: pulumi.String(base64.StdEncoding.EncodeToString([]byte("echo 'hello'"))),
},
},
})
if err != nil {
return err
}
executionRole, err := iam.NewRole(ctx, "executionRole", &iam.RoleArgs{
AssumeRolePolicyDocument: pulumi.Any(map[string]interface{}{
"version": "2012-10-17",
"statement": []map[string]interface{}{
map[string]interface{}{
"effect": "Allow",
"principal": map[string][]string{
"service": []string{
"sagemaker.amazonaws.com",
},
},
"action": []string{
"sts:AssumeRole",
},
},
},
}),
Path: pulumi.String("/"),
Policies: iam.RolePolicyTypeArray{
&iam.RolePolicyTypeArgs{
PolicyName: pulumi.String("root"),
PolicyDocument: pulumi.Any(map[string]interface{}{
"version": "2012-10-17",
"statement": []map[string]string{
{
"effect": "Allow",
"action": "*",
"resource": "*",
},
},
}),
},
},
})
if err != nil {
return err
}
basicNotebookInstance, err := sagemaker.NewNotebookInstance(ctx, "basicNotebookInstance", &sagemaker.NotebookInstanceArgs{
InstanceType: pulumi.String("ml.t2.medium"),
RoleArn: executionRole.Arn,
LifecycleConfigName: basicNotebookInstanceLifecycleConfig.NotebookInstanceLifecycleConfigName,
})
if err != nil {
return err
}
ctx.Export("basicNotebookInstanceId", basicNotebookInstance.ID())
ctx.Export("basicNotebookInstanceLifecycleConfigId", basicNotebookInstanceLifecycleConfig.ID())
return nil
})
}
Example coming soon!
Example coming soon!
import * as pulumi from "@pulumi/pulumi";
import * as aws_native from "@pulumi/aws-native";
const basicNotebookInstanceLifecycleConfig = new aws_native.sagemaker.NotebookInstanceLifecycleConfig("basicNotebookInstanceLifecycleConfig", {onStart: [{
content: Buffer.from("echo 'hello'").toString("base64"),
}]});
const executionRole = new aws_native.iam.Role("executionRole", {
assumeRolePolicyDocument: {
version: "2012-10-17",
statement: [{
effect: "Allow",
principal: {
service: ["sagemaker.amazonaws.com"],
},
action: ["sts:AssumeRole"],
}],
},
path: "/",
policies: [{
policyName: "root",
policyDocument: {
version: "2012-10-17",
statement: [{
effect: "Allow",
action: "*",
resource: "*",
}],
},
}],
});
const basicNotebookInstance = new aws_native.sagemaker.NotebookInstance("basicNotebookInstance", {
instanceType: "ml.t2.medium",
roleArn: executionRole.arn,
lifecycleConfigName: basicNotebookInstanceLifecycleConfig.notebookInstanceLifecycleConfigName,
});
export const basicNotebookInstanceId = basicNotebookInstance.id;
export const basicNotebookInstanceLifecycleConfigId = basicNotebookInstanceLifecycleConfig.id;
import pulumi
import base64
import pulumi_aws_native as aws_native
basic_notebook_instance_lifecycle_config = aws_native.sagemaker.NotebookInstanceLifecycleConfig("basicNotebookInstanceLifecycleConfig", on_start=[{
"content": base64.b64encode("echo 'hello'".encode()).decode(),
}])
execution_role = aws_native.iam.Role("executionRole",
assume_role_policy_document={
"version": "2012-10-17",
"statement": [{
"effect": "Allow",
"principal": {
"service": ["sagemaker.amazonaws.com"],
},
"action": ["sts:AssumeRole"],
}],
},
path="/",
policies=[{
"policy_name": "root",
"policy_document": {
"version": "2012-10-17",
"statement": [{
"effect": "Allow",
"action": "*",
"resource": "*",
}],
},
}])
basic_notebook_instance = aws_native.sagemaker.NotebookInstance("basicNotebookInstance",
instance_type="ml.t2.medium",
role_arn=execution_role.arn,
lifecycle_config_name=basic_notebook_instance_lifecycle_config.notebook_instance_lifecycle_config_name)
pulumi.export("basicNotebookInstanceId", basic_notebook_instance.id)
pulumi.export("basicNotebookInstanceLifecycleConfigId", basic_notebook_instance_lifecycle_config.id)
Example coming soon!
Create NotebookInstance Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new NotebookInstance(name: string, args: NotebookInstanceArgs, opts?: CustomResourceOptions);@overload
def NotebookInstance(resource_name: str,
args: NotebookInstanceArgs,
opts: Optional[ResourceOptions] = None)
@overload
def NotebookInstance(resource_name: str,
opts: Optional[ResourceOptions] = None,
instance_type: Optional[str] = None,
role_arn: Optional[str] = None,
notebook_instance_name: Optional[str] = None,
platform_identifier: Optional[str] = None,
instance_metadata_service_configuration: Optional[NotebookInstanceInstanceMetadataServiceConfigurationArgs] = None,
default_code_repository: Optional[str] = None,
kms_key_id: Optional[str] = None,
lifecycle_config_name: Optional[str] = None,
accelerator_types: Optional[Sequence[str]] = None,
direct_internet_access: Optional[str] = None,
additional_code_repositories: Optional[Sequence[str]] = None,
root_access: Optional[str] = None,
security_group_ids: Optional[Sequence[str]] = None,
subnet_id: Optional[str] = None,
tags: Optional[Sequence[_root_inputs.TagArgs]] = None,
volume_size_in_gb: Optional[int] = None)func NewNotebookInstance(ctx *Context, name string, args NotebookInstanceArgs, opts ...ResourceOption) (*NotebookInstance, error)public NotebookInstance(string name, NotebookInstanceArgs args, CustomResourceOptions? opts = null)
public NotebookInstance(String name, NotebookInstanceArgs args)
public NotebookInstance(String name, NotebookInstanceArgs args, CustomResourceOptions options)
type: aws-native:sagemaker:NotebookInstance
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "aws-native_sagemaker_notebook_instance" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args NotebookInstanceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args NotebookInstanceArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args NotebookInstanceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NotebookInstanceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args NotebookInstanceArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
NotebookInstance Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The NotebookInstance resource accepts the following input properties:
- Instance
Type string - The type of ML compute instance to launch for the notebook instance. Expect some interruption of service if this parameter is changed as CloudFormation stops a notebook instance and starts it up again to update it.
- Role
Arn string - When you send any requests to AWS resources from the notebook instance, SageMaker AI assumes this role to perform tasks on your behalf. You must grant this role necessary permissions so SageMaker AI can perform these tasks. The policy must allow the SageMaker AI service principal (sagemaker.amazonaws.com) permissions to assume this role. To be able to pass this role to SageMaker AI, the caller of this API must have the iam:PassRole permission.
- Accelerator
Types List<string> - A list of Amazon Elastic Inference (EI) instance types to associate with the notebook instance. Currently, only one instance type can be associated with a notebook instance.
- Additional
Code List<string>Repositories - An array of up to three Git repositories associated 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.
- Default
Code stringRepository - 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. When you open a notebook instance, it opens in the directory that contains this repository.
- Direct
Internet stringAccess - Sets whether SageMaker AI provides internet access to the notebook instance. If you set this to Disabled this notebook instance is able to access resources only in your VPC, and is not be able to connect to SageMaker AI training and endpoint services unless you configure a NAT Gateway in your VPC. You can set the value of this parameter to Disabled only if you set a value for the SubnetId parameter.
- Instance
Metadata Pulumi.Service Configuration Aws Native. Sage Maker. Inputs. Notebook Instance Instance Metadata Service Configuration - Information on the IMDS configuration of the notebook instance.
- Kms
Key stringId - The Amazon Resource Name (ARN) of a AWS Key Management Service key that SageMaker AI uses to encrypt data on the storage volume attached to your notebook instance. The KMS key you provide must be enabled.
- Lifecycle
Config stringName - The name of a lifecycle configuration to associate with the notebook instance.
- Notebook
Instance stringName - The name of the new notebook instance.
- Platform
Identifier string - The platform identifier of the notebook instance runtime environment. The default value is notebook-al2023-v1.
- Root
Access string - Whether root access is enabled or disabled for users of the notebook instance. The default value is Enabled. Lifecycle configurations need root access to be able to set up a notebook instance. Because of this, lifecycle configurations associated with a notebook instance always run with root access even if you disable root access for users.
- Security
Group List<string>Ids - The VPC security group IDs, in the form sg-xxxxxxxx. The security groups must be for the same VPC as specified in the subnet.
- 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.
-
List<Pulumi.
Aws Native. Inputs. Tag> - A list of key-value pairs to apply to this resource.
- Volume
Size intIn Gb - The size, in GB, of the ML storage volume to attach to the notebook instance. The default value is 5 GB. Expect some interruption of service if this parameter is changed as CloudFormation stops a notebook instance and starts it up again to update it.
- Instance
Type string - The type of ML compute instance to launch for the notebook instance. Expect some interruption of service if this parameter is changed as CloudFormation stops a notebook instance and starts it up again to update it.
- Role
Arn string - When you send any requests to AWS resources from the notebook instance, SageMaker AI assumes this role to perform tasks on your behalf. You must grant this role necessary permissions so SageMaker AI can perform these tasks. The policy must allow the SageMaker AI service principal (sagemaker.amazonaws.com) permissions to assume this role. To be able to pass this role to SageMaker AI, the caller of this API must have the iam:PassRole permission.
- Accelerator
Types []string - A list of Amazon Elastic Inference (EI) instance types to associate with the notebook instance. Currently, only one instance type can be associated with a notebook instance.
- Additional
Code []stringRepositories - An array of up to three Git repositories associated 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.
- Default
Code stringRepository - 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. When you open a notebook instance, it opens in the directory that contains this repository.
- Direct
Internet stringAccess - Sets whether SageMaker AI provides internet access to the notebook instance. If you set this to Disabled this notebook instance is able to access resources only in your VPC, and is not be able to connect to SageMaker AI training and endpoint services unless you configure a NAT Gateway in your VPC. You can set the value of this parameter to Disabled only if you set a value for the SubnetId parameter.
- Instance
Metadata NotebookService Configuration Instance Instance Metadata Service Configuration Args - Information on the IMDS configuration of the notebook instance.
- Kms
Key stringId - The Amazon Resource Name (ARN) of a AWS Key Management Service key that SageMaker AI uses to encrypt data on the storage volume attached to your notebook instance. The KMS key you provide must be enabled.
- Lifecycle
Config stringName - The name of a lifecycle configuration to associate with the notebook instance.
- Notebook
Instance stringName - The name of the new notebook instance.
- Platform
Identifier string - The platform identifier of the notebook instance runtime environment. The default value is notebook-al2023-v1.
- Root
Access string - Whether root access is enabled or disabled for users of the notebook instance. The default value is Enabled. Lifecycle configurations need root access to be able to set up a notebook instance. Because of this, lifecycle configurations associated with a notebook instance always run with root access even if you disable root access for users.
- Security
Group []stringIds - The VPC security group IDs, in the form sg-xxxxxxxx. The security groups must be for the same VPC as specified in the subnet.
- 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.
-
Tag
Args - A list of key-value pairs to apply to this resource.
- Volume
Size intIn Gb - The size, in GB, of the ML storage volume to attach to the notebook instance. The default value is 5 GB. Expect some interruption of service if this parameter is changed as CloudFormation stops a notebook instance and starts it up again to update it.
- instance_
type string - The type of ML compute instance to launch for the notebook instance. Expect some interruption of service if this parameter is changed as CloudFormation stops a notebook instance and starts it up again to update it.
- role_
arn string - When you send any requests to AWS resources from the notebook instance, SageMaker AI assumes this role to perform tasks on your behalf. You must grant this role necessary permissions so SageMaker AI can perform these tasks. The policy must allow the SageMaker AI service principal (sagemaker.amazonaws.com) permissions to assume this role. To be able to pass this role to SageMaker AI, the caller of this API must have the iam:PassRole permission.
- accelerator_
types list(string) - A list of Amazon Elastic Inference (EI) instance types to associate with the notebook instance. Currently, only one instance type can be associated with a notebook instance.
- additional_
code_ list(string)repositories - An array of up to three Git repositories associated 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.
- default_
code_ stringrepository - 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. When you open a notebook instance, it opens in the directory that contains this repository.
- direct_
internet_ stringaccess - Sets whether SageMaker AI provides internet access to the notebook instance. If you set this to Disabled this notebook instance is able to access resources only in your VPC, and is not be able to connect to SageMaker AI training and endpoint services unless you configure a NAT Gateway in your VPC. You can set the value of this parameter to Disabled only if you set a value for the SubnetId parameter.
- instance_
metadata_ objectservice_ configuration - Information on the IMDS configuration of the notebook instance.
- kms_
key_ stringid - The Amazon Resource Name (ARN) of a AWS Key Management Service key that SageMaker AI uses to encrypt data on the storage volume attached to your notebook instance. The KMS key you provide must be enabled.
- lifecycle_
config_ stringname - The name of a lifecycle configuration to associate with the notebook instance.
- notebook_
instance_ stringname - The name of the new notebook instance.
- platform_
identifier string - The platform identifier of the notebook instance runtime environment. The default value is notebook-al2023-v1.
- root_
access string - Whether root access is enabled or disabled for users of the notebook instance. The default value is Enabled. Lifecycle configurations need root access to be able to set up a notebook instance. Because of this, lifecycle configurations associated with a notebook instance always run with root access even if you disable root access for users.
- security_
group_ list(string)ids - The VPC security group IDs, in the form sg-xxxxxxxx. The security groups must be for the same VPC as specified in the subnet.
- 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.
- list(object)
- A list of key-value pairs to apply to this resource.
- volume_
size_ numberin_ gb - The size, in GB, of the ML storage volume to attach to the notebook instance. The default value is 5 GB. Expect some interruption of service if this parameter is changed as CloudFormation stops a notebook instance and starts it up again to update it.
- instance
Type String - The type of ML compute instance to launch for the notebook instance. Expect some interruption of service if this parameter is changed as CloudFormation stops a notebook instance and starts it up again to update it.
- role
Arn String - When you send any requests to AWS resources from the notebook instance, SageMaker AI assumes this role to perform tasks on your behalf. You must grant this role necessary permissions so SageMaker AI can perform these tasks. The policy must allow the SageMaker AI service principal (sagemaker.amazonaws.com) permissions to assume this role. To be able to pass this role to SageMaker AI, the caller of this API must have the iam:PassRole permission.
- accelerator
Types List<String> - A list of Amazon Elastic Inference (EI) instance types to associate with the notebook instance. Currently, only one instance type can be associated with a notebook instance.
- additional
Code List<String>Repositories - An array of up to three Git repositories associated 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.
- default
Code StringRepository - 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. When you open a notebook instance, it opens in the directory that contains this repository.
- direct
Internet StringAccess - Sets whether SageMaker AI provides internet access to the notebook instance. If you set this to Disabled this notebook instance is able to access resources only in your VPC, and is not be able to connect to SageMaker AI training and endpoint services unless you configure a NAT Gateway in your VPC. You can set the value of this parameter to Disabled only if you set a value for the SubnetId parameter.
- instance
Metadata NotebookService Configuration Instance Instance Metadata Service Configuration - Information on the IMDS configuration of the notebook instance.
- kms
Key StringId - The Amazon Resource Name (ARN) of a AWS Key Management Service key that SageMaker AI uses to encrypt data on the storage volume attached to your notebook instance. The KMS key you provide must be enabled.
- lifecycle
Config StringName - The name of a lifecycle configuration to associate with the notebook instance.
- notebook
Instance StringName - The name of the new notebook instance.
- platform
Identifier String - The platform identifier of the notebook instance runtime environment. The default value is notebook-al2023-v1.
- root
Access String - Whether root access is enabled or disabled for users of the notebook instance. The default value is Enabled. Lifecycle configurations need root access to be able to set up a notebook instance. Because of this, lifecycle configurations associated with a notebook instance always run with root access even if you disable root access for users.
- security
Group List<String>Ids - The VPC security group IDs, in the form sg-xxxxxxxx. The security groups must be for the same VPC as specified in the subnet.
- 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.
- List<Tag>
- A list of key-value pairs to apply to this resource.
- volume
Size IntegerIn Gb - The size, in GB, of the ML storage volume to attach to the notebook instance. The default value is 5 GB. Expect some interruption of service if this parameter is changed as CloudFormation stops a notebook instance and starts it up again to update it.
- instance
Type string - The type of ML compute instance to launch for the notebook instance. Expect some interruption of service if this parameter is changed as CloudFormation stops a notebook instance and starts it up again to update it.
- role
Arn string - When you send any requests to AWS resources from the notebook instance, SageMaker AI assumes this role to perform tasks on your behalf. You must grant this role necessary permissions so SageMaker AI can perform these tasks. The policy must allow the SageMaker AI service principal (sagemaker.amazonaws.com) permissions to assume this role. To be able to pass this role to SageMaker AI, the caller of this API must have the iam:PassRole permission.
- accelerator
Types string[] - A list of Amazon Elastic Inference (EI) instance types to associate with the notebook instance. Currently, only one instance type can be associated with a notebook instance.
- additional
Code string[]Repositories - An array of up to three Git repositories associated 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.
- default
Code stringRepository - 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. When you open a notebook instance, it opens in the directory that contains this repository.
- direct
Internet stringAccess - Sets whether SageMaker AI provides internet access to the notebook instance. If you set this to Disabled this notebook instance is able to access resources only in your VPC, and is not be able to connect to SageMaker AI training and endpoint services unless you configure a NAT Gateway in your VPC. You can set the value of this parameter to Disabled only if you set a value for the SubnetId parameter.
- instance
Metadata NotebookService Configuration Instance Instance Metadata Service Configuration - Information on the IMDS configuration of the notebook instance.
- kms
Key stringId - The Amazon Resource Name (ARN) of a AWS Key Management Service key that SageMaker AI uses to encrypt data on the storage volume attached to your notebook instance. The KMS key you provide must be enabled.
- lifecycle
Config stringName - The name of a lifecycle configuration to associate with the notebook instance.
- notebook
Instance stringName - The name of the new notebook instance.
- platform
Identifier string - The platform identifier of the notebook instance runtime environment. The default value is notebook-al2023-v1.
- root
Access string - Whether root access is enabled or disabled for users of the notebook instance. The default value is Enabled. Lifecycle configurations need root access to be able to set up a notebook instance. Because of this, lifecycle configurations associated with a notebook instance always run with root access even if you disable root access for users.
- security
Group string[]Ids - The VPC security group IDs, in the form sg-xxxxxxxx. The security groups must be for the same VPC as specified in the subnet.
- 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.
- Tag[]
- A list of key-value pairs to apply to this resource.
- volume
Size numberIn Gb - The size, in GB, of the ML storage volume to attach to the notebook instance. The default value is 5 GB. Expect some interruption of service if this parameter is changed as CloudFormation stops a notebook instance and starts it up again to update it.
- instance_
type str - The type of ML compute instance to launch for the notebook instance. Expect some interruption of service if this parameter is changed as CloudFormation stops a notebook instance and starts it up again to update it.
- role_
arn str - When you send any requests to AWS resources from the notebook instance, SageMaker AI assumes this role to perform tasks on your behalf. You must grant this role necessary permissions so SageMaker AI can perform these tasks. The policy must allow the SageMaker AI service principal (sagemaker.amazonaws.com) permissions to assume this role. To be able to pass this role to SageMaker AI, the caller of this API must have the iam:PassRole permission.
- accelerator_
types Sequence[str] - A list of Amazon Elastic Inference (EI) instance types to associate with the notebook instance. Currently, only one instance type can be associated with a notebook instance.
- additional_
code_ Sequence[str]repositories - An array of up to three Git repositories associated 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.
- default_
code_ strrepository - 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. When you open a notebook instance, it opens in the directory that contains this repository.
- direct_
internet_ straccess - Sets whether SageMaker AI provides internet access to the notebook instance. If you set this to Disabled this notebook instance is able to access resources only in your VPC, and is not be able to connect to SageMaker AI training and endpoint services unless you configure a NAT Gateway in your VPC. You can set the value of this parameter to Disabled only if you set a value for the SubnetId parameter.
- instance_
metadata_ Notebookservice_ configuration Instance Instance Metadata Service Configuration Args - Information on the IMDS configuration of the notebook instance.
- kms_
key_ strid - The Amazon Resource Name (ARN) of a AWS Key Management Service key that SageMaker AI uses to encrypt data on the storage volume attached to your notebook instance. The KMS key you provide must be enabled.
- lifecycle_
config_ strname - The name of a lifecycle configuration to associate with the notebook instance.
- notebook_
instance_ strname - The name of the new notebook instance.
- platform_
identifier str - The platform identifier of the notebook instance runtime environment. The default value is notebook-al2023-v1.
- root_
access str - Whether root access is enabled or disabled for users of the notebook instance. The default value is Enabled. Lifecycle configurations need root access to be able to set up a notebook instance. Because of this, lifecycle configurations associated with a notebook instance always run with root access even if you disable root access for users.
- security_
group_ Sequence[str]ids - The VPC security group IDs, in the form sg-xxxxxxxx. The security groups must be for the same VPC as specified in the subnet.
- subnet_
id str - The ID of the subnet in a VPC to which you would like to have a connectivity from your ML compute instance.
-
Sequence[Tag
Args] - A list of key-value pairs to apply to this resource.
- volume_
size_ intin_ gb - The size, in GB, of the ML storage volume to attach to the notebook instance. The default value is 5 GB. Expect some interruption of service if this parameter is changed as CloudFormation stops a notebook instance and starts it up again to update it.
- instance
Type String - The type of ML compute instance to launch for the notebook instance. Expect some interruption of service if this parameter is changed as CloudFormation stops a notebook instance and starts it up again to update it.
- role
Arn String - When you send any requests to AWS resources from the notebook instance, SageMaker AI assumes this role to perform tasks on your behalf. You must grant this role necessary permissions so SageMaker AI can perform these tasks. The policy must allow the SageMaker AI service principal (sagemaker.amazonaws.com) permissions to assume this role. To be able to pass this role to SageMaker AI, the caller of this API must have the iam:PassRole permission.
- accelerator
Types List<String> - A list of Amazon Elastic Inference (EI) instance types to associate with the notebook instance. Currently, only one instance type can be associated with a notebook instance.
- additional
Code List<String>Repositories - An array of up to three Git repositories associated 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.
- default
Code StringRepository - 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. When you open a notebook instance, it opens in the directory that contains this repository.
- direct
Internet StringAccess - Sets whether SageMaker AI provides internet access to the notebook instance. If you set this to Disabled this notebook instance is able to access resources only in your VPC, and is not be able to connect to SageMaker AI training and endpoint services unless you configure a NAT Gateway in your VPC. You can set the value of this parameter to Disabled only if you set a value for the SubnetId parameter.
- instance
Metadata Property MapService Configuration - Information on the IMDS configuration of the notebook instance.
- kms
Key StringId - The Amazon Resource Name (ARN) of a AWS Key Management Service key that SageMaker AI uses to encrypt data on the storage volume attached to your notebook instance. The KMS key you provide must be enabled.
- lifecycle
Config StringName - The name of a lifecycle configuration to associate with the notebook instance.
- notebook
Instance StringName - The name of the new notebook instance.
- platform
Identifier String - The platform identifier of the notebook instance runtime environment. The default value is notebook-al2023-v1.
- root
Access String - Whether root access is enabled or disabled for users of the notebook instance. The default value is Enabled. Lifecycle configurations need root access to be able to set up a notebook instance. Because of this, lifecycle configurations associated with a notebook instance always run with root access even if you disable root access for users.
- security
Group List<String>Ids - The VPC security group IDs, in the form sg-xxxxxxxx. The security groups must be for the same VPC as specified in the subnet.
- 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.
- List<Property Map>
- A list of key-value pairs to apply to this resource.
- volume
Size NumberIn Gb - The size, in GB, of the ML storage volume to attach to the notebook instance. The default value is 5 GB. Expect some interruption of service if this parameter is changed as CloudFormation stops a notebook instance and starts it up again to update it.
Outputs
All input properties are implicitly available as output properties. Additionally, the NotebookInstance resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Notebook
Instance stringArn - The Amazon Resource Name (ARN) of the notebook instance.
- Id string
- The provider-assigned unique ID for this managed resource.
- Notebook
Instance stringArn - The Amazon Resource Name (ARN) of the notebook instance.
- id string
- The provider-assigned unique ID for this managed resource.
- notebook_
instance_ stringarn - The Amazon Resource Name (ARN) of the notebook instance.
- id String
- The provider-assigned unique ID for this managed resource.
- notebook
Instance StringArn - The Amazon Resource Name (ARN) of the notebook instance.
- id string
- The provider-assigned unique ID for this managed resource.
- notebook
Instance stringArn - The Amazon Resource Name (ARN) of the notebook instance.
- id str
- The provider-assigned unique ID for this managed resource.
- notebook_
instance_ strarn - The Amazon Resource Name (ARN) of the notebook instance.
- id String
- The provider-assigned unique ID for this managed resource.
- notebook
Instance StringArn - The Amazon Resource Name (ARN) of the notebook instance.
Supporting Types
NotebookInstanceInstanceMetadataServiceConfiguration, NotebookInstanceInstanceMetadataServiceConfigurationArgs
Information on the IMDS configuration of the notebook instance- Minimum
Instance stringMetadata Service Version - Indicates the minimum IMDS version that the notebook instance supports. When passed as part of CreateNotebookInstance, if no value is selected, then it defaults to IMDSv1. This means that both IMDSv1 and IMDSv2 are supported. If passed as part of UpdateNotebookInstance, there is no default.
- Minimum
Instance stringMetadata Service Version - Indicates the minimum IMDS version that the notebook instance supports. When passed as part of CreateNotebookInstance, if no value is selected, then it defaults to IMDSv1. This means that both IMDSv1 and IMDSv2 are supported. If passed as part of UpdateNotebookInstance, there is no default.
- minimum_
instance_ stringmetadata_ service_ version - Indicates the minimum IMDS version that the notebook instance supports. When passed as part of CreateNotebookInstance, if no value is selected, then it defaults to IMDSv1. This means that both IMDSv1 and IMDSv2 are supported. If passed as part of UpdateNotebookInstance, there is no default.
- minimum
Instance StringMetadata Service Version - Indicates the minimum IMDS version that the notebook instance supports. When passed as part of CreateNotebookInstance, if no value is selected, then it defaults to IMDSv1. This means that both IMDSv1 and IMDSv2 are supported. If passed as part of UpdateNotebookInstance, there is no default.
- minimum
Instance stringMetadata Service Version - Indicates the minimum IMDS version that the notebook instance supports. When passed as part of CreateNotebookInstance, if no value is selected, then it defaults to IMDSv1. This means that both IMDSv1 and IMDSv2 are supported. If passed as part of UpdateNotebookInstance, there is no default.
- minimum_
instance_ strmetadata_ service_ version - Indicates the minimum IMDS version that the notebook instance supports. When passed as part of CreateNotebookInstance, if no value is selected, then it defaults to IMDSv1. This means that both IMDSv1 and IMDSv2 are supported. If passed as part of UpdateNotebookInstance, there is no default.
- minimum
Instance StringMetadata Service Version - Indicates the minimum IMDS version that the notebook instance supports. When passed as part of CreateNotebookInstance, if no value is selected, then it defaults to IMDSv1. This means that both IMDSv1 and IMDSv2 are supported. If passed as part of UpdateNotebookInstance, there is no default.
Tag, TagArgs
A set of tags to apply to the resource.Package Details
- Repository
- AWS Native pulumi/pulumi-aws-native
- License
- Apache-2.0
We recommend new projects start with resources from the AWS provider.
published on Monday, Sep 28, 2026 by Pulumi