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
744 stars 213 forks source link

How do I specify ap-northeast-1 as the region to authenticate in CodeWhisperer reconnections? #3662

Closed WhiteRaven777 closed 1 year ago

WhiteRaven777 commented 1 year ago

Your Environment

Question

We have a fee-based contract for the use of Amazon CodeWhisperer on AWS. We use AWS IAM Identify Center (formerly AWS SSO) for user authentication in AWS. The AWS IAM Identify Center we use is located in the Tokyo@Japan (ap-northeast-1) region.

The above configuration is possible in AWS Toolkit For JetBrains 1.67-231 and works fine the first time. We can actually see CodeWhisperer in action.

However, the situation is different if you need to reconnect, e.g. because your session is to expire. Oh dear, when reconnecting from the Toolkit, it always tries to connect to the AWS IAM Identify Centre by specifying us-east-1.

Even if 'ap-northeast-1' is set for 'sso_region' in the ~/.aws/config file, AWS Toolkit will not follow it and only go to 'us-east-1' for connections. Whenever the IDE opens a browser, it is forced to access 'https://device.sso.us-east-1.amazonaws.com/'. In this case, it has to follow the 'sso_region' to access 'https://device.sso.ap-northeast-1.amazonaws.com/'. (Only the first time you set up a connection from the AWS Toolkit, you can access any Region.)

Therefore, we have to delete all previous connection information each time we reconnect, open Add New Connection from scratch again, select (Connect using AWS IAM Identify Center) and reconfigure the 'Start URL' and 'Region'.

We are currently forced to do this task at least once a day. This is too painful and we would like to know what to do about it. If this can be resolved by changing the settings, could you please let us know how to do this?

jeroen-hulleman-sqills commented 1 year ago

I have the same issue.

colemvnio commented 1 year ago

Duplicate: https://github.com/aws/aws-toolkit-jetbrains/issues/3690

rli commented 1 year ago

Released in 1.68