Navigating AWS Massive Public IP JSON File
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
About the author
DevOps Engineer that wears multiple hats.
Comments
Join the discussionNo comments yet. Be the first to comment.





