AWS Amazon SageMaker Model

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

aws_sagemaker_model (Terraform)

The Model in Amazon SageMaker can be configured in Terraform with the resource name aws_sagemaker_model. The following sections describe 5 examples of how to use the resource and its parameters.

Example Usage from GitHub

aws_sagemaker_model.examplea.tf#L1
resource "aws_sagemaker_model" "examplea" {
  execution_role_arn = aws_iam_role.examplea.arn
}

resource "aws_iam_role" "examplea" {
  assume_role_policy = data.aws_iam_policy_document.assume_role.json
model.tf#L1
resource "aws_sagemaker_model" "this" {
  name               = "rs-model-a-1"
  execution_role_arn = aws_iam_role.execution_role.arn

  container {
    image          = data.aws_sagemaker_prebuilt_ecr_image.scikit.registry_path
main.tf#L7
resource "aws_sagemaker_model" "this" {
  enable_network_isolation = var.enable_network_isolation
  execution_role_arn       = var.execution_role_arn
  name                     = var.name
  tags                     = var.tags

kms_key.tf#L6
resource "aws_sagemaker_model" "test_model" {
  execution_role_arn = aws_iam_role.test_role.arn

  primary_container {
    image = "1234567890.dkr.ecr.us-east-1.amazonaws.com/foo:1"
  }
kms_key.tf#L6
resource "aws_sagemaker_model" "test_model" {
  execution_role_arn = aws_iam_role.test_role.arn

  primary_container {
    image = "1234567890.dkr.ecr.us-east-1.amazonaws.com/foo:1"
  }

Parameters

Explanation in Terraform Registry

Provides a SageMaker model resource.

AWS::SageMaker::Model (CloudFormation)

The Model in SageMaker can be configured in CloudFormation with the resource name AWS::SageMaker::Model. 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

The AWS::SageMaker::Model resource to create a model to host at an Amazon SageMaker endpoint. For more information, see Deploying a Model on Amazon SageMaker Hosting Services in the Amazon SageMaker Developer Guide.

Frequently asked questions

What is AWS Amazon SageMaker Model?

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

For Terraform, the JamesWoolfenden/terraform-aws-sagemaker, dominodatalab/domino-research and niveklabs/aws source code examples are useful. See the Terraform Example section for further details.