Sunday, March 12, 2017

AWS CLI: Table Output

Earlier today I stumbled on an AWS CLI feature I hadn't noticed before, the "output" flag.

The default value of this flag is json, which is probably what you want most of the time. It makes it pretty easy to manipulate and pull out the data you need.

But if you are just looking for a visualization of your command you have the option of specifying "text" or "table" in the command.


aws ec2 --output table describe-instances


Text will give you a flat dump of the information, while table will format it pretty with colors and blocks. I used the table command to find an instance I wanted to use in the screen shot below.

Keep in mind that table output adds a lot of extra characters, so it isn't a great way to view large numbers of instances at the same time, but if you're looking for readable output, this is handy.

I wouldn't recommend it, but you can set this to be the default in your AWS credentials file at

C:\users\<username>\.aws\credentials

It would look like