{"id":74046,"date":"2019-12-28T09:03:39","date_gmt":"2019-12-28T09:03:39","guid":{"rendered":"https:\/\/www.whizlabs.com\/blog\/?p=74046"},"modified":"2020-08-31T11:39:23","modified_gmt":"2020-08-31T11:39:23","slug":"install-aws-cli","status":"publish","type":"post","link":"https:\/\/www.whizlabs.com\/blog\/install-aws-cli\/","title":{"rendered":"How to Install AWS CLI? (A Step by Step Guide)"},"content":{"rendered":"<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">There is no doubt that <a href=\"https:\/\/www.whizlabs.com\/blog\/amazon-web-services\/\" target=\"_blank\" rel=\"noopener noreferrer\">Amazon Web Services (AWS)<\/a> is the leader in the cloud computing market. Besides, to provide its users with better and robust services, it regularly updates the platform with the latest innovations. AWS helps companies and corporates with different types of workloads. For example, massive data processing, development of apps, warehousing, and many more. But there is something more. AWS is much more than just the simple browser console. If you want to explore more about it, then it\u2019s time to learn about AWS Command Line Interface. <\/span><\/p>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">If you don\u2019t know much about it, well, there is nothing to worry about. Here we will discuss all the things about AWS CLI. You will learn how to install AWS CLI, how to use AWS CLI, AWS CLI configure, and more. But, first, let\u2019s know what AWS CLI is?<\/span><\/p>\n<blockquote><p>Preparing to become a certified AWS professional? Check our\u00a0<a href=\"https:\/\/www.whizlabs.com\/aws-certifications\/\" target=\"_blank\" rel=\"noopener noreferrer follow\" data-cke-saved-href=\"https:\/\/www.whizlabs.com\/cloud-certification-training-courses\/\" data-wpel-link=\"internal\">AWS Certifications Training Courses<\/a>\u00a0now!<\/p><\/blockquote>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_76 ez-toc-wrap-left counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #ea7e02;color:#ea7e02\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #ea7e02;color:#ea7e02\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.whizlabs.com\/blog\/install-aws-cli\/#Understanding_the_AWS_Command_Line_Interface\" >Understanding the AWS Command Line Interface<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.whizlabs.com\/blog\/install-aws-cli\/#Benefits_of_Amazon_Web_Services_CLI\" >Benefits of Amazon Web Services CLI<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.whizlabs.com\/blog\/install-aws-cli\/#Installing_the_Amazon_Web_Services_CLI\" >Installing the Amazon Web Services CLI<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.whizlabs.com\/blog\/install-aws-cli\/#How_to_Configure_AWS_CLI\" >How to Configure AWS CLI?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.whizlabs.com\/blog\/install-aws-cli\/#How_to_Use_AWS_CLI\" >How to Use AWS CLI?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.whizlabs.com\/blog\/install-aws-cli\/#How_to_Uninstall_AWS_CLI\" >How to Uninstall AWS CLI?<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2 class=\"p1\" style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"Understanding_the_AWS_Command_Line_Interface\"><\/span><span class=\"s1\">Understanding the AWS Command Line Interface<\/span><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">Before knowing how to Install AWS CLI, it is essential to understand this. <a href=\"https:\/\/aws.amazon.com\/cli\/\" target=\"_blank\" rel=\"noopener noreferrer\">AWS CLI<\/a> is a tool, which can be used to monitor and manage all the <a href=\"https:\/\/www.whizlabs.com\/blog\/top-aws-services\/\" target=\"_blank\" rel=\"noopener noreferrer\">AWS services<\/a> and features from the client\u2019s terminal session. Even though the AWS APIs or management console can control almost all the AWS services, there is another way that can be quite useful in some cases. That is the \u201cCommand Line Interface.\u201d<span class=\"Apple-converted-space\">\u00a0 <\/span><\/span><\/p>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">Once you install AWS CLI, you can unlock the true potential of the AWS environment. All you need to download and install the AWS CLI, and you are ready to manage various AWS services using command lines. <\/span><\/p>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">With easy installation and configuration, you can utilize all the functionality using the terminal program. That can be:<\/span><\/p>\n<p><strong><span class=\"s1\">1. WCL-Windows Command-Line: <\/span><\/strong><\/p>\n<p class=\"p2\" style=\"text-align: justify;\"><span class=\"s1\">On your Windows, you can quickly execute different commands in the PowerShell and the command prompt. <\/span><\/p>\n<p><strong><span class=\"s1\">2. Linux Shells: <\/span><\/strong><\/p>\n<p class=\"p2\" style=\"text-align: justify;\"><span class=\"s1\">The users can use various command shell programs, such as zsh, bash, and tsch, to execute commands in Unix, Linux, and macOS. <\/span><\/p>\n<p><strong><span class=\"s1\">3. Remote Terminal: <\/span><\/strong><\/p>\n<p class=\"p2\" style=\"text-align: justify;\"><span class=\"s1\">You can even execute the required command on Amazon EC2 using a remote terminal, for example, SSH and PuTTY. <\/span><\/p>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">Apart from all these, AWS CLI offers easy access to AWS public APIs. Furthermore, it provides effective customization for different services.<\/span><\/p>\n<blockquote>\n<p class=\"entry-title\"><strong>Must Read:<\/strong> <a href=\"https:\/\/www.whizlabs.com\/blog\/aws-cheat-sheet\/\" target=\"_blank\" rel=\"noopener noreferrer\">Exploring the Basics of AWS: AWS Cheat Sheet<\/a><\/p>\n<\/blockquote>\n<h3 class=\"p1\" style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"Benefits_of_Amazon_Web_Services_CLI\"><\/span><span class=\"s1\">Benefits of Amazon Web Services CLI<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">One of the most major benefits of the AWS CLI is it saves a lot of time. Some other benefits include, <\/span><\/p>\n<ol class=\"ol1\" style=\"text-align: justify;\">\n<li class=\"li1\"><span class=\"s1\">It supports all the AWS services.<\/span><\/li>\n<li class=\"li1\"><span class=\"s1\">The installation is quite smooth and simple. <\/span><\/li>\n<li class=\"li1\"><span class=\"s1\">Most of the AWS CLI users find it much faster than other platforms. <\/span><\/li>\n<li class=\"li1\"><span class=\"s1\">It comes with shell scripts that let it automate the cloud infrastructure effectively.<\/span><\/li>\n<\/ol>\n<h3 class=\"p1\" style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"Installing_the_Amazon_Web_Services_CLI\"><\/span><span class=\"s1\">Installing the Amazon Web Services CLI<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">Before installing, you need to download the AWS CLI. Depending on the operating system you are using, you need to follow different processes to Install AWS CLI. <\/span><\/p>\n<h4 class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">For macOS, Linux, and Unix<\/span><\/h4>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">Ensure that you are using the latest version of Python. Make sure you have Python 2.6+ or Python 3 and above. You can check your Python version, by suing \u2018Python &#8211; -version\u2019 command. <\/span><\/p>\n<p class=\"p1\" style=\"text-align: justify;\"><em><span class=\"s1\">Now let\u2019s start with the installation process:<\/span><\/em><\/p>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">To installing the Amazon Web Services CLI, prefer to use the installers come with AWS. With the installer, you will find all the required dependencies to install AWS CLI. <\/span><\/p>\n<ul class=\"ul1\" style=\"text-align: justify;\">\n<li class=\"li1\"><span class=\"s1\">To start the installation, use the bellow given command<\/span><\/li>\n<\/ul>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">\u201ccurl &#8220;https:\/\/s3.amazonaws.com\/aws-cli\/awscli-bundle.zip&#8221; -o &#8220;awscli-bu.\u201d<\/span><\/p>\n<ul class=\"ul1\" style=\"text-align: justify;\">\n<li class=\"li1\"><span class=\"s1\">Then, you need to unzip the downloaded package. For this use, this command<\/span><\/li>\n<\/ul>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">\u201cunzip awscli-bundle.zip.\u201d<\/span><\/p>\n<ul class=\"ul1\" style=\"text-align: justify;\">\n<li class=\"li1\"><span class=\"s1\">After that, you can begin the installation<\/span><\/li>\n<\/ul>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">\u201cSudo .\/awscli-bundle\/install -i \/usr\/local\/aws -b \/usr\/local\/bin\/aws\u201d<\/span><\/p>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">The -b option lets the users run the AWS CLI from a different directory. That means you don\u2019t need to mention the installation directory.<span class=\"Apple-converted-space\">\u00a0 <\/span>Follow these steps to install Amazon Web Services CLI in macOS, Linux, and Unix system. <\/span><\/p>\n<h4 class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">Installing AWS CLI on Windows<\/span><\/h4>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">To install the AWS CLI in a Windows system, make sure that you are using Windows XP and above version. <\/span><\/p>\n<p class=\"p1\" style=\"text-align: justify;\"><em><span class=\"s1\">Now, let\u2019s install this:<\/span><\/em><\/p>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">You will get three MSI installer. Choose as per your requirements<\/span><\/p>\n<ol class=\"ol1\" style=\"text-align: justify;\">\n<li class=\"li1\"><span class=\"s1\">32-bit<\/span><\/li>\n<li class=\"li1\"><span class=\"s1\">64-bit and <\/span><\/li>\n<li class=\"li1\"><span class=\"s1\">CLI setup file <\/span><\/li>\n<\/ol>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">First, choose the required option to begin downloading the MSI. Then, execute the MSI installer. Follow the onscreen instruction displayed on the screen. That\u2019s it. After that, you can locate the executable files in the installed directory. For example, <\/span><\/p>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">In the 64-bit version, the location will be -C:\\Program Files\\Amazon\\AWSCLI <\/span><\/p>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">In the 32-bit version, the program location will be- C:\\Program Files (x86) \\Amazon\\AWSCLI<\/span><\/p>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">Now, to confirm the successful installation of the program, you can use \u2018aws &#8211; -version\u2019 command. <\/span><\/p>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">You can also install this using Pip. For this, follow the below-mentioned steps.<\/span><\/p>\n<p><span class=\"s1\">1. You need to first open the command prompt. For this open start menu and then search for CMD. Click on it. <\/span><\/p>\n<p><span class=\"s1\">2. <\/span><span class=\"s1\">Now, you need to make sure that Pip and Python are installed properly, and you are using the latest version. Here is the snippet for commands that you can use to check it.<\/span><\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-74047 size-full\" src=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2019\/12\/install-aws-cli1.png\" alt=\"install AWS CLI\" width=\"460\" height=\"138\" srcset=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2019\/12\/install-aws-cli1.png 460w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2019\/12\/install-aws-cli1-300x90.png 300w\" sizes=\"(max-width: 460px) 100vw, 460px\" \/> \u00a0<img decoding=\"async\" class=\"alignnone size-full wp-image-74049\" src=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2019\/12\/install-aws-cli3.png\" alt=\"\" width=\"435\" height=\"57\" srcset=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2019\/12\/install-aws-cli3.png 435w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2019\/12\/install-aws-cli3-300x39.png 300w\" sizes=\"(max-width: 435px) 100vw, 435px\" \/><\/p>\n<p><span class=\"s1\">3. Use Pip to install AWS CLI<\/span><\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-74056 size-full\" src=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2019\/12\/install-cli.png\" alt=\"Use PIP to install AWS CLI\" width=\"273\" height=\"35\" \/><img decoding=\"async\" class=\"alignnone size-full wp-image-74053\" src=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2019\/12\/install-cli.png\" alt=\"\" width=\"273\" height=\"35\" \/> <img decoding=\"async\" class=\"alignnone size-full wp-image-74054\" src=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2019\/12\/install-cli-1.png\" alt=\"\" width=\"449\" height=\"65\" \/><\/p>\n<p><span class=\"s1\">4. Now, you need to check everything went fine. Check the snippet given below to know the commands.<\/span><\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-74049 size-full\" src=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2019\/12\/install-aws-cli3.png\" alt=\"install AWS CLI\" width=\"435\" height=\"57\" srcset=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2019\/12\/install-aws-cli3.png 435w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2019\/12\/install-aws-cli3-300x39.png 300w\" sizes=\"(max-width: 435px) 100vw, 435px\" \/><\/p>\n<blockquote><p>An AWS Elastic Load Balancer distributes the load evenly to multiple instances. Let&#8217;s understand the <a href=\"https:\/\/www.whizlabs.com\/blog\/how-elastic-load-balancing-works\/\" target=\"_blank\" rel=\"noopener noreferrer\">working of AWS Elastic Load Balancer<\/a>!<\/p><\/blockquote>\n<h3 class=\"p1\" style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"How_to_Configure_AWS_CLI\"><\/span><span class=\"s1\">How to Configure AWS CLI?<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">You can run some command to put your secret and access keys for the bucket. You need to accept the \u2018default output format\u2019 and \u2018default region.\u2019 For this press \u2018Enter.\u2019 You don\u2019t need to input anything for the output format and region. Here is a snippet of the commands.<\/span><\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-74050 size-full\" src=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2019\/12\/install-aws-cli4.png\" alt=\"Configure AWS CLI\" width=\"532\" height=\"116\" srcset=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2019\/12\/install-aws-cli4.png 532w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2019\/12\/install-aws-cli4-300x65.png 300w\" sizes=\"(max-width: 532px) 100vw, 532px\" \/><\/p>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">Now, you are ready to use \u2018aws-cli\u2019 commands to interact with the bucket. <\/span><\/p>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">When you use the above commands, during the session, the virtual environment remains active. But when you lot out and then log in again after some time, you will find it de-active. So, how to activate the virtual environment automatically whenever you log in? You need to add some commands to the .bash_profile. Here is the snippet of this command.<\/span><\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-74051 size-full\" src=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2019\/12\/install-aws-cli5.png\" alt=\"Configure AWS CLI\" width=\"478\" height=\"48\" srcset=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2019\/12\/install-aws-cli5.png 478w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2019\/12\/install-aws-cli5-300x30.png 300w\" sizes=\"(max-width: 478px) 100vw, 478px\" \/><\/p>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">The AWS secret and access keys are generally used to authenticate the AWS account. It gives you the authority to perform some specific tasks based on the permission level. It may be noted that it is not possible to restore the lost access keys. <\/span><\/p>\n<h3 class=\"p1\" style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"How_to_Use_AWS_CLI\"><\/span><span class=\"s1\">How to Use AWS CLI? <\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">Just think, you have carried out some tasks on Amazon Web Services and you have done it with the help of Amazon Web Services management console. Well, the same thing can be done, but putting fewer efforts through Amazon CLI. You can consider the below example. <\/span><\/p>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">You want to start the AWS Linux instance. If you&#8217;re going to do this using the AWS management console. To lunch the AWS instance, you will need to following steps:<\/span><\/p>\n<ol class=\"ol1\" style=\"text-align: justify;\">\n<li class=\"li1\"><span class=\"s1\">First, open the EC2.<\/span><\/li>\n<li class=\"li1\"><span class=\"s1\">Now, click on Launch Instance.<\/span><\/li>\n<li class=\"li1\"><span class=\"s1\">After that, you need to choose AMI and the type of instance that you want to create. <\/span><\/li>\n<li class=\"li1\"><span class=\"s1\">Now visit the Configure Instance Details page, set network, IAM, user data settings, and life cycle behavior. <\/span><\/li>\n<li class=\"li1\"><span class=\"s1\">Open the Add Storage page and choose the storage volumes. <\/span><\/li>\n<li class=\"li1\"><span class=\"s1\">Now, visit Add Tags page and add tags. <\/span><\/li>\n<li class=\"li1\"><span class=\"s1\">Go to the Configure Security section and set a security group. <\/span><\/li>\n<li class=\"li1\"><span class=\"s1\">That\u2019s it. Now all you need to do is review and launch the AWS Linux instance. <\/span><\/li>\n<\/ol>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">It may look easy, but when it comes to launching multiple AWS instances, it will take a lot of time. <\/span><\/p>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">Now, let\u2019s do the same task using AWS CLI.<span class=\"Apple-converted-space\">\u00a0 <\/span>However, first, you need to install AWS CLI. <\/span><\/p>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">New IAM user creation using AWS CLI<\/span><\/p>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">Here, we will create a new IAM group and users. After that, we will add the users to the IAM group with the help of AWS CLI. <\/span><\/p>\n<ul class=\"ul1\" style=\"text-align: justify;\">\n<li class=\"li1\"><span class=\"s1\">Use create-group for new IAM group creation<\/span><\/li>\n<\/ul>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">\u201c$ aws iam create-group &#8211;group-name mygroup.\u201d<\/span><\/p>\n<ul class=\"ul1\" style=\"text-align: justify;\">\n<li class=\"li1\"><span class=\"s1\">Now, create a new user using create-user<\/span><\/li>\n<\/ul>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">\u201c$ aws iam create-user &#8211;user-name myuser.\u201d<\/span><\/p>\n<ul class=\"ul1\" style=\"text-align: justify;\">\n<li class=\"li1\"><span class=\"s1\">To add the newly created users to the group, you need to use the add-user-to-group command<\/span><\/li>\n<\/ul>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">\u201c$ aws iam add-user-to-group &#8211;user-name myuser &#8211;group-name myiamgroup\u201d<\/span><\/p>\n<ul class=\"ul1\" style=\"text-align: justify;\">\n<li class=\"li1\"><span class=\"s1\">Now, you need to allow a policy to the newly added users. For this, use the put-user-policy command<\/span><\/li>\n<\/ul>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">\u201c$ aws iam put-user-policy &#8211;user-name myuser &#8211;policy-name mypoweruserole &#8211;policy-document file:\/\/MyPolicyFile.jso\u201d<\/span><\/p>\n<ul class=\"ul1\" style=\"text-align: justify;\">\n<li class=\"li1\"><span class=\"s1\">Want to assign some access keys to the IAM users, use create-access-key<\/span><\/li>\n<\/ul>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">\u201c$ aws iam create-access-key &#8211;user-name myuser.\u201d<\/span><\/p>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">Starting AWS Linux instance with the help of AWS CLI<\/span><\/p>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">Remember that before starting the Linux instance, you need to create a security group and key pair.\u00a0<\/span><\/p>\n<ul class=\"ul1\" style=\"text-align: justify;\">\n<li class=\"li1\"><span class=\"s1\">Now use create-key-pair to create the key pair. <\/span><\/li>\n<\/ul>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">\u201c$ aws ec2 create-key-pair &#8211;key-name mykeypair &#8211;query &#8216;KeyMaterial&#8217; &#8211;output text &gt; mykeypair.pem\u201d<\/span><\/p>\n<ul class=\"ul1\" style=\"text-align: justify;\">\n<li class=\"li1\"><span class=\"s1\">Create a new security group and add the rules <\/span><\/li>\n<\/ul>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">\u201c$ aws ec2 create-security-group &#8211;group-name mysecurityg &#8211;description &#8220;My security group.\u201d<\/span><\/p>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">After that, you can launch the EC2 instance just by using run-instance command. <\/span><\/p>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">\u201c$ aws ec2 run-instances &#8211;image-id ami-09ae83da98a52eedf &#8211;count 1 &#8211;instance-type t2. micro &#8211;key-name MyKeyPair &#8211;security-group-ids sg-903004f8\u201d<\/span><\/p>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">You might think that it is quite complex than using the AWS management console. But the truth is this is very simple. You can obtain the same result just by combining all the commands and then save them in a script format. With this, you can alter the codes and execute them whenever you want. There is no need to start the process from the beginning. For more detail, you can check the official AWS CLI documentation.<\/span><\/p>\n<blockquote><p>OpsWork allows you to define and deploy a stack of components. Here\u2019s\u00a0<a href=\"https:\/\/www.whizlabs.com\/blog\/opswork-deployment-in-aws\/\" target=\"_blank\" rel=\"noopener noreferrer follow\" data-wpel-link=\"internal\">how OpsWork stack looks and how to implement it<\/a>!<\/p><\/blockquote>\n<h3 class=\"p1\" style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"How_to_Uninstall_AWS_CLI\"><\/span><span class=\"s1\">How to Uninstall AWS CLI? <\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">To uninstall AWS CLI, you need to understand how you had installed the program, using Pip or commands. However, there are simple steps and commands following which you can uninstall the program. Here is a snipped of the commands that can be used to uninstall the AWS CLI.<\/span><\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-74052 size-full\" src=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2019\/12\/install-aws-cli6.png\" alt=\"Uninstall AWS CLI\" width=\"379\" height=\"66\" srcset=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2019\/12\/install-aws-cli6.png 379w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2019\/12\/install-aws-cli6-300x52.png 300w\" sizes=\"(max-width: 379px) 100vw, 379px\" \/><\/p>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">Now, you know a lot of things about AWS CLI, its installation, and how to use it. The AWS Command Line Interface is an effective as well powerful tool that helps you in managing the cloud services. You can now give it a try. Remember that AWS CLI can perform much more than you have ever imagined. There is a lot of things that you can explore about AWS CLI by using AWS CLI documentation.<\/span><\/p>\n<blockquote><p><em>Want to know more about AWS CLI and it&#8217;s installation? Just start a discussion at\u00a0<a href=\"https:\/\/www.whizlabs.com\/forums\/\" target=\"_blank\" rel=\"noopener noreferrer follow\" data-wpel-link=\"internal\">Whizlabs Forum<\/a>\u00a0to get answers by the experts.<\/em><\/p><\/blockquote>\n<h4>Bottom Line<\/h4>\n<p><span class=\"s1\">AWS CLI is a tool that is used to monitor and manage all the AWS services and features from the client\u2019s terminal session. Besides AWS APIs or management console, it&#8217;s another way to control AWS services. So, here we have learned how to install and configure AWS CLI on different operating systems. We&#8217;ve also covered how to use and uninstall the AWS Command Line Interface. <\/span><\/p>\n<p>If you are an AWS professional working on AWS CLI, you may find a number of job opportunities for you to get ahead. Still, an AWS certification is always an add-on as it validates your skills and adds a credential in your resume. So, if you are aspiring to get recognition for your skills, check out our <a href=\"https:\/\/www.whizlabs.com\/aws-certifications\/\" target=\"_blank\" rel=\"noopener noreferrer\">AWS certification training courses<\/a> and start your preparation to get ahead in your career.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>There is no doubt that Amazon Web Services (AWS) is the leader in the cloud computing market. Besides, to provide its users with better and robust services, it regularly updates the platform with the latest innovations. AWS helps companies and corporates with different types of workloads. For example, massive data processing, development of apps, warehousing, and many more. But there is something more. AWS is much more than just the simple browser console. If you want to explore more about it, then it\u2019s time to learn about AWS Command Line Interface. If you don\u2019t know much about it, well, there [&hellip;]<\/p>\n","protected":false},"author":13,"featured_media":74058,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[4],"tags":[2910,2909,2907,2908],"class_list":["post-74046","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-aws-certifications","tag-aws-cli-configure","tag-aws-cli-documentation","tag-uninstall-aws-cli","tag-use-aws-cli"],"uagb_featured_image_src":{"full":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2019\/12\/install-aws-cli.png",600,315,false],"thumbnail":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2019\/12\/install-aws-cli-150x150.png",150,150,true],"medium":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2019\/12\/install-aws-cli-300x158.png",300,158,true],"medium_large":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2019\/12\/install-aws-cli.png",600,315,false],"large":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2019\/12\/install-aws-cli.png",600,315,false],"1536x1536":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2019\/12\/install-aws-cli.png",600,315,false],"2048x2048":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2019\/12\/install-aws-cli.png",600,315,false],"profile_24":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2019\/12\/install-aws-cli.png",24,13,false],"profile_48":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2019\/12\/install-aws-cli.png",48,25,false],"profile_96":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2019\/12\/install-aws-cli.png",96,50,false],"profile_150":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2019\/12\/install-aws-cli.png",150,79,false],"profile_300":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2019\/12\/install-aws-cli.png",300,158,false],"tptn_thumbnail":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2019\/12\/install-aws-cli-250x250.png",250,250,true],"web-stories-poster-portrait":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2019\/12\/install-aws-cli.png",600,315,false],"web-stories-publisher-logo":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2019\/12\/install-aws-cli.png",96,50,false],"web-stories-thumbnail":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2019\/12\/install-aws-cli.png",150,79,false]},"uagb_author_info":{"display_name":"Pavan Gumaste","author_link":"https:\/\/www.whizlabs.com\/blog\/author\/pavan\/"},"uagb_comment_info":2,"uagb_excerpt":"There is no doubt that Amazon Web Services (AWS) is the leader in the cloud computing market. Besides, to provide its users with better and robust services, it regularly updates the platform with the latest innovations. AWS helps companies and corporates with different types of workloads. For example, massive data processing, development of apps, warehousing,&hellip;","_links":{"self":[{"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/posts\/74046","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/comments?post=74046"}],"version-history":[{"count":4,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/posts\/74046\/revisions"}],"predecessor-version":[{"id":74071,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/posts\/74046\/revisions\/74071"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/media\/74058"}],"wp:attachment":[{"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/media?parent=74046"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/categories?post=74046"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/tags?post=74046"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}