Skip to content
v2.274.0

InstanceRefreshStrategy Enum ​

The strategy to use for the instance refresh.

Example ​

ts
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 ​

MemberDescription
ROLLINGTerminate instances and launch new ones to replace them.
REPLACE_ROOT_VOLUMEReplace the root volume of instances in place.

Referenced by ​