Skip to content

Instantly share code, notes, and snippets.

@nabsha
Last active September 20, 2021 02:19
Show Gist options
  • Save nabsha/dde69d9a207eb642edc18fafb9beb0d5 to your computer and use it in GitHub Desktop.
Save nabsha/dde69d9a207eb642edc18fafb9beb0d5 to your computer and use it in GitHub Desktop.
Get all AWS EC2 IP Ranges for a region and a service
#!/bin/sh
curl -s https://ip-ranges.amazonaws.com/ip-ranges.json | jq -r '.prefixes[] | select(.region=="ap-southeast-2") | select(.service=="EC2") | .ip_prefix'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment