AWS Amazon SageMaker Notebook Instance Lifecycle Configuration

This page shows how to write Terraform and CloudFormation for Amazon SageMaker Notebook Instance Lifecycle Configuration and write them securely.

code-icon

Fix issues in your cloud & app configurations

Test for misconfigurations of this resource in your cloud.

get-started-button

Terraform Example (aws_sagemaker_notebook_instance_lifecycle_configuration)

Provides a lifecycle configuration for SageMaker Notebook Instances.

Parameters

Example Usage (from GitHub)

github-iconAndreasLuckert/fraud-detection-using-terraform-and-sagemaker
resource "aws_sagemaker_notebook_instance_lifecycle_configuration" "basic_lifecycle" {
  name      = "dev-platform-al-sm-frauddetection-lifecycle-config"
  on_create = base64encode(data.template_file.on_create.rendered)
  on_start  = base64encode(data.template_file.on_start.rendered)

  depends_on = [aws_s3_bucket.s3_bucket_model_training_data]
github-iconboldlink/terraform
resource "aws_sagemaker_notebook_instance_lifecycle_configuration" "main" {
  name      = var.name
  on_create = var.on_create
  on_start  = var.on_start
}

github-iconAndreasLuckert/aws-sm-notebook-instance
resource "aws_sagemaker_notebook_instance_lifecycle_configuration" "notebook_config" {
  name = "dev-platform-al-sm-lifecycle-config"
  on_create = filebase64("../scripts/on-create.sh")
  on_start = filebase64("../scripts/on-start.sh")

CloudFormation Example (AWS::SageMaker::NotebookInstanceLifecycleConfig)

The AWS::SageMaker::NotebookInstanceLifecycleConfig resource creates shell scripts that run when you create and/or start a notebook instance. For information about notebook instance lifecycle configurations, see Customize a Notebook Instance in the Amazon SageMaker Developer Guide.

Parameters

Frequently asked questions

What is AWS Amazon SageMaker Notebook Instance Lifecycle Configuration?

AWS Amazon SageMaker Notebook Instance Lifecycle Configuration is a resource for Amazon SageMaker of Amazon Web Service. Settings can be wrote in Terraform and CloudFormation.

Where can I find the example code for the AWS Amazon SageMaker Notebook Instance Lifecycle Configuration?

For Terraform, the AndreasLuckert/fraud-detection-using-terraform-and-sagemaker, boldlink/terraform and AndreasLuckert/aws-sm-notebook-instance source code examples are useful. See the Terraform Example section for further details.