Skip to content
v2.278.0

InstancePoolProperty Struct ​

Specifies an instance type and its priority for a heterogeneous endpoint.

Use instance pools to configure a production variant with multiple instance types, enabling the endpoint to provision instances across different types based on priority.

Example ​

ts
// 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 instancePoolProperty: sagemaker.CfnEndpointConfig.InstancePoolProperty = {
  instanceType: 'instanceType',
  priority: 123,

  // the properties below are optional
  modelNameOverride: 'modelNameOverride',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_sagemaker as sagemaker

instance_pool_property = sagemaker.CfnEndpointConfig.InstancePoolProperty(
    instance_type="instanceType",
    priority=123,

    # the properties below are optional
    model_name_override="modelNameOverride"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.sagemaker.*;

InstancePoolProperty instancePoolProperty = InstancePoolProperty.builder()
        .instanceType("instanceType")
        .priority(123)

        // the properties below are optional
        .modelNameOverride("modelNameOverride")
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Sagemaker;

var instancePoolProperty = new InstancePoolProperty {
    InstanceType = "instanceType",
    Priority = 123,

    // the properties below are optional
    ModelNameOverride = "modelNameOverride"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

instancePoolProperty := &InstancePoolProperty{
	InstanceType: jsii.String("instanceType"),
	Priority: jsii.Number(123),

	// the properties below are optional
	ModelNameOverride: jsii.String("modelNameOverride"),
}

Properties ​

instanceTypestringinstance_typestrinstanceTypeStringInstanceTypestringInstanceType*string required #
The ML compute instance type for the instance pool.
modelNameOverrideoptionalstringmodel_name_overrideoptionalstrmodelNameOverrideoptionalStringModelNameOverrideoptionalstringModelNameOverrideoptional*string #
The name of a SageMaker model to use for this instance pool instead of the model specified for the production variant.

Use this to deploy a different model optimized for the instance type in this pool.

prioritynumberpriorityint | floatpriorityNumberPrioritydoublePriority*float64 required #
The priority for the instance pool.
notes

SageMaker attempts to provision instances in order of priority, starting with the lowest value. If instances for a higher-priority pool are unavailable, SageMaker attempts to provision from the next pool. Valid values: 1 to 5, where 1 is the highest priority.