Define a warm pool.
import { WarmPool } from 'aws-cdk-lib/aws-autoscaling';Or use the module namespace:
import * as autoscaling from 'aws-cdk-lib/aws-autoscaling';
// autoscaling.WarmPoolConfiguration passed to the constructor as WarmPoolProps.
autoScalingGroupRequiredIAutoScalingGroupRefThe Auto Scaling group to add the warm pool to.
WarmPoolOptionsmaxGroupPreparedCapacityOptionalinherited from WarmPoolOptionsnumberThe maximum number of instances that are allowed to be in the warm pool or in any state except Terminated for the Auto Scaling group. If the value is not specified, Amazon EC2 Auto Scaling launches and maintains the difference between the group's maximum capacity and its desired capacity.
Default: - max size of the Auto Scaling group
minSizeOptionalinherited from WarmPoolOptionsnumberThe minimum number of instances to maintain in the warm pool.
Default: 0
poolStateOptionalinherited from WarmPoolOptionsPoolStateThe instance state to transition to after the lifecycle actions are complete.
Default: PoolState.STOPPED
reuseOnScaleInOptionalinherited from WarmPoolOptionsbooleanIndicates whether instances in the Auto Scaling group can be returned to the warm pool on scale in. If the value is not specified, instances in the Auto Scaling group will be terminated when the group scales in.
Default: false
Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.
Subscribe to Newsletteraws-autoscaling