How to Setup AWS CLI on RHEL 7 ec2 server

Follow the steps given below to setup AWS CLI on a RHEL 7 ec2 instance.

  1. Install pip using the following command.

     curl "" -o ""
     sudo python
  2. Install AWS CLI using pip

     sudo pip install awscli
  3. Once installed, set up the CLI using the following command.

      aws configure

    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.