Describe the bug
After I setup the the AWS credential file according to
https://docs.aws.amazon.com/toolkit-for-jetbrains/latest/userguide/setup-credentials.html
I get the error:
AWS Credentials
Failed to load AWS profiles: Expected a profile or property definition on line 1
Edit AWS Credential file(s)
The content if the file looks like this (masked):
[default]
aws_access_key_id = XXXXXXXXXXXXXXXXXXXX
aws_secret_access_key = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
At the same time
C:>aws s3 ls
for instance, is working fine with the same credentials.
To reproduce
Expected behavior
Use the given credentials to connect to AWS
Screenshots
Your Environment
Edit AWS credential file
How did you edit the file (what editor)? Could you attach the file (after replacing the keys) here?
Hi @justinmk3 ,
Thank you for your answer.
I use the IntelliJ editor via the "Edit AWS credential file(s)" from the plugin.
I attache an -for me- non working example. It's ASCII - LF.
The configured account has worked before.
@larsschaps That file looks ok. Do you have a ~/.aws/config file?
~/.aws/credentials, does the problem persist?~/.aws/credentials."Edit AWS credential file" is not enough to reproduce the issue on my end, so we need to find the full steps that reproduce the issue.
Hi @justinmk3,
yes, I do. And thank you I found the error.
There was a space on the first line before the '#'
brgs
Lars
Just to comment for visibility: I had the same error message.
After debugging for a while I found the error to be caused by indentation in my config file, which never caused problems with the CLI
[profile ..]
role_arn = ..
source_profile = default
So if you end up having the same issue make sure to remove all spaces and indentations in your config and credentials file
Most helpful comment
Just to comment for visibility: I had the same error message.
After debugging for a while I found the error to be caused by indentation in my config file, which never caused problems with the CLI
So if you end up having the same issue make sure to remove all spaces and indentations in your config and credentials file