GetLaunchTemplateData - 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).


Retrieves the configuration data of the specified instance. You can use this data to create a launch template.

This action calls on other describe actions to get instance information. Depending on your instance configuration, you may need to allow the following actions in your IAM policy: DescribeSpotInstanceRequests, DescribeInstanceCreditSpecifications, DescribeVolumes, DescribeInstanceAttribute, and DescribeElasticGpus. Or, you can allow describe* depending on your instance requirements.

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 instance.

Type: String

Required: Yes

Response Elements

The following elements are returned by the service.


The instance data.

Type: ResponseLaunchTemplateData 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 gets the data for instance i-123456abcabc123ab.

Sample Request &InstanceId=i-123456abcabc123ab &AUTHPARAMS

Sample Response

<GetLaunchTemplateDataResponse xmlns=""> <requestId>57372b95-c320-409e-b268-1e4example</requestId> <launchTemplateData> <blockDeviceMappingSet> <item> <deviceName>/dev/xvda</deviceName> <ebs> <deleteOnTermination>true</deleteOnTermination> </ebs> </item> </blockDeviceMappingSet> <ebsOptimized>false</ebsOptimized> <iamInstanceProfile> <arn>arn:aws:iam::123456789012:instance-profile/AdminRole</arn> </iamInstanceProfile> <imageId>ami-1a2b3c4d</imageId> <instanceType>t2.micro</instanceType> <keyName>kp-us-east</keyName> <monitoring/> <networkInterfaceSet> <item> <description>Primary network interface</description> <groupSet> <groupId>sg-7c227abc</groupId> </groupSet> <ipv6AddressesSet/> <networkInterfaceId>eni-d26c8f36</networkInterfaceId> <privateIpAddress></privateIpAddress> <privateIpAddressesSet> <item> <primary>true</primary> <privateIpAddress></privateIpAddress> </item> </privateIpAddressesSet> <subnetId>subnet-7b16dabc</subnetId> </item> <item> <description>my network interface</description> <groupSet> <groupId>sg-54e8b123</groupId> </groupSet> <ipv6AddressesSet/> <networkInterfaceId>eni-714bc4a5</networkInterfaceId> <privateIpAddress></privateIpAddress> <privateIpAddressesSet> <item> <primary>true</primary> <privateIpAddress></privateIpAddress> </item> </privateIpAddressesSet> <subnetId>subnet-7b16de0c</subnetId> </item> </networkInterfaceSet> <placement> <availabilityZone>us-east-1a</availabilityZone> <groupName/> <tenancy>default</tenancy> </placement> </launchTemplateData> </GetLaunchTemplateDataResponse>

See Also

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