AWSS (stands for AWS Search) is a CLI tool to make your life easier when searching AWS resources.
It is a wrapper written in Go using AWS SDK Go v2. The work is still in progress and will be updated regularly.
The current version is 0.7.3
- Specify a configuration file
--config - Search AWS resources
- in parallel (default)
- using all profiles, multiple profiles or a single profile.
--profiles allor--profiles default,dev - in all regions, multiple regions or a single region.
--regions allor--regions us-east-1,us-east-2
- Select the output format
- table
--output table(default) - json
--output json - json-pretty
--output json-pretty
- table
- Show empty results
--show-empty - Show tags
--show-tags(it works only with--output tableand it is ignored when using another output format) - Search AWS ec2 instances
awss ec2- Filter by:
- instance ids
--instance-ids|-i i-1234567890abcdef0,i-0987654321fedcba0 - names
--names|-n my-instance-1,my-instance-2 - tags
--tags|-t Name:my-instance-1,Name:my-instance-2 - tag keys
--tag-keys|-k Name,Environment - instance types
--instance-types|-T t2.micro,t3.micro - availability zones
--availability-zones|-z a,b - instance states
--instance-states|-s running,stopped - private ips
--private-ips|-p 172.16.0.1,172.17.1.254 - public ips
--public-ips|-P 52.28.19.20,52.30.31.32
- instance ids
- Sort by:
- id
--sort id - name
--sort name - type
--sort type - az
--sort az - state
--sort state - private ip
--sort private_ip - public ip
--sort public_ip - enis
--sort enis
- id
- Filter by:
- Search AWS ENIs
- Filter by:
- network interface ids
--network-interface-ids|-i eni-1234567890abcdef0,eni-0987654321fedcba0 - tags
--tags|-t Name:my-eni-1,Name:my-eni-2 - tag keys
--tag-keys|-k Name,Environment - instance ids
--instance-ids|-I i-1234567890abcdef0,i-0987654321fedcba0 - availability zones
--availability-zones|-z a,b - private ips
--private-ips|-p 172.16.0.1,172.17.1.254 - public ips
--public-ips|-P 52.28.19.20,52.30.31.32
- network interface ids
- ENIs doesn't support sort at the moment
- Filter by:
And you can combine these filters together.
git clone http://github.com/dyegoe/awss
cd awss
go build
cp awss /usr/local/binOr you can download the binary from the releases page.
AWSS uses a configuration file to set the default:
- profiles
- regions
- output format
- show empty results
- show tags
- all regions to search
- sort field for ec2 instances
The default configuration file is ~/.awss/config.yaml but you can specify another one using --config flag.
The --config accepts a single file (either relative or absolute path).
The configuration file is a YAML file with the following structure:
profiles:
- default
regions:
- us-east-1
output: table
show:
empty: false
tags: false
all-regions:
- eu-central-1
- eu-north-1
- eu-west-1
- eu-west-2
- eu-west-3
- us-east-1
- us-east-2
- us-west-1
- us-west-2
- ca-central-1
- sa-east-1
- ap-south-1
- ap-southeast-1
- ap-southeast-2
- ap-northeast-3
- ap-northeast-2
- ap-northeast-1
ec2:
sort: nameawss --help
awss ec2 --help
awss --profiles default,profile \
--regions eu-central-1,us-east-1,sa-east-1 \
ec2 \
--names 'some-wildcard*' \
--tags Environment:dev,Environment:prod \
--tag-keys 'zone-*' \
--instance-types t2.micro,t3.medium \
--availability-zones a,b \
--instance-states running,stopped \
--private-ips 172.16.0.1,172.17.1.254 \
--public-ips 52.28.19.20,52.30.31.32 \
--sort id \
--output table \
--show-empty \
--show-tagsContributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given. For major changes, please open an issue first to discuss what you would like to change.
More details in CONTRIBUTING.md.
Apache 2.0