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:  https://www.techrunnr.com/how-to-set-up-access-and-secret-key-in-aws-iam/?utm_source=WhatsApp&utm_medium=IM&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 
[default]
region = ap-southeast-1
output = text
ubuntu@techrunnr1:~$ cat .aws/credentials 
[default]
aws_access_key_id = *****************
aws_secret_access_key = **************************
ubuntu@techrunnr1~$ 

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.

#1
#2
#3
Questions Answered
Articles Written
Overall Points
Categories: AWS

0 Comments

Leave a Reply

Please wait...

Subscribe to our newsletter

Want to be notified when our article is published? Enter your email address and name below to be the first to know.