Install AWS CLI on WSL Ubuntu
Within Windows command prompt, AWS CLI does not provide autocomplete feature. According to AWS document, the feature is only available on “Unix-like systems”.
Luckily we have WSL (Windows Subsystem for Linux)on Windows 10. We can simply run AWS CLI from the WSL with autocomplete provided natively. Problem solved!
Here are the steps I took to get AWS CLI installed on my WSL Ubuntu.
Before we install AWS CLI package itself, we need to get Python package manager pip installed first.
Download pip install script. Notice I use –k here, this is because I am running this behind company proxy, the proxy changes HTTPS certificate to its own certificate. Without –k the command will fail. You can leave it out if you have direct Internet access
Next, the usual update apt command
Then we download and install Python minimal
Now we can install pip, the --trusted-host here is again due to the fact that I am downloading all these packages behind proxy.
Next, verify that pip is installed correctly.
Finally, we can now use pip to install the AWS CLI.
Verify the install by run aws --version.
Now let’s do something fun. Rather than enable the native AWS Completer, there is a pretty cool autocomplete tool call aws-shell. Here is its GitHub link.
To install aws-shell, run the pip install command below
Run aws-shell to get into the shell. The tool will not only prompt for parameters, but can also retrieve information from AWS and promote for completion, like existing stack name, Security Group Ids, etc.