Configuration file

wbailey edited this page Jun 1, 2012 · 8 revisions
Clone this wiki locally

There is a lot of information about instances available in EC2 that can be displayed and what everyone wants to see is different. Much like the web console is customizable so is the claws application via a configuration file written in YAML.


To initialize claws with a configuration file run the --init option:

claws --init

This will generate a configuration file in your home directory:



This file is certainly going to change over time but at present the default generated file looks like:

    - us-east-1
    - eu-east-1
      width: 10
      title: ID
      width: 20
      title: Name
      width: 8
      title: Status
      width: 42
      title: DNS Name
      width: 13
      title: Instance Type
      width: 16
      title: Public IP
      width: 16
      title: Private IP
      width: 30
      title: tags

To make claws really work all you have to do is enter you AWS credentials and the ssh user and you should be able to connect to the host you select.


Though not supported yet you will be able to enter the home directory of your projects capistrano configuration files. Once this is enabled you will be able to display and filter hosts by their defined environment and role.


  • user - The username for ssh to use when connecting to the selected host
  • identity - The path to the identity file to use


  • access_key_id - An active access key id for your account
  • secret_access_key - The secret access key that is generated when you generate and access key

You can find your credentials by logging in to your AWS account, clicking the My Account link in the upper right, and then selecting Security Credentials under the Account tab on the left.


If you have hosts in multiple regions claws will automatically display all of the instances in them. If you want to limit the regions that you want to report on you can indicate that using this stanza. Remember to uses dashes to delineate the region indicating an array in yaml:

  - us-east-1
  - eu-east-1


This section has the most significant content because it controls what you want to see in the status table. From the example it is clear that you can enter the following in the fields stanza:

  • field name - This is the amazon name of the field. Consult the ruby aws-sdk documentation for a list of all of the available methods that can be entered.
  • width - The visible width in characters to display on the screen. The default width is 10 characters.
  • title - This is an optional field that can used for a more readable column heading title.

Special Fields

There are some special fields that claws defines for you that make it easier to manipulate the display. They are listed below:

  • name - AWS stores the name of a the server as a tag so claws extracts this for usage in your configuration file
  • tags - AWS allows you define any number of tags to identify your instance. The configuration allows for the usage of the tags field which is a formatted string of the available tags (minus the Name key/value pair)
  • roles - Just like the tags special field, security groups can be accessed via security_groups that displays a formatted string of the key/values