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,510 points
1,167 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
• 58,020 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, 2019 by Shashank
• 1,370 points

Related Questions In AWS

0 votes
2 answers

How to test credentials for AWS Command Line Tools

This command always works regardless of the ...READ MORE

answered Aug 8, 2018 in AWS by anonymous
6,027 views
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,170 points
927 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,170 points
640 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
• 58,020 points
1,127 views
+15 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 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,036 views
+2 votes
1 answer
+3 votes
6 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
• 69,220 points
20,004 views
0 votes
1 answer

How to find unused Amazon EC2 security groups?

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

answered Jul 10, 2018 in AWS by Priyaj
• 58,020 points
2,248 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