AWS CLI config file locations
Find AWS CLI config file locations and AWS_CONFIG_FILE behavior on macOS, Linux, and Windows.
AWS_CONFIG_FILE selects a configuration file instead of the default ~/.aws/config. The files are not merged. This page covers the config file only.
AWS_CONFIG_FILE
First choiceSelects a custom file path, not a directory. There is no equivalent command-line flag.
Config file location
Only use this command when AWS_CONFIG_FILE is set to a file path.$AWS_CONFIG_FILECommands
vi "$AWS_CONFIG_FILE"Default user config
Default locationUsed when AWS_CONFIG_FILE is unset. Stores settings such as region, output format, and named profiles.
Config file location
The file may not exist yet. Profile sections use [default] or [profile <name>].~/.aws/configCommands
vi "$HOME/.aws/config"
Official AWS CLI documentation