CfnNotebookInstanceProps Struct
Properties for defining a CfnNotebookInstance.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_sagemaker as sagemaker } from 'aws-cdk-lib';
const cfnNotebookInstanceProps: sagemaker.CfnNotebookInstanceProps = {
instanceType: 'instanceType',
roleArn: 'roleArn',
// the properties below are optional
acceleratorTypes: ['acceleratorTypes'],
additionalCodeRepositories: ['additionalCodeRepositories'],
defaultCodeRepository: 'defaultCodeRepository',
directInternetAccess: 'directInternetAccess',
instanceMetadataServiceConfiguration: {
minimumInstanceMetadataServiceVersion: 'minimumInstanceMetadataServiceVersion',
},
kmsKeyId: 'kmsKeyId',
lifecycleConfigName: 'lifecycleConfigName',
notebookInstanceName: 'notebookInstanceName',
platformIdentifier: 'platformIdentifier',
rootAccess: 'rootAccess',
securityGroupIds: ['securityGroupIds'],
subnetId: 'subnetId',
tags: [{
key: 'key',
value: 'value',
}],
volumeSizeInGb: 123,
};
Properties
acceleratorTypesstring[]accelerator_typestyping.List[str]acceleratorTypesList<String>AcceleratorTypesstring[]AcceleratorTypes*[]*stringdeprecated#notes
Currently, only one instance type can be associated with a notebook instance. For more information, see Using Elastic Inference in Amazon SageMaker .
Valid Values: ml.eia1.medium | ml.eia1.large | ml.eia1.xlarge | ml.eia2.medium | ml.eia2.large | ml.eia2.xlarge .
additionalCodeRepositoriesstring[]additional_code_repositoriestyping.List[str]additionalCodeRepositoriesList<String>AdditionalCodeRepositoriesstring[]AdditionalCodeRepositories*[]*string#notes
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. For more information, see Associating Git Repositories with SageMaker AI Notebook Instances .
defaultCodeRepositorystringdefault_code_repositorystrdefaultCodeRepositoryStringDefaultCodeRepositorystringDefaultCodeRepository*string#notes
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. For more information, see Associating Git Repositories with SageMaker AI Notebook Instances .
directInternetAccessstringdirect_internet_accessstrdirectInternetAccessStringDirectInternetAccessstringDirectInternetAccess*string#notes
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.
For more information, see Notebook Instances Are Internet-Enabled by Default . You can set the value of this parameter to Disabled only if you set a value for the SubnetId parameter.
instanceMetadataServiceConfigurationIResolvable | CfnNotebookInstance.InstanceMetadataServiceConfigurationPropertyinstance_metadata_service_configurationtyping.Union[IResolvable, InstanceMetadataServiceConfigurationProperty]instanceMetadataServiceConfigurationIResolvableInstanceMetadataServiceConfigurationIResolvableInstanceMetadataServiceConfigurationinterface{}#Expect some interruption of service if this parameter is changed as CloudFormation stops a notebook instance and starts it up again to update it.
The KMS key you provide must be enabled. For information, see Enabling and Disabling Keys in the AWS Key Management Service Developer Guide .
lifecycleConfigNamestringlifecycle_config_namestrlifecycleConfigNameStringLifecycleConfigNamestringLifecycleConfigName*string#For information about lifecycle configurations, see Customize a Notebook Instance in the Amazon SageMaker Developer Guide .
notebookInstanceNamestringnotebook_instance_namestrnotebookInstanceNameStringNotebookInstanceNamestringNotebookInstanceName*string#platformIdentifierstringplatform_identifierstrplatformIdentifierStringPlatformIdentifierstringPlatformIdentifier*string#The default value is notebook-al2-v2 .
notes
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. For more information, see SageMaker AI Roles .
To be able to pass this role to SageMaker AI, the caller of this API must have the
iam:PassRolepermission.
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.
securityGroupIdsstring[]security_group_idstyping.List[str]securityGroupIdsList<String>SecurityGroupIdsstring[]SecurityGroupIds*[]*string#The security groups must be for the same VPC as specified in the subnet.
notes
For more information, see Resource Tag and Using Cost Allocation Tags .
You can add tags later by using the CreateTags API.
volumeSizeInGbnumbervolume_size_in_gbint | floatvolumeSizeInGbNumberVolumeSizeInGbdoubleVolumeSizeInGb*float64#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.