{"id":28969,"date":"2018-11-12T15:58:18","date_gmt":"2018-11-12T13:58:18","guid":{"rendered":"https:\/\/mamchenkov.net\/wordpress\/?p=28969"},"modified":"2018-11-12T15:58:18","modified_gmt":"2018-11-12T13:58:18","slug":"using-aws-cli-query-option-to-simplify-output","status":"publish","type":"post","link":"https:\/\/mamchenkov.net\/wordpress\/2018\/11\/12\/using-aws-cli-query-option-to-simplify-output\/","title":{"rendered":"Using aws-cli &#8211;query Option To Simplify Output"},"content":{"rendered":"<!-- google_ad_section_start -->\n<p>Eric Hammond shares <a href=\"https:\/\/alestic.com\/2013\/11\/aws-cli-query\/\">a super-handy tip<\/a> for those of us who work with Amazon AWS via the command line:<\/p>\n<blockquote><p>I just learned about a recent addition to aws-cli: The\u00a0<code>--query<\/code>\u00a0option lets you specify what parts of the response data structure you want output.<\/p>\n<p>Instead of wading through pages of JSON output, you can select a few specific values and output them as JSON, table, or simple text. The new\u00a0<code>--query<\/code>\u00a0option is far easier to use than\u00a0<code>jq<\/code>,\u00a0<code>grep<\/code>+<code>cut<\/code>, or Perl, my other fallback tools for parsing the output.<\/p><\/blockquote>\n<p>Read the rest of <a href=\"https:\/\/alestic.com\/2013\/11\/aws-cli-query\/\">his blog post<\/a> for a few examples of how to use it.<\/p>\n<!-- google_ad_section_end -->\n","protected":false},"excerpt":{"rendered":"<!-- google_ad_section_start -->\n<p>Eric Hammond shares a super-handy tip for those of us who work with Amazon AWS via the command line: I just learned about a recent addition to aws-cli: The\u00a0&#8211;query\u00a0option lets you specify what parts of the response data structure you want output. Instead of wading through pages of JSON output, you can select a few &hellip; <a href=\"https:\/\/mamchenkov.net\/wordpress\/2018\/11\/12\/using-aws-cli-query-option-to-simplify-output\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Using aws-cli &#8211;query Option To Simplify Output<\/span><\/a><\/p>\n<!-- google_ad_section_end -->\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"Using aws-cli --query Option To Simplify Output #Amazon #AWS #CLI #WebDev #hosting #productivity","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"_links_to":"","_links_to_target":""},"categories":[1,6,133,62,1334],"tags":[3270,1960,1079,1330,2289],"keyring_services":[],"class_list":["post-28969","post","type-post","status-publish","format-standard","hentry","category-general","category-linux","category-sysadmin","category-technology","category-web-work","tag-amazon-aws","tag-command-line","tag-productivity","tag-web-development","tag-web-hosting"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":27706,"url":"https:\/\/mamchenkov.net\/wordpress\/2017\/06\/20\/5-fancy-reasons-and-7-funky-uses-for-the-aws-cli\/","url_meta":{"origin":28969,"position":0},"title":"5 Fancy Reasons and 7 Funky Uses for the AWS CLI","author":"Leonid Mamchenkov","date":"June 20, 2017","format":false,"excerpt":"5 Fancy Reasons and 7 Funky Uses for the AWS CLI\u00a0has a few good examples of AWS CLI usage: AWS CLI Multiple Profiles AWS CLI Autocomplete Formatting AWS CLI Output Filtering AWS CLI Output Using Waiters in the AWS CLI Using Input Files to Commands Using Roles to Access Resources\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":27400,"url":"https:\/\/mamchenkov.net\/wordpress\/2017\/03\/08\/awless-a-mighty-cli-for-aws\/","url_meta":{"origin":28969,"position":1},"title":"awless &#8211; a Mighty CLI for AWS","author":"Leonid Mamchenkov","date":"March 8, 2017","format":false,"excerpt":"awless is a command line interface to the Amazon AWS. \u00a0While Amazon AWS already has its own set of tools for command line interface, awless makes things even simpler, with the following features: run frequent actions by using simple commands easily explore your infrastructure and cloud resources inter relations via\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2017\/03\/awless-demo-500x264.gif?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":26813,"url":"https:\/\/mamchenkov.net\/wordpress\/2016\/10\/31\/easier-aws-cli-with-docker\/","url_meta":{"origin":28969,"position":2},"title":"Easier AWS CLI with Docker","author":"Leonid Mamchenkov","date":"October 31, 2016","format":false,"excerpt":"Here is a handy blog post that shows how to simplify the installation and running of the Amazon AWS command line commands, using Docker. \u00a0With the Dockerfile like this: One can build the image and run the container as follows: Obviously, DO NOT hardcode your Amazon AWS credentials into an\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":28161,"url":"https:\/\/mamchenkov.net\/wordpress\/2017\/11\/01\/jq-and-jo-handy-cli-tools-for-working-with-json\/","url_meta":{"origin":28969,"position":3},"title":"jq and jo &#8211; handy CLI tools for working with JSON","author":"Leonid Mamchenkov","date":"November 1, 2017","format":false,"excerpt":"Here are a couple of really useful command-line tools for anybody working with JSON.\u00a0 The first one is jq, which is a somewhat wider known JSON processor.\u00a0 Here's a nice tutorial with many examples of how this tool is useful.\u00a0 The second one, is jo - a command-line tool for\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":20523,"url":"https:\/\/mamchenkov.net\/wordpress\/2014\/02\/12\/an-introduction-to-the-aws-command-line-tool\/","url_meta":{"origin":28969,"position":4},"title":"An Introduction to the AWS Command Line Tool","author":"Leonid Mamchenkov","date":"February 12, 2014","format":"link","excerpt":"An Introduction to the AWS Command Line Tool","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2014\/02\/awscli-example.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":44362,"url":"https:\/\/mamchenkov.net\/wordpress\/2019\/10\/29\/awsume-aws-assume-made-awesome\/","url_meta":{"origin":28969,"position":5},"title":"AWSume: AWS Assume Made Awesome!","author":"Leonid Mamchenkov","date":"October 29, 2019","format":false,"excerpt":"AWSume is a command line tool that makes switching between multiple Amazon AWS profiles really easy and simple.","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2019\/10\/awsume.gif?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2019\/10\/awsume.gif?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2019\/10\/awsume.gif?resize=525%2C300&ssl=1 1.5x"},"classes":[]}],"jetpack_sharing_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts\/28969","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/comments?post=28969"}],"version-history":[{"count":0,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts\/28969\/revisions"}],"wp:attachment":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/media?parent=28969"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/categories?post=28969"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/tags?post=28969"},{"taxonomy":"keyring_services","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/keyring_services?post=28969"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}