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.
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
In the upper-left corner of the page, select a region and resource group.
-
On the Launch Templates page, click Create Template.
-
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.
NoteThe 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.
-
In the Confirm Configurations step, enter a template name and version description, then click Create Launch Template.
-
Configurations: Click the
icon in the Basic Configurations and Advanced Configurations sections to modify parameters. NoteThe 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.

-
-
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.
A launch template or a new version of an existing template must already exist.
Use the ECS console
-
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.

-
On the Custom Launch tab, the selected template and version are automatically loaded. Verify all configurations.
NoteTo modify parameters or specify missing required parameters, click the
icon. -
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
Change the default version of a launch template
Delete a launch template version
Delete a launch template
Deleting a template does not affect instances created from it.
Deleting a template deletes all its versions. To delete a specific version, see Delete a launch template version.
Use the ECS console
-
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.
-
-
In the message that appears, click OK.
Call an API operation
Call an API operation to delete a template. See DeleteLaunchTemplate.
References
-
DescribeLaunchTemplates: queries launch templates.
-
DescribeLaunchTemplateVersions: queries launch template versions.
-
ECS instance creation methods: methods for batch creating ECS instances.
