Skip to content

Instantly share code, notes, and snippets.



Created Feb 18, 2021
What would you like to do?
AWS ip-ranges.json parsing with JQ examples
# Use jq to parse the published AWS IP ranges.
# Use the file from here:
# Select all Cloudfront nodes homed to Sydney
jq .prefixes[] | select(.service == "CLOUDFRONT") | select(.network_border_group=="ap-southeast-2")
# Find s3 endpoints in Oregon
jq -r '.prefixes[] | select(.region=="us-east-2") | select(.service=="S3") | .ip_prefix' < ip-ranges.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment