# HealthChecks

Health check settings for multiple types.

- 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#L2717)
- Type last changed: v2.182.0 · 5 Mar 2025

## Example

```ts
declare const vpc: ec2.Vpc;

new autoscaling.AutoScalingGroup(this, 'ASG', {
  vpc,
  instanceType: ec2.InstanceType.of(ec2.InstanceClass.BURSTABLE2, ec2.InstanceSize.MICRO),
  machineImage: ec2.MachineImage.latestAmazonLinux2(),
  healthChecks: autoscaling.HealthChecks.ec2({
    gracePeriod: Duration.seconds(100),
  }),
});
```

## Properties

- `gracePeriod`: [Duration](/cdk/api/v2/docs/aws-cdk-lib.Duration.html)

- `types`: string[]

## Methods

- `ec2(options?: Ec2HealthChecksOptions): HealthChecks // chainable` (static) — Use EC2 only for health checks.

  **Parameters**

  - `options` — EC2 health checks options.

- `withAdditionalChecks(options: AdditionalHealthChecksOptions): HealthChecks // chainable` (static) — Use additional health checks other than EC2.

  Specify types other than EC2, as EC2 is always enabled.
  It considers the instance unhealthy if it fails either the EC2 status checks or the additional health checks.

  **Parameters**

  - `options` — Additional health checks options.
