This topic describes the notes for creating launch templates, how to create launch templates, and operations that can be performed by using launch templates.
Background information
- Up to 30 launch templates can be created per region within an account.
- When you create a launch template, all parameters are optional. However, if a launch template does not contain required parameters such as the instance type or image, you must specify these parameters when you create an instance by using the launch template.
- Launch templates cannot be modified after they are created. However, you can create versions for launch templates.
You can create launch templates in the Elastic Compute Service (ECS) console or on the ECS instance buy page. Alternatively, you can call the CreateLaunchTemplate operation by using Alibaba Cloud SDKs, OpenAPI Explorer, and Alibaba Cloud CLI to create launch templates.
Create a launch template in the ECS console
You can create launch templates beforehand to simplify the creation of ECS instances, scaling groups, and auto provisioning groups.
Create a launch template on the ECS instance buy page
If you want to save the configurations of an instance for simplifying subsequent instance creation, you can create a launch template when you create the instance.
Subsequent operations
Operation | Description | References |
---|---|---|
Create an ECS instance | You can use an existing launch template to quickly create an instance. This eliminates the need to repeatedly configure parameters. | For more information, see Create an instance by using a launch template. |
Create multiple ECS instances at a time | A launch template can work with the RunInstances operation to create multiple instances
at a time. This eliminates the need to configure a large number of parameters to create
multiple instances.
You must specify the LaunchTemplateId and LaunchTemplateVersion parameters when you call the RunInstances operation. |
For more information, see RunInstances. |
Create a scaling group | You can use an existing launch template to quickly create a scaling group based on ECS instances. The system uses configurations defined in the launch template to create a scaling group. If some of the configurations do not fulfill business requirements, you can modify these configurations when you create the scaling group. For example, you can modify the virtual private cloud (VPC) and vSwitch required in the scaling configuration. | For more information, see Create a scaling group based on an existing ECS instance. |
Create an auto provisioning group | Auto provisioning groups use specific versions of launch templates as instance configuration sources. Attributes such as instance images, security groups, and logon credentials from the launch templates are used by auto provisioning groups to create ECS instances. After an auto provisioning group is created, an ECS instance cluster is started and provisioned at the specified point in time, which improves the efficiency of offering a large number of ECS instances at a time. | For more information, see Create an auto provisioning group. |