How to Install AWS CLI Tools in Linux

Channel: Linux
Abstract: This will prompt for for AWS Access Key ID and Secret Access Key created in above step. AWS Access Key ID [None]you can manage multiple AWS service vi

The AWS Command Line Interface (CLI) is the unified tools for managing AWS services. Using this tool, you can manage multiple AWS service via command line and automate them using scripts.

You can install and configure AWS command line utility on your Linux system. This tutorial will help you with the installation of AWS command line utility and configure it.

Installing the AWS CLI

AWS CLI tools package are available under the default repositories. You can use the package manager for installing AWS CLI on Linux systems.

Choose one of the below command to install:

  • Ubuntu and Debian Systems
    sudo apt install awscli 
    
  • Fedora and CentOS 8
    sudo dnf install awscli 
    
  • CentOS 7 and Scientific Linux
    sudo yum install awscli 
    
  • Other the the package manager, you can directly install using source code. This will install the latest awscli version on any Linux platform.
    curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" 
    unzip awscliv2.zip 
    sudo ./aws/install 
    
Generate Access Keys

Generate the Access Key an Secrete Access Key to your AWS Account

  • Head to AWS Security Credentials.
  • Expand option Access keys (access key ID and secret access key)
  • Click the button Create New Access Key
  • Copy the access key ID and secret access key and save to safe place
Configure AWS CLI

Next, configure the cli tools to connect with your AWS account. Just execute below command to setup environment.

aws configure 

This will prompt for for AWS Access Key ID and Secret Access Key created in above step.

AWS Access Key ID [None]: ABCDEFXXXXXXXXDKKDFJ
AWS Secret Access Key [None]: 3SDFskjf8KDfjksdf9sdfjsdkfjkKSDKSJFKD
Default region name [None]: us-east-1
Default output format [None]:

That’s it. Your system is configured with the AWS CLI tools.

Working with AWS CLI Tools

AWS CLI tools provide your option to manage multiple service via the command line. To get the help about uses type:

aws help 

Here is the few example commands to work with aws cli:

  • List all the instances
    aws ec2 describe-instances
    
  • List instances from other zone
    aws ec2 describe-instances --region=us-west-1
    
  • List S3 buckets
    aws s3 list
    
Conclusion

In this tutorial, you have learned to install AWS ClI tools on Unix/Linux systems. Also with some basic examples for uses.

Ref From: tecadmin

Related articles