Skip to content

Instantly share code, notes, and snippets.

View Burekasim's full-sized avatar

Avi Keinan Burekasim

  • DoiT International
  • Israel
  • 02:13 (UTC +03:00)
View GitHub Profile
@pcn
pcn / example.md
Last active September 14, 2023 19:40
Using jq to get+filter aws data

I've been playing with jq, and I've been having a hard time finding examples of how it works with output from a service like AWS (which I use a lot).

Here is one I use a lot with vagrant-ec2.

When we're launching and killing a lot of instances, the AWS API is the only way to track down which instances are live, ready, dead, etc.

To find instances that are tagged with e.g. {"Key" = "Name", "Value" = "Web-00'} in the middle of a vagrant dev cycle, or a prod launch/replace cycle, you can do something like this: