CreateEndpointConfig - Amazon SageMaker


Creates an endpoint configuration that 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 SageMaker to provision. Then you call the CreateEndpoint API.


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

In the request, you define a ProductionVariant, for each model that you want to deploy. Each ProductionVariant parameter also describes the resources that you want 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. SageMaker distributes two-thirds of the traffic to Model A, and one-third to model B.


When you call CreateEndpoint, a load call is made to DynamoDB to verify that your endpoint configuration exists. When you read data from a DynamoDB table supporting Eventually Consistent Reads, the response might not reflect the results of a recently completed write operation. The response might include some stale data. If the dependent entities are not yet in DynamoDB, this causes a validation error. If you repeat your read request after a short time, the response should return the latest data. So retry logic is recommended to handle these possible issues. We also recommend that customers call DescribeEndpointConfig before calling CreateEndpoint to minimize the potential impact of a DynamoDB eventually consistent read.

Request Syntax

{ "AsyncInferenceConfig": { "ClientConfig": { "MaxConcurrentInvocationsPerInstance": number }, "OutputConfig": { "KmsKeyId": "string", "NotificationConfig": { "ErrorTopic": "string", "SuccessTopic": "string" }, "S3OutputPath": "string" } }, "DataCaptureConfig": { "CaptureContentTypeHeader": { "CsvContentTypes": [ "string" ], "JsonContentTypes": [ "string" ] }, "CaptureOptions": [ { "CaptureMode": "string" } ], "DestinationS3Uri": "string", "EnableCapture": boolean, "InitialSamplingPercentage": number, "KmsKeyId": "string" }, "EndpointConfigName": "string", "ExplainerConfig": { "ClarifyExplainerConfig": { "EnableExplanations": "string", "InferenceConfig": { "ContentTemplate": "string", "FeatureHeaders": [ "string" ], "FeaturesAttribute": "string", "FeatureTypes": [ "string" ], "LabelAttribute": "string", "LabelHeaders": [ "string" ], "LabelIndex": number, "MaxPayloadInMB": number, "MaxRecordCount": number, "ProbabilityAttribute": "string", "ProbabilityIndex": number }, "ShapConfig": { "NumberOfSamples": number, "Seed": number, "ShapBaselineConfig": { "MimeType": "string", "ShapBaseline": "string", "ShapBaselineUri": "string" }, "TextConfig": { "Granularity": "string", "Language": "string" }, "UseLogit": boolean } } }, "KmsKeyId": "string", "ProductionVariants": [ { "AcceleratorType": "string", "ContainerStartupHealthCheckTimeoutInSeconds": number, "CoreDumpConfig": { "DestinationS3Uri": "string", "KmsKeyId": "string" }, "InitialInstanceCount": number, "InitialVariantWeight": number, "InstanceType": "string", "ModelDataDownloadTimeoutInSeconds": number, "ModelName": "string", "ServerlessConfig": { "MaxConcurrency": number, "MemorySizeInMB": number }, "VariantName": "string", "VolumeSizeInGB": number } ], "Tags": [ { "Key": "string", "Value": "string" } ] }

Request Parameters

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

The request accepts the following data in JSON format.


Specifies configuration for how an endpoint performs asynchronous inference. This is a required field in order for your Endpoint to be invoked using InvokeEndpointAsync.

Type: AsyncInferenceConfig object

Required: No


Configuration to control how SageMaker captures inference data.

Type: DataCaptureConfig object

Required: No


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]){0,62}

Required: Yes


A member of CreateEndpointConfig that enables explainers.

Type: ExplainerConfig object

Required: No


The Amazon Resource Name (ARN) of a AWS Key Management Service key that SageMaker uses to encrypt data on the storage volume attached to the ML compute instance that hosts the endpoint.

The KmsKeyId can be any of the following formats:

  • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab

  • Key ARN: arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab

  • Alias name: alias/ExampleAlias

  • Alias name ARN: arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias

The KMS key policy must grant permission to the IAM role that you specify in your CreateEndpoint, UpdateEndpoint requests. For more information, refer to the AWS Key Management Service section Using Key Policies in AWS KMS


Certain Nitro-based instances include local storage, dependent on the instance type. Local storage volumes are encrypted using a hardware module on the instance. You can't request a KmsKeyId when using an instance type with local storage. If any of the models that you specify in the ProductionVariants parameter use nitro-based instances with local storage, do not specify a value for the KmsKeyId parameter. If you specify a value for KmsKeyId when using any nitro-based instances with local storage, the call to CreateEndpointConfig fails.

For a list of instance types that support local instance storage, see Instance Store Volumes.

For more information about local instance storage encryption, see SSD Instance Store Volumes.

Type: String

Length Constraints: Maximum length of 2048.

Pattern: .*

Required: No


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


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

Type: Array of Tag objects

Array Members: Minimum number of 0 items. Maximum number of 50 items.

Required: No

Response Syntax

{ "EndpointConfigArn": "string" }

Response Elements

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

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


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.


You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: