aws-cdk-lib.aws_autoscaling.SignalsOptions

interface SignalsOptions

LanguageType name
.NETAmazon.CDK.AWS.AutoScaling.SignalsOptions
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsautoscaling#SignalsOptions
Javasoftware.amazon.awscdk.services.autoscaling.SignalsOptions
Pythonaws_cdk.aws_autoscaling.SignalsOptions
TypeScript (source)aws-cdk-lib » aws_autoscaling » SignalsOptions

Customization options for Signal handling.

Example

declare const vpc: ec2.Vpc;
declare const instanceType: ec2.InstanceType;
declare const machineImage: ec2.IMachineImage;

new autoscaling.AutoScalingGroup(this, 'ASG', {
  vpc,
  instanceType,
  machineImage,

  // ...

  init: ec2.CloudFormationInit.fromElements(
    ec2.InitFile.fromString('/etc/my_instance', 'This got written during instance startup'),
  ),
  signals: autoscaling.Signals.waitForAll({
    timeout: Duration.minutes(10),
  }),
});

Properties

NameTypeDescription
minSuccessPercentage?numberThe percentage of signals that need to be successful.
timeout?DurationHow long to wait for the signals to be sent.

minSuccessPercentage?

Type: number (optional, default: 100)

The percentage of signals that need to be successful.

If this number is less than 100, a percentage of signals may be failure signals while still succeeding the creation or update in CloudFormation.


timeout?

Type: Duration (optional, default: Duration.minutes(5))

How long to wait for the signals to be sent.

This should reflect how long it takes your instances to start up (including instance start time and instance initialization time).