aws-shell
aws-shell copied to clipboard
Cannot use profiles on windows
When using the default profile, the shell works, but trying to specify a profile like aws-shell --profile dev results in:
Creating doc index in the background. It will be a few minutes before all documentation is available.
aws> ec2 describe-instances
Traceback (most recent call last):
File "c:\python27\lib\runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "c:\python27\lib\runpy.py", line 72, in _run_code
exec code in run_globals
File "C:\Python27\Scripts\aws-shell.exe\__main__.py", line 9, in <module>
File "c:\python27\lib\site-packages\awsshell\__init__.py", line 70, in main
shell.run()
File "c:\python27\lib\site-packages\awsshell\app.py", line 319, in run
p = self._popen_cls(full_cmd, shell=True, env=self._env)
File "c:\python27\lib\subprocess.py", line 710, in __init__
errread, errwrite)
File "c:\python27\lib\subprocess.py", line 958, in _execute_child
startupinfo)
TypeError: environment can only contain strings
How did you install the shell?
Using PIP.
Tried upgrading dependencies: awscli-1.13.0 boto3-1.4.8 botocore-1.8.3
Still get same result.
The hacky fix is on awsshell\app.py:515 make it look like:
self._env[str('AWS_DEFAULT_PROFILE')] = new_profile_name