AWS::EC2::LaunchTemplateSpecifies the properties for creating a launch template. The minimum required properties for specifying a launch template are as follows: + You must specify at least one property for the launch template data. + You can optionally specify a name for the launch template. If you do not specify a name, CFN creates a name for you. A launch template can contain some or all of the configuration information to launch an instance. When you launch an instance using a launch template, instance properties that are not specified in the launch template use default values, except the ImageId property, which has no default value. If you do not specify an AMI ID for the launch template ImageId property, you must specify an AMI ID for the instance ImageId property. For more information, see [Launch an instance from a launch template](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html) in the *Amazon EC2 User Guide*.
4 configurable properties. 1 required. Click a row to see details.
| Property | Type | Flags |
|---|---|---|
LaunchTemplateData | LaunchTemplateData | RequiredWrite-only |
LaunchTemplateName | string | Create-only |
TagSpecifications | Array<LaunchTemplateTagSpecification> | Write-only |
VersionDescription | string | Write-only |
Values returned after the resource is created. Access these with Fn::GetAtt.
| Attribute | Type | Description |
|---|---|---|
DefaultVersionNumber | string | - |
LatestVersionNumber | string | - |
LaunchTemplateId | string | - |
A minimal template with required properties and common optional ones.
AWSTemplateFormatVersion: "2010-09-09"
Description: Sample template for AWS::EC2::LaunchTemplate
Resources:
MyResource:
Type: AWS::EC2::LaunchTemplate
Properties:
LaunchTemplateData: "value"Permissions CloudFormation needs in your IAM role to manage this resource.
ec2:DescribeLaunchTemplatesec2:CreateLaunchTemplateec2:CreateTagsec2:CreateLaunchTemplateVersionec2:DescribeLaunchTemplatesec2:DeleteLaunchTemplateec2:DeleteTagsec2:DescribeLaunchTemplatesEverything you need to know about EC2 on one page. HD quality, print-friendly.
Download Free InfographicLaunchTemplateIdThese properties cannot be changed after the resource is created. Updating them triggers a replacement.
LaunchTemplateName