Quick setup - Amazon Command Line Interface
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China.

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 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]: AKIAIOSFODNN7EXAMPLE AWS Secret Access Key [None]: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY Default region name [None]: us-west-2 Default output format [None]: 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.