Quantcast
Channel: YourStory.com » Tutorials
Viewing all articles
Browse latest Browse all 27

Tutorial: Installing and Configuring the AWS CLI

$
0
0

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

- Janakiram MSV, Chief Editor, CloudStory.in


Viewing all articles
Browse latest Browse all 27

Trending Articles