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

yawsso auto without cache #87

Closed linuxkd closed 4 months ago

linuxkd commented 1 year ago

When running yawsso auto if there is a previous AWS SSO cache, it will properly cause the login function to execute and renew the credentials. If there is no cache present, yawsso auto fails with the following error:

Can not find valid AWS CLI v2 SSO login cache in /user/profile/.aws/sso/cache for profile profile-name.

The AWS cache is removed automatically by homebrew updates of the awscli formula.

I suggest that if the cache is empty, but there is valid configuration for SSO, that yawsso auto calls aws sso login or similar, and then performs any needed actions to generate the v1 creds afterward.

victorskl commented 1 year ago

Um. Hear you! Agree that yawsso auto sub command flow is not robust there yet. Thanks for sharing your use case and suggesting. I will find sometime to explore.

linuxkd commented 1 year ago

Um. Hear you! Agree that yawsso auto sub command flow is not robust there yet. Thanks for sharing your use case and suggesting. I will find sometime to explore.

Thanks so much. If it would be helpful, I could attempt to implement the change as described if that is something you would be open to. I don't like to spend the time without knowing ahead of time if it would be welcome.

victorskl commented 1 year ago

Oh, Sure. PR always welcome, of course, pls.

victorskl commented 4 months ago

Sorry for the year long wait. The yawsso-1.2.0 out.!

pip install -U yawsso==1.2.0

This should work now..