Skip to content

Instantly share code, notes, and snippets.

@rcbop
Created June 7, 2018 13:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rcbop/aee2ce07a3d750941e62029c5b7a3c3b to your computer and use it in GitHub Desktop.
Save rcbop/aee2ce07a3d750941e62029c5b7a3c3b to your computer and use it in GitHub Desktop.
get amazon ip range for region and convert it to csv
curl -L https://ip-ranges.amazonaws.com/ip-ranges.json | jq '.prefixes[] | select(.region=="sa-east-1") ' | jq --slurp -r '. | map([.ip_prefix, .region, .service] | join(", ")) | join("\n")'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment