Config File Locator

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.

  1. AWS_CONFIG_FILE

    First choice

    Selects a custom file path, not a directory. There is no equivalent command-line flag.

    Config file location
    $AWS_CONFIG_FILE
    Only use this command when AWS_CONFIG_FILE is set to a file path.
    Commands
    vi "$AWS_CONFIG_FILE"
  2. Default user config

    Default location

    Used when AWS_CONFIG_FILE is unset. Stores settings such as region, output format, and named profiles.

    Config file location
    ~/.aws/config
    The file may not exist yet. Profile sections use [default] or [profile <name>].
    Commands
    vi "$HOME/.aws/config"

Official AWS CLI documentation