Welcome!

Python Authors: Christopher Keene, David Smith, RealWire News Distribution

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 is the Founder & Principal Analyst at Janakiram & Associates. Through his speaking, writing and consulting, he helps businesses take advantage of the emerging technologies. Founder and driving force of an initiative called www.GetCloudReady.com he enables businesses to be ready for the Cloud. As the CTO of GetCloudReady.com, he leads a highly talented engineering team that focuses on developing and migrating applications to Microsoft Windows Azure, Amazon Web Services and Cloud Foundry. 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 in just few months. He is the Chief Editor of a popular portal on Cloud called www.CloudStory.in where he analyzes the latest trends from the world of Cloud Computing. Janakiram is an analyst with the GigaOM Pro analyst network where he analyzes the Cloud Services landscape. Janakiram is a guest faculty at the International Institute of Information Technology, Hyderabad (IIIT-H) where he teaches Big Data and Cloud Computing to the students enrolled for the Masters course. Janakiram has worked at world-class product companies including Microsoft Corporation, Amazon Web Services and Alcatel-Lucent. His last role was with Amazon Web Services as the Technology Evangelist where he joined them as the first employee in India. 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. At the time of leaving Microsoft, he was a Technical Architect, Cloud focusing on Windows Azure.