Welcome!

Java Authors: Hovhannes Avoyan, Carmen Gonzalez, Imran Akbar, Sharon Barkai, Adrian Bridgwater

Blog Feed Post

Tutorial: Installing and Configuring the AWS CLI

One of the biggest complaints from developers using AWS is the fragmentation of the command line tools. Each service uses its own set of tools written in a separate language. For example, EC2 command line tools are written in Java while Beanstalk tools are developed using Ruby and SES command line tools are based on Python. This makes it extremely difficult to configure and manage multiple AWS services from the command line.

Keeping this in mind, AWS has now developed a new set of command line tools called AWS CLI that consolidates various tools related to AWS. Its a unified set of tools that support popular services including EC2, RDS, Beanstalk, SQS, SNS, SES, CloudWatch and CloudFormation. This eliminates the need to install and configure separate tools for each service.

Here is a step-by-step guide to install and configure AWS CLI.

Step 1 – Download and install the AWS CLI

mkdir /opt/aws
cd /opt/aws
curl http://python-distribute.org/distribute_setup.py | python
curl https://raw.github.com/pypa/pip/master/contrib/get-pip.py | python
pip install awscli

Step 2 – Create a file called aws_credentials.txt and add the Access Key, Secret Key and the default Region

[default]
aws_access_key_id = AKIAIOSFODNN7EXAMPLE
aws_secret_access_key = wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
region = ap-southeeast-1

Step 3 – Configure the AWS_CONFIG_FILE environment variable

export AWS_CONFIG_FILE="/opt/aws/aws_credentials.txt"

Step 4 – Test the configuration by typing the following command

aws ec2 describe-regions

Below is a screencast of this tutorial

Read the original blog entry...

More Stories By Janakiram MSV

Janakiram MSV heads the Cloud Infrastructure Services at Aditi Technologies. He was the founder and CTO of Get Cloud Ready Consulting, a niche Cloud Migration and Cloud Operations firm that recently got acquired by Aditi Technologies. In his current role, he leads a highly talented engineering team that focuses on migrating and managing applications deployed on Amazon Web Services and Microsoft Windows Azure Infrastructure Services.
Janakiram is an industry analyst with deep understanding of Cloud services. Through his speaking, writing and analysis, he helps businesses take advantage of the emerging technologies. He leverages his experience of engaging with the industry in developing informative and practical research, analysis and authoritative content to inform, influence and guide decision makers. He analyzes market trends, new products / features, announcements, industry happenings and the impact of executive transitions.
Janakiram is one of the first few Microsoft Certified Professionals on Windows Azure in India. Demystifying The Cloud, an eBook authored by Janakiram is downloaded more than 100,000 times within the first few months. He is the Chief Editor of a popular portal on Cloud called www.CloudStory.in that covers the latest trends in Cloud Computing. Janakiram is an analyst with the GigaOM Pro analyst network where he analyzes the Cloud Services landscape. He is a guest faculty at the International Institute of Information Technology, Hyderabad (IIIT-H) where he teaches Big Data and Cloud Computing to students enrolled for the Masters course. As a passionate speaker, he has chaired the Cloud Computing track at premier events in India.
He has been the keynote speaker at many premier conferences, and his seminars are attended by thousands of architects, developers and IT professionals. His sessions are rated among the best in every conference he participates.
Janakiram has worked at the world-class product companies including Microsoft Corporation, Amazon Web Services and Alcatel-Lucent. Joining as the first employee of Amazon Web Services in India, he was the AWS Technology Evangelist. Prior to that, Janakiram spent 10 years at Microsoft Corporation where he was involved in selling, marketing and evangelizing the Microsoft Application Platform and Tools.