Install AWS CLI on Unix/Linux ubuntu; Through this tutorial, we will learn how to install aws amazon cli n Unix/Linux ubuntu system.
How to Install AWS CLI on Linux
Use the following steps to install and configure AWS CLI on Unix/Linux system:
- Installing the AWS CLI
- Generate Access Keys
- Configure AWS CLI
- Working with AWS CLI Tools
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 following 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"
Generate Access Keys
Generate the Access Key an Secrete Access Key from AWS Account using the following steps:
- 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
Then configure the CLI tools to connect with AWS account. So, execute the following command to set up the environment.
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]:
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:
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
In this tutorial, we have learned to install AWS CLI tools on Unix/Linux systems. Also with some basic examples for uses.