用 AWS CloudFormation 於建立資源調整政策 - Amazon SageMaker

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

用 AWS CloudFormation 於建立資源調整政策

下列範例顯示如何使用在端點上設定模型 auto 調整比例 AWS CloudFormation。

Endpoint: Type: "AWS::SageMaker::Endpoint" Properties: EndpointName: yourEndpointName EndpointConfigName: yourEndpointConfigName ScalingTarget: Type: "AWS::ApplicationAutoScaling::ScalableTarget" Properties: MaxCapacity: 10 MinCapacity: 2 ResourceId: endpoint/my-endpoint/variant/my-variant RoleARN: arn ScalableDimension: sagemaker:variant:DesiredInstanceCount ServiceNamespace: sagemaker ScalingPolicy: Type: "AWS::ApplicationAutoScaling::ScalingPolicy" Properties: PolicyName: my-scaling-policy PolicyType: TargetTrackingScaling ScalingTargetId: Ref: ScalingTarget TargetTrackingScalingPolicyConfiguration: TargetValue: 70.0 ScaleInCooldown: 600 ScaleOutCooldown: 30 PredefinedMetricSpecification: PredefinedMetricType: SageMakerVariantInvocationsPerInstance

如需詳細資訊,請參閱 Ap plication Auto Scaling 放使用者指南 AWS CloudFormation中的使用建立應用程式自動調整資源