1. How To Install and Configure AWS CLI on RHEL 7
i | P a g e
Table of Contents
Overview.......................................................................................................................................................1
Applies To......................................................................................................................................................1
Pre-Requisites ...............................................................................................................................................1
Installation ....................................................................................................................................................1
Check Packages.........................................................................................................................................1
Download AWS CLI Bundler......................................................................................................................1
Unzip bundle.............................................................................................................................................1
Install.........................................................................................................................................................2
Test Installation Status..............................................................................................................................2
Configuring AWS CLI .....................................................................................................................................2
AWS Portal – Security Credentials............................................................................................................2
Portal – Access Key ...................................................................................................................................3
Portal – Access Key ...................................................................................................................................3
Configure CLI.............................................................................................................................................4
CLI Configuration Files ..............................................................................................................................4
Run Sample CLI..........................................................................................................................................4
2. How To Install and Configure AWS CLI on RHEL 7
1 | P a g e
Overview
Amazon Web Services Command Line Interface (CLI) is a unified tool to manage your AWS services. You
can control multiple AWS services from the command line and automate them through scripts.
In this guide we will navigate through the steps of installation and configuration of AWS CLI interface.
Applies To
Tested on RHEL 7, CentOS 7.
Pre-Requisites
Python 2 version 2.6.5+ or Python 3 version 3.3+
Installation
Installation of Amazon CLI is a simple procedure.
Check Packages
rpm -qa | grep python
Download AWS CLI Bundler
curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip"
Unzip bundle
unzip awscli-bundle.zip
3. How To Install and Configure AWS CLI on RHEL 7
2 | P a g e
Install
./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws
Parameter Purpose
-i Installation directory
-b Binary Location for AWS CLI
Test Installation Status
/usr/local/bin/aws --version or aws help
Configuring AWS CLI
First step before you configure the AWS CLI, you need to get the “AWS Access Key ID” and “AWS Secret
Access Key” from the AWS Management console from the root user “Security Credentials” menu option
and click on “Create New Access Key”.
AWS Access Key = Your Account Access Key
AWS Secret Access Key = Your Account Secret Access Key
AWS Portal – Security Credentials
After login into the AWS portal, click on “Security Credentials” option.
4. How To Install and Configure AWS CLI on RHEL 7
3 | P a g e
Portal – Access Key
Click on option “Access Keys (Access Key ID and Secret Access Key)” and click on “Create New Access
Key” button, to generate a new key.
Note: you can also download the access key file.
Portal – Access Key
Click on option “Access Keys (Access Key ID and Secret Access Key)”.
5. How To Install and Configure AWS CLI on RHEL 7
4 | P a g e
Configure CLI
Once you have generate the access key ID and secret access key, you may configure cli, to configure the
cli run the command;
aws configure
CLI Configuration Files
After configuring the AWS CLI, the configuration files are stored in the user’s home directory under “.aws”
folder. config file will contain the options set and credentials file will user credentials.
cd ~/; pwd; ll
Run Sample CLI
To demonstrate the cli command execution, we will check for availability zones in text output, run the
below command;
aws ec2 describe-availability-zones