# UpdatePolicy

How existing instances should be updated.

- Source: [`aws-autoscaling/lib/auto-scaling-group.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-autoscaling/lib/auto-scaling-group.ts#L997)
- Type last changed: v2.263.0 · 31 Jul 2026

## 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],
  }),
});
```

## Initializer

```ts
new UpdatePolicy()
```

## Methods

- `instanceRefresh(options: InstanceRefreshOptions): UpdatePolicy // chainable` (static) — Use instance refresh to update the instances in the AutoScalingGroup.

  When properties that trigger an instance refresh change (such as LaunchTemplate
  or MixedInstancesPolicy), CloudFormation starts an instance refresh to replace
  instances gradually while maintaining availability.

- `replacingUpdate(): UpdatePolicy // chainable` (static) — Create a new AutoScalingGroup and switch over to it.

- `rollingUpdate(options?: RollingUpdateOptions): UpdatePolicy // chainable` (static) — Replace the instances in the AutoScalingGroup one by one, or in batches.
