Install Amazon CLI Tools

Install Amazon CLI Tools


Amazon comes with Command Line Interface (CLI) and AMI Tools to manage the instances. CLI tools can be used to create and manage resources for EC2, EBS, and VPC. Whereas, AMI tools can be used to create and manage instance-store backed Linux AMIs. The AWS CLI is a unified tool to manage AWS services. Amazon documentation has very detailed instructions on how to set up these but the main aim of this post is to quickly set up with CLI tools and start using them. This post shows how to install, configure, and verify Amazon CLI tools as this is the basic set up which will be a pre-requisite for many upcoming blog posts.

Use Case

This use case shows how to install and configure Java, and AWS CLI tools on Ubuntu, and perform some verification on the set up to ensure the proper working of the CLI tools.
What we need to do:

  • Download & Install Java 1.7
  • Download & Install AWS CLI Tools
  • Set up Environment Variables
  • Verify Setup


Install Java 1.7:

  • Download Java 1.7:
  • Configure Java 1.7: 
  • Verify:

Download & Install AWS CLI Tools:

  • Download AWS CLI Tools:
  • Configure AWS CLI Tools:

Set up Environment Variables:

  • JAVA_HOME Environment Variable:
  • CLI Tools Environment Variable: 
  • Refresh Profile File:

The  screenshot given below shows how it looks like:

profile file

Verify Setup:

  • Describe Regions:

$ ec2-describe-regions

Describe regions

  • Describe Instances in a Region:

$ ec2-describe-instances –region us-west-2

instance in a region

  • Describe Instance Status:

$ ec2-describe-instance-status –region us-west-2 i-16845d1d

instance status


  • Amazon web-based Console has lot of functionalities with respect to launching instances, assigning security groups, creating EBS volumes, and others. However, Amazon CLI tools can be scripted for easy management and certain functionalities like Auto-Scaling and others are only possible with CLI tools.
  • With just one CLI tool, it’s possible to control multiple AWS services from the command line and automate them through scripts.


  • CLI Commands:

7230 Views 4 Views Today