Hacker News new | ask | show | jobs
by Terretta 2359 days ago
Interesting this requires ‘jq’ when JMESpath is built into AWS CLI already.

http://jmespath.org/

4 comments

jq is only used in three of the >120 functions (for sort-keys functionality). All the rest use JMESPath.

If anyone can help with a solution I'd be delighted to remove the dependency on jq.

https://github.com/bash-my-aws/bash-my-aws/blob/b74d92a902bb...

I would definitely keep jq dependency there, especially if you plan to expand the code base to provide ecs and Fargate commands. You will quickly run into use cases where JMESpath is not capable of parsing json outputs for different tasksdefintion commands.
jmespath has quite a few limitations, even the official AWS CLI documentation states that for the more advanced stuff `jq` is probably the go to tool.

https://docs.aws.amazon.com/cli/latest/userguide/cli-usage-o...

"For more advanced filtering that you might not be able to do with --query, you can consider jq, a command line JSON processor. You can download it and find the official tutorial at http://stedolan.github.io/jq/."

I find jq’s language a lot nicer than JMESpath and trend to use it whenever possible
My HN comment detailing several limitations of JMESPath: https://news.ycombinator.com/item?id=16400320