

Die vorliegende Übersetzung wurde maschinell erstellt. Im Falle eines Konflikts oder eines Widerspruchs zwischen dieser übersetzten Fassung und der englischen Fassung (einschließlich infolge von Verzögerungen bei der Übersetzung) ist die englische Fassung maßgeblich.

# Verwenden Sie CloudFormation um eine Skalierungsrichtlinie zu erstellen
<a name="endpoint-scaling-cloudformation"></a>

Das folgende Beispiel zeigt, wie Sie Auto Scaling für Modelle auf einem Endpunkt mit CloudFormation konfigurieren.

```
  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
```

Weitere Informationen finden Sie unter [Erstellen von Ressourcen für Application Auto Scaling mit AWS CloudFormation](https://docs.aws.amazon.com/autoscaling/application/userguide/creating-resources-with-cloudformation.html) im *Benutzerhandbuch zum Application Auto Scaling*.