AWS CLI config file locations
Commands use a POSIX shell (macOS, Linux, or WSL). Install the named editor or CLI first. Before using an environment-variable path, check that the variable is set to a non-empty, intended path. When using vi or Notepad, ensure the parent directory exists and is writable. A missing file is created when you save it; Notepad may ask to create it.
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