After you create a launch template, you cannot modify it. You can create a new version of the launch template and modify the parameters of the launch template in the new version. When you create Elastic Compute Service (ECS) instances by using a launch template, you can use any version of the launch template. If you do not specify a version, the default version is used. This topic describes how to create a new version of a launch template, set the version that is frequently used as the default version, and delete a version that is no longer needed.
Create a launch template version
Each launch template can have multiple versions, and each version can have different parameters. You can change the parameters in the launch template by creating a new version.
Prerequisites
A launch template is created. For more information, see Create a launch template.
Considerations
-
By default, the first version number of a new launch template is 1. You can create a new version of this launch template.
ImportantVersion numbers are incremented in the order in which versions are created. You cannot customize version numbers.
-
You can create up to 30 versions for each launch template.
-
When you create a launch template version, all parameters are optional. However, if a launch template version does not contain the required parameters, such as the instance type or image, you must add the parameters when you use the launch template version to create instances.
-
You cannot modify launch template versions after you create them.
Procedure
In the top navigation bar, select the region and resource group of the resource that you want to manage.
-
Find the launch template that you want to manage and use one of the following methods to create a version for the launch template.
-
On the Launch Templates page, click New Version in the Actions column that corresponds to the launch template.

-
Click the ID of the launch template that you want to manage to go to the template details page. In the Version Information section, click New Version.

-
-
On the Template Name page, configure parameters.
In the Clone Template section, you can select an existing template and version and configure the parameters based on the selected template and version. For information about the parameters and how to configure them, see Custom launch ECS instances.
-
In the Confirm Configurations step, select Create Version in the Save As section and select a launch template for which you want to save the new version in the Launch Template section.
-
Click Create Launch Template.
-
In the message that appears, click View New Version to go to the ECS console and view the created version.
NoteYou can also view all created launch templates in the launch template list on the Template Name page.
Change the default version of a launch template
You can set a commonly used version of a launch template as the default version of the launch template. If you do not specify a version when you use a launch template to create ECS instances, the system automatically uses the default version of the launch template to create ECS instances. This section describes how to change the default version of a launch template.
In the top navigation bar, select the region and resource group of the resource that you want to manage.
-
Click the ID of the launch template that you want to manage to go to the launch template details page.
-
In the Version Information section, find the version that you want to use as the default version and click Set as Default in the Actions column.

Delete a launch template version
You can perform the following operations to delete a non-default launch template version that is no longer needed.
-
If the version that you want to delete is set as the default version, you cannot delete the version. In this case, you can change the default version to a different version and then delete the original default version.
-
If you no longer need all versions of a launch template, you only need to delete the launch template.
In the top navigation bar, select the region and resource group of the resource that you want to manage.
-
On the Launch Templates page, click the ID of the launch template that you want to manage to go to the launch template details page.
-
In the Version Information section, select and delete one or more versions.
-
To delete a single version, find the version and click Delete in the Actions column.
-
To batch delete versions, select the versions and click Delete in the lower part of the page.
-
-
In the message that appears, click OK.
Related operations
-
You can manage launch template versions by calling the following API operations:
-
CreateLaunchTemplateVersion: creates a version for a launch template.
-
ModifyLaunchTemplateDefaultVersion: specifies a version of a launch template as the default version of the launch template.
-
DeleteLaunchTemplateVersion: deletes a version of a launch template.
-
-
After you create a new version of a launch template, you can select a launch template version when you perform the operations that are described in the following table.
Actions
Description
Reference
Create an ECS instance
Use a launch template to create an ECS instance without re-entering configuration details.
Create multiple ECS instances
Use a launch template with the RunInstances API to create multiple ECS instances. In the RunInstances request, specify the
LaunchTemplateIdandLaunchTemplateVersionparameters.Create a scaling group
When creating a scaling group, you can use a launch template to define the instance configurations. This allows you to override specific settings from the template, such as the VPC or vSwitch, to meet your requirements.
Create an auto provisioning group
An auto provisioning group uses a launch template version to define instance configurations, including the image, security group, and logon credentials. Once created, the group attempts to provision a cluster of ECS instances that meets the target capacity.