aws-cli icon indicating copy to clipboard operation
aws-cli copied to clipboard

Enabling the configure command to set a different profile as the default profile.

Open Bue-von-hon opened this issue 1 year ago • 1 comments

Describe the feature

It would be useful for users to be able to use another profile they already have defined as their default profile, so they don't have to set up duplicate keys.

Use Case

Because we use separate profiles, we always have to manually change the default profile for the programs we run in the IDE.

It would be very useful to be able to explicitly specify a default profile, so that we don't have to specify key values twice. We can use environment variables to specify a session-dependent profile, but this is a workaround.

Proposed Solution

[default]
region = ap-northeast-2
output = json
profile = some_other_profile

Other Information

No response

Acknowledgements

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

CLI version used

2.17.48

Environment details (OS name and version, etc.)

macOS(latest)

Bue-von-hon avatar Sep 12 '24 08:09 Bue-von-hon

Thanks for the feature request. Using environment variables is probably your best bet. If assuming a role then you could use source_profile, documented here, which you could set using the aws configure set command.

Otherwise I think this feature request overlaps with https://github.com/aws/aws-cli/issues/8002. We may want to consolidate these, and clarify the possible use cases/implementations that would not break any current functionality. I'm not sure that specifying another profile within the default profile is the best approach, but there may be better ways to extend configurations between profiles.

tim-finnigan avatar Sep 13 '24 16:09 tim-finnigan