Skip to content

The AWS Helper is a go based command line interface utility for AWS

License

Notifications You must be signed in to change notification settings

kj187/aws-helper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AWS Helper

AwsHelper Build Status Go Report Card License

The AWS Helper is a go based command line interface utility for AWS

Installation

Linux AMD64

$ wget -O /usr/local/bin/aws-helper XXX/artifacts/raw/aws-helper_linux-amd64
$ chmod +x /usr/local/bin/aws-helper

Darwin

$ wget -O /usr/local/bin/aws-helper XXX/artifacts/raw/aws-helper_darwin-arch386
$ chmod +x /usr/local/bin/aws-helper

Contribution

In order to work properly, AWS Helper needs to be checked out at the following location: $GOPATH/src/github.com/kj187/aws-helper

$ git clone XXX/aws-helper.git $GOPATH/src/github.com/kj187/aws-helper

Setup

$ cd $GOPATH/src/github.com/kj187/aws-helper
$ make setup

Tests only

$ cd $GOPATH/src/github.com/kj187/aws-helper
$ make test

Commands

____ _ _ _ ____    _  _ ____ _    ___  ____ ____
|__| | | | [__     |__| |___ |    |__] |___ |__/
|  | |_|_| ___]    |  | |___ |___ |    |___ |  \

The AWS Helper is a go based command line interface utility for AWS.
Author: Julian Kleinhans <mail@kj187.de>, alias @kj187

Usage:
  aws-helper [flags]
  aws-helper [command]

Examples:
aws-helper ec2:list -c Name -C KeyName -f AZ:eu-central-1

Available Commands:
  ec2:list    List all EC2 instances
  help        Help about any command

Flags:
  -a, --access_key string   set aws access_key
  -h, --help                help for aws-helper
  -p, --profile string      set aws profile
  -r, --region string       set region (default "eu-central-1")
  -s, --secret_key string   set aws secret_key

Use "aws-helper [command] --help" for more information about a command.

Region

The default region is eu-central-1. You can define the region with an environment variable AWS_DEFAULT_REGION or with the flag --region

Example with env var:

$ export AWS_DEFAULT_REGION=us-east-1
$ aws-helper ec2:list

Example with flag:

$ aws-helper ec2:list --region us-east-1
$ aws-helper ec2:list

Credentials

Environment variables

TODO

Flags

TODO

Ec2:list

Usage:
  aws-helper ec2:list [flags]

Flags:
  -c, --column stringSlice          add additional column (tag)
  -f, --filter stringSlice          filter with column (Example: InstanceType:t2.micro)
  -h, --help                        help for ec2:list
  -C, --remove-column stringSlice   remove default column
  -t, --tag stringSlice             filter with tag (Example: Name:Jenkins)

Global Flags:
  -a, --access_key string   set aws access_key
  -p, --profile string      set aws profile
  -r, --region string       set region (default "eu-central-1")
  -s, --secret_key string   set aws secret_key

Default columns

  • InstanceId
  • ImageId
  • State
  • SubnetId
  • AZ
  • InstanceType
  • KeyName
  • PrivateIpAddress
  • PublicIpAddress

With the uppercase C flag -C or --remove-column you have the possibility to remove a default column.

Example

$ aws-helper ec2:list -C SubnetId -C AZ

As you can see you could also remove multiple columns.

Add tags as column

Imagine your instances have a "Name" tag, with the lowercase -c or --column yu have the possibility to add tags as a column.

Example

$ aws-helper ec2:list -c Name

Yes, you could also add multiple columns.

Filter

There a two different ways to filter your results. You could use a tag filter or a column filter.

Tag filter

Example

$ aws-helper ec2:list -t Name:Jenkins
Column filter

Example

$ aws-helper ec2:list -f InstanceType:t2.micro

About

The AWS Helper is a go based command line interface utility for AWS

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published