Skip to content
v2.274.0

CfnEndpointConfigProps Struct ​

Properties for defining a CfnEndpointConfig.

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

    // the properties below are optional
    acceleratorType: 'acceleratorType',
    capacityReservationConfig: {
      capacityReservationPreference: 'capacityReservationPreference',
      mlReservationArn: 'mlReservationArn',
    },
    containerStartupHealthCheckTimeoutInSeconds: 123,
    coreDumpConfig: {
      destinationS3Uri: 'destinationS3Uri',

      // the properties below are optional
      kmsKeyId: 'kmsKeyId',
    },
    enableSsmAccess: false,
    inferenceAmiVersion: 'inferenceAmiVersion',
    initialInstanceCount: 123,
    initialVariantWeight: 123,
    instancePools: [{
      instanceType: 'instanceType',
      priority: 123,

      // the properties below are optional
      modelNameOverride: 'modelNameOverride',
    }],
    instanceType: 'instanceType',
    managedInstanceScaling: {
      maxInstanceCount: 123,
      minInstanceCount: 123,
      scaleInPolicy: {
        strategy: 'strategy',

        // the properties below are optional
        cooldownInMinutes: 123,
        maximumStepSize: 123,
      },
      status: 'status',
    },
    modelDataDownloadTimeoutInSeconds: 123,
    modelName: 'modelName',
    routingConfig: {
      prefixAwareRoutingConfig: {
        concurrencyThreshold: 123,
        prefixLength: 123,
      },
      routingStrategy: 'routingStrategy',
    },
    serverlessConfig: {
      maxConcurrency: 123,
      memorySizeInMb: 123,

      // the properties below are optional
      provisionedConcurrency: 123,
    },
    variantInstanceProvisionTimeoutInSeconds: 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',
  },
  enableNetworkIsolation: false,
  endpointConfigName: 'endpointConfigName',
  executionRoleArn: 'executionRoleArn',
  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',
  metricsConfig: {
    enableDetailedObservability: false,
    enableEnhancedMetrics: false,
    metricPublishFrequencyInSeconds: 123,
  },
  shadowProductionVariants: [{
    variantName: 'variantName',

    // the properties below are optional
    acceleratorType: 'acceleratorType',
    capacityReservationConfig: {
      capacityReservationPreference: 'capacityReservationPreference',
      mlReservationArn: 'mlReservationArn',
    },
    containerStartupHealthCheckTimeoutInSeconds: 123,
    coreDumpConfig: {
      destinationS3Uri: 'destinationS3Uri',

      // the properties below are optional
      kmsKeyId: 'kmsKeyId',
    },
    enableSsmAccess: false,
    inferenceAmiVersion: 'inferenceAmiVersion',
    initialInstanceCount: 123,
    initialVariantWeight: 123,
    instancePools: [{
      instanceType: 'instanceType',
      priority: 123,

      // the properties below are optional
      modelNameOverride: 'modelNameOverride',
    }],
    instanceType: 'instanceType',
    managedInstanceScaling: {
      maxInstanceCount: 123,
      minInstanceCount: 123,
      scaleInPolicy: {
        strategy: 'strategy',

        // the properties below are optional
        cooldownInMinutes: 123,
        maximumStepSize: 123,
      },
      status: 'status',
    },
    modelDataDownloadTimeoutInSeconds: 123,
    modelName: 'modelName',
    routingConfig: {
      prefixAwareRoutingConfig: {
        concurrencyThreshold: 123,
        prefixLength: 123,
      },
      routingStrategy: 'routingStrategy',
    },
    serverlessConfig: {
      maxConcurrency: 123,
      memorySizeInMb: 123,

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

Properties ​

asyncInferenceConfigIResolvable | CfnEndpointConfig.AsyncInferenceConfigPropertyasync_inference_configtyping.Union[IResolvable, AsyncInferenceConfigProperty]asyncInferenceConfigIResolvableAsyncInferenceConfigIResolvableAsyncInferenceConfiginterface{}#
Specifies configuration for how an endpoint performs asynchronous inference.
dataCaptureConfigIResolvable | CfnEndpointConfig.DataCaptureConfigPropertydata_capture_configtyping.Union[IResolvable, DataCaptureConfigProperty]dataCaptureConfigIResolvableDataCaptureConfigIResolvableDataCaptureConfiginterface{}#
Specifies how to capture endpoint data for model monitor.

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

enableNetworkIsolationboolean | IResolvableenable_network_isolationtyping.Union[bool, IResolvable]enableNetworkIsolationBooleanEnableNetworkIsolationboolEnableNetworkIsolationinterface{}#
Sets whether all model containers deployed to the endpoint are isolated.

If they are, no inbound or outbound network calls can be made to or from the model containers.

endpointConfigNamestringendpoint_config_namestrendpointConfigNameStringEndpointConfigNamestringEndpointConfigName*string#
The name of the endpoint configuration.
executionRoleArnstringexecution_role_arnstrexecutionRoleArnStringExecutionRoleArnstringExecutionRoleArn*string#
The Amazon Resource Name (ARN) of an IAM role that Amazon SageMaker AI can assume to perform actions on your behalf.
explainerConfigIResolvable | CfnEndpointConfig.ExplainerConfigPropertyexplainer_configtyping.Union[IResolvable, ExplainerConfigProperty]explainerConfigIResolvableExplainerConfigIResolvableExplainerConfiginterface{}#
A parameter to activate explainers.
kmsKeyIdstringkms_key_idstrkmsKeyIdStringKmsKeyIdstringKmsKeyId*string#
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.
notes
  • 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 .

metricsConfigIResolvable | CfnEndpointConfig.MetricsConfigPropertymetrics_configtyping.Union[IResolvable, MetricsConfigProperty]metricsConfigIResolvableMetricsConfigIResolvableMetricsConfiginterface{}#
Specifies the metrics that the endpoint publishes to Amazon CloudWatch, the frequency of publication, and whether to enable enhanced or detailed observability metrics.
productionVariantsIResolvable | IResolvable | CfnEndpointConfig.ProductionVariantProperty[]production_variantstyping.Union[IResolvable, typing.List[typing.Union[IResolvable, ProductionVariantProperty]]]productionVariantsIResolvableProductionVariantsIResolvableProductionVariantsinterface{}required#
A list of `ProductionVariant` objects, one for each model that you want to host at this endpoint.
shadowProductionVariantsIResolvable | IResolvable | CfnEndpointConfig.ProductionVariantProperty[]shadow_production_variantstyping.Union[IResolvable, typing.List[typing.Union[IResolvable, ProductionVariantProperty]]]shadowProductionVariantsIResolvableShadowProductionVariantsIResolvableShadowProductionVariantsinterface{}#
Array of `ProductionVariant` objects.
notes

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 .

tagsCfnTag[]tagstyping.List[CfnTag]tagsList<CfnTag>TagsCfnTag[]Tags*[]CfnTag#
A list of key-value pairs to apply to this resource.
notes

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

vpcConfigIResolvable | CfnEndpointConfig.VpcConfigPropertyvpc_configtyping.Union[IResolvable, VpcConfigProperty]vpcConfigIResolvableVpcConfigIResolvableVpcConfiginterface{}#
Specifies an Amazon Virtual Private Cloud (VPC) that your SageMaker jobs, hosted models, and compute resources have access to.

You can control access to and from your resources by configuring a VPC.