Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot finish configure step #13

Closed
strannik19 opened this issue Oct 23, 2019 · 7 comments
Closed

cannot finish configure step #13

strannik19 opened this issue Oct 23, 2019 · 7 comments

Comments

@strannik19
Copy link

Ran into a problem when configuring awssso:

$ awssso configure
[?] URL: https://########.awsapps.com/start/
[?] AWS CLI profile: profile_name
[?] Username: username@domain.com
[?] Password: *****************
Traceback (most recent call last):
File "/usr/local/bin/awssso", line 10, in
sys.exit(main())
File "/usr/local/lib/python3.7/site-packages/awssso/cli.py", line 222, in main
func(args)
File "/usr/local/lib/python3.7/site-packages/awssso/cli.py", line 79, in configure
instances = sso.get_instances()
File "/usr/local/lib/python3.7/site-packages/awssso/ssoclient.py", line 18, in get_instances
return [i for i in r.json()['result'] if i['applicationName'] == 'AWS Account']
KeyError: 'result'

@strannik19
Copy link
Author

r = self._s.get(f'https://portal.sso.{self._region}.amazonaws.com/instance/appinstances')
this just gets a 401 error

@wnkz
Copy link
Owner

wnkz commented Oct 24, 2019

This likely due to a problem in fetching the token needed for this API. Can you share information about:

  • OS
  • Python (System, Homebrew, pyenv, ...)
  • Installation method (pip, pipenv, pipx, ...)
  • Chrome and ChromeDriver versions

@strannik19
Copy link
Author

macOS 10.14.6
Homebrew Python 3.7.4
installation method: pip
chromedriver: 77.0.3865.40
Chrome: 77.0.3865.120

@strannik19
Copy link
Author

the awssso authn-token entry exists in my keychain and its populated

@wnkz
Copy link
Owner

wnkz commented Oct 24, 2019

Does this happen all the time or was this a one time error ? In what region is AWS SSO deployed ?

You can specify this with --region option or with environment variables AWSSSO_REGION, AWS_DEFAULT_REGION otherwise it defaults to eu-west-1

@strannik19
Copy link
Author

when I directly pass in --region it works. thanks. haven't tried the env variables yet.
I was assuming this would come from the profile that is being used, as I have many different profiles in different regions, and always having to specify which one can be hard to remember.
any which way, thanks, closing this issue!

@wnkz
Copy link
Owner

wnkz commented Oct 25, 2019

@strannik19 yes, in the current version there is a default value to the region parameter which overrides the one in the configuration ; this will get fixed in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants