Menu
AWS CloudFormation
User Guide (API Version 2010-05-15)

AWS::AutoScaling::ScalingPolicy

The AWS::AutoScaling::ScalingPolicy resource adds a scaling policy to an auto scaling group. A scaling policy specifies whether to scale the auto scaling group up or down, and by how much. For more information on scaling policies, see Scaling by Policy in the Auto Scaling Developer Guide.

You can use a scaling policy together with an CloudWatch alarm. An CloudWatch alarm can automatically initiate actions on your behalf, based on parameters you specify. A scaling policy is one type of action that an alarm can initiate. For a snippet showing how to create an Auto Scaling policy that is triggered by an CloudWatch alarm, see Auto Scaling Policy Triggered by CloudWatch Alarm.

This type supports updates. For more information about updating this resource, see PutScalingPolicy.

Syntax


{
   "Type" : "AWS::AutoScaling::ScalingPolicy",
   "Properties" : {
      "AdjustmentType" : String,
      "AutoScalingGroupName" : String,
      "Cooldown" : String,
      "MinAdjustmentStep" : Integer,
      "ScalingAdjustment" : String
   }
}      

Properties

AdjustmentType

Specifies whether the ScalingAdjustment is an absolute number or a percentage of the current capacity. Valid values are ChangeInCapacity, ExactCapacity, and PercentChangeInCapacity.

Required: Yes

Type: String

Update requires: No interruption

AutoScalingGroupName

The name or Amazon Resource Name (ARN) of the Auto Scaling Group that you want to attach the policy to.

Required: Yes

Type: String

Update requires: No interruption

Cooldown

The amount of time, in seconds, after a scaling activity completes before any further trigger-related scaling activities can start.

Required: No

Type: String

Update requires: No interruption

MinAdjustmentStep

The minmum number of instances that are added or removed when the Auto Scaling group scales up or down. You can use this property only when you specify PercentChangeInCapacity for the AdjustmentType property.

Required: No

Type: Integer

Update requires: No interruption

ScalingAdjustment

The number of instances by which to scale. AdjustmentType determines the interpretation of this number, such as an absolute number or as a percentage of the existing Auto Scaling group size. A positive increment adds to the current capacity and a negative value removes from the current capacity.

Required: Yes

Type: String

Update requires: No interruption

Return Value

When you specify an AWS::AutoScaling::ScalingPolicy type as an argument to the Ref function, AWS CloudFormation returns the policy name.

For more information about using the Ref function, see Ref.