Skip to content
v2.275.0

ProductionVariant Struct ​

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

Example ​

ts
// 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 ​

acceleratorTypeoptionalAcceleratorTypeaccelerator_typeoptionalAcceleratorTypeacceleratorTypeoptionalAcceleratorTypeAcceleratorTypeoptionalAcceleratorTypeAcceleratorTypeoptionalAcceleratorType= None#
The size of the Elastic Inference (EI) instance to use for the production variant.
initialInstanceCountoptionalnumberinitial_instance_countoptionalint | floatinitialInstanceCountoptionalNumberInitialInstanceCountoptionaldoubleInitialInstanceCountoptional*float64= 1#
Number of instances to launch initially.
initialVariantWeightoptionalnumberinitial_variant_weightoptionalint | floatinitialVariantWeightoptionalNumberInitialVariantWeightoptionaldoubleInitialVariantWeightoptional*float64= 1.0#
Determines initial traffic distribution among all of the models that you specify in the endpoint configuration.
instanceTypeInstanceTypeinstance_typeInstanceTypeinstanceTypeInstanceTypeInstanceTypeInstanceTypeInstanceTypeInstanceTyperequired#
The ML compute instance type.
modelNamestringmodel_namestrmodelNameStringModelNamestringModelName*stringrequired#
The name of the model that you want to host.

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

variantNamestringvariant_namestrvariantNameStringVariantNamestringVariantName*stringrequired#
The name of the production variant.