4 ms·
Interesting this requires ‘jq’ when JMESpath is built into AWS CLI already. http://jmespath.org/ http://jmespath.org/
by Terretta 7y ago
Interesting this requires ‘jq’ when JMESpath is built into AWS CLI already.
http://jmespath.org/ http://jmespath.org/
- fiddlerwoaroof 7y agoI find jq’s language a lot nicer than JMESpath and trend to use it whenever possible
- kesor 7y agojmespath 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-output.html#json-output 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/." http://stedolan.github.io/jq/."
- justin_oaks 7y agoMy HN comment detailing several limitations of JMESPath: https://news.ycombinator.com/item?id=16400320 https://news.ycombinator.com/item?id=16400320
- failmode 7y agojq 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/b74d92a902bb54ab7527eb40e79d397b3895bf0c/lib/stack-functions#L326 https://github.com/bash-my-aws/bash-my-aws/blob/b74d92a902bb...
- kafana 7y agoI 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.