AWS Amazon SageMaker Image Version

This page shows how to write Terraform and CloudFormation for Amazon SageMaker Image Version and write them securely.

aws_sagemaker_image_version (Terraform)

The Image Version in Amazon SageMaker can be configured in Terraform with the resource name aws_sagemaker_image_version. The following sections describe 2 examples of how to use the resource and its parameters.

Example Usage from GitHub

sagemaker_image_version.tf#L4
resource "aws_sagemaker_image_version" "sagemaker_image_version" {
  count = var.enable_sagemaker_image_version ? 1 : 0

  image_name = var.sagemaker_image_version_image_name != "" ? var.sagemaker_image_version_image_name : (var.enable_sagemaker_image ? aws_sagemaker_image.sagemaker_image.0.id : null)
  base_image = var.sagemaker_image_version_base_image

sagemaker_image_version.tf#L4
resource "aws_sagemaker_image_version" "sagemaker_image_version" {
  count = var.enable_sagemaker_image_version ? 1 : 0

  image_name = var.sagemaker_image_version_image_name != "" ? var.sagemaker_image_version_image_name : (var.enable_sagemaker_image ? aws_sagemaker_image.sagemaker_image.0.id : null)
  base_image = var.sagemaker_image_version_base_image

Review your Terraform file for AWS best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).

Parameters

Explanation in Terraform Registry

Provides a Sagemaker Image Version resource.

AWS::SageMaker::ImageVersion (CloudFormation)

The ImageVersion in SageMaker can be configured in CloudFormation with the resource name AWS::SageMaker::ImageVersion. The following sections describe how to use the resource and its parameters.

Example Usage from GitHub

An example could not be found in GitHub.

Parameters

Explanation in CloudFormation Registry

Creates a version of the SageMaker image specified by ImageName. The version represents the Amazon Container Registry (ECR) container image specified by BaseImage.

Note You can use the DependsOn attribute to specify that the creation of a specific resource follows another. You can use it for the following use cases. For more information, see DependsOn attribute.

  1. DependsOn can be used to establish a parent/child relationship between ImageVersion and Image where the ImageVersion DependsOnthe Image.
  2. DependsOn can be used to establish order among ImageVersions within the same Image namespace. For example, if ImageVersionB DependsOn ImageVersionA and both share the same parent Image, then ImageVersionA is version N and ImageVersionB is N+1.

Frequently asked questions

What is AWS Amazon SageMaker Image Version?

AWS Amazon SageMaker Image Version 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 Image Version?

For Terraform, the asrkata/SebastianUA-terraform and SebastianUA/terraform source code examples are useful. See the Terraform Example section for further details.