Delete a scaling policy
If you no longer need a scaling policy, you can delete it at any time.
Topics
Delete all scaling policies and deregister the model (console)
To delete all scaling policies and deregister the variant as a scalable target
- Open the Amazon SageMaker AI console at https://console.aws.amazon.com/sagemaker/ - . 
- 
                    On the navigation pane, choose Endpoints. 
- 
                    Choose your endpoint, and then for Endpoint runtime settings, choose the variant. 
- 
                    Choose Configure auto scaling. 
- 
                    Choose Deregister auto scaling. 
Delete a scaling policy (AWS CLI or Application Auto Scaling API)
You can use the AWS CLI or the Application Auto Scaling API to delete a scaling policy from a variant.
Delete a scaling policy (AWS CLI)
To delete a scaling policy from a variant, use the delete-scaling-policy command with the following parameters:
- 
                        --policy-name—The name of the scaling policy.
- 
                        --resource-id—The resource identifier for the variant. For this parameter, the resource type isendpointand the unique identifier is the name of the variant. For example,endpoint/.my-endpoint/variant/my-variant
- 
                        --service-namespace—Set this value tosagemaker.
- 
                        --scalable-dimension—Set this value tosagemaker:variant:DesiredInstanceCount.
The following example deletes a target tracking scaling policy named
                                my-scaling-policymy-variantmy-endpoint
aws application-autoscaling delete-scaling-policy \ --policy-namemy-scaling-policy\ --resource-id endpoint/my-endpoint/variant/my-variant\ --service-namespace sagemaker \ --scalable-dimension sagemaker:variant:DesiredInstanceCount
Delete a scaling policy (Application Auto Scaling API)
To delete a scaling policy from your variant, use the DeleteScalingPolicy Application Auto Scaling API action with the following parameters:
- 
                        PolicyName—The name of the scaling policy.
- 
                        ServiceNamespace—Set this value tosagemaker.
- 
                        ResourceID—The resource identifier for the variant. For this parameter, the resource type isendpointand the unique identifier is the name of the variant. For example,endpoint/.my-endpoint/variant/my-variant
- 
                        ScalableDimension—Set this value tosagemaker:variant:DesiredInstanceCount.
The following example deletes a target tracking scaling policy named
                                my-scaling-policymy-variantmy-endpoint
POST / HTTP/1.1 Host: application-autoscaling.us-east-2.amazonaws.com Accept-Encoding: identity X-Amz-Target: AnyScaleFrontendService.DeleteScalingPolicy X-Amz-Date: 20230506T182145Z User-Agent: aws-cli/2.0.0 Python/3.7.5 Windows/10 botocore/2.0.0dev4 Content-Type: application/x-amz-json-1.1 Authorization: AUTHPARAMS { "PolicyName": "my-scaling-policy", "ServiceNamespace": "sagemaker", "ResourceId": "endpoint/my-endpoint/variant/my-variant", "ScalableDimension": "sagemaker:variant:DesiredInstanceCount" }