[…] keep the installation of AWS CLI isolated from everything else.
- create /.aws directory if it does not exist.
- create ~/.aws/.python-version and fill it with your favorite Python version
- cd into /.aws and pipenv install awscli
This will create a dedicated virtual environment and install AWS CLI there so that it’s exclusively available only from that place. Pipenv will know which virtual environment to use in this directory thanks to the Pipfile.lock file.
[…] make a symlink that will redirect any requests to aws command into our dedicated virtual environment.
- create ~/.aws/bin/ directory
- create ~/.aws/bin/aws file there with the following script inside