Skip to content
v2.275.0

CfnInferenceComponentProps Struct ​

Properties for defining a CfnInferenceComponent.

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 cfnInferenceComponentProps: sagemaker.CfnInferenceComponentProps = {
  endpointName: 'endpointName',

  // the properties below are optional
  deploymentConfig: {
    autoRollbackConfiguration: {
      alarms: [{
        alarmName: 'alarmName',
      }],
    },
    rollingUpdatePolicy: {
      maximumBatchSize: {
        type: 'type',
        value: 123,
      },
      maximumExecutionTimeoutInSeconds: 123,
      rollbackMaximumBatchSize: {
        type: 'type',
        value: 123,
      },
      waitIntervalInSeconds: 123,
    },
  },
  endpointArn: 'endpointArn',
  inferenceComponentName: 'inferenceComponentName',
  runtimeConfig: {
    copyCount: 123,
    currentCopyCount: 123,
    desiredCopyCount: 123,
    placementStatus: [{
      currentCopyCount: 123,
      instanceType: 'instanceType',
    }],
  },
  specification: {
    baseInferenceComponentName: 'baseInferenceComponentName',
    computeResourceRequirements: {
      maxMemoryRequiredInMb: 123,
      minMemoryRequiredInMb: 123,
      numberOfAcceleratorDevicesRequired: 123,
      numberOfCpuCoresRequired: 123,
    },
    container: {
      artifactUrl: 'artifactUrl',
      containerMetricsConfig: {
        metricsEndpoints: [{
          metricsEndpointPath: 'metricsEndpointPath',

          // the properties below are optional
          metricPublishFrequencyInSeconds: 123,
        }],
      },
      deployedImage: {
        resolutionTime: 'resolutionTime',
        resolvedImage: 'resolvedImage',
        specifiedImage: 'specifiedImage',
      },
      environment: {
        environmentKey: 'environment',
      },
      image: 'image',
    },
    currentDataCacheConfig: {
      enableCaching: false,
    },
    dataCacheConfig: {
      enableCaching: false,
    },
    modelName: 'modelName',
    schedulingConfig: {
      availabilityZoneBalance: {
        enforcementMode: 'enforcementMode',

        // the properties below are optional
        maxImbalance: 123,
      },
      placementStrategy: 'placementStrategy',
    },
    startupParameters: {
      containerStartupHealthCheckTimeoutInSeconds: 123,
      modelDataDownloadTimeoutInSeconds: 123,
    },
  },
  specifications: [{
    instanceType: 'instanceType',

    // the properties below are optional
    computeResourceRequirements: {
      maxMemoryRequiredInMb: 123,
      minMemoryRequiredInMb: 123,
      numberOfAcceleratorDevicesRequired: 123,
      numberOfCpuCoresRequired: 123,
    },
    container: {
      artifactUrl: 'artifactUrl',
      containerMetricsConfig: {
        metricsEndpoints: [{
          metricsEndpointPath: 'metricsEndpointPath',

          // the properties below are optional
          metricPublishFrequencyInSeconds: 123,
        }],
      },
      environment: {
        environmentKey: 'environment',
      },
      image: 'image',
    },
    currentDataCacheConfig: {
      enableCaching: false,
    },
    dataCacheConfig: {
      enableCaching: false,
    },
    modelName: 'modelName',
    schedulingConfig: {
      availabilityZoneBalance: {
        enforcementMode: 'enforcementMode',

        // the properties below are optional
        maxImbalance: 123,
      },
      placementStrategy: 'placementStrategy',
    },
    startupParameters: {
      containerStartupHealthCheckTimeoutInSeconds: 123,
      modelDataDownloadTimeoutInSeconds: 123,
    },
  }],
  tags: [{
    key: 'key',
    value: 'value',
  }],
  variantName: 'variantName',
};

Properties ​

deploymentConfigoptionalIResolvable | CfnInferenceComponent.InferenceComponentDeploymentConfigPropertydeployment_configoptionaltyping.Union[IResolvable, InferenceComponentDeploymentConfigProperty]deploymentConfigoptionalIResolvableDeploymentConfigoptionalIResolvableDeploymentConfigoptionalinterface{}#
The deployment configuration for an endpoint, which contains the desired deployment strategy and rollback configurations.
endpointArnoptionalstringendpoint_arnoptionalstrendpointArnoptionalStringEndpointArnoptionalstringEndpointArnoptional*string#
The Amazon Resource Name (ARN) of the endpoint that hosts the inference component.
endpointNamestringendpoint_namestrendpointNameStringEndpointNamestringEndpointName*stringrequired#
The name of the endpoint that hosts the inference component.
inferenceComponentNameoptionalstringinference_component_nameoptionalstrinferenceComponentNameoptionalStringInferenceComponentNameoptionalstringInferenceComponentNameoptional*string#
The name of the inference component.
runtimeConfigoptionalIResolvable | CfnInferenceComponent.InferenceComponentRuntimeConfigPropertyruntime_configoptionaltyping.Union[IResolvable, InferenceComponentRuntimeConfigProperty]runtimeConfigoptionalIResolvableRuntimeConfigoptionalIResolvableRuntimeConfigoptionalinterface{}#
The runtime config for the inference component.
specificationoptionalIResolvable | CfnInferenceComponent.InferenceComponentSpecificationPropertyspecificationoptionaltyping.Union[IResolvable, InferenceComponentSpecificationProperty]specificationoptionalIResolvableSpecificationoptionalIResolvableSpecificationoptionalinterface{}#
The specification for the inference component, for an endpoint with a single instance type.

Specify exactly one of Specification or Specifications. InstanceType is not accepted here; use Specifications for per instance type configuration.

specificationsoptionalIResolvable | IResolvable | CfnInferenceComponent.InferenceComponentSpecificationForInstanceTypeProperty[]specificationsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, InferenceComponentSpecificationForInstanceTypeProperty]]]specificationsoptionalIResolvableSpecificationsoptionalIResolvableSpecificationsoptionalinterface{}#
A list of specification objects for the inference component, one per instance type.

The service requires at least two entries; use the singular Specification for a single instance type.

tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag#
An array of tags to apply to the resource.
variantNameoptionalstringvariant_nameoptionalstrvariantNameoptionalStringVariantNameoptionalstringVariantNameoptional*string#
The name of the production variant that hosts the inference component.