Skip to content

Instantly share code, notes, and snippets.

@dcarley
Created April 7, 2016 16:59
Show Gist options
  • Save dcarley/c748ed6001260fa9bf1f6f5daf4870f3 to your computer and use it in GitHub Desktop.
Save dcarley/c748ed6001260fa9bf1f6f5daf4870f3 to your computer and use it in GitHub Desktop.
awscli --query vs. jq
subscribed=$(aws sns list-subscriptions | jq -c ".[][] | select(.TopicArn | contains(\"${topic_arn}\")) | .Endpoint" | tr -d \")
subscribed=$(aws sns list-subscriptions --query "Subscriptions[?TopicArn==\`${topic_arn}\`].Endpoint" --output text | tr '\t' '\n')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment