Yesterday, I was attending a meetup from the great French AWS Users Group, and Henri showed us a great new project he is working on, called: awless.

awless is a great alternative to the official AWS CLI. It’s written in Go, and available under the Apache license on GitHub.

awless will enhance your experience with the CLI with key features like: autocompletion, offline mode (--local), template support, revert capabilities, etc.

Using a well-known syntax: subject, verb, complement, it drastically simplifies daily operations with the CLI, for example:

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
[13:37][Majora][~]$ awless list instances

|        ID ▲         |    ZONE    | NAME |  STATE  |   TYPE   |   PUBLIC IP   |  PRIVATE IP   | UPTIME  |   KEYPAIR    |
|---------------------|------------|------|---------|----------|---------------|---------------|---------|--------------|
| i-0099888399012e5b2 | eu-west-1c |      | running | t2.micro | 52.212.2.1XX  | 172.31.24.233 | 48 secs | myCPFreeTier |
| i-033e57e044e6c8617 | eu-west-1c |      | running | t2.micro | 52.212.84.XX  | 172.31.28.107 | 48 secs | myCPFreeTier |
| i-0402fcfe2ad45c675 | eu-west-1a |      | stopped | t2.micro |               | 172.31.44.109 | 5 weeks | myCPFreeTier |
| i-05c5b1079128cbeae | eu-west-1c |      | running | t2.micro | 34.251.228.XX | 172.31.22.94  | 48 secs | myCPFreeTier |
| i-0cf50db0c11fd023f | eu-west-1c |      | running | t2.micro | 52.30.242.XX  | 172.31.25.192 | 48 secs | myCPFreeTier |
| i-0fea0ce2c684edd15 | eu-west-1c |      | running | t2.micro | 54.72.150.XXX | 172.31.18.180 | 48 secs | myCPFreeTier |

PS: All outputs are markdown compatible.

PS2: Don’t blame me for instances without a name tag. :)

1
2
3
4
5
[13:37][Majora][~]$ awless list buckets --aws-region=eu-west-2
|         ID ▲         |                                       GRANTS                                        | CREATED  |
|----------------------|-------------------------------------------------------------------------------------|----------|
| zoph-bucket-xxx      | FULL_CONTROL[user:1b7d95b8fef668e805xxxaa0d6dfea0065a93cb14f29b2fc1cc9137d0c2db35e] | 2 months |
|                      | READ[group:http://acs.amazonaws.com/groups/global/AllUsers]                         |          |

Hands on

Let’s stop a simple instance:

alt

Then, revert this change:

alt

SSH access to your instances is like Magic 🎉

alt

Get detailed information about your instance:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
[13:37][Majora][~]$ awless show i-0402fcfe2ad45c675
|    PROPERTY ▲     |        VALUE        |
|-------------------|---------------------|
| Architecture      | x86_64              |
| Hypervisor        | xen                 |
| ID                | i-0402fcfe2ad45c675 |
| Image             | ami-d38ecea0        |
| KeyPair           | myCPFreeTier        |
| NetworkInterfaces | [eni-eadd92b9]      |
| Private IP        | 172.31.44.109       |
| RootDevice        | /dev/sda1           |
| RootDeviceType    | ebs                 |
| SecurityGroups    | [sg-74cb670d]       |
| State             | stopped             |
| Subnet            | subnet-6399db3b     |
| Type              | t2.micro            |
| Uptime            | 5 weeks             |
| Vpc               | vpc-d85163bc        |
| Zone              | eu-west-1a          |

# Relations:
eu-west-1[region]
	↳ vpc-d85163bc[vpc]
		↳ subnet-6399db3b[subnet]
			↳ i-0402fcfe2ad45c675[instance]

Depending on: myCPFreeTier[keypair], @FreeBSD 11-11-0-RELEASE-AutogenByAWSMP-[securitygroup], vol-0c56ec363f41e8089[volume]

Did you notice the Relations section? Awesome! 👍

Using templates

In this example, I’m running an awless template to set up a WordPress blog in HA from the official awless-templates repository.

First, list subnets and VPC in your region, answer questions with subnet for instances, and subnets for ELB.

alt

Then your VPC name (use autocompletion)

alt

Running template

alt

And here we go 👏, your WordPress blog is now up and running.

alt

Conclusion

I think this CLI is clearly impressive despite the alpha/beta version. We will need to keep an eye on this development. Don’t hesitate to put a star ⭐ on GitHub or contribute to this project. Thanks, Henri and his great team!

That’s all folks!

zoph.