Skip to content

Instantly share code, notes, and snippets.

@polaco1782
Created February 20, 2025 12:01
Show Gist options
  • Save polaco1782/f3697201070d307cfd67d80c9182ddb9 to your computer and use it in GitHub Desktop.
Save polaco1782/f3697201070d307cfd67d80c9182ddb9 to your computer and use it in GitHub Desktop.
Get AWS ipv4 ranges based on region
#!/bin/bash
#
# You need JQ. Replace the region with the one you want
#
curl -s https://ip-ranges.amazonaws.com/ip-ranges.json | jq '.prefixes[] | select(.region == "us-east-1") | .ip_prefix'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment