Skip to content

Instantly share code, notes, and snippets.

@fvoges
Created January 18, 2023 12:58
Show Gist options
  • Select an option

  • Save fvoges/bb5b6ca131c7a36f667119b93cb0ba74 to your computer and use it in GitHub Desktop.

Select an option

Save fvoges/bb5b6ca131c7a36f667119b93cb0ba74 to your computer and use it in GitHub Desktop.
Get Amazon AWS IP ranges with curl and jq

How to get Amazon AWS CIDR blocks using curl and jq

curl -s https://ip-ranges.amazonaws.com/ip-ranges.json|jq '.prefixes[]|select(.region == "eu-west-2"  and .service == "EC2_INSTANCE_CONNECT")'

See AWS docs and this article for more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment