Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing AWS configuration directory

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?

like image 733
Saurabh Avatar asked Feb 02 '26 22:02

Saurabh


1 Answers

Custom locations for config and credentials files can be specified using two environment variables:

  • AWS_CONFIG_FILE: Specifies the location of the file that the AWS CLI uses to store configuration profiles. The default path is ~/.aws/config.
  • AWS_SHARED_CREDENTIALS_FILE: Specifies the location of the file that the AWS CLI uses to store access keys. The default path is ~/.aws/credentials.
like image 64
Marcin Avatar answered Feb 05 '26 14:02

Marcin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!