Complete the code to create a launch template with a name.
aws ec2 create-launch-template --launch-template-name [1] --version-description "v1" --launch-template-data file://template.json
The --launch-template-name parameter requires a unique name. "template123" is a valid example.
Complete the code to specify the AMI ID in the launch template data.
{
"ImageId": "[1]",
"InstanceType": "t2.micro"
}The ImageId must be a valid AMI ID format like "ami-0abcdef1234567890".
Fix the error in the launch template data to correctly specify the instance type.
{
"ImageId": "ami-0abcdef1234567890",
"InstanceType": "[1]"
}The correct instance type format is like "t2.micro" with a dot separating family and size.
Fill both blanks to specify the key name and security group IDs in the launch template data.
{
"KeyName": "[1]",
"SecurityGroupIds": ["[2]"]
}The KeyName should be your SSH key pair name, and SecurityGroupIds must be valid security group IDs like "sg-0a1b2c3d4e5f6g7h8".
Fill all three blanks to create a launch template data snippet with user data, tag specifications, and block device mappings.
{
"UserData": "[1]",
"TagSpecifications": [{"ResourceType": "instance", "Tags": [{"Key": "Name", "Value": "[2]"}]}],
"BlockDeviceMappings": [{"DeviceName": "/dev/xvda", "Ebs": {"VolumeSize": [3]]
}UserData must be base64 encoded script, TagSpecifications include the instance name, and BlockDeviceMappings specify the volume size in GB.