aws-samples / amazon-q-slack-gateway

MIT No Attribution
79 stars 28 forks source link

Receive "Internal Server Error" message when "Sign in to Amazon Q" #58

Closed NguyenAnhTuan1912 closed 2 weeks ago

NguyenAnhTuan1912 commented 3 weeks ago

Important: Bug reports submitted here should relate specifically to the open source sample amazon-q-slack-gateway project. Do not submit bugs related to the Amazon Q service itself.
If your issue relates to Amazon Q setup, user provisioning, document ingestion, accuracy, or other aspects of the service, then first check the Amazon Q documentation, and then reproduce the problem using the Amazon Q console web experience before engaging AWS support directly. Thank you.

Describe the bug The redirect url of Lambda Function and API Gateway aren't working. It throws "Internal Server Error" message (I have attached a screenshot below).

To Reproduce Steps to reproduce the behavior: I did all the instruction in "Prerequisites" and the setup step-by-step.

Expected behavior When I click "Sign In to Amazon Q", the Lambda should return OK, that mean my user had logged in Amazon Q and can communicate with Amazon Q Bot in Slack.

Screenshots I can add Q App to my Slack Workspace image

When I click "Sign in to Amazon Q" image

And logs image

P/s: cloudformation's parameters that I assigned in are: image

Additional context

NguyenAnhTuan1912 commented 3 weeks ago

The issue may raised with this exchangeIdPTokenForIAMSessionCreds function image

Here is the logs image

The code is fail to get response from getSSOOIDCClient function, you can see in the image.

NguyenAnhTuan1912 commented 2 weeks ago

I've solved this problem. By disable IAM Identity Center in old region and enable the new one in the same region with Amazon Q App (us-east-1 or us-west-2).