interface ProductionVariantProperty
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Sagemaker.CfnEndpointConfig.ProductionVariantProperty |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awssagemaker#CfnEndpointConfig_ProductionVariantProperty |
Java | software.amazon.awscdk.services.sagemaker.CfnEndpointConfig.ProductionVariantProperty |
Python | aws_cdk.aws_sagemaker.CfnEndpointConfig.ProductionVariantProperty |
TypeScript | aws-cdk-lib » aws_sagemaker » CfnEndpointConfig » ProductionVariantProperty |
Specifies a model that you want to host and the resources to deploy for hosting it.
If you are deploying multiple models, tell Amazon SageMaker how to distribute traffic among the models by specifying the InitialVariantWeight objects.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_sagemaker as sagemaker } from 'aws-cdk-lib';
const productionVariantProperty: sagemaker.CfnEndpointConfig.ProductionVariantProperty = {
variantName: 'variantName',
// the properties below are optional
acceleratorType: 'acceleratorType',
capacityReservationConfig: {
capacityReservationPreference: 'capacityReservationPreference',
mlReservationArn: 'mlReservationArn',
},
containerStartupHealthCheckTimeoutInSeconds: 123,
coreDumpConfig: {
destinationS3Uri: 'destinationS3Uri',
// the properties below are optional
kmsKeyId: 'kmsKeyId',
},
enableSsmAccess: false,
inferenceAmiVersion: 'inferenceAmiVersion',
initialInstanceCount: 123,
initialVariantWeight: 123,
instancePools: [{
instanceType: 'instanceType',
priority: 123,
// the properties below are optional
modelNameOverride: 'modelNameOverride',
}],
instanceType: 'instanceType',
managedInstanceScaling: {
maxInstanceCount: 123,
minInstanceCount: 123,
scaleInPolicy: {
strategy: 'strategy',
// the properties below are optional
cooldownInMinutes: 123,
maximumStepSize: 123,
},
status: 'status',
},
modelDataDownloadTimeoutInSeconds: 123,
modelName: 'modelName',
routingConfig: {
prefixAwareRoutingConfig: {
concurrencyThreshold: 123,
prefixLength: 123,
},
routingStrategy: 'routingStrategy',
},
serverlessConfig: {
maxConcurrency: 123,
memorySizeInMb: 123,
// the properties below are optional
provisionedConcurrency: 123,
},
variantInstanceProvisionTimeoutInSeconds: 123,
volumeSizeInGb: 123,
};
Properties
| Name | Type | Description |
|---|---|---|
| variant | string | The name of the production variant. |
| accelerator | string | The size of the Elastic Inference (EI) instance to use for the production variant. |
| capacity | IResolvable | Capacity | Settings for the capacity reservation for the compute instances that SageMaker AI reserves for an endpoint. |
| container | number | The timeout value, in seconds, for your inference container to pass health check by SageMaker Hosting. |
| core | IResolvable | Core | Specifies where SageMaker writes core dumps from the model container when the process crashes, and how it encrypts them. |
| enable | boolean | IResolvable | You can use this parameter to turn on native AWS Systems Manager (SSM) access for a production variant behind an endpoint. |
| inference | string | Specifies an option from a collection of preconfigured Amazon Machine Image (AMI) images. |
| initial | number | Number of instances to launch initially. |
| initial | number | Determines initial traffic distribution among all of the models that you specify in the endpoint configuration. |
| instance | IResolvable | (IResolvable | Instance)[] | A list of instance pools for the production variant. |
| instance | string | The ML compute instance type. |
| managed | IResolvable | Managed | Settings that control the range in the number of instances that the endpoint provisions as it scales up or down to accommodate traffic. |
| model | number | The timeout value, in seconds, to download and extract the model that you want to host from Amazon S3 to the individual inference instance associated with this production variant. |
| model | string | The name of the model that you want to host. |
| routing | IResolvable | Routing | Settings that control how the endpoint routes incoming traffic to the instances that the endpoint hosts. |
| serverless | IResolvable | Serverless | The serverless configuration for an endpoint. |
| variant | number | The timeout value, in seconds, for provisioning instances for the production variant. |
| volume | number | The size, in GB, of the ML storage volume attached to individual inference instance associated with the production variant. |
variantName
Type:
string
The name of the production variant.
acceleratorType?
Type:
string
(optional)
The size of the Elastic Inference (EI) instance to use for the production variant.
EI instances provide on-demand GPU computing for inference. For more information, see Using Elastic Inference in Amazon SageMaker . For more information, see Using Elastic Inference in Amazon SageMaker .
capacityReservationConfig?
Type:
IResolvable | Capacity
(optional)
Settings for the capacity reservation for the compute instances that SageMaker AI reserves for an endpoint.
containerStartupHealthCheckTimeoutInSeconds?
Type:
number
(optional)
The timeout value, in seconds, for your inference container to pass health check by SageMaker Hosting.
For more information about health check, see How Your Container Should Respond to Health Check (Ping) Requests .
coreDumpConfig?
Type:
IResolvable | Core
(optional)
Specifies where SageMaker writes core dumps from the model container when the process crashes, and how it encrypts them.
enableSsmAccess?
Type:
boolean | IResolvable
(optional)
You can use this parameter to turn on native AWS Systems Manager (SSM) access for a production variant behind an endpoint.
By default, SSM access is disabled for all production variants behind an endpoint. You can turn on or turn off SSM access for a production variant behind an existing endpoint by creating a new endpoint configuration and calling UpdateEndpoint .
inferenceAmiVersion?
Type:
string
(optional)
Specifies an option from a collection of preconfigured Amazon Machine Image (AMI) images.
Each image is configured by AWS with a set of software and driver versions. AWS optimizes these configurations for different machine learning workloads. By selecting an AMI version, you can ensure that your inference environment is compatible with specific software requirements, such as CUDA driver versions, Linux kernel versions, or AWS Neuron driver versions
initialInstanceCount?
Type:
number
(optional)
Number of instances to launch initially.
initialVariantWeight?
Type:
number
(optional)
Determines initial traffic distribution among all of the models that you specify in the endpoint configuration.
The traffic to a production variant is determined by the ratio of the VariantWeight to the sum of all VariantWeight values across all ProductionVariants. If unspecified, it defaults to 1.0.
instancePools?
Type:
IResolvable | (IResolvable | Instance)[]
(optional)
A list of instance pools for the production variant.
Each instance pool specifies an instance type and its priority for provisioning. Use instance pools to configure heterogeneous endpoints that deploy models across multiple instance types.
instanceType?
Type:
string
(optional)
The ML compute instance type.
managedInstanceScaling?
Type:
IResolvable | Managed
(optional)
Settings that control the range in the number of instances that the endpoint provisions as it scales up or down to accommodate traffic.
modelDataDownloadTimeoutInSeconds?
Type:
number
(optional)
The timeout value, in seconds, to download and extract the model that you want to host from Amazon S3 to the individual inference instance associated with this production variant.
modelName?
Type:
string
(optional)
The name of the model that you want to host.
This is the name that you specified when creating the model.
routingConfig?
Type:
IResolvable | Routing
(optional)
Settings that control how the endpoint routes incoming traffic to the instances that the endpoint hosts.
serverlessConfig?
Type:
IResolvable | Serverless
(optional)
The serverless configuration for an endpoint.
Specifies a serverless endpoint configuration instead of an instance-based endpoint configuration.
variantInstanceProvisionTimeoutInSeconds?
Type:
number
(optional)
The timeout value, in seconds, for provisioning instances for the production variant.
When SageMaker encounters an insufficient capacity error while provisioning instances, it retries with the next instance pool (if configured) or waits until the timeout expires. This timeout applies only to capacity provisioning and does not include the time for model download or container startup.
volumeSizeInGb?
Type:
number
(optional)
The size, in GB, of the ML storage volume attached to individual inference instance associated with the production variant.
Currently only Amazon EBS gp2 storage volumes are supported.

.NET
Go
Java
Python
TypeScript