Table Of Contents

Feedback

User Guide

First time using the AWS CLI? See the User Guide for help getting started.

[ aws . sagemaker ]

create-model-package

Description

Creates a model package that you can use to create Amazon SageMaker models or list on AWS Marketplace. Buyers can subscribe to model packages listed on AWS Marketplace to create models in Amazon SageMaker.

To create a model package by specifying a Docker container that contains your inference code and the Amazon S3 location of your model artifacts, provide values for InferenceSpecification . To create a model from an algorithm resource that you created or subscribed to in AWS Marketplace, provide a value for SourceAlgorithmSpecification .

See also: AWS API Documentation

See 'aws help' for descriptions of global parameters.

Synopsis

  create-model-package
--model-package-name <value>
[--model-package-description <value>]
[--inference-specification <value>]
[--validation-specification <value>]
[--source-algorithm-specification <value>]
[--certify-for-marketplace | --no-certify-for-marketplace]
[--cli-input-json <value>]
[--generate-cli-skeleton <value>]

Options

--model-package-name (string)

The name of the model package. The name must have 1 to 63 characters. Valid characters are a-z, A-Z, 0-9, and - (hyphen).

--model-package-description (string)

A description of the model package.

--inference-specification (structure)

Specifies details about inference jobs that can be run with models based on this model package, including the following:

  • The Amazon ECR paths of containers that contain the inference code and model artifacts.
  • The instance types that the model package supports for transform jobs and real-time endpoints used for inference.
  • The input and output content formats that the model package supports for inference.

Shorthand Syntax:

Containers=[{ContainerHostname=string,Image=string,ImageDigest=string,ModelDataUrl=string,ProductId=string},{ContainerHostname=string,Image=string,ImageDigest=string,ModelDataUrl=string,ProductId=string}],SupportedTransformInstanceTypes=string,string,SupportedRealtimeInferenceInstanceTypes=string,string,SupportedContentTypes=string,string,SupportedResponseMIMETypes=string,string

JSON Syntax:

{
  "Containers": [
    {
      "ContainerHostname": "string",
      "Image": "string",
      "ImageDigest": "string",
      "ModelDataUrl": "string",
      "ProductId": "string"
    }
    ...
  ],
  "SupportedTransformInstanceTypes": ["ml.m4.xlarge"|"ml.m4.2xlarge"|"ml.m4.4xlarge"|"ml.m4.10xlarge"|"ml.m4.16xlarge"|"ml.c4.xlarge"|"ml.c4.2xlarge"|"ml.c4.4xlarge"|"ml.c4.8xlarge"|"ml.p2.xlarge"|"ml.p2.8xlarge"|"ml.p2.16xlarge"|"ml.p3.2xlarge"|"ml.p3.8xlarge"|"ml.p3.16xlarge"|"ml.c5.xlarge"|"ml.c5.2xlarge"|"ml.c5.4xlarge"|"ml.c5.9xlarge"|"ml.c5.18xlarge"|"ml.m5.large"|"ml.m5.xlarge"|"ml.m5.2xlarge"|"ml.m5.4xlarge"|"ml.m5.12xlarge"|"ml.m5.24xlarge", ...],
  "SupportedRealtimeInferenceInstanceTypes": ["ml.t2.medium"|"ml.t2.large"|"ml.t2.xlarge"|"ml.t2.2xlarge"|"ml.m4.xlarge"|"ml.m4.2xlarge"|"ml.m4.4xlarge"|"ml.m4.10xlarge"|"ml.m4.16xlarge"|"ml.m5.large"|"ml.m5.xlarge"|"ml.m5.2xlarge"|"ml.m5.4xlarge"|"ml.m5.12xlarge"|"ml.m5.24xlarge"|"ml.c4.large"|"ml.c4.xlarge"|"ml.c4.2xlarge"|"ml.c4.4xlarge"|"ml.c4.8xlarge"|"ml.p2.xlarge"|"ml.p2.8xlarge"|"ml.p2.16xlarge"|"ml.p3.2xlarge"|"ml.p3.8xlarge"|"ml.p3.16xlarge"|"ml.c5.large"|"ml.c5.xlarge"|"ml.c5.2xlarge"|"ml.c5.4xlarge"|"ml.c5.9xlarge"|"ml.c5.18xlarge"|"ml.g4dn.xlarge"|"ml.g4dn.2xlarge"|"ml.g4dn.4xlarge"|"ml.g4dn.8xlarge"|"ml.g4dn.12xlarge"|"ml.g4dn.16xlarge"|"ml.r5.large"|"ml.r5.xlarge"|"ml.r5.2xlarge"|"ml.r5.4xlarge"|"ml.r5.12xlarge"|"ml.r5.24xlarge", ...],
  "SupportedContentTypes": ["string", ...],
  "SupportedResponseMIMETypes": ["string", ...]
}

--validation-specification (structure)

Specifies configurations for one or more transform jobs that Amazon SageMaker runs to test the model package.

JSON Syntax:

{
  "ValidationRole": "string",
  "ValidationProfiles": [
    {
      "ProfileName": "string",
      "TransformJobDefinition": {
        "MaxConcurrentTransforms": integer,
        "MaxPayloadInMB": integer,
        "BatchStrategy": "MultiRecord"|"SingleRecord",
        "Environment": {"string": "string"
          ...},
        "TransformInput": {
          "DataSource": {
            "S3DataSource": {
              "S3DataType": "ManifestFile"|"S3Prefix"|"AugmentedManifestFile",
              "S3Uri": "string"
            }
          },
          "ContentType": "string",
          "CompressionType": "None"|"Gzip",
          "SplitType": "None"|"Line"|"RecordIO"|"TFRecord"
        },
        "TransformOutput": {
          "S3OutputPath": "string",
          "Accept": "string",
          "AssembleWith": "None"|"Line",
          "KmsKeyId": "string"
        },
        "TransformResources": {
          "InstanceType": "ml.m4.xlarge"|"ml.m4.2xlarge"|"ml.m4.4xlarge"|"ml.m4.10xlarge"|"ml.m4.16xlarge"|"ml.c4.xlarge"|"ml.c4.2xlarge"|"ml.c4.4xlarge"|"ml.c4.8xlarge"|"ml.p2.xlarge"|"ml.p2.8xlarge"|"ml.p2.16xlarge"|"ml.p3.2xlarge"|"ml.p3.8xlarge"|"ml.p3.16xlarge"|"ml.c5.xlarge"|"ml.c5.2xlarge"|"ml.c5.4xlarge"|"ml.c5.9xlarge"|"ml.c5.18xlarge"|"ml.m5.large"|"ml.m5.xlarge"|"ml.m5.2xlarge"|"ml.m5.4xlarge"|"ml.m5.12xlarge"|"ml.m5.24xlarge",
          "InstanceCount": integer,
          "VolumeKmsKeyId": "string"
        }
      }
    }
    ...
  ]
}

--source-algorithm-specification (structure)

Details about the algorithm that was used to create the model package.

Shorthand Syntax:

SourceAlgorithms=[{ModelDataUrl=string,AlgorithmName=string},{ModelDataUrl=string,AlgorithmName=string}]

JSON Syntax:

{
  "SourceAlgorithms": [
    {
      "ModelDataUrl": "string",
      "AlgorithmName": "string"
    }
    ...
  ]
}

--certify-for-marketplace | --no-certify-for-marketplace (boolean)

Whether to certify the model package for listing on AWS Marketplace.

--cli-input-json (string) Performs service operation based on the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, the CLI values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally.

--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command.

See 'aws help' for descriptions of global parameters.

Output

ModelPackageArn -> (string)

The Amazon Resource Name (ARN) of the new model package.