Navigating AWS Massive Public IP JSON File
Peter Walker
1 min read
How to get all us-east-1 Public IP Addresses for EC2
If necessary - Mac (install brew, then install jq) and Linux below that:
/bin/bash -c "$(curl -fsSL raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install jq
sudo apt install jq -y # debian based OS
sudo yum install jq # RHEL based or Amazon Linux
Skip jq install if already installed and query the AWS JSON file
curl https://ip-ranges.amazonaws.com/ip-ranges.json | jq -r '.prefixes[] | select(.service=="EC2") | .ip_prefix'
Edit here: select(.service=="EC2") with the service you are interested in. e.g. S3, RDS, etc
0
Subscribe to my newsletter
Read articles from Peter Walker directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Peter Walker
Peter Walker
DevOps Engineer that wears multiple hats.