Delete a scaling policy
You can delete a scaling policy with the AWS Management Console, the AWS CLI, or the Application Auto Scaling API. You must delete a scaling policy if you wish to update a model's endpoint.
Delete a scaling policy (Console)
To delete an automatic scaling policy (console)
-
Open the Amazon SageMaker console at https://console.aws.amazon.com/sagemaker/
. -
In the navigation pane, choose Endpoints.
-
Choose the endpoint for which you want to delete automatic scaling.
-
For Endpoint runtime settings, choose the variant that you want to configure.
-
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
AWS CLI 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 isendpoint
and the unique identifier is the name of the variant. For example,endpoint/MyEndpoint/variant/MyVariant
. -
--service-namespace
—Set this value tosagemaker
. -
--scalable-dimension
—Set this value tosagemaker:variant:DesiredInstanceCount
.
The following example deletes a target-tracking scaling policy named
myscalablepolicy
from a variant named
myscalablevariant
.
aws application-autoscaling delete-scaling-policy \ --policy-name myscalablepolicy \ --resource-id endpoint/MyEndpoint/variant/MyVariant \ --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 isendpoint
and the unique identifier is the name of the variant,. For example,endpoint/MyEndpoint/variant/MyVariant
. -
ScalableDimension
—Set this value tosagemaker:variant:DesiredInstanceCount
.
The following example uses the Application Auto Scaling API to delete a target-tracking
scaling policy named myscalablepolicy
from a variant named
myscalablevariant
.
POST / HTTP/1.1 Host: autoscaling.us-east-2.amazonaws.com Accept-Encoding: identity X-Amz-Target: AnyScaleFrontendService.DeleteScalingPolicy X-Amz-Date: 20160506T182145Z User-Agent: aws-cli/1.10.23 Python/2.7.11 Darwin/15.4.0 botocore/1.4.8 Content-Type: application/x-amz-json-1.1 Authorization: AUTHPARAMS { "PolicyName": "myscalablepolicy", "ServiceNamespace": "sagemaker", "ResourceId": "endpoint/MyEndpoint/variant/MyVariant", "ScalableDimension": "sagemaker:variant:DesiredInstanceCount" }