- Newest
- Most votes
- Most comments
For Linux server:
sudo apt install awscli
To install AWS CLI on Linux using PIP:
python3 -m pip install awscli
Or
python3 -m pip install awscliv2
awscliv2 --install
which aws
Add this path(output of previous step) to your PATH environment variable
========>> Edit:
For Ubuntu server:
Go to EC2 instance from console -> Actions -> Connect -> EC2 Instance Connect
sudo apt update
sudo apt install python3-pip
sudo python3 -m pip install awscli
aws cli would be installed at '/home/ubuntu/.local/bin'. Either add this path to your PATH variable or create a symlink as below:
cd /usr/local/bin
sudo ln -s /home/ubuntu/.local/bin/aws ./
Now you can run aws cli on the sever.
For Windows server:
Download AWS CLI MSI Installer and install it.
If you have any questions, refer Install or update the latest version of the AWS CLI
After you SSH into the server, refer to Install or update the latest version of the AWS CLI for instructions.
Its Ubuntu
No package awscli available
I installed at mine(Ubuntu ec2) and instructions that I mentioned for ubuntu worked fine. Can you tell me the AMI id which you'd have used while creating ubuntu EC2.
You need to follow these steps to install awscli on ubuntu ec2:
sudo apt update sudo apt install python3-pip sudo python3 -m pip install awscli
Let me know how it goes. If this helped then you may accept the answer, if not happy to help further.
When I ran the command from the root of the server, it gave me the following error "apt: invalid flag: install"
Relevant content
- Accepted Answerasked 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated 2 years ago
Thanks. When I run the above command, it installs it on my local machine. I want to install it on a remote server
I assume this is EC2 linux. Can you ssh to that server? if so, then ssh to that server and then install using above command. Or go to AWS management console, go to EC2 and click your instance, go to Actions and then Connect. Using above mentioned command, install it. Let me know if you have any questions.
If you intend to run all commands from your local machine to remote EC2 server, I'd suggest you to start looking at SSM. Here is step by step guide for that too, if you find that can help.
Let me take a look at mine.
I installed at mine(Ubuntu ec2) and instructions that I mentioned for ubuntu worked fine. Can you tell me the AMI id which you'd have used while creating ubuntu EC2.
You need to follow these steps to install awscli on ubuntu ec2:
sudo apt update sudo apt install python3-pip sudo python3 -m pip install awscli
Let me know how it goes. If this helped then you may accept the answer, if not happy to help further.