linaro-its/aws2-wrap

Remove uneccessary profile in `aws sso login`

Closed this issue · 2 comments

I just got this message:

❯ docker --context dagster-ecs compose --project-name containers up

Please login with 'aws sso login --profile=sandbox'
ProcessProviderExecutionError: error in credential_process
caused by: exit status 1

Which made me think about:

https://ben11kehoe.medium.com/you-only-need-to-call-aws-sso-login-once-for-all-your-profiles-41a334e1b37e

Maybe the message should just be:

Please login with 'aws sso login'
ProcessProviderExecutionError: error in credential_process
caused by: exit status 1

Do you agree?

Hi

I agree that you can sign in once for all of your profiles. However, it is not necessarily sufficient to just run aws sso login as that requires the default profile to be set up for SSO which may not be the case. It certainly isn't on my setup.

That is why the script provides the full command which includes the specific profile being referenced at the time of running. The user can then just copy/paste the command.

I hope that makes sense.

Thanks for the reply!

that requires the default profile to be set up for SSO which may not be the case

I don't have a default setup either. I see what you mean, this is what you get without it:

Missing the following required SSO configuration values: sso_start_url, sso_region. To make sure this profile is properly configured to use SSO, please run: aws configure sso

I tried this before and I didn't get this error, probably because my profile was set in my env. It's probably not safe to assume the profile that ran aws2-wrap has a profile set either, for example in a new shell. Closing!