Each launch template can have multiple versions. This topic describes how to create a launch template version and change the default version of a launch template.
Prerequisites
Background information
- After a launch template is created, its launch template version is 1 by default. You
can create more versions for the launch template.
Note The number of launch template versions increments sequentially based on the order in which the versions are created. You cannot specify custom numbers for template versions.
- A maximum of 30 versions can be created for each launch template.
- When you create a launch template version, all parameters are optional. However, if a launch template version does not contain required parameters such as the image or instance type, you must specify these parameters when you create an instance by using the launch template version.
- After a launch template version is created, its configurations cannot be modified.
Create a launch template version in the Elastic Compute Service (ECS) console
You can create a version for a launch template beforehand to simplify instance creation, regardless of whether you need to create instances for the moment.
You can call the CreateLaunchTemplateVersion operation to create launch templates and launch template versions by using Alibaba Cloud SDKs, OpenAPI Explorer, and Alibaba Cloud CLI.
Create a launch template version on the Elastic Compute Service product page
If you want to create an instance and save its configurations for future use, you can create a launch template version when you create the instance.
Change the default version of a launch template
If you use a particular launch template version frequently, you can specify it as the default version. This eliminates the need to specify a version when you use a launch template to create instances.
You can call the ModifyLaunchTemplateDefaultVersion operation to change the default version of a launch template by using Alibaba Cloud SDKs, OpenAPI Explorer, and Alibaba Cloud CLI.