You are viewing documentation for version 2 of the AWS SDK for Ruby. Version 3 documentation can be found here.

Class: Aws::AutoScaling::Types::MixedInstancesPolicy

  • Object
show all
Defined in:



When passing MixedInstancesPolicy as input to an Aws::Client method, you can use a vanilla Hash:

  launch_template: {
    launch_template_specification: {
      launch_template_id: "XmlStringMaxLen255",
      launch_template_name: "LaunchTemplateName",
      version: "XmlStringMaxLen255",
    overrides: [
        instance_type: "XmlStringMaxLen255",
  instances_distribution: {
    on_demand_allocation_strategy: "XmlString",
    on_demand_base_capacity: 1,
    on_demand_percentage_above_base_capacity: 1,
    spot_allocation_strategy: "XmlString",
    spot_instance_pools: 1,
    spot_max_price: "MixedInstanceSpotPrice",

Describes a mixed instances policy for an Auto Scaling group. With mixed instances, your Auto Scaling group can provision a combination of On-Demand Instances and Spot Instances across multiple instance types. Used in combination with CreateAutoScalingGroup. For more information, see Auto Scaling Groups with Multiple Instance Types and Purchase Options in the Amazon EC2 Auto Scaling User Guide.

When you create your Auto Scaling group, you can specify a launch configuration or template as a parameter for the top-level object, or you can specify a mixed instances policy, but not both at the same time.

Returned by:

Instance Attribute Summary collapse

Instance Attribute Details


The instances distribution to use.

If you leave this parameter unspecified when creating the group, the default values are used.



The launch template and overrides.

This parameter is required when creating an Auto Scaling group with a mixed instances policy, but is not required when updating the group.