AWS Fundamentals Logo
AWS Fundamentals
L2 Construct

WarmPool

Define a warm pool.

Import

import { WarmPool } from 'aws-cdk-lib/aws-autoscaling';

Or use the module namespace:

import * as autoscaling from 'aws-cdk-lib/aws-autoscaling';
// autoscaling.WarmPool

Properties

Configuration passed to the constructor as WarmPoolProps.

autoScalingGroupRequired
IAutoScalingGroupRef

The Auto Scaling group to add the warm pool to.

4 properties inherited from WarmPoolOptions
maxGroupPreparedCapacityOptionalinherited from WarmPoolOptions
number

The 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 WarmPoolOptions
number

The minimum number of instances to maintain in the warm pool.

Default: 0

poolStateOptionalinherited from WarmPoolOptions
PoolState

The instance state to transition to after the lifecycle actions are complete.

Default: PoolState.STOPPED

reuseOnScaleInOptionalinherited from WarmPoolOptions
boolean

Indicates 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

Learn AWS the Practical Way

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

Subscribe to Newsletter