enum InstanceRefreshStrategy
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.AutoScaling.InstanceRefreshStrategy |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsautoscaling#InstanceRefreshStrategy |
Java | software.amazon.awscdk.services.autoscaling.InstanceRefreshStrategy |
Python | aws_cdk.aws_autoscaling.InstanceRefreshStrategy |
TypeScript (source) | aws-cdk-lib » aws_autoscaling » InstanceRefreshStrategy |
The strategy to use for the instance refresh.
Example
declare const vpc: ec2.Vpc;
declare const instanceType: ec2.InstanceType;
declare const machineImage: ec2.IMachineImage;
declare const alarm: cloudwatch.Alarm;
new autoscaling.AutoScalingGroup(this, 'ASG', {
vpc,
instanceType,
machineImage,
updatePolicy: autoscaling.UpdatePolicy.instanceRefresh({
strategy: autoscaling.InstanceRefreshStrategy.ROLLING,
minHealthyPercentage: 90,
maxHealthyPercentage: 100,
instanceWarmup: Duration.seconds(300),
checkpointPercentages: [50, 100],
checkpointDelay: Duration.minutes(10),
alarms: [alarm],
}),
});
Members
| Name | Description |
|---|---|
| ROLLING | Terminate instances and launch new ones to replace them. |
| REPLACE_ROOT_VOLUME | Replace the root volume of instances in place. |
ROLLING
Terminate instances and launch new ones to replace them.
REPLACE_ROOT_VOLUME
Replace the root volume of instances in place.
When this strategy is used, only ImageId changes within the launch template or mixed
instances policy are allowed. Other property changes may cause the stack update to fail.

.NET
Go
Java
Python
TypeScript (