aws / aws/aws-cli

When using `aws login` profiles can be confused

Open
#9,978 3 comments 6 reactions 0 assignees View on GitHub
feature-request identitystore p3
Dominant language
Python
Stars
17.3k
Forks
4.6k
Avg merge
1d 2h
Merged PRs (30d)
13

Description

### Describe the feature

When running`aws login --profile xxxx` the .aws/config files gets updated properly with the proper login_session, but the next run a different role/aws account can be selected by mistake

### Use Case

It would be nice to have a --auto-select option.

Example:

Say I run:
`aws login --profile profile1`

Then in the browser I select role-1 in AWS account 123456789012

The .aws/config file gets updated with

`login_session = arn:aws:sts:123456789012:assumed-role/role-1/user`

the next time I run

`aws login --profile profile1`

When the UI opens I would like to see the role in the login_session either preselected or automatically get it, so not a different role/aws account can be selected by mistake.

### Proposed Solution

Maybe introduce a new arg called --auto-select

### Other Information

_No response_

### Acknowledgements

- [ ] I may be able to implement this feature request
- [ ] This feature might incur a breaking change

### CLI version used

2.32.13

### Environment details (OS name and version, etc.)

Mac Os

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.