victorskl / yawsso

Yet Another AWS SSO - sync up AWS CLI v2 SSO login session to legacy CLI v1 credentials
MIT License
302 stars 26 forks source link

Error: "no section: 'default' #85

Closed diranged closed 1 year ago

diranged commented 1 year ago

Testing this out, and we're seeing this error when we try to run it:

% ./.venv3/bin/yawsso                  
No section: 'default'
% ./.venv3/bin/yawsso --version
yawsso 1.1.0
% ./.venv3/bin/yawsso --debug  
2023-03-10 15:53:38,681 yawsso       DEBUG    Logging level: DEBUG
2023-03-10 15:53:38,928 yawsso       DEBUG    aws-cli/2.11.0 Python/3.11.2 Darwin/22.3.0 source/arm64 prompt/off
2023-03-10 15:53:38,928 yawsso       DEBUG    Current named profiles in config: ['default', 'eng']
2023-03-10 15:53:38,928 yawsso       DEBUG    Syncing named profiles: ['default', 'eng']
2023-03-10 15:53:38,929 yawsso       ERROR    No section: 'default'
% 

Any thoughts?

victorskl commented 1 year ago

Do you by chance having like this in your ~/.aws/config?

[profile default]
region=us-west-2
output=json

For default, you would not need profile prefix in section config.

ditto named profile -- https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html

[default]
region=us-west-2
output=json
diranged commented 1 year ago

So I did not have a default profile in there at all... but the problem seems to have gone away?