jq

jq

Examples using jq with aws cli.

aws sns list-subscriptions | jq .Subscriptions | jq '.[] | select(.Endpoint == "my@emailaddress.com")'
aws lambda list-functions | jq .Functions | jq '.[] | .FunctionName'
aws ec2 describe-security-groups --group-ids <group-id> | jq '.SecurityGroups | .[] | .IpPermissions | .[0] | .IpRanges | .[] | .CidrIp' | sort | sed 's/"//g' | sort | sed 's/\/32//g'
aws lambda list-functions | jq '.Functions | .[] | select(.FunctionName == "<fn-name>")'
aws lambda list-functions | jq '.Functions | .[] | select(.FunctionName | startswith("fn-name-start"))'