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.
example
Use a bare-bones client and the command you need to make an API call.
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
, andDescribeElasticGpus
. Or, you can allowdescribe*
depending on your instance requirements.Use a bare-bones client and the command you need to make an API call.
import { EC2Client, GetLaunchTemplateDataCommand } from "@aws-sdk/client-ec2"; // ES Modules import // const { EC2Client, GetLaunchTemplateDataCommand } = require("@aws-sdk/client-ec2"); // CommonJS import const client = new EC2Client(config); const command = new GetLaunchTemplateDataCommand(input); const response = await client.send(command);
GetLaunchTemplateDataCommandInput for command's
input
shape.GetLaunchTemplateDataCommandOutput for command's
response
shape.config for EC2Client's
config
shape.