Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: CC-BY-SA-4.0

CreateEndpointConfig

Creates an endpoint configuration that Amazon SageMaker hosting services uses to deploy models. In the configuration, you identify one or more models, created using the CreateModel API, to deploy and the resources that you want Amazon SageMaker to provision. Then you call the CreateEndpoint API.

Note
Use this API only if you want to use Amazon SageMaker hosting services to deploy models into production.

In the request, you define one or more ProductionVariants, each of which identifies a model. Each ProductionVariant parameter also describes the resources that you want Amazon SageMaker to provision. This includes the number and type of ML compute instances to deploy.

If you are hosting multiple models, you also assign a VariantWeight to specify how much traffic you want to allocate to each model. For example, suppose that you want to host two models, A and B, and you assign traffic weight 2 for model A and 1 for model B. Amazon SageMaker distributes two-thirds of the traffic to Model A, and one-third to model B.

{
   "[EndpointConfigName](#SageMaker-CreateEndpointConfig-request-EndpointConfigName)": "string",
   "[KmsKeyId](#SageMaker-CreateEndpointConfig-request-KmsKeyId)": "string",
   "[ProductionVariants](#SageMaker-CreateEndpointConfig-request-ProductionVariants)": [ 
      { 
         "[AcceleratorType](API_ProductionVariant.md#SageMaker-Type-ProductionVariant-AcceleratorType)": "string",
         "[InitialInstanceCount](API_ProductionVariant.md#SageMaker-Type-ProductionVariant-InitialInstanceCount)": number,
         "[InitialVariantWeight](API_ProductionVariant.md#SageMaker-Type-ProductionVariant-InitialVariantWeight)": number,
         "[InstanceType](API_ProductionVariant.md#SageMaker-Type-ProductionVariant-InstanceType)": "string",
         "[ModelName](API_ProductionVariant.md#SageMaker-Type-ProductionVariant-ModelName)": "string",
         "[VariantName](API_ProductionVariant.md#SageMaker-Type-ProductionVariant-VariantName)": "string"
      }
   ],
   "[Tags](#SageMaker-CreateEndpointConfig-request-Tags)": [ 
      { 
         "[Key](API_Tag.md#SageMaker-Type-Tag-Key)": "string",
         "[Value](API_Tag.md#SageMaker-Type-Tag-Value)": "string"
      }
   ]
}

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

** EndpointConfigName ** The name of the endpoint configuration. You specify this name in a CreateEndpoint request.
Type: String
Length Constraints: Maximum length of 63.
Pattern: ^[a-zA-Z0-9](-*[a-zA-Z0-9])*
Required: Yes

** KmsKeyId ** The Amazon Resource Name (ARN) of a AWS Key Management Service key that Amazon SageMaker uses to encrypt data on the storage volume attached to the ML compute instance that hosts the endpoint.
Type: String
Length Constraints: Maximum length of 2048.
Pattern: .*
Required: No

** ProductionVariants ** An list of ProductionVariant objects, one for each model that you want to host at this endpoint.
Type: Array of ProductionVariant objects
Array Members: Minimum number of 1 item. Maximum number of 10 items.
Required: Yes

** Tags ** A list of key-value pairs. For more information, see Using Cost Allocation Tags in the * AWS Billing and Cost Management User Guide*.
Type: Array of Tag objects
Array Members: Minimum number of 0 items. Maximum number of 50 items.
Required: No

{
   "[EndpointConfigArn](#SageMaker-CreateEndpointConfig-response-EndpointConfigArn)": "string"
}

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

** EndpointConfigArn ** The Amazon Resource Name (ARN) of the endpoint configuration.
Type: String
Length Constraints: Minimum length of 20. Maximum length of 2048.
Pattern: arn:aws[a-z\-]*:sagemaker:[a-z0-9\-]*:[0-9]{12}:endpoint-config/.*

For information about the errors that are common to all actions, see Common Errors.

ResourceLimitExceeded
You have exceeded an Amazon SageMaker resource limit. For example, you might have too many training jobs created.
HTTP Status Code: 400

For more information about using this API in one of the language-specific AWS SDKs, see the following: + AWS Command Line Interface + AWS SDK for .NET + AWS SDK for C++ + AWS SDK for Go + AWS SDK for Go - Pilot + AWS SDK for Java + AWS SDK for JavaScript + AWS SDK for PHP V3 + AWS SDK for Python + AWS SDK for Ruby V2