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

A launch template is created. For more information, see Create a launch template.

Background information

Before you create a launch template version, take note of the following items:
  • 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.

  1. Log on to the ECS console.
  2. In the left-side navigation pane, choose Deployment & Elasticity > Launch Templates.
  3. In the top navigation bar, select a region.
  4. On the Launch Templates page, find the launch template for which you want to create a version and click New Version in the Actions column.
    Alternatively, click the ID of the launch template for which you want to create a version to view its configurations, and click New Version in the Version Information section. New Version
  5. On the Launch Template page, configure parameters.
    In the Clone Template section, select an existing template and version. Then, configure parameters based on the launch template version. For information about the parameters and their descriptions, see Create an instance by using the wizard.
  6. In the Confirm Configuration step, select New Template Version in the Save As section and select a launch template for which you want to create a version from the Launch Template drop-down list.
  7. Click Create Launch Template.
  8. In the Created message, click View New Version to go to the ECS console and view the created version.

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.

  1. Go to the Elastic Compute Service product page and click Buy Now.
  2. On the Custom Launch tab, configure parameters.
    For information about the parameters and their descriptions, see Create an instance by using the wizard.
  3. In the Preview step, click Save as Launch Template.
  4. In the Save as Launch Template dialog box, click Create New Version and select the launch template for which you want to create a version from the Launch Template drop-down list.
  5. In the Created message, click View New Version to go to the ECS console and view the created version.

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.

  1. Log on to the ECS console.
  2. In the left-side navigation pane, choose Deployment & Elasticity > Launch Templates.
  3. In the top navigation bar, select a region.
  4. Click the ID of the launch template whose default version you want to change. In the Version Information section, find the version that you want to set as the default version and click Set as Default in the Actions column.
    Default version

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.