Closed alexbilbie closed 4 years ago
Howdy!
I was able to replicate the issue and will dig into finding a solution
Thanks for bringing this to our attention!
Was this addressed in https://github.com/trek10inc/awsume/commit/3ed8fad276feb64192c95464df58ea13e8c19213?
@c-bandy Yeah, that was the commit that fixed it
I deployed the fix to 4.1.5, thanks again for the bug report!
This seems to have caused another issue, because auto doesn't work for me anymore
$ awsume profile -a
Traceback (most recent call last):
File "/usr/local/bin/awsumepy", line 10, in <module>
sys.exit(main())
File "/usr/local/lib/python3.7/site-packages/awsume/awsumepy/main.py", line 29, in main
run_awsume(sys.argv[1:])
File "/usr/local/lib/python3.7/site-packages/awsume/awsumepy/main.py", line 17, in run_awsume
awsume.run(argument_list)
File "/usr/local/lib/python3.7/site-packages/awsume/awsumepy/app.py", line 247, in run
credentials = self.get_credentials(args, profiles)
File "/usr/local/lib/python3.7/site-packages/awsume/awsumepy/app.py", line 202, in get_credentials
credentials = self.plugin_manager.hook.get_credentials(config=self.config, arguments=args, profiles=profiles)
File "/usr/local/lib/python3.7/site-packages/pluggy/hooks.py", line 286, in __call__
return self._hookexec(self, self.get_hookimpls(), kwargs)
File "/usr/local/lib/python3.7/site-packages/pluggy/manager.py", line 92, in _hookexec
return self._inner_hookexec(hook, methods, kwargs)
File "/usr/local/lib/python3.7/site-packages/pluggy/manager.py", line 86, in <lambda>
firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
File "/usr/local/lib/python3.7/site-packages/pluggy/callers.py", line 208, in _multicall
return outcome.get_result()
File "/usr/local/lib/python3.7/site-packages/pluggy/callers.py", line 80, in get_result
raise ex[1].with_traceback(ex[2])
File "/usr/local/lib/python3.7/site-packages/pluggy/callers.py", line 187, in _multicall
res = hook_impl.function(*args)
File "/usr/local/lib/python3.7/site-packages/awsume/awsumepy/default_plugins.py", line 470, in get_credentials
user_session, role_session = get_assume_role_credentials_mfa_required(config, arguments, profiles, target_profile)
File "/usr/local/lib/python3.7/site-packages/awsume/awsumepy/default_plugins.py", line 387, in get_assume_role_credentials_mfa_required
if arguments.auto_refresh and os.environ.get('AWS_PROFILE').startswith('autoawsume-'):
AttributeError: 'NoneType' object has no attribute 'startswith'```
Fix pushed to 4.1.6, if you still have any issues feel free to reopen the issue or open a new issue, thanks!
Hello,
I have a few profiles configured two of which are called
platform-production-admin
andshared-services-admin
.Earlier today I ran
. awsume shared-services-admin -a
(no issues).A few hours later (in the same terminal window) I've typed
. awsume platform-production-admin -a
and I see this output:The traceback is automatically output into the terminal after hitting enter on the
. awsume platform-production-admin -a
command.How can I stop this from happening?
If it helps at all I'm on macOS 10.14.5, I installed Python via Homebrew and
awsume
via pip