{"id":4532,"date":"2022-01-19T21:05:00","date_gmt":"2022-01-19T13:05:00","guid":{"rendered":"https:\/\/www.jameseduard.com\/?p=4532"},"modified":"2022-01-19T21:05:00","modified_gmt":"2022-01-19T13:05:00","slug":"how-to-install-aws-cli-on-ubuntu-20-04","status":"publish","type":"post","link":"https:\/\/www.jameseduard.com\/?p=4532","title":{"rendered":"How to Install AWS CLI on Ubuntu 20.04"},"content":{"rendered":"\n\n\n<p class=\"wp-block-paragraph\">In this article, we will guide you how to install the AWS CLI command-line utility on Ubuntu Server 20.04<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.jameseduard.com\/wp-content\/uploads\/2022\/01\/awscli.png\" alt=\"\" class=\"wp-image-4547\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">1. To Install<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If you check the AWS documentation, you will see that AWS doesn\u2019t recommend installing the package in a specific location. In this post, I will create a hidden directory called .aws and install the CLI into it.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">2. Create Directory<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Let us start with creating a new directory called .aws in our come directory.<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">cd \nmkdir .aws<\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.jameseduard.com\/wp-content\/uploads\/2022\/01\/awsdir-1.jpg\" alt=\"\" class=\"wp-image-4542\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">3. Install Unzip<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Next, we need to install unzip in order to extrect the CLI. use the following command to install unzip.<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">sudo apt install unzip<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">4. Download and Unzip AWS CLI<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Now, let\u2019s download the CLI using the following command. Please make sure you download it to the .aws directory.<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">sudo curl \"https:\/\/awscli.amazonaws.com\/awscli-exe-linux-x86_64.zip\" -o \"awscliv2.zip\"<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">When the download is completed unzip the file.<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">unzip awscliv2.zip<\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.jameseduard.com\/wp-content\/uploads\/2022\/01\/awcliunzip.jpg\" alt=\"\" class=\"wp-image-4543\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">5. Install and Test<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The last step is to install the AWS CLI using the following command.<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">sudo .\/aws\/install<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">By default, AWS will install the CLI in the following path.<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">\/usr\/local\/bin\/aws<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">To check the AWS CLI version type:<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">aws --version<\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.jameseduard.com\/wp-content\/uploads\/2022\/01\/awsoutput.jpg\" alt=\"\" class=\"wp-image-4536\"\/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>In this article, we will guide you how to install the AWS CLI command-line utility on Ubuntu Server 20.04 1. To Install If you check the AWS documentation, you will see that AWS doesn\u2019t recommend installing the package in a specific location. In this post, I will create a hidden directory called .aws and install<\/p>\n","protected":false},"author":1,"featured_media":4547,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[89,52,47],"tags":[87,88,92],"class_list":["post-4532","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-aws","category-devops","category-how-tos","tag-automation","tag-aws","tag-terraform"],"_links":{"self":[{"href":"https:\/\/www.jameseduard.com\/index.php?rest_route=\/wp\/v2\/posts\/4532","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.jameseduard.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jameseduard.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jameseduard.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jameseduard.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4532"}],"version-history":[{"count":0,"href":"https:\/\/www.jameseduard.com\/index.php?rest_route=\/wp\/v2\/posts\/4532\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.jameseduard.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4532"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jameseduard.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4532"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jameseduard.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4532"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}