View EC2 Instances via Command Line Using ec2-describe-instances

Running ec2-describe-instances from the command line where you have AWS developer tools installed will display information about running instances.

Example:
To view instances simply run ec2-describe-instances

To view detailed help information run ec2-describe-instances –help
  SYNOPSIS
     ec2din (ec2-describe-instances)
     ec2din [GENERAL OPTIONS] [INSTANCE [INSTANCE […]]]
  GENERAL NOTES
     Any command option/parameter may be passed a value of ‘-‘ to indicate
     that values for that option should be read from stdin.
  DESCRIPTION
     List and describe your instances
     The INSTANCE parameter is the instance ID(s) to describe.
     If unspecified all your instances will be returned.

  GENERAL OPTIONS

     -K, –private-key KEY
          Specify KEY as the private key to use. Defaults to the value of the
          EC2_PRIVATE_KEY environment variable (if set). Overrides the default.

     -C, –cert CERT
          Specify CERT as the X509 certificate to use. Defaults to the value
          of the EC2_CERT environment variable (if set). Overrides the default.

     -U, –url URL
          Specify URL as the web service URL to use. Defaults to the value of
          ‘https://ec2.amazonaws.com’ or to that of the EC2_URL environment
          variable (if set). Overrides the default.

     –region REGION
          Specify REGION as the web service region to use.
          This option will override the URL specified by the “-U URL” option and EC2_URL environment variable.

     -v, –verbose
          Verbose output.

     -?, –help
          Display this help.

     -H, –headers
          Display column headers.

     –debug
          Display additional debugging information.

     –show-empty-fields
          Indicate empty fields.

     –connection-timeout TIMEOUT
          Specify a connection timeout TIMEOUT (in seconds).

     –request-timeout TIMEOUT
          Specify a request timeout TIMEOUT (in seconds).

Leave a Reply

Your email address will not be published. Required fields are marked *