The instance configuration source specifies the configuration template that can be used to create Elastic Compute Service (ECS) instances or elastic container instances in scaling groups during scale-out activities. Auto Scaling automatically creates ECS instances or elastic container instances based on the specified instance configuration source and adds the created instances to scaling groups during scale-out activities.

Types of instance configuration sources

Instance configuration sources include launch templates and scaling configurations. Launch templates can be used only for scaling groups of ECS instances.

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 in effect becomes invalid.

Type Applicable scaling group Description
Launch template Scaling groups of ECS instances A launch template is a feature of ECS. You must create a template by using the ECS console or by calling an API operation before you use a launch template. For more information, see Launch templates or CreateLaunchTemplate.
Scaling configuration Scaling groups of ECS instances and scaling groups of elastic container instances A scaling configuration specifies the instance configuration template that is created for the scaling group in the Auto Scaling console. You can create a scaling configuration by using one of the following methods:

Operations on instance configuration sources

The following table describes the common operations on instance configuration sources.
Phase Scenario Operation References
When you create a scaling group You want to use the configuration information of an existing instance to scale out ECS instances or elastic container instances. When you create the scaling group, set Instance Configuration Source to Select Existing Instance. After the scaling group is created, Auto Scaling automatically creates a scaling configuration based on some parameters of the selected instance, and the scaling group is automatically enabled.
Note No new image is created. The image in the scaling configuration is the image that is specified when you create the ECS instance. If the ID of the instance image does not exist, the instance cannot be used as a template.
You want to use an existing launch template to scale out ECS instances. When you create the scaling group, set Instance Configuration Source to Launch Templates. After the scaling group is created, the scaling group is automatically enabled. Create a scaling group
You do not have an existing instance configuration to create instances. When you create the scaling group, set Instance Configuration Source to Create from Scratch. After the scaling group is created, the scaling group enters the disabled state. Create a scaling group
After a scaling group is created You did not specify the instance configuration source when you created the scaling group. Manually create a scaling configuration. You can also modify the scaling group and select a launch template. Then, enable the scaling group.
You want to use other scaling configurations. Create a scaling configuration and put the scaling configuration into the Active state. You can also select an existing scaling configuration.
You want to use other launch templates or template versions of ECS instances. Modify the scaling group and select another launch template or template version. Modify a scaling group
You need to manually update the image in your scaling configuration, or want Auto Scaling to automatically update the image in the scaling configuration.

Select a method to update the image in your scaling configuration based on your business requirements.

If you need to frequently publish applications, we recommend that you use the automatic method to update the image in your scaling configuration. In other cases, you can manually update the image in your scaling configuration.

Compare instance configuration sources

If your scaling group contains ECS instances, you can select an instance configuration source based on the description in the following table.

Item Scaling configuration 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, if ECS instances fail to be created, the failure is not caused by missing image parameters. Launch templates do not support parameter verification. All parameters are optional. When you create ECS instances based on a launch template in which the required parameters such as image parameters are missing, the ECS instances cannot be created.
Configuration method Select an existing instance 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 a launch template by using the ECS console or by calling an API operation, and then use the created launch template as the instance configuration source when you create a scaling group in the Auto Scaling console.
Modification You can create multiple scaling configurations based on different business requirements. You can manually modify a single scaling configuration. All modifications are irreversible.
Note Only a limited number of scaling configurations can be created for a scaling group. For more information, see Limits.
You cannot modify launch templates, but you can create and use new template versions.
Multiple instance types You can select multiple instance types. If you have specific requirements on instance specifications, we recommend that you select multiple instance types. This increases the success rate of scale-out activities.
Note Only a limited number of instance types can be selected for a scaling configuration. For more information, see Limits.
The initial launch template does not support multiple instance types. However, you can modify the launch template and configure the Extend Configurations of Launch Template parameter to select multiple instance types in the Auto Scaling console.

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 in a single zone and increase the success rate of scale-out activities. For more information, see Create a scaling group.

Compare parameter settings

You can use an existing instance or launch template as the instance configuration source to create a scaling group. You can also 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 configure an instance configuration source for a scaling group.
Manually create a scaling configuration Use an existing ECS instance Use a launch template
You can configure 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 the 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 a launch template.
Note For more information about the parameters supported by a 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