This documentation is for Version 1 of the Amazon CLI only. For documentation related to Version 2 of the Amazon CLI, see the Version 2 User Guide.
About the examples in the Amazon CLI User Guide
The Amazon Command Line Interface (Amazon CLI) examples in this guide are formatted using the following conventions:
-
Prompt – The command prompt uses the Linux prompt and is displayed as (
$
). For commands that are Windows specific,C:\>
is used as the prompt. Do not include the prompt when you type commands. -
Directory – When commands must be executed from a specific directory, the directory name is shown before the prompt symbol.
-
User input – Command text that you enter at the command line is formatted as
user input
. -
Replaceable text – Variable text, including names of resources that you choose, or IDs generated by Amazon services that you must include in commands, is formatted as
replaceable text
. In multiple-line commands or commands where specific keyboard input is required, keyboard commands can also be shown as replaceable text. -
Output – Output returned by Amazon services is shown under user input, and is formatted as
computer output
.
The following aws configure
command example demonstrates user
input, replaceable text, and output:
-
Enter
aws configure
at the command line, and then press Enter. -
The Amazon CLI outputs lines of text, prompting you to enter additional information.
-
Enter each of your access keys in turn, and then press Enter.
-
Then, enter an Amazon Region name in the format shown, press Enter, and then press Enter a final time to skip the output format setting.
-
The final Enter command is shown as replaceable text because there is no user input for that line.
$
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
ENTER
The following example shows a simple command with output. To use this example, enter the
full text of the command (the highlighted text after the prompt), and then press
Enter. The name of the security group,
, is replaceable to your desired
security group name. The JSON document, including the curly braces, is output. If you
configure your CLI to output in text or table format, the output will be formatted
differently. JSONmy-sg
$
aws ec2 create-security-group --group-name
my-sg
--description "My security group"{ "GroupId": "sg-903004f8" }