Skip to content

fix: try the named profile before the EC2 instance role - #175

Merged
sebsto merged 1 commit into
mainfrom
fix/profile-before-instance-role
Nov 19, 2026
Merged

sebsto merged 1 commit into
mainfrom
fix/profile-before-instance-role

Conversation

@sebsto

@sebsto sebsto commented Nov 19, 2026

Copy link
Copy Markdown
Owner

--profile now wins over the EC2 instance role.

Before, on an EC2 host the instance role answered first, so the profile was never used and the wrong account's Parameter Store was read. With a profile name, the profile providers now come first and the instance role is the last choice. Without a profile name, the order is unchanged.

Closes #171

Tests: swift test passes (210). I did not verify it against a real SSO profile on EC2; a quick check with -p <sso-profile> on an EC2 Mac would confirm it.

On an EC2 host the instance role answered first, so --profile was ignored
and the wrong account's Parameter Store was read. With a profile name, the
profile providers now come before the instance role. Without one, the
order is unchanged.

Fixes #171
@sebsto

sebsto commented Nov 19, 2026

Copy link
Copy Markdown
Owner Author

tested on EC2 Mac and it works

@sebsto
sebsto merged commit 6be5a76 into main Nov 19, 2026
2 checks passed
@sebsto
sebsto deleted the fix/profile-before-instance-role branch November 19, 2026 11:57
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.

--profile is ignored on EC2: instance role wins over the profile

1 participant