Cannot launch from template in AWS CLI

0 votes

Working on scripting my first ever EC2 instance launch using the CLI, following the user guide here. I manually created a launch template using the console, and am trying to launch an instance from it using the directions provided, but continually get the following error:

erich@ip-172-31-69-124:~$ aws ec2 run-instances --launch-template LaunchTemplateId=lt-0a0d15f9401ca8442

aws: error: the following arguments are required: --image-id

Jul 30, 2018 in AWS by bug_seeker
• 15,510 points
945 views

1 answer to this question.

0 votes

You are using an older version of CLI that does not support --launch-template option.

$ aws ec2 --version

aws-cli/1.11.109 Python/2.6.9 Linux/4.1.17-22.30.amzn1.x86_64 botocore/1.7.20

$ aws ec2 run-instances --launch-template

aws: error: argument --image-id is required

After upgrading:

$ sudo pip install awscli --upgrade

$ aws ec2 --version aws-cli/1.14.65 Python/2.6.9 Linux/4.1.17-22.30.amzn1.x86_64 botocore/1.9.18 $

aws ec2 run-instances --launch-template

aws: error: argument --launch-template: expected one argument

$ aws ec2 run-instances help [--launch-template <value>]

answered Jul 30, 2018 by Priyaj
• 58,020 points

Related Questions In AWS

0 votes
1 answer

How to edit files in the AWS S3 bucket from CLI?

Hi@akhtar, According to my knowledge,  you can't edit ...READ MORE

answered Jun 8, 2020 in AWS by MD
• 95,460 points
9,713 views
+5 votes
2 answers

Can we export/migrate users from AWS cognito, does it cause vendor lock-in?

Cognito actually has the capability to import ...READ MORE

answered Aug 1, 2018 in AWS by bug_seeker
• 15,510 points
5,042 views
0 votes
1 answer

Quick way to get AWS Account number from the cli tools?

Via "Secure Token Service" using the following ...READ MORE

answered Jul 12, 2018 in AWS by Priyaj
• 58,020 points
1,818 views
0 votes
1 answer
0 votes
1 answer
0 votes
2 answers

Receiving SMS from users and stores in AWS

As far as I know, receiving international ...READ MORE

answered Aug 21, 2018 in AWS by Priyaj
• 58,020 points
1,658 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP