Reputation: 6920
AWS stores the default configuration files in ~/.aws/
.
I'm trying to have all hidden directories inside ~/.config/
, and would like to change the default location to ~/.config/aws/
How would I do this from the AWS CLI?
Upvotes: 2
Views: 6550
Reputation: 841
You can specify a non-default location for the config file by setting the AWS_CONFIG_FILE environment variable to another local path.
Steps I used:
1. Create a folder with the name of your choice. I used .awscheck (mkdir .awscheck)
2. Create a file named credentials within the folder.
3. Configure the variable. (export AWS_CONFIG_FILE=~/.awscheck/credentials)
4. Run aws configure and add your values.
Similarly, if you want to store configurations, you can create a config file and add the configurations like profiles and regions in the config file.
Upvotes: 1
Reputation: 238081
Custom locations for config
and credentials
files can be specified using two environment variables:
~/.aws/config
. ~/.aws/credentials
. Upvotes: 7