Skip to content

Instantly share code, notes, and snippets.

@IAmStoxe
Last active July 23, 2020 03:55
Show Gist options
  • Select an option

  • Save IAmStoxe/7f60dc7f21946e2408d20b8c1fbe2c2b to your computer and use it in GitHub Desktop.

Select an option

Save IAmStoxe/7f60dc7f21946e2408d20b8c1fbe2c2b to your computer and use it in GitHub Desktop.
Replace EC2 with the target service (i.e. S3, CLOUDFRONT, etc. - case sensitive)
curl -s 'https://ip-ranges.amazonaws.com/ip-ranges.json' |
jq -r '.prefixes[] | select(.service | contains("EC2")) | .ip_prefix' |
sort -u
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment