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

Automatically log in when sync fails #60

Closed remmelt closed 1 year ago

remmelt commented 2 years ago

Hello and thanks for this useful tool!

Our use case is like this:

yawsso --profile x

# if exit code != 0
yawsso --login --profile x

It would be awesome if this could be a single command, doing a sync if possible, and doing login only if necessary.

How does this sound to you?

victorskl commented 2 years ago

Ah, right! Can't promise but I can explore the use case. If there is not much implication to existing use cases then it should do, yes. :)

remmelt commented 2 years ago

It would be way nicer than my bash script 😄

Thanks for your consideration!

victorskl commented 1 year ago

This is avail as of rc3 under auto subcommand. pip install -U yawsso==1.0.0rc3

Usage: yawsso auto --profile dev

https://github.com/victorskl/yawsso/blob/main/README.md#auto-login-then-sync