Copyright | (c) 2013-2018 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
Creates a model in Amazon SageMaker. In the request, you name the model and describe one or more containers. For each container, you specify the docker image containing inference code, artifacts (from prior training), and custom environment map that the inference code uses when you deploy the model into production.
Use this API to create a model only if you want to use Amazon SageMaker hosting services. 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.
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. In addition, you also use the IAM role to manage permissions the inference code needs. For example, if the inference code access any other AWS resources, you grant necessary permissions via this role.
Synopsis
- createModel :: Text -> ContainerDefinition -> Text -> CreateModel
- data CreateModel
- cmVPCConfig :: Lens' CreateModel (Maybe VPCConfig)
- cmTags :: Lens' CreateModel [Tag]
- cmModelName :: Lens' CreateModel Text
- cmPrimaryContainer :: Lens' CreateModel ContainerDefinition
- cmExecutionRoleARN :: Lens' CreateModel Text
- createModelResponse :: Int -> Text -> CreateModelResponse
- data CreateModelResponse
- cmrsResponseStatus :: Lens' CreateModelResponse Int
- cmrsModelARN :: Lens' CreateModelResponse Text
Creating a Request
Creates a value of CreateModel
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
cmVPCConfig
- A object that specifies the VPC that you want your model to connect to. Control access to and from your training container by configuring the VPC. For more information, see 'host-vpc' .cmTags
- An array of key-value pairs. For more information, see Using Cost Allocation Tags in the AWS Billing and Cost Management User Guide .cmModelName
- The name of the new model.cmPrimaryContainer
- 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 into production.cmExecutionRoleARN
- 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. Deploying on ML compute instances is part of model hosting. For more information, see Amazon SageMaker Roles .
data CreateModel Source #
See: createModel
smart constructor.
Instances
Request Lenses
cmVPCConfig :: Lens' CreateModel (Maybe VPCConfig) Source #
A object that specifies the VPC that you want your model to connect to. Control access to and from your training container by configuring the VPC. For more information, see 'host-vpc' .
cmTags :: Lens' CreateModel [Tag] Source #
An array of key-value pairs. For more information, see Using Cost Allocation Tags in the AWS Billing and Cost Management User Guide .
cmModelName :: Lens' CreateModel Text Source #
The name of the new model.
cmPrimaryContainer :: Lens' CreateModel 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 into production.
cmExecutionRoleARN :: 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. Deploying on ML compute instances is part of model hosting. For more information, see Amazon SageMaker Roles .
Destructuring the Response
Creates a value of CreateModelResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
cmrsResponseStatus
- -- | The response status code.cmrsModelARN
- The ARN of the model created in Amazon SageMaker.
data CreateModelResponse Source #
See: createModelResponse
smart constructor.
Instances
Response Lenses
cmrsResponseStatus :: Lens' CreateModelResponse Int Source #
- - | The response status code.
cmrsModelARN :: Lens' CreateModelResponse Text Source #
The ARN of the model created in Amazon SageMaker.