This topic provides an overview of instance configuration sources. During a scale-out event, Auto Scaling creates ECS instances based on the instance configuration source and adds the created instances to the scaling group. Instance configuration sources contain the scaling configuration and instance launch template.

Operations on instance configuration sources

Each scaling group can have only one instance configuration source in effect. For example, after you enable a new scaling configuration, the current launch template or scaling configuration becomes invalid.

The instance launch template is a feature of ECS. If you want to use an instance launch template, you must create the template by using the ECS console or by calling an API operation. For more information, see Launch templates.

The following table describes the common operations on instance configuration sources.
Phase Scenario Operation Reference
During the creation of a scaling group You want to use an existing ECS instance as a template to create instances. Select the ECS instance as the instance configuration source.

After the scaling group is created, Auto Scaling automatically creates a scaling configuration based on the instance, and the scaling group automatically enters the enabled state.

You want to use an instance launch template to create ECS instances. Select the instance launch template as the instance configuration source.

After the scaling group is created, it automatically enters the enabled state.

Create a scaling group
You do not have a proper instance configuration to create ECS instances. Do not specify the instance configuration source.

After the scaling group is created, it enters the stopped state.

Create a scaling group
After the creation of a scaling group You do not specify the instance configuration source. Manually create a scaling configuration or select an instance launch template, and then enable the scaling group.
You want to use other scaling configurations. Create and enable a scaling configuration, or select an existing scaling configuration.
You want to use other instance launch templates or template versions. Select another instance launch template or template version to modify the scaling group. Modify a scaling group

Comparison between scaling configurations and instance launch templates

Comparison item Scaling configuration Instance launch template
Parameter verification Scaling configurations support parameter verification. You cannot create a scaling configuration if the required parameters such as image parameters are missing. Therefore, when you create ECS instances based on the scaling configuration, the creation will not fail due to missing parameters. Instance launch templates do not support parameter verification. All parameters are optional. When you create ECS instances based on an instance launch template in which the required parameters such as image parameters are missing, the ECS instances fail to be created.
Sequence of configuring parameters Select an existing ECS instance that is used to automatically create a scaling configuration when you create a scaling group, or manually create a scaling configuration after you create a scaling group. Create an instance launch template by using the ECS console or by calling an API operation, and then use this template as the instance configuration source to create a scaling group.
Modification You can create multiple scaling configurations based on different needs. You can modify scaling configurations. All modifications are irreversible.

If you need to frequently publish applications, we recommend that you create an image update task to replace images in multiple scaling configurations. For more information, see Update images in scaling configurations.

Note The number of scaling configurations that you can create for a scaling group is limited. For more information, see Limits.
You cannot modify instance launch templates, but you can create and use new template versions.
Multiple instance types You can select multiple instance types. We recommend that you use scaling configurations when you focus on higher performance instead of a specific instance type. This increases the success rate of creating ECS instances.
Note The number of available instance types in a scaling configuration is limited. For more information, see Limits.
You cannot select multiple instance types.

A scaling configuration can support multiple instance types. A scaling group in a VPC can support multiple zones. This can reduce the risk of insufficient resources and increase the success rate of creating ECS instances. For more information, see Create a scaling group.

Comparison between parameter settings

You can use an existing instance or launch template as the instance configuration source to create a scaling group. Alternatively, you can manually create a scaling configuration as the instance configuration source after the scaling group is created. The following table describes the parameter settings of three methods that can be used to create a scaling group.
Manually create a scaling configuration Use an existing ECS instance Use an instance launch template
You can specify the following parameters to manually create a scaling configuration. For more information about the parameters, see CreateScalingConfiguration.
  • ImageId
  • ImageName
  • InstanceType
  • Cpu
  • Memory
  • DeploymentSetId
  • InstanceTypes.N
  • SecurityGroupId
  • IoOptimized
  • InternetChargeType
  • InternetMaxBandwidthIn
  • InternetMaxBandwidthOut
  • SystemDisk.Category
  • SystemDisk.Size
  • SystemDisk.DiskName
  • SystemDisk.Description
  • SystemDisk.AutoSnapshotPolicyId
  • ScalingConfigurationName
  • DataDisk.N.Size
  • DataDisk.N.SnapshotId
  • DataDisk.N.Category
  • DataDisk.N.Device
  • DataDisk.N.DeleteWithInstance
  • DataDisk.N.Encrypted
  • DataDisk.N.KMSKeyId
  • DataDisk.N.DiskName
  • DataDisk.N.Description
  • DataDisk.N.AutoSnapshotPolicyId
  • LoadBalancerWeight
  • Tags
  • UserData
  • KeyPairName
  • RamRoleName
  • SecurityEnhancementStrategy
  • InstanceName
  • HostName
  • SpotStrategy
  • PasswordInherit
  • SpotPriceLimit.N.InstanceType
  • SpotPriceLimit.N.PriceLimit
  • Password
  • ResourceGroupId
  • SecurityGroupIds.N
  • HpcClusterId
  • InstanceDescription
  • ClientToken
  • Ipv6AddressCount
Auto Scaling automatically creates a scaling configuration based on the parameters of an existing ECS instance.
Note For more information about all parameters supported by an ECS instance, see RunInstances.
  • ImageId
  • InstanceType
  • SecurityGroupIds
  • IoOptimized
  • InternetChargeType
  • InternetMaxBandwidthIn
  • InternetMaxBandwidthOut
  • KeyPairName
  • SpotStrategy
  • SpotPriceLimit
  • ResourceGroupId
  • HpcClusterId
  • DeploymentSetId
  • SystemDisk.Category
  • SystemDisk.Size
  • SystemDisk.Description
  • DataDisk.Category
  • DataDisk.Size
  • DataDisk.Device
  • DataDisk.DeleteWithInstance
  • DataDisk.Encrypted
  • DataDisk.KMSKeyId
  • DataDisk.DiskName
  • DataDisk.Description
  • DataDisk.SourceSnapshotId
  • UserData
  • RamRoleName
  • ResourceGroupId
You can create a scaling group based on the parameters of an instance launch template.
Note For more information about all parameters supported by an instance launch template, see CreateLaunchTemplateVersion.
  • ImageId
  • InstanceType
  • SecurityGroupId
  • IoOptimized
  • InstanceName
  • InternetMaxBandwidthIn
  • InternetMaxBandwidthOut
  • HostName
  • PasswordInherit
  • InternetChargeType
  • SystemDisk.Size
  • SystemDisk.Category
  • SystemDisk.DiskName
  • SystemDisk.Description
  • DataDisk.N.Size
  • DataDisk.N.SnapshotId
  • DataDisk.N.Category
  • DataDisk.N.Encrypted
  • DataDisk.N.DiskName
  • DataDisk.N.Description
  • DataDisk.N.Device
  • DataDisk.N.DeleteWithInstance
  • UserData
  • KeyPairName
  • RamRoleName
  • SpotStrategy
  • SpotPriceLimit
  • SecurityEnhancementStrategy
  • Tag.N.Key
  • Tag.N.Value
  • ResourceGroupId