Skip to content

Instantly share code, notes, and snippets.

@qtangs
Last active July 30, 2019 15:24
Show Gist options
  • Save qtangs/0e0848d5d303e03acdcb3b5d40dff57b to your computer and use it in GitHub Desktop.
Save qtangs/0e0848d5d303e03acdcb3b5d40dff57b to your computer and use it in GitHub Desktop.
resource "aws_sagemaker_notebook_instance" "basic" {
name = "FraudDetectionNotebookInstance"
role_arn = "${aws_iam_role.sm_notebook_instance_role.arn}"
instance_type = "ml.t2.medium"
lifecycle_config_name = "${aws_sagemaker_notebook_instance_lifecycle_configuration.basic_lifecycle.name}"
}
resource "aws_sagemaker_notebook_instance_lifecycle_configuration" "basic_lifecycle" {
name = "BasicNotebookInstanceLifecycleConfig"
on_start = "${base64encode(data.template_file.instance_init.rendered)}"
}
data "template_file" "instance_init" {
template = "${file("${path.module}/template/sagemaker_instance_init.sh")}"
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment