Skip to content

fix: honor --profile flag for AWS credential and config loading#847

Open
houseofeng wants to merge 1 commit intopeak:masterfrom
houseofeng:fix-profile-flag-bug
Open

fix: honor --profile flag for AWS credential and config loading#847
houseofeng wants to merge 1 commit intopeak:masterfrom
houseofeng:fix-profile-flag-bug

Conversation

@houseofeng
Copy link
Copy Markdown

  • Allow --profile to use AWS credential chain instead of forcing ~/.aws/credentials
  • Add Profile field to session.Options for proper shared config loading
  • Maintains backward compatibility for --credentials-file usage

Resolves issue where --profile flag was ignored and application always used default profile from shared config if no credentials file was specified.

- Allow --profile to use AWS credential chain instead of forcing ~/.aws/credentials
- Add Profile field to session.Options for proper shared config loading
- Maintains backward compatibility for --credentials-file usage

Resolves issue where --profile flag was ignored and application
always used default profile from shared config.
@houseofeng houseofeng requested a review from a team as a code owner November 2, 2025 21:12
@houseofeng houseofeng requested review from ilkinulas and seruman and removed request for a team November 2, 2025 21:12
@houseofeng
Copy link
Copy Markdown
Author

Looking at the output of the failed integration test, I don't believe that has to do with the code changes. Please let me know if I'm mistaken.

terryrankine added a commit to terryrankine/s5cmd that referenced this pull request Mar 18, 2026
Remove Profile from the credential-file-only branch so --profile alone
uses the SDK's shared config resolution (SSO, assume-role, etc.) instead
of being forced through NewSharedCredentials. Pass Profile into
session.Options so the SDK picks up the correct profile. (peak#847)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant