Interface CfnEndpointConfig.ProductionVariantProperty
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CfnEndpointConfig.ProductionVariantProperty.Jsii$Proxy
- Enclosing class:
CfnEndpointConfig
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 software.amazon.awscdk.services.sagemaker.*;
ProductionVariantProperty productionVariantProperty = ProductionVariantProperty.builder()
.variantName("variantName")
// the properties below are optional
.acceleratorType("acceleratorType")
.capacityReservationConfig(CapacityReservationConfigProperty.builder()
.capacityReservationPreference("capacityReservationPreference")
.mlReservationArn("mlReservationArn")
.build())
.containerStartupHealthCheckTimeoutInSeconds(123)
.coreDumpConfig(CoreDumpConfigProperty.builder()
.destinationS3Uri("destinationS3Uri")
// the properties below are optional
.kmsKeyId("kmsKeyId")
.build())
.enableSsmAccess(false)
.inferenceAmiVersion("inferenceAmiVersion")
.initialInstanceCount(123)
.initialVariantWeight(123)
.instancePools(List.of(InstancePoolProperty.builder()
.instanceType("instanceType")
.priority(123)
// the properties below are optional
.modelNameOverride("modelNameOverride")
.build()))
.instanceType("instanceType")
.managedInstanceScaling(ManagedInstanceScalingProperty.builder()
.maxInstanceCount(123)
.minInstanceCount(123)
.scaleInPolicy(ScaleInPolicyProperty.builder()
.strategy("strategy")
// the properties below are optional
.cooldownInMinutes(123)
.maximumStepSize(123)
.build())
.status("status")
.build())
.modelDataDownloadTimeoutInSeconds(123)
.modelName("modelName")
.routingConfig(RoutingConfigProperty.builder()
.prefixAwareRoutingConfig(PrefixAwareRoutingConfigProperty.builder()
.concurrencyThreshold(123)
.prefixLength(123)
.build())
.routingStrategy("routingStrategy")
.build())
.serverlessConfig(ServerlessConfigProperty.builder()
.maxConcurrency(123)
.memorySizeInMb(123)
// the properties below are optional
.provisionedConcurrency(123)
.build())
.variantInstanceProvisionTimeoutInSeconds(123)
.volumeSizeInGb(123)
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forCfnEndpointConfig.ProductionVariantPropertystatic final classAn implementation forCfnEndpointConfig.ProductionVariantProperty -
Method Summary
Modifier and TypeMethodDescriptionbuilder()default StringThe size of the Elastic Inference (EI) instance to use for the production variant.default ObjectSettings for the capacity reservation for the compute instances that SageMaker AI reserves for an endpoint.default NumberThe timeout value, in seconds, for your inference container to pass health check by SageMaker Hosting.default ObjectSpecifies where SageMaker writes core dumps from the model container when the process crashes, and how it encrypts them.default ObjectYou can use this parameter to turn on native AWS Systems Manager (SSM) access for a production variant behind an endpoint.default StringSpecifies an option from a collection of preconfigured Amazon Machine Image (AMI) images.default NumberNumber of instances to launch initially.default NumberDetermines initial traffic distribution among all of the models that you specify in the endpoint configuration.default ObjectA list of instance pools for the production variant.default StringThe ML compute instance type.default ObjectSettings that control the range in the number of instances that the endpoint provisions as it scales up or down to accommodate traffic.default NumberThe 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.default StringThe name of the model that you want to host.default ObjectSettings that control how the endpoint routes incoming traffic to the instances that the endpoint hosts.default ObjectThe serverless configuration for an endpoint.default NumberThe timeout value, in seconds, for provisioning instances for the production variant.The name of the production variant.default NumberThe size, in GB, of the ML storage volume attached to individual inference instance associated with the production variant.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getVariantName
The name of the production variant.- See Also:
-
getAcceleratorType
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 .
- See Also:
-
getCapacityReservationConfig
Settings for the capacity reservation for the compute instances that SageMaker AI reserves for an endpoint.Returns union: either
IResolvableorCfnEndpointConfig.CapacityReservationConfigProperty- See Also:
-
getContainerStartupHealthCheckTimeoutInSeconds
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 .
- See Also:
-
getCoreDumpConfig
Specifies where SageMaker writes core dumps from the model container when the process crashes, and how it encrypts them.Returns union: either
IResolvableorCfnEndpointConfig.CoreDumpConfigProperty- See Also:
-
getEnableSsmAccess
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.Returns union: either
BooleanorIResolvable- See Also:
-
getInferenceAmiVersion
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
- See Also:
-
getInitialInstanceCount
Number of instances to launch initially.- See Also:
-
getInitialVariantWeight
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
VariantWeightto the sum of allVariantWeightvalues across all ProductionVariants. If unspecified, it defaults to 1.0.- See Also:
-
getInstancePools
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.
Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnEndpointConfig.InstancePoolProperty>- See Also:
-
getInstanceType
The ML compute instance type.- See Also:
-
getManagedInstanceScaling
Settings that control the range in the number of instances that the endpoint provisions as it scales up or down to accommodate traffic.Returns union: either
IResolvableorCfnEndpointConfig.ManagedInstanceScalingProperty- See Also:
-
getModelDataDownloadTimeoutInSeconds
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.- See Also:
-
getModelName
The name of the model that you want to host.This is the name that you specified when creating the model.
- See Also:
-
getRoutingConfig
Settings that control how the endpoint routes incoming traffic to the instances that the endpoint hosts.Returns union: either
IResolvableorCfnEndpointConfig.RoutingConfigProperty- See Also:
-
getServerlessConfig
The serverless configuration for an endpoint.Specifies a serverless endpoint configuration instead of an instance-based endpoint configuration.
Returns union: either
IResolvableorCfnEndpointConfig.ServerlessConfigProperty- See Also:
-
getVariantInstanceProvisionTimeoutInSeconds
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.
- See Also:
-
getVolumeSizeInGb
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.
- See Also:
-
builder
-