Reputation: 808
I would like to specify the following auto scaling group:
Using a Launch Template, I can specify defined duration spot instances, but only a single instance type.
Using the Auto Scaling Group configuration, I can specify spot instances with multiple instance types, but not defined durations.
Is there a way to get all three? Multiple instance types, spot instances, and defined durations/spot blocks.
Upvotes: 0
Views: 319
Reputation: 270194
According to New – EC2 Auto Scaling Groups With Multiple Instance Types & Purchase Options | AWS News Blog, you can specify multiple instance types in an Auto Scaling group by specifying Combine purchase models and instances. This also lets you combine Spot and On-Demand
However, because Auto Scaling groups will launch/terminate instances based upon activity, it is not possible to launch a Defined Duration spot instance as part of an Auto Scaling group. However, you could launch it separately and then use AttachInstances to add it to the Auto Scaling group. You could then set Instance Protection on that instance to prevent it from being terminated.
Upvotes: 0