libZSservicesZSamazonka-sagemakerZSamazonka-sagemaker
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.SageMaker.CreateModel

Description

Creates a model in Amazon SageMaker. In the request, you name the model and describe a primary container. For the primary container, you specify the Docker image that contains inference code, artifacts (from prior training), and a custom environment map that the inference code uses when you deploy the model for predictions.

Use this API to create a model if you want to use Amazon SageMaker hosting services or run a batch transform job.

To host your model, you create an endpoint configuration with the CreateEndpointConfig API, and then create an endpoint with the CreateEndpoint API. Amazon SageMaker then deploys all of the containers that you defined for the model in the hosting environment.

For an example that calls this method when deploying a model to Amazon SageMaker hosting services, see Deploy the Model to Amazon SageMaker Hosting Services (Amazon Web Services SDK for Python (Boto 3)).

To run a batch transform using your model, you start a job with the CreateTransformJob API. Amazon SageMaker uses your model and your dataset to get inferences which are then saved to a specified S3 location.

In the CreateModel request, you must define a container with the PrimaryContainer parameter.

In the request, you also provide an IAM role that Amazon SageMaker can assume to access model artifacts and docker image for deployment on ML compute hosting instances or for batch transform jobs. In addition, you also use the IAM role to manage permissions the inference code needs. For example, if the inference code access any other Amazon Web Services resources, you grant necessary permissions via this role.

Synopsis

Creating a Request

data CreateModel Source #

See: newCreateModel smart constructor.

Constructors

CreateModel' 

Fields

Instances

Instances details
Eq CreateModel Source # 
Instance details

Defined in Amazonka.SageMaker.CreateModel

Read CreateModel Source # 
Instance details

Defined in Amazonka.SageMaker.CreateModel

Show CreateModel Source # 
Instance details

Defined in Amazonka.SageMaker.CreateModel

Generic CreateModel Source # 
Instance details

Defined in Amazonka.SageMaker.CreateModel

Associated Types

type Rep CreateModel :: Type -> Type #

NFData CreateModel Source # 
Instance details

Defined in Amazonka.SageMaker.CreateModel

Methods

rnf :: CreateModel -> () #

Hashable CreateModel Source # 
Instance details

Defined in Amazonka.SageMaker.CreateModel

ToJSON CreateModel Source # 
Instance details

Defined in Amazonka.SageMaker.CreateModel

AWSRequest CreateModel Source # 
Instance details

Defined in Amazonka.SageMaker.CreateModel

Associated Types

type AWSResponse CreateModel #

ToHeaders CreateModel Source # 
Instance details

Defined in Amazonka.SageMaker.CreateModel

Methods

toHeaders :: CreateModel -> [Header] #

ToPath CreateModel Source # 
Instance details

Defined in Amazonka.SageMaker.CreateModel

ToQuery CreateModel Source # 
Instance details

Defined in Amazonka.SageMaker.CreateModel

type Rep CreateModel Source # 
Instance details

Defined in Amazonka.SageMaker.CreateModel

type AWSResponse CreateModel Source # 
Instance details

Defined in Amazonka.SageMaker.CreateModel

newCreateModel Source #

Create a value of CreateModel with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:primaryContainer:CreateModel', createModel_primaryContainer - The location of the primary docker image containing inference code, associated artifacts, and custom environment map that the inference code uses when the model is deployed for predictions.

$sel:enableNetworkIsolation:CreateModel', createModel_enableNetworkIsolation - Isolates the model container. No inbound or outbound network calls can be made to or from the model container.

$sel:containers:CreateModel', createModel_containers - Specifies the containers in the inference pipeline.

$sel:vpcConfig:CreateModel', createModel_vpcConfig - A VpcConfig object that specifies the VPC that you want your model to connect to. Control access to and from your model container by configuring the VPC. VpcConfig is used in hosting services and in batch transform. For more information, see Protect Endpoints by Using an Amazon Virtual Private Cloud and Protect Data in Batch Transform Jobs by Using an Amazon Virtual Private Cloud.

$sel:inferenceExecutionConfig:CreateModel', createModel_inferenceExecutionConfig - Specifies details of how containers in a multi-container endpoint are called.

$sel:tags:CreateModel', createModel_tags - An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different ways, for example, by purpose, owner, or environment. For more information, see Tagging Amazon Web Services Resources.

$sel:modelName:CreateModel', createModel_modelName - The name of the new model.

$sel:executionRoleArn:CreateModel', createModel_executionRoleArn - The Amazon Resource Name (ARN) of the IAM role that Amazon SageMaker can assume to access model artifacts and docker image for deployment on ML compute instances or for batch transform jobs. Deploying on ML compute instances is part of model hosting. For more information, see Amazon SageMaker Roles.

To be able to pass this role to Amazon SageMaker, the caller of this API must have the iam:PassRole permission.

Request Lenses

createModel_primaryContainer :: Lens' CreateModel (Maybe ContainerDefinition) Source #

The location of the primary docker image containing inference code, associated artifacts, and custom environment map that the inference code uses when the model is deployed for predictions.

createModel_enableNetworkIsolation :: Lens' CreateModel (Maybe Bool) Source #

Isolates the model container. No inbound or outbound network calls can be made to or from the model container.

createModel_containers :: Lens' CreateModel (Maybe [ContainerDefinition]) Source #

Specifies the containers in the inference pipeline.

createModel_vpcConfig :: Lens' CreateModel (Maybe VpcConfig) Source #

A VpcConfig object that specifies the VPC that you want your model to connect to. Control access to and from your model container by configuring the VPC. VpcConfig is used in hosting services and in batch transform. For more information, see Protect Endpoints by Using an Amazon Virtual Private Cloud and Protect Data in Batch Transform Jobs by Using an Amazon Virtual Private Cloud.

createModel_inferenceExecutionConfig :: Lens' CreateModel (Maybe InferenceExecutionConfig) Source #

Specifies details of how containers in a multi-container endpoint are called.

createModel_tags :: Lens' CreateModel (Maybe [Tag]) Source #

An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different ways, for example, by purpose, owner, or environment. For more information, see Tagging Amazon Web Services Resources.

createModel_modelName :: Lens' CreateModel Text Source #

The name of the new model.

createModel_executionRoleArn :: Lens' CreateModel Text Source #

The Amazon Resource Name (ARN) of the IAM role that Amazon SageMaker can assume to access model artifacts and docker image for deployment on ML compute instances or for batch transform jobs. Deploying on ML compute instances is part of model hosting. For more information, see Amazon SageMaker Roles.

To be able to pass this role to Amazon SageMaker, the caller of this API must have the iam:PassRole permission.

Destructuring the Response

data CreateModelResponse Source #

See: newCreateModelResponse smart constructor.

Constructors

CreateModelResponse' 

Fields

Instances

Instances details
Eq CreateModelResponse Source # 
Instance details

Defined in Amazonka.SageMaker.CreateModel

Read CreateModelResponse Source # 
Instance details

Defined in Amazonka.SageMaker.CreateModel

Show CreateModelResponse Source # 
Instance details

Defined in Amazonka.SageMaker.CreateModel

Generic CreateModelResponse Source # 
Instance details

Defined in Amazonka.SageMaker.CreateModel

Associated Types

type Rep CreateModelResponse :: Type -> Type #

NFData CreateModelResponse Source # 
Instance details

Defined in Amazonka.SageMaker.CreateModel

Methods

rnf :: CreateModelResponse -> () #

type Rep CreateModelResponse Source # 
Instance details

Defined in Amazonka.SageMaker.CreateModel

type Rep CreateModelResponse = D1 ('MetaData "CreateModelResponse" "Amazonka.SageMaker.CreateModel" "libZSservicesZSamazonka-sagemakerZSamazonka-sagemaker" 'False) (C1 ('MetaCons "CreateModelResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "modelArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))

newCreateModelResponse Source #

Create a value of CreateModelResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:httpStatus:CreateModelResponse', createModelResponse_httpStatus - The response's http status code.

$sel:modelArn:CreateModelResponse', createModelResponse_modelArn - The ARN of the model created in Amazon SageMaker.

Response Lenses

createModelResponse_modelArn :: Lens' CreateModelResponse Text Source #

The ARN of the model created in Amazon SageMaker.