CfnEndpointConfigProps Struct
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: [{
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{}#dataCaptureConfigIResolvable | CfnEndpointConfig.DataCaptureConfigPropertydata_capture_configtyping.Union[IResolvable, DataCaptureConfigProperty]dataCaptureConfigIResolvableDataCaptureConfigIResolvableDataCaptureConfiginterface{}#The data capture configuration applies to all production variants hosted at the endpoint.
enableNetworkIsolationboolean | IResolvableenable_network_isolationtyping.Union[bool, IResolvable]enableNetworkIsolationBooleanEnableNetworkIsolationboolEnableNetworkIsolationinterface{}#If they are, no inbound or outbound network calls can be made to or from the model containers.
endpointConfigNamestringendpoint_config_namestrendpointConfigNameStringEndpointConfigNamestringEndpointConfigName*string#executionRoleArnstringexecution_role_arnstrexecutionRoleArnStringExecutionRoleArnstringExecutionRoleArn*string#explainerConfigIResolvable | CfnEndpointConfig.ExplainerConfigPropertyexplainer_configtyping.Union[IResolvable, ExplainerConfigProperty]explainerConfigIResolvableExplainerConfigIResolvableExplainerConfiginterface{}#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
KmsKeyIdwhen 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 .
metricsConfigIResolvable | CfnEndpointConfig.MetricsConfigPropertymetrics_configtyping.Union[IResolvable, MetricsConfigProperty]metricsConfigIResolvableMetricsConfigIResolvableMetricsConfiginterface{}#productionVariantsIResolvable | IResolvable | CfnEndpointConfig.ProductionVariantProperty[]production_variantstyping.Union[IResolvable, typing.List[typing.Union[IResolvable, ProductionVariantProperty]]]productionVariantsIResolvableProductionVariantsIResolvableProductionVariantsinterface{}required#shadowProductionVariantsIResolvable | IResolvable | CfnEndpointConfig.ProductionVariantProperty[]shadow_production_variantstyping.Union[IResolvable, typing.List[typing.Union[IResolvable, ProductionVariantProperty]]]shadowProductionVariantsIResolvableShadowProductionVariantsIResolvableShadowProductionVariantsinterface{}#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 .
notes
For more information, see Resource Tag and Using Cost Allocation Tags .
vpcConfigIResolvable | CfnEndpointConfig.VpcConfigPropertyvpc_configtyping.Union[IResolvable, VpcConfigProperty]vpcConfigIResolvableVpcConfigIResolvableVpcConfiginterface{}#You can control access to and from your resources by configuring a VPC.