ImportError: cannot import name api - Error Configuring aws_cli on centos 7

Error with import if fabric submodules. Commented from fabric import .. statements and added import fabric. Not sure, if this is originally an issue but, resolved my problem. Please refer my comment on my question.


The aws package in PyPI is not AWS's official CLI client but rather an older unmaintained library that used to interface with AWS and is now broken. AWS's official CLI client is awscli. Therefore if you pip install aws instead of pip install awscli you will run into the issue above.

The solution is to first run pip uninstall aws then run pip install awscli.