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
• 15,350 points
80 views

2 answers to this question.

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,520 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
43 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
34 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,520 points
38 views
+13 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,380 points
150 views
0 votes
1 answer
+3 votes
5 answers

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

Hey, 3 ways you can do this: To ...READ MORE

answered Oct 9, 2018 in AWS by Omkar
• 67,480 points
2,603 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,520 points
393 views