Rohit kasyap
Rohit kasyap

Reputation: 61

AWS CLI "$ aws configure" creates .awsconfig and .awscredentials files instead of .aws/config and .aws/credenatials

While configuring my access keys in AWS CLI, there is an issue with credentials and config file creation. when using "$ aws configure --profile xxxxx" command. It used to work fine, "$ aws configure --profile xxxxx" would create .aws/config and .aws/credentials files, through which I was able to run any aws commands, while in any of the drives or folder through cli. I uninstalled and reinstalled AWS CLI for the latest version. Now "$ aws configure --profile xxxxx" just created .awsconfig and .awscredentials files in the same old path (C:\Users\Profile).

There are no documents in AWS regarding this issue.

Upvotes: 0

Views: 106

Answers (1)

Rohit kasyap
Rohit kasyap

Reputation: 61

I was able to find the issue. I wanted to set the env variables so used the $setx commands

$setx AWS_ACCESS_KEY_ID 
$setx AWS_SECRET_ACCESS_KEY 
$setx AWS_DEFAULT_REGION 
$setx AWS_PROFILE 
$setx AWS_CREDENTIAL_FILE 
$setx AWS_CONFIG_FILE

So whenever I tried to $aws configure, instead of the .aws folder, .awsconfig and .awscredentials files were created which were not global. By using $unset, I was able to remove all these and $aws configure now creates folder .aws with config and credentials files.

Hopes this helps. @DanielScott

Upvotes: 0

Related Questions