-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Closed as not planned
Labels
bugThis issue is a bug.This issue is a bug.needs-triageThis issue or PR still needs to be triaged.This issue or PR still needs to be triaged.
Description
Describe the bug
When using the aws login command, it automatically updates the ~/.aws/config file with a new section. The command forces the format [profile <name>] including the "profile " prefix.
While this format is technically valid for the CLI, the prefix is redundant. The CLI works correctly with the simpler [<name>] format in the config file. Including the prefix by default causes ambiguity or warnings when this config file is parsed by other tools (such as the AWS SDK for Java).
Regression Issue
- Select this option if this issue appears to be a regression.
Expected Behavior
The aws login command should generate the configuration entry without the "profile " prefix in ~/.aws/config.
Expected format:
[test-profile]
login_session = arn:aws:sts::000000000000:assumed-role/example/user@example.com
region = us-east-1
Current Behavior
The command currently generates the configuration entry with the "profile " prefix.
Current result:
[profile test-profile]
login_session = arn:aws:sts::000000000000:assumed-role/example/user@example.com
region = us-east-1
Reproduction Steps
- Configure a profile for SSO or execute a login command that writes to the config.
aws login --profile test-profile- Open the
~/.aws/configfile. - Observe that the section header is generated as [profile test-profile] instead of [test-profile].
Possible Solution
No response
Additional Information/Context
No response
CLI version used
2.32.2
Environment details (OS name and version, etc.)
macOS Tahoe 26.0.1
Metadata
Metadata
Assignees
Labels
bugThis issue is a bug.This issue is a bug.needs-triageThis issue or PR still needs to be triaged.This issue or PR still needs to be triaged.