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

AWS SSO: Failed to get profile credentials #12330

Closed
2 tasks done
adcanis opened this issue Mar 29, 2023 · 1 comment
Closed
2 tasks done

AWS SSO: Failed to get profile credentials #12330

adcanis opened this issue Mar 29, 2023 · 1 comment
Labels
bug Something isn't working duplicate If marked with duplicate, issue will be closed & original will be added for traceability platform Issues tied to the general CLI platform

Comments

@adcanis
Copy link

adcanis commented Mar 29, 2023

How did you install the Amplify CLI?

npm

If applicable, what version of Node.js are you using?

19.6.0

Amplify CLI Version

11.0.3

What operating system are you using?

Mac

Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.

no manual changes made

Describe the bug

#12174 still persisting. This appears to be happening after the account exceeds the 8hr expiration. Attempts to re-login return 1 of 2 errors.

Failed to get profile credentials. Unexpected token A in JSON at position 0

This error is on amplify init

There was an error pulling the backend environment dev. The provided token has expired.

This is every time an amplify command is ran after aws sso login --profile <profile> to re-login.

Following #7361 clearing the cookies on the start page, emptying .aws/sso/cache does not work. This is currently effecting 9 accounts

Expected behavior

re-login should refresh token and commands should work

Reproduction steps

  1. from this doc, enable IAM identity center and create an org

  2. add an account under "Multi-account permissions" > "AWS Accounts"

  3. create a permissions set

  4. create a group with permission set

  5. create a user (e.g. "adcanis"), assign to group

  6. grant access to the account added in step 2

  7. log in using the "start url" (e.g. https://xxxxxx.awsapps.com/start)

  8. following the instructions in Command line or programmatic access found on the "start url" using aws configure sso and following "option 2" to add credentials to .aws/credentials

  9. run aws sso login --profile <profile name>

  10. initialize a new amplify project with amplify init

  11. observe first error

  12. if session has expired, re-login via aws sso login --profile <profile name>

  13. run amplify push -y for example and observe second error

Project Identifier

2274433f-fcef-4f58-baf3-6ebb90e99a30

Log output

# Put your logs below this line


Additional information

No response

Before submitting, please confirm:

  • I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
  • I have removed any sensitive information from my code snippets and submission.
@adcanis adcanis added the pending-triage Issue is pending triage label Mar 29, 2023
@josefaidt
Copy link
Contributor

Hey @adcanis thanks for raising this and apologies for the confusion! As mentioned in #12174 the fix is pending-release. I'll mark this as a duplicate and close in favor of tracking the existing item, but will update #12174 once this is released

@josefaidt josefaidt closed this as not planned Won't fix, can't repro, duplicate, stale Mar 29, 2023
@josefaidt josefaidt added bug Something isn't working platform Issues tied to the general CLI platform duplicate If marked with duplicate, issue will be closed & original will be added for traceability and removed pending-triage Issue is pending triage labels Mar 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate If marked with duplicate, issue will be closed & original will be added for traceability platform Issues tied to the general CLI platform
Projects
None yet
Development

No branches or pull requests

2 participants