Forum Discussion

AWalden_185388's avatar
AWalden_185388
Icon for Nimbostratus rankNimbostratus
Nov 29, 2018
Solved

F5 Bigip LTM v14 AWS CLI

I'm working on upgrading to bigip ltm v14 on the aws marketplace. My understanding is that v14 has the aws cli installed. I'm attempting to use the aws cli on v14 by running the following /opt/aws/awscli-1.10.26/bin/aws. When I do this I get

 

"Traceback (most recent call last): File "/opt/aws/awscli-1.10.26/bin/aws", line 19, in import awscli.clidriver ImportError: No module named awscli.clidriver"

 

Is there documentation of using the aws cli on the bigip for v14?

 

  • We were able to execute by setting the following environment variables.

     

    export AWS_HOME=/opt/aws/awscli-1.10.26

     

    export PATH=$PATH:$AWS_HOME/bin

     

    export PYTHONPATH=$AWS_HOME/lib/python2.6/site-packages:/opt/aws/awscli- 1.10.26

     

4 Replies

  • We were able to execute by setting the following environment variables.

     

    export AWS_HOME=/opt/aws/awscli-1.10.26

     

    export PATH=$PATH:$AWS_HOME/bin

     

    export PYTHONPATH=$AWS_HOME/lib/python2.6/site-packages:/opt/aws/awscli- 1.10.26

     

    • AWalden_185388's avatar
      AWalden_185388
      Icon for Nimbostratus rankNimbostratus

      To add-on to your answer. There are two typos in the export PYTHONPATH at the awscli- and 1.10.26// Also a more permanent fix is to add what you suggested to the end of the ~/.bashrc file.

       

      For the linux noobs

       

      1. vim ~/.bashrc
      2. hit i for insert
      3. copy and paste the following three lines to the end of the file

         

        export AWS_HOME=/opt/aws/awscli-1.10.26

         

        export PATH=$PATH:$AWS_HOME/bin

         

        export PYTHONPATH=$AWS_HOME/lib/python2.6/site-packages:/opt/aws/awscli-1.10.26/lib64/python2.6/site-packages

         

      4. hit Esc and type :wq! then hit enter.

         

      5. source ~/.bashrc
      6. aws help
  • too late for this thread but for anyone coming to this after, python just switched to 2.7.

    Just swap out "python2.6" in export to "python2.7" and should work again.