DeleteLaunchTemplate - Amazon Elastic Compute Cloud
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).


Deletes a launch template. Deleting a launch template deletes all of its versions.

Request Parameters

The following parameters are for this specific action. For more information about required and optional parameters that are common to all actions, see Common Query Parameters.


Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

Type: Boolean

Required: No


The ID of the launch template.

You must specify either the LaunchTemplateId or the LaunchTemplateName, but not both.

Type: String

Required: No


The name of the launch template.

You must specify either the LaunchTemplateName or the LaunchTemplateId, but not both.

Type: String

Length Constraints: Minimum length of 3. Maximum length of 128.

Pattern: [a-zA-Z0-9\(\)\.\-/_]+

Required: No

Response Elements

The following elements are returned by the service.


Information about the launch template.

Type: LaunchTemplate object


The ID of the request.

Type: String


For information about the errors that are common to all actions, see Common client error codes.



This example deletes launch template lt-0a20c965061f64abc.

Sample Request &LaunchTemplateId=lt-0a20c965061f64abc &AUTHPARAMS

Sample Response

<DeleteLaunchTemplateResponse xmlns=""> <requestId>c12605de-c470-4eaa-a4d0-ab4dexample</requestId> <launchTemplate> <createTime>2017-10-31T11:38:52.000Z</createTime> <createdBy>arn:aws:iam::123456789012:root</createdBy> <defaultVersionNumber>2</defaultVersionNumber> <latestVersionNumber>2</latestVersionNumber> <launchTemplateId>lt-0a20c965061f64abc</launchTemplateId> <launchTemplateName>MyLaunchTemplate</launchTemplateName> </launchTemplate> </DeleteLaunchTemplateResponse>

See Also

For more information about using this API in one of the language-specific Amazon SDKs, see the following: