ec2-search 0.7.0

search AWS ec2 easily
Documentation

ec2-search Test

Search EC2 instance easily

Installation

Cargo Install

With Rust's package manager cargo, you can install via:

$ cargo install ec2-search

If you install the latest master branch commit

$ cargo install --git https://github.com/mocyuto/ec2-search --branch master

Homebrew

macOS or Linux

$ brew tap mocyuto/ec2-search
$ brew install ec2-search

Usage

$ ec2s help

AWS credentials

ec2-search needs aws credentials, so you need to set credentials. You can use Environment value or "~/.aws/credentials".

For more information, see AWS Credentials

Instance

Search instance info.

$ ec2s instance help
# or alias. see help
$ ec2s i help 

info

display basic info

$ ec2s i info -q api
ID           Name       Status   Type
i-012345678  test-api1  running  t2.micro
i-023456789  test-api2  running  t3.small
counts: 2

instance ids

display instance ids

## like search
$ ec2s instance ids -q "api"
ID           Name
i-012345678  test-api1
i-023456789  test-api2
counts: 2

instance ips

Display instance public and private IPs.

$ ec2s instance ips -q "api"
Private IP   Public IP  Name
10.0.0.1                test-api1
10.0.0.2                test-api2
counts: 2

instance DNS name

Display instance public and private DNS name

$ ec2s i dns -q api
Private DNS                                      Public DNS  Name
 ip-10-10-10-10.ap-northeast-1.compute.internal              test-api1
 ip-10-10-10-11.ap-northeast-1.compute.internal              test-api2
counts: 2

Target Group

$ ec2s target-group help
# or alias
$ ec2s tg help