aws-cdk-lib.aws_stepfunctions_tasks.ProductionVariant

interface ProductionVariant

LanguageType name
.NETAmazon.CDK.AWS.StepFunctions.Tasks.ProductionVariant
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsstepfunctionstasks#ProductionVariant
Javasoftware.amazon.awscdk.services.stepfunctions.tasks.ProductionVariant
Pythonaws_cdk.aws_stepfunctions_tasks.ProductionVariant
TypeScript (source)aws-cdk-lib » aws_stepfunctions_tasks » ProductionVariant

Identifies a model that you want to host and the resources to deploy for hosting it.

See also: https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ProductionVariant.html

Example

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ec2 as ec2 } from 'aws-cdk-lib';
import { aws_stepfunctions_tasks as stepfunctions_tasks } from 'aws-cdk-lib';

declare const acceleratorType: stepfunctions_tasks.AcceleratorType;
declare const instanceType: ec2.InstanceType;
const productionVariant: stepfunctions_tasks.ProductionVariant = {
  instanceType: instanceType,
  modelName: 'modelName',
  variantName: 'variantName',

  // the properties below are optional
  acceleratorType: acceleratorType,
  initialInstanceCount: 123,
  initialVariantWeight: 123,
};

Properties

NameTypeDescription
instanceTypeInstanceTypeThe ML compute instance type.
modelNamestringThe name of the model that you want to host.
variantNamestringThe name of the production variant.
acceleratorType?AcceleratorTypeThe size of the Elastic Inference (EI) instance to use for the production variant.
initialInstanceCount?numberNumber of instances to launch initially.
initialVariantWeight?numberDetermines initial traffic distribution among all of the models that you specify in the endpoint configuration.

instanceType

Type: InstanceType

The ML compute instance type.


modelName

Type: string

The name of the model that you want to host.

This is the name that you specified when creating the model.


variantName

Type: string

The name of the production variant.


acceleratorType?

Type: AcceleratorType (optional, default: None)

The size of the Elastic Inference (EI) instance to use for the production variant.


initialInstanceCount?

Type: number (optional, default: 1)

Number of instances to launch initially.


initialVariantWeight?

Type: number (optional, default: 1.0)

Determines initial traffic distribution among all of the models that you specify in the endpoint configuration.