Amazon EC2 Command-Line Reference
The Amazon EC2 command-line tools are wrappers around the web services API. In fact, there is basically a one-to-one mapping between a command line, its arguments, and an API call of a similar name with similar parameters.
Every command has the following general form:
command
[GENERAL OPTIONS
] [COMMAND OPTIONS
]
For example, the command to start an EC2 instance looks like this:
ec2-run-instances -v ami-123456 -g dmz
In this instance, the -v
is a
general option for specifying verbose output, and ami-1234566 -g dmz
are the command-specific
options.
The general options are:
-
Pull in command parameters from standard input.
-C
certificate
The certificate to authenticate your web services request with Amazon. This value overrides the environment variable
EC2_CERT
.--connection-timeout
Indicates an alternate SOAP connection timeout in seconds.
- -
-debug
Prints out debug information.
--headers
Display column headers.
--help
Prints out help for the command in question.
-K
privatekey
The private key to authenticate your web services request with Amazon. This value overrides the environment variable
EC2_PRIVATE_KEY
.--region
region
Specifies the region to apply to the command.
--request-timeout
Indicates an alternate SOAP request timeout in seconds.
--show-empty-fields
Displays empty columns in command responses as
(nil)
.-U
url
Specifies the Amazon Web Services URL to make the API call against. This option overrides the
EC2_URL
environment variable.-v
Indicates that you would like verbose ...
Get Cloud Application Architectures now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.