Skip to content
v2.274.0

Experimental

@aws-cdk/aws-sagemaker-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.

InstanceProductionVariantProps Struct ​

Construction properties for an instance production variant.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as sagemaker_alpha from '@aws-cdk/aws-sagemaker-alpha';
import * as cdk from 'aws-cdk-lib';

declare const acceleratorType: sagemaker_alpha.AcceleratorType;
declare const instanceType: sagemaker_alpha.InstanceType;
declare const model: sagemaker_alpha.Model;
const instanceProductionVariantProps: sagemaker_alpha.InstanceProductionVariantProps = {
  model: model,
  variantName: 'variantName',

  // the properties below are optional
  acceleratorType: acceleratorType,
  containerStartupHealthCheckTimeout: cdk.Duration.minutes(30),
  initialInstanceCount: 123,
  initialVariantWeight: 123,
  instanceType: instanceType,
};

Properties ​

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

EI instances provide on-demand GPU computing for inference.

containerStartupHealthCheckTimeoutDurationcontainer_startup_health_check_timeoutDurationcontainerStartupHealthCheckTimeoutDurationContainerStartupHealthCheckTimeoutDurationContainerStartupHealthCheckTimeoutDuration= none#
The timeout value, in seconds, for your inference container to pass health check.

Range between 60 and 3600 seconds.

initialInstanceCountnumberinitial_instance_countint | floatinitialInstanceCountNumberInitialInstanceCountdoubleInitialInstanceCount*float64= 1#
Number of instances to launch initially.
initialVariantWeightnumberinitial_variant_weightint | floatinitialVariantWeightNumberInitialVariantWeightdoubleInitialVariantWeight*float64= 1.0#
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 variant weight to the sum of all variant weight values across all production variants.

instanceTypeInstanceTypeinstance_typeInstanceTypeinstanceTypeInstanceTypeInstanceTypeInstanceTypeInstanceTypeInstanceType= InstanceType.T2_MEDIUM#
Instance type of the production variant.
modelIModelmodelIModelmodelIModelModelIModelModelIModelrequired#
The model to host.
variantNamestringvariant_namestrvariantNameStringVariantNamestringVariantName*stringrequired#
Name of the production variant.