All Products
Search
Document Center

Elastic Compute Service:Launch template overview

Last Updated:May 15, 2026

Save reusable ECS instance configurations in launch templates to standardize deployments and batch create instances.

Features and benefits

All configurations in launch templates are optional, providing flexibility for various scenarios.

  • Preset parameters: Preset instance creation parameters, such as the instance type, operating system, network settings, security rules, and storage settings.

  • Standardization and consistency: Create instances with identical configurations and environments, reducing human error and simplifying maintenance.

  • Quick deployment: Create ECS instances from a template without specifying individual parameters.

  • Version control and iteration: Create different versions of a launch template to iterate configurations or suit different projects. Save changed configurations as a new version.

    Launch template versions

    The following figure shows a launch template with three versions. Version 1 specifies an instance type, an image, a vSwitch, and a VPC. Version 2 adds a security group. Version 3 has different parameter values. Version 1 is the default version. If you do not specify a version when creating instances, Version 1 is used.

    image

Use cases

  • New application deployment: Use a launch template to create instances with consistent development, testing, and production environments.

  • Auto scaling and disaster recovery: Quickly replicate and configure ECS instances when creating scaling groups or disaster recovery plans.

  • Continuous integration/continuous deployment (CI/CD): Integrate launch templates with CI/CD pipelines to deploy code to pre-configured environments.

  • Elastic use of resources:

    • Auto Scaling: Use an existing launch template to create a scaling group. Auto Scaling (ESS) uses the template configurations. Modify configurations on the Create Scaling Group page if needed. See Create scaling group from existing instance.

    • Auto Provisioning: Auto provisioning groups use launch templates as instance configuration sources, inheriting attributes such as images, security groups, and logon credentials. After creation, the group provisions and starts an ECS instance cluster at the specified time. See Create auto provisioning group.

Limitations

  • Quotas: Up to 30 launch templates per region and 30 versions per template.

  • Optional parameters: All parameters are optional when creating a template. If a template omits required parameters such as the instance type and image, you must specify them when creating instances.

  • Immutability: Launch templates are immutable. To modify a template, create a new version.

Billing

Launch templates are free. You are charged only for ECS resources deployed through templates. See Billing overview.

Tasks

Create a launch template

Specify instance configurations in a launch template, then use it to create ECS instances, scaling groups, or auto provisioning groups.

Use the ECS console

  1. Go to ECS Console - Launch Templates.

  2. In the upper-left corner of the page, select a region and resource group.地域

  3. On the Launch Templates page, click Create Template.

  4. On the Launch Template page, specify parameters in the Basic Configurations and Advanced Configurations steps.

    You can specify parameters or select an existing template as a basis. For parameter details, see Create an instance with Custom Launch.

    Note

    The Clone Template section is unavailable when you create your first template. After you have templates, you can select an existing template and version, then modify parameters.

    In the Instance Type section, use the Scenario-based Selection tab to filter instance types.

  5. In the Confirm Configurations step, enter a template name and version description, then click Create Launch Template.

    • Configurations: Click theEdit icon in the Basic Configurations and Advanced Configurations sections to modify parameters.

      Note

      The Basic Configurations and Advanced Configurations parameters are required to create ECS instances but are optional on the Launch Template page.

    • Save As: Specify how to save the current configurations.

      • Create Template: Save the current configurations as the default version of a new template.

      • Create Version: Select an existing template and save the current configurations as its latest version.

    • Template Name and Version Description: Enter a name and description for management.

    • Template Resource Group: Select a resource group for the template.

      To create a new resource group, click here to go to the Create Resource Group page. See Resource groups.

    Launch template

  6. In the Success message, click View Template to view the template in the ECS console.

Call an API operation

Call the CreateLaunchTemplate operation.

Use a launch template to create an ECS instance

Use any version of a launch template to quickly create ECS instances.

Note

A launch template or a new version of an existing template must already exist.

Use the ECS console

  1. On the Launch Templates page, find the launch template that you want to use and click Create Instance in the Actions column.

    You can also select a launch template ID to view its configurations, then click Create Instance in the Actions column for a specific version. New version

  2. On the Custom Launch tab, the selected template and version are automatically loaded. Verify all configurations.

    Note

    To modify parameters or specify missing required parameters, click the Edit icon.

  3. Create an ECS instance.

    • To create a subscription instance, configure the Duration parameter and select ECS Terms of Service and Product Terms of Service, then click Create Order.

    • To create a pay-as-you-go instance, select ECS Terms of Service and Product Terms of Service, then click Create Instance.

    After creation, go to the Instance page in the ECS console to view the instance.

Call an API operation

Call the RunInstances operation with the LaunchTemplateId and LaunchTemplateVersion parameters to batch create ECS instances without specifying all parameters each time. See RunInstances.

Manage the versions of a launch template

Launch templates are immutable. To change configurations, create a new version. When creating instances, you can use any version; the default version is used if none is specified.

Create a new version of a launch template

Use the ECS console

  1. On the Launch Templates page, find a template and click New Version in the Actions column.

    Alternatively, click the template ID to view its configurations, then click New Version in the Version Information section.New version

  2. On the Launch Template page, configure parameters.

    In the Clone Template section, select an existing template and version as a basis. For parameter details, see Create an instance with Custom Launch.

  3. In the Confirm Configurations step, select Create Version and select the target template.

  4. Click Create Launch Template.

  5. In the message that appears, click View New Version to view the new version in the ECS console.

    Note

    You can also view all templates in the launch template list on the Launch Templates page.

Call an API operation

Call the following API operation to manage launch template versions:

Change the default version of a launch template

Set the most frequently used version as the default. If you do not specify a version when creating instances, the default version is used.

Use the ECS console

On the Launch Templates page, select the template ID. In the Version Information section, find the target version and click Set as Default in the Actions column.

Default version

Call an API operation

Call the following API operation to change the default version:

ModifyLaunchTemplateDefaultVersion: sets a version as the default version.

Delete a launch template version

Delete a launch template version that is no longer needed.

Important

Use the ECS console

  1. On the Launch Templates page, select the template to expand its version information.

  2. In the Version Information section, delete versions.

    • To delete a single version, find it and click Delete in the Actions column.

    • To batch delete versions, select them and click Delete above the Version column.

  3. In the Delete Version message, click OK.

Call an API operation

Call the following API operation to delete a version:

Delete a launch template

Deleting a template does not affect instances created from it.

Important

Deleting a template deletes all its versions. To delete a specific version, see Delete a launch template version.

Use the ECS console

  1. On the Launch Templates page, delete templates.

    • To delete a single template, find it and click Delete in the Actions column.

    • To batch delete templates, select them and click Delete above the Template ID column.

  2. In the message that appears, click OK.

Call an API operation

Call an API operation to delete a template. See DeleteLaunchTemplate.

References