Skip to content
v2.275.0

Ec2HealthChecksOptions Struct ​

EC2 Heath checks options.

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 ​

gracePeriodoptionalDurationgrace_periodoptionalDurationgracePeriodoptionalDurationGracePeriodoptionalDurationGracePeriodoptionalDuration= Duration.seconds(0)#
Specified the time Auto Scaling waits before checking the health status of an EC2 instance that has come into service and marking it unhealthy due to a failed health check.