CfnEndpointConfigProps

class aws_cdk.aws_sagemaker.CfnEndpointConfigProps(*, production_variants, async_inference_config=None, data_capture_config=None, enable_network_isolation=None, endpoint_config_name=None, execution_role_arn=None, explainer_config=None, kms_key_id=None, shadow_production_variants=None, tags=None, vpc_config=None)

Bases: object

Properties for defining a CfnEndpointConfig.

Parameters:
  • production_variants (Union[IResolvable, Sequence[Union[IResolvable, ProductionVariantProperty, Dict[str, Any]]]]) – A list of ProductionVariant objects, one for each model that you want to host at this endpoint.

  • async_inference_config (Union[IResolvable, AsyncInferenceConfigProperty, Dict[str, Any], None]) – Specifies configuration for how an endpoint performs asynchronous inference.

  • data_capture_config (Union[IResolvable, DataCaptureConfigProperty, Dict[str, Any], None]) – Specifies how to capture endpoint data for model monitor. The data capture configuration applies to all production variants hosted at the endpoint.

  • enable_network_isolation (Union[bool, IResolvable, None]) –

  • endpoint_config_name (Optional[str]) – The name of the endpoint configuration.

  • execution_role_arn (Optional[str]) –

  • explainer_config (Union[IResolvable, ExplainerConfigProperty, Dict[str, Any], None]) – A parameter to activate explainers.

  • kms_key_id (Optional[str]) – 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 .. epigraph:: 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 .

  • shadow_production_variants (Union[IResolvable, Sequence[Union[IResolvable, ProductionVariantProperty, Dict[str, Any]]], None]) – 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 (Optional[Sequence[Union[CfnTag, Dict[str, Any]]]]) – A list of key-value pairs to apply to this resource. For more information, see Resource Tag and Using Cost Allocation Tags .

  • vpc_config (Union[IResolvable, VpcConfigProperty, Dict[str, Any], None]) –

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sagemaker-endpointconfig.html

ExampleMetadata:

fixture=_generated

Example:

# 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

cfn_endpoint_config_props = sagemaker.CfnEndpointConfigProps(
    production_variants=[sagemaker.CfnEndpointConfig.ProductionVariantProperty(
        variant_name="variantName",

        # the properties below are optional
        accelerator_type="acceleratorType",
        container_startup_health_check_timeout_in_seconds=123,
        enable_ssm_access=False,
        initial_instance_count=123,
        initial_variant_weight=123,
        instance_type="instanceType",
        managed_instance_scaling=sagemaker.CfnEndpointConfig.ManagedInstanceScalingProperty(
            max_instance_count=123,
            min_instance_count=123,
            status="status"
        ),
        model_data_download_timeout_in_seconds=123,
        model_name="modelName",
        routing_config=sagemaker.CfnEndpointConfig.RoutingConfigProperty(
            routing_strategy="routingStrategy"
        ),
        serverless_config=sagemaker.CfnEndpointConfig.ServerlessConfigProperty(
            max_concurrency=123,
            memory_size_in_mb=123,

            # the properties below are optional
            provisioned_concurrency=123
        ),
        volume_size_in_gb=123
    )],

    # the properties below are optional
    async_inference_config=sagemaker.CfnEndpointConfig.AsyncInferenceConfigProperty(
        output_config=sagemaker.CfnEndpointConfig.AsyncInferenceOutputConfigProperty(
            kms_key_id="kmsKeyId",
            notification_config=sagemaker.CfnEndpointConfig.AsyncInferenceNotificationConfigProperty(
                error_topic="errorTopic",
                include_inference_response_in=["includeInferenceResponseIn"],
                success_topic="successTopic"
            ),
            s3_failure_path="s3FailurePath",
            s3_output_path="s3OutputPath"
        ),

        # the properties below are optional
        client_config=sagemaker.CfnEndpointConfig.AsyncInferenceClientConfigProperty(
            max_concurrent_invocations_per_instance=123
        )
    ),
    data_capture_config=sagemaker.CfnEndpointConfig.DataCaptureConfigProperty(
        capture_options=[sagemaker.CfnEndpointConfig.CaptureOptionProperty(
            capture_mode="captureMode"
        )],
        destination_s3_uri="destinationS3Uri",
        initial_sampling_percentage=123,

        # the properties below are optional
        capture_content_type_header=sagemaker.CfnEndpointConfig.CaptureContentTypeHeaderProperty(
            csv_content_types=["csvContentTypes"],
            json_content_types=["jsonContentTypes"]
        ),
        enable_capture=False,
        kms_key_id="kmsKeyId"
    ),
    enable_network_isolation=False,
    endpoint_config_name="endpointConfigName",
    execution_role_arn="executionRoleArn",
    explainer_config=sagemaker.CfnEndpointConfig.ExplainerConfigProperty(
        clarify_explainer_config=sagemaker.CfnEndpointConfig.ClarifyExplainerConfigProperty(
            shap_config=sagemaker.CfnEndpointConfig.ClarifyShapConfigProperty(
                shap_baseline_config=sagemaker.CfnEndpointConfig.ClarifyShapBaselineConfigProperty(
                    mime_type="mimeType",
                    shap_baseline="shapBaseline",
                    shap_baseline_uri="shapBaselineUri"
                ),

                # the properties below are optional
                number_of_samples=123,
                seed=123,
                text_config=sagemaker.CfnEndpointConfig.ClarifyTextConfigProperty(
                    granularity="granularity",
                    language="language"
                ),
                use_logit=False
            ),

            # the properties below are optional
            enable_explanations="enableExplanations",
            inference_config=sagemaker.CfnEndpointConfig.ClarifyInferenceConfigProperty(
                content_template="contentTemplate",
                feature_headers=["featureHeaders"],
                features_attribute="featuresAttribute",
                feature_types=["featureTypes"],
                label_attribute="labelAttribute",
                label_headers=["labelHeaders"],
                label_index=123,
                max_payload_in_mb=123,
                max_record_count=123,
                probability_attribute="probabilityAttribute",
                probability_index=123
            )
        )
    ),
    kms_key_id="kmsKeyId",
    shadow_production_variants=[sagemaker.CfnEndpointConfig.ProductionVariantProperty(
        variant_name="variantName",

        # the properties below are optional
        accelerator_type="acceleratorType",
        container_startup_health_check_timeout_in_seconds=123,
        enable_ssm_access=False,
        initial_instance_count=123,
        initial_variant_weight=123,
        instance_type="instanceType",
        managed_instance_scaling=sagemaker.CfnEndpointConfig.ManagedInstanceScalingProperty(
            max_instance_count=123,
            min_instance_count=123,
            status="status"
        ),
        model_data_download_timeout_in_seconds=123,
        model_name="modelName",
        routing_config=sagemaker.CfnEndpointConfig.RoutingConfigProperty(
            routing_strategy="routingStrategy"
        ),
        serverless_config=sagemaker.CfnEndpointConfig.ServerlessConfigProperty(
            max_concurrency=123,
            memory_size_in_mb=123,

            # the properties below are optional
            provisioned_concurrency=123
        ),
        volume_size_in_gb=123
    )],
    tags=[CfnTag(
        key="key",
        value="value"
    )],
    vpc_config=sagemaker.CfnEndpointConfig.VpcConfigProperty(
        security_group_ids=["securityGroupIds"],
        subnets=["subnets"]
    )
)

Attributes

async_inference_config

Specifies configuration for how an endpoint performs asynchronous inference.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sagemaker-endpointconfig.html#cfn-sagemaker-endpointconfig-asyncinferenceconfig

data_capture_config

Specifies how to capture endpoint data for model monitor.

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

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sagemaker-endpointconfig.html#cfn-sagemaker-endpointconfig-datacaptureconfig

enable_network_isolation

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sagemaker-endpointconfig.html#cfn-sagemaker-endpointconfig-enablenetworkisolation

Type:

see

endpoint_config_name

The name of the endpoint configuration.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sagemaker-endpointconfig.html#cfn-sagemaker-endpointconfig-endpointconfigname

execution_role_arn

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sagemaker-endpointconfig.html#cfn-sagemaker-endpointconfig-executionrolearn

Type:

see

explainer_config

A parameter to activate explainers.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sagemaker-endpointconfig.html#cfn-sagemaker-endpointconfig-explainerconfig

kms_key_id

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 .. epigraph:

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 <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html#instance-store-volumes>`_ .

For more information about local instance storage encryption, see `SSD Instance Store Volumes <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ssd-instance-store.html>`_ .
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sagemaker-endpointconfig.html#cfn-sagemaker-endpointconfig-kmskeyid

production_variants

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

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sagemaker-endpointconfig.html#cfn-sagemaker-endpointconfig-productionvariants

shadow_production_variants

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 .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sagemaker-endpointconfig.html#cfn-sagemaker-endpointconfig-shadowproductionvariants

tags

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

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

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sagemaker-endpointconfig.html#cfn-sagemaker-endpointconfig-tags

vpc_config

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sagemaker-endpointconfig.html#cfn-sagemaker-endpointconfig-vpcconfig

Type:

see