I am using cloudformation create-stack command to create instances. The template uses AWS::AutoScaling::AutoScalingGroup as a scaling group. Is it possible to add a delay between instance creation?
Looked through the documentation but could not find anything useful.
Unfortunately, there is no such functionality available when creating the ASG. Thus, if you define your ASG with DesiredCapacity of, for example, 3, all the instances will be created at the same time.
However, it is worth noting, that although you can't define a delay time on the initial ASG creation, you can specify the delay during performing rolling updates of your ASG later. In this case you define AutoScalingRollingUpdate Policy for the ASG. The policy has a parameter PauseTime which is:
The amount of time that AWS CloudFormation pauses after making a change to a batch of instances to give those instances time to start software applications.
Also, it should be mentioned that PauseTime works this way when WaitOnResourceSignals is false.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With