can we create multiple instance in a single AWS cloudFormation Template

2.1k Views Asked by At

I'm new to this AWS. I want n instances to be launched by running single Cloud Formation template.

WorkAround:

We went through the Auto-scaling group. But it appears condition to be mentioned to scale up. Besides we aren't clear with that concept.

Please guide us :

  • Can we achieve this through Auto-scaling group..?
  • Or is there any way to mention the count of no of instances to be launched in the CF template itself..?
1

There are 1 best solutions below

0
On

Autoscaling can be done using the number of servers alone. It doesn't need to be triggered by alarms related to CPU or traffic. You simply describe "MinSize", "DesiredCapacity", and "MaxSize" to be the count of instances you want. If you want a specific number of instances, those numbers can all be the same.

The other way to do it is to specify several AWS::EC2::Instances in your template. If the machines are hetrogenous it may make more sense to do this.