User Tools

Site Tools


aws:query-with-jq

Query with jq

Just a fabricated joke to have a page starting with Q

STANDARDS=$(aws securityhub list-standards-control-associations  --security-control-id ${CONTROL_ID} | jq -r .StandardsControlAssociationSummaries.[].StandardsArn)

Seriously, jq is a really useful Linux command to process and extract values from JSON formatted data - See jq - json parser

Sadly, or more likely serves you right, jq is a linux and not windows command. Just one more reason to dump windows. Crashed Windows pictures

Parse AWS cli output

aws lambda list-functions | jq '[.Functions[] | {FunctionName, Description,  Runtime}]'


[
  {
    "FunctionName": "UpdateStackFunction",
    "Runtime": "python3.8"
  },
  {
    "FunctionName": "ExtractDict",
    "Runtime": "python3.9"
  }

.....
]
aws/query-with-jq.txt · Last modified: by andrew

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki