How to configure Amazon EC2 command line interface?

0 votes

I want to install Amazon Ec2 cli tools on a linux machine. I have configured java and have installed ec2 cli tools but I am getting the following error:

[root@ip-/]# ec2-describe-regions | sort
Required option '-O, --aws-access-key KEY' missing (-h for usage)

Also please tell me how to set EC2_PRIVATE_KEY, EC2_CERT parameters. How to resolve this.

Jul 19, 2018 in AWS by bug_seeker
• 14,980 points
59 views

2 answers to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

Ec2 cli tools are old and are not maintained by AWS anymore. Use aws-cli instead. Refer this link which details how to set-up and configure aws-cli.

using aws-cli, its a one time installation which support almost all the AWS Services. with older CLI tools, you had to configure CLI for each and every service separately.

also aws-cli provides output in JSON format, hence it is extremely easy to parse output. This feature was missing from all the older CLI tools and parsing the output was the most painful task.

Also older CLI tools were java dependent, whereas aws-cli works on python and in my experience, I have found its comparatively faster than the older cli tools.

answered Jul 19, 2018 by Priyaj
• 56,140 points
0 votes
You can use this command to create EC2 instance.
aws ec2 run-instances --image-id ami-id --key-name yourkeyname --instance-type t2.micro --region us-east-1 --subnet-id your-subnet-id --count 1
answered Feb 23 by Shashank
• 1,350 points

Related Questions In AWS

0 votes
2 answers
0 votes
1 answer

How to upload a lib for Tomcat in Amazon EC2?

You need to set the proper privileges ...READ MORE

answered Aug 20, 2018 in AWS by Archana
• 4,090 points
30 views
0 votes
1 answer

How to add swap to Amazon EC2 instance?

A fix for this problem is to ...READ MORE

answered Sep 11, 2018 in AWS by Archana
• 4,090 points
19 views
0 votes
1 answer

How to safely upgrade an Amazon EC2 instance from t1.micro to large?

Using AWS Management Console: Right-Click on the instance Instance ...READ MORE

answered Oct 8, 2018 in AWS by Priyaj
• 56,140 points
24 views
+13 votes
2 answers
0 votes
1 answer
+3 votes
5 answers

How to move files from amazon ec2 to s3 bucket using command line

First Option sm3cmd Use s3cmd s3cmd get s3://AWS_S3_Bucket/dir/file Take a ...READ MORE

answered Aug 29, 2018 in AWS by Priyaj
• 56,140 points
1,050 views
0 votes
1 answer

How to find unused Amazon EC2 security groups?

Select all and delete there you can ...READ MORE

answered Jul 9, 2018 in AWS by Priyaj
• 56,140 points
289 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.