Skip to content

Resource: awsSagemakerNotebookInstanceLifecycleConfiguration

Provides a lifecycle configuration for SageMaker Notebook Instances.

Example Usage

Usage:

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.sagemakerNotebookInstanceLifecycleConfiguration.SagemakerNotebookInstanceLifecycleConfiguration(
  this,
  "lc",
  {
    name: "foo",
    onCreate: '${base64encode("echo foo")}',
    onStart: '${base64encode("echo bar")}',
  }
);

Argument Reference

The following arguments are supported:

  • name - (Optional) The name of the lifecycle configuration (must be unique). If omitted, Terraform will assign a random, unique name.
  • onCreate - (Optional) A shell script (base64-encoded) that runs only once when the SageMaker Notebook Instance is created.
  • onStart - (Optional) A shell script (base64-encoded) that runs every time the SageMaker Notebook Instance is started including the time it's created.

Attributes Reference

In addition to all arguments above, the following attributes are exported:

  • arn - The Amazon Resource Name (ARN) assigned by AWS to this lifecycle configuration.

Import

Models can be imported using the name, e.g.,

$ terraform import aws_sagemaker_notebook_instance_lifecycle_configuration.lc foo