aws / aws-toolkit-jetbrains

AWS Toolkit for JetBrains - a plugin for interacting with AWS from JetBrains IDEs
https://plugins.jetbrains.com/plugin/11349-aws-toolkit
Apache License 2.0
753 stars 219 forks source link

RDS datasource failed with error: Token refresh started before session initialized. #4145

Closed vhnguyenae closed 4 months ago

vhnguyenae commented 7 months ago

My Environment

Question I failed to setup a Datasource for Amazon Aurora MySQL with the error below: "Token refresh started before session initialized." Google search doesn't give back much result that is related 😅 I'm not sure about the field Secret Name/ARN though. What's the correct syntax ?

I also tried to to specify the version 2.11.4 (which is from the Engine version of my RDS Aurora) but still get the same error.

Does anyone encounter the same issue before? How can I fix this? Thanks in advance for your help.

image
moduspwnens commented 7 months ago

I'm new to DataGrip, but I think I just ran into and solved this issue on my end.

It seems the AWS Toolkit wants to manage its own temporary credentials outside the scope of the AWS CLI. In the main DataGrip window, at the bottom-right corner, you should see a notice about which AWS credentials are in use. For me, there was also a warning icon.

Screenshot 2024-02-27 at 9 54 16 AM

By clicking through that menu, it initiated a separate IAM Identity Center sign-in session in my web browser, and then stored the credential. The warning icon then disappeared, and I was able to connect to my RDS instance.

vhnguyenae commented 7 months ago

thanks for the help, but it still doesn't work for me 😅 , I tried it but now I got an Operation TimeOut instead 😅

image

But the DataSource that I created for DynamoDb and Athena worked fine though 🤔 . My RDS instance is in a VPC though, maybe that's the issue?

vchikoti1998 commented 5 months ago

This has been addressed in #4278

vchikoti1998 commented 4 months ago

This issue got released in AWS Toolkit version 3.2

vhnguyenae commented 4 months ago

@vchikoti1998 I updated the AWS Toolkit to version 3.4 but I still got the same error message :(