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, metrics_config=None, shadow_production_variants=None, tags=None, vpc_config=None)
Bases:
objectProperties for defining a
CfnEndpointConfig.- Parameters:
production_variants (
Union[IResolvable,Sequence[Union[IResolvable,ProductionVariantProperty,Dict[str,Any]]]]) – A list ofProductionVariantobjects, 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]) – 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.endpoint_config_name (
Optional[str]) – The name of the endpoint configuration.execution_role_arn (
Optional[str]) – The Amazon Resource Name (ARN) of an IAM role that Amazon SageMaker AI can assume to perform actions on your behalf.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/ExampleAliasThe KMS key policy must grant permission to the IAM role that you specify in yourCreateEndpoint,UpdateEndpointrequests. 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 aKmsKeyIdwhen using an instance type with local storage. If any of the models that you specify in theProductionVariantsparameter use nitro-based instances with local storage, do not specify a value for theKmsKeyIdparameter. If you specify a value forKmsKeyIdwhen using any nitro-based instances with local storage, the call toCreateEndpointConfigfails. 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 .metrics_config (
Union[IResolvable,MetricsConfigProperty,Dict[str,Any],None]) – Specifies the metrics that the endpoint publishes to Amazon CloudWatch, the frequency of publication, and whether to enable enhanced or detailed observability metrics.shadow_production_variants (
Union[IResolvable,Sequence[Union[IResolvable,ProductionVariantProperty,Dict[str,Any]]],None]) – Array ofProductionVariantobjects. 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 onProductionVariants. If you use this field, you can only specify one variant forProductionVariantsand one variant forShadowProductionVariants.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]) – 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.
- See:
- ExampleMetadata:
fixture=_generated
Example:
from aws_cdk import CfnTag # 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", capacity_reservation_config=sagemaker.CfnEndpointConfig.CapacityReservationConfigProperty( capacity_reservation_preference="capacityReservationPreference", ml_reservation_arn="mlReservationArn" ), container_startup_health_check_timeout_in_seconds=123, core_dump_config=sagemaker.CfnEndpointConfig.CoreDumpConfigProperty( destination_s3_uri="destinationS3Uri", # the properties below are optional kms_key_id="kmsKeyId" ), enable_ssm_access=False, inference_ami_version="inferenceAmiVersion", initial_instance_count=123, initial_variant_weight=123, instance_pools=[sagemaker.CfnEndpointConfig.InstancePoolProperty( instance_type="instanceType", priority=123, # the properties below are optional model_name_override="modelNameOverride" )], instance_type="instanceType", managed_instance_scaling=sagemaker.CfnEndpointConfig.ManagedInstanceScalingProperty( max_instance_count=123, min_instance_count=123, scale_in_policy=sagemaker.CfnEndpointConfig.ScaleInPolicyProperty( strategy="strategy", # the properties below are optional cooldown_in_minutes=123, maximum_step_size=123 ), status="status" ), model_data_download_timeout_in_seconds=123, model_name="modelName", routing_config=sagemaker.CfnEndpointConfig.RoutingConfigProperty( prefix_aware_routing_config=sagemaker.CfnEndpointConfig.PrefixAwareRoutingConfigProperty( concurrency_threshold=123, prefix_length=123 ), routing_strategy="routingStrategy" ), serverless_config=sagemaker.CfnEndpointConfig.ServerlessConfigProperty( max_concurrency=123, memory_size_in_mb=123, # the properties below are optional provisioned_concurrency=123 ), variant_instance_provision_timeout_in_seconds=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", metrics_config=sagemaker.CfnEndpointConfig.MetricsConfigProperty( enable_detailed_observability=False, enable_enhanced_metrics=False, metric_publish_frequency_in_seconds=123 ), shadow_production_variants=[sagemaker.CfnEndpointConfig.ProductionVariantProperty( variant_name="variantName", # the properties below are optional accelerator_type="acceleratorType", capacity_reservation_config=sagemaker.CfnEndpointConfig.CapacityReservationConfigProperty( capacity_reservation_preference="capacityReservationPreference", ml_reservation_arn="mlReservationArn" ), container_startup_health_check_timeout_in_seconds=123, core_dump_config=sagemaker.CfnEndpointConfig.CoreDumpConfigProperty( destination_s3_uri="destinationS3Uri", # the properties below are optional kms_key_id="kmsKeyId" ), enable_ssm_access=False, inference_ami_version="inferenceAmiVersion", initial_instance_count=123, initial_variant_weight=123, instance_pools=[sagemaker.CfnEndpointConfig.InstancePoolProperty( instance_type="instanceType", priority=123, # the properties below are optional model_name_override="modelNameOverride" )], instance_type="instanceType", managed_instance_scaling=sagemaker.CfnEndpointConfig.ManagedInstanceScalingProperty( max_instance_count=123, min_instance_count=123, scale_in_policy=sagemaker.CfnEndpointConfig.ScaleInPolicyProperty( strategy="strategy", # the properties below are optional cooldown_in_minutes=123, maximum_step_size=123 ), status="status" ), model_data_download_timeout_in_seconds=123, model_name="modelName", routing_config=sagemaker.CfnEndpointConfig.RoutingConfigProperty( prefix_aware_routing_config=sagemaker.CfnEndpointConfig.PrefixAwareRoutingConfigProperty( concurrency_threshold=123, prefix_length=123 ), routing_strategy="routingStrategy" ), serverless_config=sagemaker.CfnEndpointConfig.ServerlessConfigProperty( max_concurrency=123, memory_size_in_mb=123, # the properties below are optional provisioned_concurrency=123 ), variant_instance_provision_timeout_in_seconds=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.
- 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.
- enable_network_isolation
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.
- endpoint_config_name
The name of the endpoint configuration.
- execution_role_arn
The Amazon Resource Name (ARN) of an IAM role that Amazon SageMaker AI can assume to perform actions on your behalf.
- explainer_config
A parameter to activate explainers.
- 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-1234567890abKey ARN:
arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890abAlias name:
alias/ExampleAliasAlias 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,UpdateEndpointrequests. 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>`_ .
- metrics_config
Specifies the metrics that the endpoint publishes to Amazon CloudWatch, the frequency of publication, and whether to enable enhanced or detailed observability metrics.
- production_variants
A list of
ProductionVariantobjects, one for each model that you want to host at this endpoint.
- shadow_production_variants
Array of
ProductionVariantobjects.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 forProductionVariantsand one variant forShadowProductionVariants.
- tags
A list of key-value pairs to apply to this resource.
For more information, see Resource Tag and Using Cost Allocation Tags .
- vpc_config
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.