Quick setup
This topic explains how to quickly configure basic settings that the Amazon Command Line Interface (Amazon CLI) uses to interact with Amazon. These include your security credentials, the default output format, and the default Amazon Region.
New configuration quick setup
For general use, the aws configure
command in your preferred terminal is
the fastest way to set up your Amazon CLI installation. When you enter this command, the
Amazon CLI prompts you for four pieces of information:
The Amazon CLI stores this information in a profile (a
collection of settings) named default
in the
credentials
file. By default, the information in this profile
is used when you run an Amazon CLI command that doesn't explicitly specify a profile to use.
For more information on the credentials
file, see Configuration and credential file settings
The following example shows sample values. Replace them with your own values as described in the following sections.
$
aws configure
AWS Access Key ID [None]:
AWS Secret Access Key [None]:
AKIAIOSFODNN7EXAMPLE
Default region name [None]:
wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
Default output format [None]:
us-west-2
json
For more detailed information on configuration see Configuration basics.
Using existing configuration and credentials files
If you have existing configuration and credentials files, these can be used for the Amazon CLI.
To use the config
and credentials
files,
move them to the folder named .aws
in your home directory. Where you find
your home directory location varies based on the operating system, but is referred to
using the environment variables %UserProfile%
in Windows and
$HOME
or ~
(tilde) in Unix-based systems.
You can specify a non-default location for the config
and
credentials
files by setting the AWS_CONFIG_FILE
and AWS_SHARED_CREDENTIALS_FILE
environment variables to another local
path. See Environment variables to configure the Amazon CLI
for details.
For more detailed information on configuration and credentials files, see Configuration and credential file settings.