aws-cdk-lib.aws_sagemaker.CfnEndpointConfigProps

interface CfnEndpointConfigProps

LanguageType name
.NETAmazon.CDK.AWS.Sagemaker.CfnEndpointConfigProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awssagemaker#CfnEndpointConfigProps
Javasoftware.amazon.awscdk.services.sagemaker.CfnEndpointConfigProps
Pythonaws_cdk.aws_sagemaker.CfnEndpointConfigProps
TypeScript aws-cdk-lib » aws_sagemaker » CfnEndpointConfigProps

Properties for defining a CfnEndpointConfig.

Example

// 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 cfnEndpointConfigProps: sagemaker.CfnEndpointConfigProps = {
  productionVariants: [{
    initialVariantWeight: 123,
    modelName: 'modelName',
    variantName: 'variantName',

    // the properties below are optional
    acceleratorType: 'acceleratorType',
    containerStartupHealthCheckTimeoutInSeconds: 123,
    enableSsmAccess: false,
    initialInstanceCount: 123,
    instanceType: 'instanceType',
    modelDataDownloadTimeoutInSeconds: 123,
    serverlessConfig: {
      maxConcurrency: 123,
      memorySizeInMb: 123,

      // the properties below are optional
      provisionedConcurrency: 123,
    },
    volumeSizeInGb: 123,
  }],

  // the properties below are optional
  asyncInferenceConfig: {
    outputConfig: {
      kmsKeyId: 'kmsKeyId',
      notificationConfig: {
        errorTopic: 'errorTopic',
        includeInferenceResponseIn: ['includeInferenceResponseIn'],
        successTopic: 'successTopic',
      },
      s3FailurePath: 's3FailurePath',
      s3OutputPath: 's3OutputPath',
    },

    // the properties below are optional
    clientConfig: {
      maxConcurrentInvocationsPerInstance: 123,
    },
  },
  dataCaptureConfig: {
    captureOptions: [{
      captureMode: 'captureMode',
    }],
    destinationS3Uri: 'destinationS3Uri',
    initialSamplingPercentage: 123,

    // the properties below are optional
    captureContentTypeHeader: {
      csvContentTypes: ['csvContentTypes'],
      jsonContentTypes: ['jsonContentTypes'],
    },
    enableCapture: false,
    kmsKeyId: 'kmsKeyId',
  },
  endpointConfigName: 'endpointConfigName',
  explainerConfig: {
    clarifyExplainerConfig: {
      shapConfig: {
        shapBaselineConfig: {
          mimeType: 'mimeType',
          shapBaseline: 'shapBaseline',
          shapBaselineUri: 'shapBaselineUri',
        },

        // the properties below are optional
        numberOfSamples: 123,
        seed: 123,
        textConfig: {
          granularity: 'granularity',
          language: 'language',
        },
        useLogit: false,
      },

      // the properties below are optional
      enableExplanations: 'enableExplanations',
      inferenceConfig: {
        contentTemplate: 'contentTemplate',
        featureHeaders: ['featureHeaders'],
        featuresAttribute: 'featuresAttribute',
        featureTypes: ['featureTypes'],
        labelAttribute: 'labelAttribute',
        labelHeaders: ['labelHeaders'],
        labelIndex: 123,
        maxPayloadInMb: 123,
        maxRecordCount: 123,
        probabilityAttribute: 'probabilityAttribute',
        probabilityIndex: 123,
      },
    },
  },
  kmsKeyId: 'kmsKeyId',
  shadowProductionVariants: [{
    initialVariantWeight: 123,
    modelName: 'modelName',
    variantName: 'variantName',

    // the properties below are optional
    acceleratorType: 'acceleratorType',
    containerStartupHealthCheckTimeoutInSeconds: 123,
    enableSsmAccess: false,
    initialInstanceCount: 123,
    instanceType: 'instanceType',
    modelDataDownloadTimeoutInSeconds: 123,
    serverlessConfig: {
      maxConcurrency: 123,
      memorySizeInMb: 123,

      // the properties below are optional
      provisionedConcurrency: 123,
    },
    volumeSizeInGb: 123,
  }],
  tags: [{
    key: 'key',
    value: 'value',
  }],
};

Properties

NameTypeDescription
productionVariantsIResolvable | IResolvable | ProductionVariantProperty[]A list of ProductionVariant objects, one for each model that you want to host at this endpoint.
asyncInferenceConfig?IResolvable | AsyncInferenceConfigPropertySpecifies configuration for how an endpoint performs asynchronous inference.
dataCaptureConfig?IResolvable | DataCaptureConfigPropertySpecifies how to capture endpoint data for model monitor.
endpointConfigName?stringThe name of the endpoint configuration.
explainerConfig?IResolvable | ExplainerConfigPropertyAWS::SageMaker::EndpointConfig.ExplainerConfig.
kmsKeyId?stringThe Amazon Resource Name (ARN) of an AWS Key Management Service key that Amazon SageMaker uses to encrypt data on the storage volume attached to the ML compute instance that hosts the endpoint.
shadowProductionVariants?IResolvable | IResolvable | ProductionVariantProperty[]Array of ProductionVariant objects.
tags?CfnTag[]A list of key-value pairs to apply to this resource.

productionVariants

Type: IResolvable | IResolvable | ProductionVariantProperty[]

A list of ProductionVariant objects, one for each model that you want to host at this endpoint.


asyncInferenceConfig?

Type: IResolvable | AsyncInferenceConfigProperty (optional)

Specifies configuration for how an endpoint performs asynchronous inference.


dataCaptureConfig?

Type: IResolvable | DataCaptureConfigProperty (optional)

Specifies how to capture endpoint data for model monitor.

The data capture configuration applies to all production variants hosted at the endpoint.


endpointConfigName?

Type: string (optional)

The name of the endpoint configuration.


explainerConfig?

Type: IResolvable | ExplainerConfigProperty (optional)

AWS::SageMaker::EndpointConfig.ExplainerConfig.


kmsKeyId?

Type: string (optional)

The Amazon Resource Name (ARN) of an AWS Key Management Service key that Amazon SageMaker uses to encrypt data on the storage volume attached to the ML compute instance that hosts the endpoint.

  • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
  • Key ARN: arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
  • Alias name: alias/ExampleAlias
  • Alias name ARN: arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias

The KMS key policy must grant permission to the IAM role that you specify in your CreateEndpoint , UpdateEndpoint requests. For more information, refer to the AWS Key Management Service section Using Key Policies in AWS KMS

Certain Nitro-based instances include local storage, dependent on the instance type. Local storage volumes are encrypted using a hardware module on the instance. You can't request a KmsKeyId when using an instance type with local storage. If any of the models that you specify in the ProductionVariants parameter use nitro-based instances with local storage, do not specify a value for the KmsKeyId parameter. If you specify a value for KmsKeyId when using any nitro-based instances with local storage, the call to CreateEndpointConfig fails.

For a list of instance types that support local instance storage, see Instance Store Volumes .

For more information about local instance storage encryption, see SSD Instance Store Volumes .


shadowProductionVariants?

Type: IResolvable | IResolvable | ProductionVariantProperty[] (optional)

Array of ProductionVariant objects.

There is one for each model that you want to host at this endpoint in shadow mode with production traffic replicated from the model specified on ProductionVariants . If you use this field, you can only specify one variant for ProductionVariants and one variant for ShadowProductionVariants .


tags?

Type: CfnTag[] (optional)

A list of key-value pairs to apply to this resource.

For more information, see Resource Tag and Using Cost Allocation Tags .