Edit a scaling policy
After creating a scaling policy, you can edit any of its settings except the name.
Topics
Edit a scaling policy (console)
To edit a target tracking scaling policy with the AWS Management Console, use the same procedure that you used to Configure model auto scaling with the console.
Edit a scaling policy (AWS CLI or Application Auto Scaling API)
You can use the AWS CLI or the Application Auto Scaling API to edit a scaling policy in the same way that you create a new scaling policy. For more information, see Apply a scaling policy.
Temporarily turn off scaling policies
After you configure auto scaling, you have the following options if you need to investigate an issue without interference from scaling policies (dynamic scaling):
-
Temporarily suspend and then resume scaling activities by calling the register-scalable-target CLI command or RegisterScalableTarget API action, specifying a Boolean value for both
DynamicScalingInSuspended
andDynamicScalingOutSuspended
.The following example shows how to suspend scaling policies for a variant named
, running on themy-variant
endpoint.my-endpoint
aws application-autoscaling register-scalable-target \ --service-namespace sagemaker \ --resource-id endpoint/
my-endpoint
/variant/my-variant
\ --scalable-dimension sagemaker:variant:DesiredInstanceCount \ --suspended-state '{"DynamicScalingInSuspended":true,"DynamicScalingOutSuspended":true}' -
Prevent specific target tracking scaling policies from scaling in your variant by disabling the policy's scale-in portion. This method prevents the scaling policy from deleting instances, while still allowing it to create them as needed.
Temporarily disable and then enable scale-in activities by editing the policy using the put-scaling-policy CLI command or the PutScalingPolicy API action, specifying a Boolean value for
DisableScaleIn
.The following is an example of a target tracking configuration for a scaling policy that will scale out but not scale in.
{ "TargetValue":
70.0
, "PredefinedMetricSpecification": { "PredefinedMetricType": "SageMakerVariantInvocationsPerInstance
" }, "DisableScaleIn":true
}