How to install aws cli in Ubuntu 18.04 &16.04 LTS By manikanta

Today my question is why we should use aws cli in our environment. Let’s discuss I think you know very well our IT sector is moving toward automation and we are performing our 90% task with the help of automation tools like Jenkins, Ansible, Bit-bucket, Bamboo, etc. etc. similarly aws cli is automation tool of AWS that provides help us to automate our daily basis task. In simple language you can use aws cli to create scripts for automating your Amazon Web Services.
In this article we will discuss how to install aws cli in Ubuntu 18.04&16.04 LTS.
There are mainly  two way to install aws cli in Ubuntu. Let’s discuss one by one.
  • From official repository of Ubuntu
  • Using python pip

Method 1:  Using apt repository to install aws cli in Ubuntu.

First of all we will install from official repository of Ubuntu. Check the Ubuntu version first and then update official repository of Ubuntu.
Now we are going to install aws cli, kindly run below command and follow the step.

Method 2: Installing with Python Pip.

We have successfully installed aws cli but when I have checked this is showing old version let’s upgrade to new version with the help of pip. Use the curl command to download the installation scripts.

When our scripts will download then we will execute this script with the help of python follow below step.
when you have installed pip than you have to add it’s variable by default it’s not installed.
Now install aws cli from pip.
Now You have successfully upgraded your aws old version to new version but still you didn’t add your AWS access key and security key file from aws gui console to aws cli. Without adding access key and security key you can not access your aws cli. Let’s do it.
  • Configuring AWS CLI

Now check your access key and security key has been successfully configured or not.
  • How to Verify AWS CLI configured properly?

Up to this step we have successfully installed aws cli let’s check it working fine or not. For this purpose you have to  executing any of the below commands and see it’s working fine without any error.
The following command displays the available Amazon Elastic Compute Cloud (Amazon EC2) specific commands.
The above command will get the listing of all s3 buckets in your account.
That should list all the instances in your account.
If want to stop your instance change your instance id in above command and then hit enter this command will stop your instance no need to stop from aws console.

Conclusion

In this tutorial we have discussed how to install aws cli in Ubuntu. If you want to automate your aws infra then defiantly you should know about aws cli because this is the best way to automate your aws daily basis task by making a simple script.Only run that script your task will automatically done.

Comments

Popular posts from this blog

❇️ Top 50 Linux Commands You Must Know as a Regular User ❇️

✌️ Amazon EC2✌

Linux Intro, Linux versions, create a Linux server in local desktop/laptop, Create Linux server in AWS.