Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'amplify init' ignores specified profile #13326

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

musou1500
Copy link

@musou1500 musou1500 commented Oct 12, 2023

Description of changes

Following code seems wrong.

const chain = new CredentialProviderChain();
const processProvider = () => new ProcessCredentials({ profile: profileName });
chain.providers.push(processProvider);

This specifies credential provider to load credential of specified profile.
But chain.providers.push appends provider to defaultProviders.
consequently, specified provider runs after defaultProviders processed.

It causes use of unexpected credential (in my case, default profile was used to create stack instead of specified profile).

This PR fix it to not use defaultProviders.

Issue #3, if available

Description of how you validated changes

Checklist

  • PR description included
  • yarn test passes
  • Tests are changed or added
  • Relevant documentation is changed or added (and PR referenced)
  • New AWS SDK calls or CloudFormation actions have been added to relevant test and service IAM policies
  • Pull request labels are added

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@musou1500 musou1500 requested a review from a team as a code owner October 12, 2023 17:11
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.

None yet

1 participant