make aws sso cli default profile name compatible with the profile name generated by aws sso web login
- Dominant language
- Python
- Stars
- 17.3k
- Forks
- 4.6k
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 13
Description
### Describe the bug
Maybe not necessarily a bug, but definitely an annoying misalignment.
Would very much like to have the generated aws cli profile obtained upon `aws sso login` (which is named in the form `AWSAdministratorAccess-1234567890`, i.e. [ROLE]-[ACCOUNT_NUMBER]) have the same profile name as the one obtained via "Command line or programmatic access" of the AWS SSO web login page (which is named in the form `1234567890_AWSAdministratorAccess`, i.e. [ACCOUNT_NUMBER]_[ROLE]).
This would enable a user to seamlessly use homegrown scripts without having to do weird handling of these profile, as to accommodate the scenario where different users could use different way of login in to SSO (aws cli vs web).
Alternatively, if backwards compatibility is required, would be nice to offer at least a way of configuring how this output should look - or implement this based on a configuration flag.
### Expected Behavior
when obtaining credentials via `aws sso` I would expect the resulting aws cli profile to have the form [ACCOUNT_NUMBER]_[ROLE], e.g. `1234567890_AWSAdministratorAccess` - which is the same that the AWS SSO web login generates under Option 2 of "Command line or programmatic access"
### Current Behavior
Current format is [ROLE]-[ACCOUNT_NUMBER], e.g. `AWSAdministratorAccess-1234567890`
### Reproduction Steps
`aws configure sso`
with a correct URL for one's account and a correct region and the other options (CLI default client Region, CLI default output format, CLI profile name) set to whatever it suggests (just press enter).
### Possible Solution
- compatibility with the profile generated by AWS SSO web login
- friction free usage
- could be done via config flag or some config value suggesting how to format the profile name
### Additional Information/Context
_No response_
### CLI version used
2.6.3
### Environment details (OS name and version, etc.)
Mac OS
Contributor guide
Assessment
This issue has not been assessed yet.