Follow the steps given below to setup AWS CLI on a RHEL 7 ec2 instance.
Install pip using the following command.
curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"
sudo python get-pip.py
Install AWS CLI using pip
sudo pip install awscli
Once installed, set up the CLI using the following command.
If you have attached a
role to your instance, you need not enter the
access key and
secret key. You just need to enter the region name and output format.