CreateEndpointConfig
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.
Note
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.
Note
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",
"IncludeInferenceResponseIn": [ "string" ],
"SuccessTopic": "string"
},
"S3FailurePath": "string",
"S3OutputPath": "string"
}
},
"DataCaptureConfig": {
"CaptureContentTypeHeader": {
"CsvContentTypes": [ "string" ],
"JsonContentTypes": [ "string" ]
},
"CaptureOptions": [
{
"CaptureMode": "string"
}
],
"DestinationS3Uri": "string",
"EnableCapture": boolean,
"InitialSamplingPercentage": number,
"KmsKeyId": "string"
},
"EnableNetworkIsolation": boolean,
"EndpointConfigName": "string",
"ExecutionRoleArn": "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",
"MetricsConfig": {
"EnableDetailedObservability": boolean,
"EnableEnhancedMetrics": boolean,
"MetricPublishFrequencyInSeconds": number
},
"ProductionVariants": [
{
"AcceleratorType": "string",
"CapacityReservationConfig": {
"CapacityReservationPreference": "string",
"MlReservationArn": "string"
},
"ContainerStartupHealthCheckTimeoutInSeconds": number,
"CoreDumpConfig": {
"DestinationS3Uri": "string",
"KmsKeyId": "string"
},
"EnableSSMAccess": boolean,
"InferenceAmiVersion": "string",
"InitialInstanceCount": number,
"InitialVariantWeight": number,
"InstancePools": [
{
"InstanceType": "string",
"ModelNameOverride": "string",
"Priority": number
}
],
"InstanceType": "string",
"ManagedInstanceScaling": {
"MaxInstanceCount": number,
"MinInstanceCount": number,
"ScaleInPolicy": {
"CooldownInMinutes": number,
"MaximumStepSize": number,
"Strategy": "string"
},
"Status": "string"
},
"ModelDataDownloadTimeoutInSeconds": number,
"ModelName": "string",
"RoutingConfig": {
"PrefixAwareRoutingConfig": {
"ConcurrencyThreshold": number,
"PrefixLength": number
},
"RoutingStrategy": "string"
},
"ServerlessConfig": {
"MaxConcurrency": number,
"MemorySizeInMB": number,
"ProvisionedConcurrency": number
},
"VariantInstanceProvisionTimeoutInSeconds": number,
"VariantName": "string",
"VolumeSizeInGB": number
}
],
"ShadowProductionVariants": [
{
"AcceleratorType": "string",
"CapacityReservationConfig": {
"CapacityReservationPreference": "string",
"MlReservationArn": "string"
},
"ContainerStartupHealthCheckTimeoutInSeconds": number,
"CoreDumpConfig": {
"DestinationS3Uri": "string",
"KmsKeyId": "string"
},
"EnableSSMAccess": boolean,
"InferenceAmiVersion": "string",
"InitialInstanceCount": number,
"InitialVariantWeight": number,
"InstancePools": [
{
"InstanceType": "string",
"ModelNameOverride": "string",
"Priority": number
}
],
"InstanceType": "string",
"ManagedInstanceScaling": {
"MaxInstanceCount": number,
"MinInstanceCount": number,
"ScaleInPolicy": {
"CooldownInMinutes": number,
"MaximumStepSize": number,
"Strategy": "