Define a step scaling action. This kind of scaling policy adjusts the target capacity in configurable steps. The size of the step is configurable based on the metric's distance to its alarm threshold. This Action must be used as the target of a CloudWatch alarm to take effect.
import { StepScalingAction } from 'aws-cdk-lib/aws-autoscaling';Or use the module namespace:
import * as autoscaling from 'aws-cdk-lib/aws-autoscaling';
// autoscaling.StepScalingActionConfiguration passed to the constructor as StepScalingActionProps.
autoScalingGroupRequiredIAutoScalingGroupRefThe auto scaling group.
adjustmentTypeOptionalAdjustmentTypeHow the adjustment numbers are interpreted.
Default: ChangeInCapacity
cooldownOptionalDeprecatedDurationPeriod after a scaling completes before another scaling activity can start.
Default: The default cooldown configured on the AutoScalingGroup
Deprecated: cooldown is not valid with step scaling action
estimatedInstanceWarmupOptionalDurationEstimated time until a newly launched instance can send metrics to CloudWatch.
Default: Same as the cooldown
metricAggregationTypeOptionalMetricAggregationTypeThe aggregation type for the CloudWatch metrics.
Default: Average
minAdjustmentMagnitudeOptionalnumberMinimum absolute number to adjust capacity with as result of percentage scaling. Only when using AdjustmentType = PercentChangeInCapacity, this number controls the minimum absolute effect size.
Default: No minimum scaling effect
Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.
Subscribe to Newsletteraws-autoscaling