Thursday, November 21, 2024
HomeCloudAWSHow to install and configure AWS CLI on Linux

How to install and configure AWS CLI on Linux

Here will see how to install AWS Command Line Interface(CLI) in Ubuntu and CentOS.

Install AWS CLI

In Ubuntu:

Pip is recommended method of installing AWS CLI on Linux which is python based tool helps in install, upgrade, and remove Python packages.

You can configure it using “aws configure” command.

While configuring, it will ask you for the several information like AWS Access Key ID, AWS Secret Access Key, Default region name, Default output format. You need to provide that information. In my case below is the Access Key and Secret Access Key.

AWS Access Key = WUEW22JFDJSIWBUCP32J
AWS Secret Access Key = QKRzbphWlpk8WmHZiGF4VawiQnoR0qO2FhU5ptEi

# aws configure
AWS Access Key ID [None]: WUEW22JFDJSIWBUCP32J
AWS Secret Access Key [None]: QKRzbphWlpk8WmHZiGF4VawiQnoR0qO2FhU5ptEi
Default region name [None]: us-west-1
Default output format [None]:

Once configuration complete, It will create .aws folder in user’s home directory. Below is the content of .aws directory.

# ls .aws/

config  credentials

# cat .aws/config
[default]
region = us-west-1
# cat .aws/credentials
[default]
aws_access_key_id = WUEW22JFDJSIWBUCP32J
aws_secret_access_key = QKRzbphWlpk8WmHZiGF4VawiQnoR0qO2FhU5ptEi

We configured successfully. Lets start check the AWS CLI working properly or not.

# aws help
# aws --version
aws-cli/1.7.13 Python/2.7.3 Linux/3.11.0-26-generic

 In CentOS

Before start check python package is installed on the system or not. If not start install it. To Install

# yum -y install python
# yum install python-pip -y

Once pip installed successfully, start install AWS command line using pip.

# pip install awscli
# aws configure
AWS Access Key ID [None]: WUEW22JFDJSIWBUCP32J
AWS Secret Access Key [None]: QKRzbphWlpk8WmHZiGF4VawiQnoR0qO2FhU5ptEi
Default region name [None]: us-west-1
Default output format [None]:

Now installation and configuration of AWS CLI is completed. Lets Verify either file and folder is created.

RELATED ARTICLES
- Advertisment -

Most Popular

Recent Comments