AutoScalingGroupMixedInstancesPolicyArgs

data class AutoScalingGroupMixedInstancesPolicyArgs(val instancesDistribution: Output<AutoScalingGroupInstancesDistributionArgs>? = null, val launchTemplate: Output<AutoScalingGroupLaunchTemplateArgs>) : ConvertibleToJava<AutoScalingGroupMixedInstancesPolicyArgs>

Use this structure to launch multiple instance types and On-Demand Instances and Spot Instances within a single Auto Scaling group. A mixed instances policy contains information that Amazon EC2 Auto Scaling can use to launch instances and help optimize your costs. For more information, see Auto Scaling groups with multiple instance types and purchase options in the Amazon EC2 Auto Scaling User Guide. You can create a mixed instances policy for new and existing Auto Scaling groups. You must use a launch template to configure the policy. You cannot use a launch configuration. There are key differences between Spot Instances and On-Demand Instances:

  • The price for Spot Instances varies based on demand

  • Amazon EC2 can terminate an individual Spot Instance as the availability of, or price for, Spot Instances changes When a Spot Instance is terminated, Amazon EC2 Auto Scaling group attempts to launch a replacement instance to maintain the desired capacity for the group. `MixedInstancesPolicy` is a property of the AWS::AutoScaling::AutoScalingGroup resource.

Constructors

Link copied to clipboard
constructor(instancesDistribution: Output<AutoScalingGroupInstancesDistributionArgs>? = null, launchTemplate: Output<AutoScalingGroupLaunchTemplateArgs>)

Properties

Link copied to clipboard

The instances distribution.

Link copied to clipboard

One or more launch templates and the instance types (overrides) that are used to launch EC2 instances to fulfill On-Demand and Spot capacities.

Functions

Link copied to clipboard
open override fun toJava(): AutoScalingGroupMixedInstancesPolicyArgs