AWS Fundamentals Logo
AWS Fundamentals
L2 Construct

StepScalingAction

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

import { StepScalingAction } from 'aws-cdk-lib/aws-applicationautoscaling';

Or use the module namespace:

import * as applicationautoscaling from 'aws-cdk-lib/aws-applicationautoscaling';
// applicationautoscaling.StepScalingAction

Properties

Configuration passed to the constructor as StepScalingActionProps.

scalingTargetRequired
IScalableTargetRef

The scalable target.

adjustmentTypeOptional
AdjustmentType

How the adjustment numbers are interpreted.

Default: ChangeInCapacity

cooldownOptional
Duration

Grace period after scaling activity. For scale out policies, multiple scale outs during the cooldown period are squashed so that only the biggest scale out happens. For scale in policies, subsequent scale ins during the cooldown period are ignored.

Default: No cooldown period

metricAggregationTypeOptional
MetricAggregationType

The aggregation type for the CloudWatch metrics.

Default: Average

minAdjustmentMagnitudeOptional
number

Minimum 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

policyNameOptional
string

A name for the scaling policy.

Default: Automatically generated name

Learn AWS the Practical Way

Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.

Subscribe to Newsletter