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
• 14,970 points
50 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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
• 56,120 points

Related Questions In AWS

+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
• 14,970 points
529 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
• 56,120 points
42 views
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
• 56,120 points
44 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.