Reading Time: < 1 minute

In this article, we will see how to install and configure AWS CLI for managing our AWS. It provides direct access to the API of AWS.
Through AWS CLI we can use this for bash scripts to automate.

Now we will see how to install AWS CLI in Ubuntu 18.04
AWS CLI is already available in the official package repository of Ubuntu 18.04. First, we will update the repository.

sudo apt-get update

Now install AWS CLI:

sudo apt-get install awscli

AWS CLI should be installed.

Now check whether AWS CLI is working or not.

ubuntu@techrunnr1:~$ aws --version
aws-cli/1.14.44 Python/3.6.8 Linux/4.18.0-25-generic botocore/1.8.48

Configure AWS through AWS CLI

First we will configure AWS CLI client with AWS account credentials.If you dont know how to set up Access and Secret Key In AWS IAM,Refer to this Article:;utm_campaign=share

Now we will run AWS configure command.

ubuntu@techrunnr1:~$ aws configure 
AWS Access Key ID : ***************
AWS Secret Access Key :  *************
Default region name : ap-southeast-1
Default output format :  text

The configuration files of AWS CLI is stored in ~/.aws/config and ~/.aws/credentials file as you can see below.

ubuntu@techrunnr1:~$ cat .aws/config 
region = ap-southeast-1
output = text
ubuntu@techrunnr1:~$ cat .aws/credentials 
aws_access_key_id = *****************
aws_secret_access_key = **************************

Now AWS CLI has been configured in Ubuntu 18.04.

In next article we see the Basic AWS S3 cli commands like copy file to s3,download file from s3,create bucket,removebucket etc..

© 2019, Techrunnr. All rights reserved.

Questions Answered
Articles Written
Overall Points
Categories: AWS


Leave a Reply