Giter VIP home page Giter VIP logo

Comments (7)

zhaoyi0113 avatar zhaoyi0113 commented on August 31, 2024 1

issue is resolved after reinstall awscli. Thanks

from yawsso.

victorskl avatar victorskl commented on August 31, 2024

That's a bit odd, yes. Umm, would you mind use --trace to see any meaningful pointer to where the issue might be.

It is using Python built-in shutil.which module to find aws binary in your current shell env PATH. As last resort, you can use -b (or --bin) flag to point the absolute path of the AWS v2 binary location. I made it that for those folks using both v1 alias to aws and; v2 such that aws2.

Happy to provide more if I can see some trace output. Please mask any private info, if any.

from yawsso.

zhaoyi0113 avatar zhaoyi0113 commented on August 31, 2024

The output from --trace is:

2021-01-30 19:59:37,433 yawsso.cli   TRACE    Logging level: TRACE
2021-01-30 19:59:37,434 yawsso.cli   TRACE    args: Namespace(bin=None, command=None, debug=False, default=False, default_only=False, export_vars1=True, profiles=['00'], trace=True, version=False)
2021-01-30 19:59:37,434 yawsso.cli   TRACE    AWS_CONFIG_FILE: /Users/joey/.aws/config
2021-01-30 19:59:37,434 yawsso.cli   TRACE    AWS_SHARED_CREDENTIALS_FILE: /Users/joey/.aws/credentials
2021-01-30 19:59:37,434 yawsso.cli   TRACE    AWS_SSO_CACHE_PATH: /Users/joey/.aws/sso/cache
2021-01-30 19:59:37,434 yawsso.cli   TRACE    Cache SSO JSON files: ['/Users/joey/.aws/sso/cache/c9f2ab5ada1a3d25651c848225b644f863a38826.json', '/Users/joey/.aws/sso/cache/botocore-client-id-ap-southeast-2.json']
2021-01-30 19:59:37,872 yawsso.cli   ERROR    Required AWS CLI v2. Found aws-cli/1.18.0 Python/3.7.4 Darwin/20.2.0 botocore/1.12.253

Do you see anything wrong in the output?

from yawsso.

victorskl avatar victorskl commented on August 31, 2024

Do you see anything wrong in the output?

Nop.

Probably related with how you setup your shell environment PATH and Python, I reckon. Show output of these commands:

yawsso --version
aws --version
python -V
python3 -V
pip -V
pip3 -V

which yawsso
which aws
which python
which python3
which pip
which pip3

from yawsso.

zhaoyi0113 avatar zhaoyi0113 commented on August 31, 2024

Below is the output.

Joey-Zeller:k8s joey$ yawsso --version
yawsso 0.6.1
Joey-Zeller:k8s joey$ aws --version
aws-cli/2.1.22 Python/3.7.4 Darwin/20.2.0 exe/x86_64 prompt/off
Joey-Zeller:k8s joey$ python -V
Python 3.7.4
Joey-Zeller:k8s joey$ python3 -V
Python 3.7.4
Joey-Zeller:k8s joey$ pip -V
pip 21.0 from /Users/joey/.pyenv/versions/3.7.4/lib/python3.7/site-packages/pip (python 3.7)
Joey-Zeller:k8s joey$ pip3 -V
pip 20.0.2 from /usr/local/lib/python3.7/site-packages/pip (python 3.7)

Joey-Zeller:k8s joey$ which python
/Users/joey/.pyenv/shims/python
Joey-Zeller:k8s joey$ which python3
/Users/joey/.pyenv/shims/python3
Joey-Zeller:k8s joey$ which pip
/Users/joey/.pyenv/shims/pip
Joey-Zeller:k8s joey$ which pip3
/usr/local/bin//pip3

from yawsso.

victorskl avatar victorskl commented on August 31, 2024

Please also include output of

which yawsso
which aws
ls -l $(which aws)
eval $(which aws) --version

Also try which aws output path directly with -b flag. Example:

yawsso -b $(which aws) -p 00 -e

from yawsso.

zhaoyi0113 avatar zhaoyi0113 commented on August 31, 2024
Joey-Zeller:entity joey$ which yawsso
/Users/joey/.pyenv/shims/yawsso

$ which aws
/usr/local/bin//aws

Joey-Zeller:entity joey$ ls -l $(which aws)
lrwxr-xr-x  1 root  staff  22 30 Jan 14:47 /usr/local/bin//aws -> /usr/local/aws-cli/aws

Joey-Zeller:entity joey$ eval $(which aws) --version
aws-cli/2.1.22 Python/3.7.4 Darwin/20.2.0 exe/x86_64 prompt/off

Joey-Zeller:entity joey$ yawsso -b $(which aws) -p 00 -e
No section: 'profile 00'

I see that the command yawsso -b $(which aws) -p 00 -e works but when I run it without -b, it complains about the aws version.

from yawsso.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.