Skip to content

devilliers/xingu

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xingu

An alternative AWS command line tool

Why?

The name

A tributory of the Amazon. It is written in Go so I could have gone with xingo, and I do love a pun, but it turns out that Xingo is a character from Ben 10.

The reason

Initially I wanted to download RDS logs and the way to do this is supposed to be

$ aws rds download-db-log-file-portion --db-instance-identifier <db ID> --log-file-name <filename> --output text --starting-token 0 > /tmp/psql.log

...but this didn't work. It would have bits of file missing. The reliable way seems to be using the downloadCompleteLogFile API endpoint. This tool does that.

Usage

Configuration

None - it reads your AWS configuration from your environment and your home directory, just like the aws tool does.

Commands

$ xingu rds logs
Interact with RDS logs

Usage:
  xingu rds logs [command]

Available Commands:
  download    Download an RDS log file
  list        List RDS logs
  list        List RDS logs

Flags:
  -h, --help   help for logs

Global Flags:
      --config string   config file (default is $HOME/.xingu.yaml)

Use "xingu rds logs [command] --help" for more information about a command.

List log files

$ xingu rds logs list -d <database ID>

Download a single log file

$ xingu rds logs download -d <database ID> -f <filename>

Download several days of logs

xingu rds logs download -d <database ID> --days 2

List ec2 instances

xingu ec2 list

# or just one
xingu ec2 list -n <name filter>

# is equivalent to
xingu ec2 list --filters "tag:Name=<name filter>"

SSH into an ec2 instance

Takes the same filters as list...

xingu ec2 ssh # the first one in the list

# you probably want to be more specific
xingu ec2 ssh -n <name filter>

TODO

  • Download files if missing or smaller than on server
  • Gzip files before writing to disk

About

Alternative AWS CLI

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%