Describe the bug
I cannot use my existing AWS profile inside AWS toolkit, as i receive the error Failed to refresh process-based credentials.
I use a custom process (an in-house Python cli called Wrench) to obtain time-limited credentials for a IAM role when connecting to AWS. This works fine on the command line, but not inside PyCharm. I have used this process for years now, so the problem is not there.
I install Wrench in a pyenv Python 3.6 environment. My system Python is 3.7. I recently had a very similar issue where it wasn't possible for the aws cli to get credentials from the custom process because I had pip install awscli into Python 3.7. That's fixed now, and $ aws sts get-caller-identity correctly gets the credentials from the custom process.
I am able to connect to AWS using a profile which does not use the custom process.
I'm unable to see any relevant info in the PyCharm log file. Is there somewhere else I can look to debug this?
Expected behavior
I am able to connect to AWS using the same profile in PyCharm that I use on the shell.
Screenshots

Your Environment
Sadly the log statement we need to debug this has not been released to stable channel yet. If I had to take a shot in the dark, I would guess environment variables are causing issues since Mac apps launched from gui do not inherit them.
Things to try
Thanks for the quick response!
The problem is definitely the environment that PyCharm launches in - when I launch it from the terminal I'm able to connect using any of the AWS profiles I have setup.
Thanks for the help @abrooksv
For what it's worth - I had this exact same problem, and
$ idea)helped solve this.
Most helpful comment
Sadly the log statement we need to debug this has not been released to stable channel yet. If I had to take a shot in the dark, I would guess environment variables are causing issues since Mac apps launched from gui do not inherit them.
Things to try