Unknow Error when setting up CodeWhisperer with VS Code.

0

The following is my AWS Toolkit Logs:

2023-04-30 16:46:50 [ERROR]: API response (oidc.ap-northeast-1.amazonaws.com /token): {
  name: 'InvalidGrantException',
  '$fault': 'client',
  '$metadata': {
    httpStatusCode: 400,
    requestId: 'dbbba2ef-e5f1-4b20-9d92-d7869b57e732',
    extendedRequestId: undefined,
    cfId: undefined
  },
  error: 'invalid_grant',
  error_description: 'Invalid grant provided',
  message: 'UnknownError'
}
2023-04-30 16:46:50 [ERROR]: aws.codeWhisperer.sso: Error: Failed to connect to IAM Identity Center [FailedToConnect]
	 -> InvalidGrantException: UnknownError

After entering my AWS access portal URL, got a pop-up, choose Copy Code and Proceed, I did get a message said AWS Toolkit for VSCode can now access your data.. However, VS Code still failed to connect to IAM Identity Center, and gave me the Error log above. What else I could do to fix the error?

Also, I have done the SSO token provider configuration at ~/.aws/config by casting aws configure sso. How about ~/.aws/credentials? should I leave it empty? currently it's my old IAM user ACCESS KEY ID & SECRET ACCESS KEY.

Thanks!

1 個回答
0
已接受的答案

If there is an error in the settings made with the aws configure sso command, the error message "Invalid grant provided" will appear.
Please make sure that the start URL and the region where SSO is located are specified correctly.

Please check here for a similar problem.
https://github.com/aws/aws-toolkit-vscode/issues/3064

profile picture
專家
已回答 1 年前
profile picture
專家
已審閱 23 天前
  • I have absolutely no idea what a SSO is... the sign up process was so arduous I was ready to throw in the towel, but then I got an email urging me to try AWS. Three more verification steps later, the last of which failed with:

    invalid_grant

    Invalid grant provided

    Agreeing to the permissions is not enough agreement; I actually have to troubleshoot a 4th or 5th level of authentication?

    Does anyone ever actually get to login and use the services?

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南