interface CfnEndpointConfigProps
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.Sagemaker.CfnEndpointConfigProps |
Java | software.amazon.awscdk.services.sagemaker.CfnEndpointConfigProps |
Python | aws_cdk.aws_sagemaker.CfnEndpointConfigProps |
TypeScript | @aws-cdk/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 * as sagemaker from '@aws-cdk/aws-sagemaker';
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
Name | Type | Description |
---|---|---|
production | IResolvable | IResolvable | Production [] | A list of ProductionVariant objects, one for each model that you want to host at this endpoint. |
async | IResolvable | Async | Specifies configuration for how an endpoint performs asynchronous inference. |
data | IResolvable | Data | Specifies how to capture endpoint data for model monitor. |
endpoint | string | The name of the endpoint configuration. |
explainer | IResolvable | Explainer | AWS::SageMaker::EndpointConfig.ExplainerConfig . |
kms | 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. |
shadow | IResolvable | IResolvable | Production [] | Array of ProductionVariant objects. |
tags? | Cfn [] | A list of key-value pairs to apply to this resource. |
productionVariants
Type:
IResolvable
|
IResolvable
|
Production
[]
A list of ProductionVariant
objects, one for each model that you want to host at this endpoint.
asyncInferenceConfig?
Type:
IResolvable
|
Async
(optional)
Specifies configuration for how an endpoint performs asynchronous inference.
dataCaptureConfig?
Type:
IResolvable
|
Data
(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
|
Explainer
(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 theProductionVariants
parameter use nitro-based instances with local storage, do not specify a value for theKmsKeyId
parameter. If you specify a value forKmsKeyId
when using any nitro-based instances with local storage, the call toCreateEndpointConfig
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
|
Production
[]
(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:
Cfn
[]
(optional)
A list of key-value pairs to apply to this resource.
For more information, see Resource Tag and Using Cost Allocation Tags .