{"id":15563172,"url":"https://github.com/cmlccie/awsipranges","last_synced_at":"2025-04-04T21:06:20.178Z","repository":{"id":247164747,"uuid":"677597785","full_name":"cmlccie/awsipranges","owner":"cmlccie","description":"Quickly query the AWS IP Ranges","archived":false,"fork":false,"pushed_at":"2025-03-27T20:41:43.000Z","size":653,"stargazers_count":83,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-01T18:53:33.308Z","etag":null,"topics":["aws","cidr","cidr-ranges","cloud","ipaddresses","ipv4","ipv6","rust","rust-crate","rust-library"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/awsipranges","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cmlccie.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-12T02:35:28.000Z","updated_at":"2025-03-27T20:41:40.000Z","dependencies_parsed_at":"2024-07-19T07:23:46.295Z","dependency_job_id":"cb98aace-dd42-447d-adad-127458841a28","html_url":"https://github.com/cmlccie/awsipranges","commit_stats":{"total_commits":171,"total_committers":2,"mean_commits":85.5,"dds":0.3391812865497076,"last_synced_commit":"f84b4c9a03b5962990791c448e01a0174f7ff9b0"},"previous_names":["cmlccie/awsipranges"],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmlccie%2Fawsipranges","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmlccie%2Fawsipranges/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmlccie%2Fawsipranges/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmlccie%2Fawsipranges/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cmlccie","download_url":"https://codeload.github.com/cmlccie/awsipranges/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246697889,"owners_count":20819461,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","cidr","cidr-ranges","cloud","ipaddresses","ipv4","ipv6","rust","rust-crate","rust-library"],"created_at":"2024-10-02T16:20:16.439Z","updated_at":"2025-04-04T21:06:20.158Z","avatar_url":"https://github.com/cmlccie.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# awsipranges\n\n_Quickly query the AWS IP Ranges_\n\n[![License](https://img.shields.io/badge/license-BSD%E2%80%932%E2%80%93Clause%E2%80%93Patent-blue)](https://opensource.org/license/bsdpluspatent)\n[![Crates.io Version](https://img.shields.io/crates/v/awsipranges)](https://crates.io/crates/awsipranges)\n[![docs.rs](https://img.shields.io/docsrs/awsipranges)](https://docs.rs/awsipranges/latest/awsipranges/)\n[![Tests](https://github.com/cmlccie/awsipranges/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/cmlccie/awsipranges/actions/workflows/tests.yml)\n[![Code Coverage](https://codecov.io/gh/cmlccie/awsipranges/graph/badge.svg?token=2NS0NOYQ0Y)](https://codecov.io/gh/cmlccie/awsipranges)\n\n---\n\n![Demo](https://vhs.charm.sh/vhs-10iTXUYl2aeKdyYoMvI6C0.gif)\n\n`awsipranges` allows you to search, filter, and use public [AWS IP address ranges](https://docs.aws.amazon.com/vpc/latest/userguide/aws-ip-ranges.html) from the command line without writing complicated JSON parsing scripts or commands. This single-purpose CLI tool allows you to quickly answer questions like:\n\n- Is some IPv4/IPv6 `\u003caddress\u003e` a public AWS IP address?\n  - What region is it in?\n  - What service(s) does it belong to?\n  - What supernets does it belong to?\n- What are the supernets of `\u003csome-cidr-block\u003e`?\n- What services publish their IP ranges in the `ip-ranges.json` file?\n- What IP ranges are used by `\u003csome-supported-service\u003e` in `\u003csome-region\u003e`?\n- What Local / Wavelength Zones are attached to `\u003csome-region\u003e`?\n- What are the IP ranges for `\u003csome-local-zone\u003e`?\n\nYou could get answers to some of these ☝️ questions by [filtering the JSON file](https://docs.aws.amazon.com/vpc/latest/userguide/aws-ip-work-with.html#filter-json-file), but `awsipranges` [features](#features) make filtering more accessible. `awsipranges` parses and understands the structure of IPv4 and IPv6 CIDRs allowing you to work with IP ranges as they were meant to - as structured data - enabling you to output the results in human and machine friendly formats.\n\nIf you find this project useful, please consider giving it a star ⭐ on [GitHub](https://github.com/cmlccie/awsipranges). Your support is greatly appreciated!\n\n## Features\n\n- **Retrieve \u0026 Cache**: [`ip-ranges.json`](https://ip-ranges.amazonaws.com/ip-ranges.json) to `${HOME}/.aws/ip-ranges.json`; refreshing the cache after 24 hours (by default).\n- **Search**: IP ranges for an _**IPv4/IPv6 address**_ or _**CIDR**_ (any prefix length) to view the AWS IP ranges that contain the provided address or CIDR.\n- **Filter**: IP ranges by region, service, network border group, and IP version (IPv4/IPv6).\n- **Multiple Output Formats**: Table, CIDR, and netmask output formats for easy integration with other tools.\n- **Save Results to CSV**: Save your search and filter results to CSV for programmatic use or analysis in your favorite spreadsheet app.\n- **Rust Crate:** This CLI tool's core functionality is also available as a library, allowing you to easily add it to your Rust utility or application.\n\n## Installation\n\nYou can build and install `awsipranges` from source or install pre-built binaries. `awsipranges` supports:\n\n| OS              | arm64 (AArch64)                     | amd64 (x86_64)                         |\n| --------------- | ----------------------------------- | -------------------------------------- |\n| **macOS**       | ✅ ⏬ Apple silicon                 | ✅ ⏬ Intel silicon                    |\n| **Linux**       | ✅ GNU (glibc) \u003c/BR\u003e ✅ Musl (libc) | ✅ ⏬ GNU (glibc) \u003c/BR\u003e ✅ Musl (libc) |\n| **Windows 10+** |                                     | ✅ ⏬ MSVC                             |\n\n✅ = Supported ⏬ = Pre-built binaries available\n\nFollowing [Rust Platform Support](https://doc.rust-lang.org/nightly/rustc/platform-support.html) for supported targets and OS and library version dependencies.\n\n### Pre-Built Binaries\n\nYou can download and install pre-built binaries from the [releases](https://github.com/cmlccie/awsipranges/releases/) page or use the following installation scripts, which select and install the correct binary for your platform.\n\n#### Homebrew\n\n```Shell\nbrew install cmlccie/tap/awsipranges\n```\n\n#### Shell Script\n\nSee the [releases](https://github.com/cmlccie/awsipranges/releases/) page for the latest `{{version}}`.\n\n```Shell\ncurl --proto '=https' --tlsv1.2 -LsSf https://github.com/cmlccie/awsipranges/releases/download/{{version}}/awsipranges-installer.sh | sh\n```\n\n#### PowerShell Script\n\nSee the [releases](https://github.com/cmlccie/awsipranges/releases/) page for the latest `{{version}}`.\n\n```PowerShell\npowershell -c \"irm https://github.com/cmlccie/awsipranges/releases/download/{{version}}/awsipranges-installer.ps1 | iex\"\n```\n\n### Build from source\n\nTo build and install `awsipranges` from source, you will need the [Rust toolchain installed](https://www.rust-lang.org/tools/install) on your system. Then, you can use `cargo install` to download and build your desired version.\n\n#### Crates.io\n\nInstall published releases of `awsipranges` from [crates.io](https://crates.io/crates/awsipranges/).\n\n```bash\ncargo install awsipranges\n```\n\n#### GitHub\n\nInstall the latest, potentially _unreleased_, `awsipranges` from the `main` branch on [GitHub](https://crates.io/crates/awsipranges/).\n\n```bash\ncargo install --git https://github.com/cmlccie/awsipranges.git\n```\n\n## Issues and Enhancements\n\nIf you encounter any issues or bugs or have ideas for enhancements and new features, please report them on our [GitHub Issues](https://github.com/cmlccie/awsipranges/issues) page. Your feedback is a gift and helps us improve the tool for everyone!\n\n## Acknowledgements\n\nI appreciate the following teams and individuals without which this tool would not be possible or as quickly constructed:\n\n- The AWS Networking team that publishes and maintains the [AWS IP address ranges](https://docs.aws.amazon.com/vpc/latest/userguide/aws-ip-ranges.html).\n- Abhishek Chanda ([@achanda](https://www.github.com/achanda)) for publishing the excellent [ipnetwork](https://crates.io/crates/ipnetwork) crate, which makes parsing and working with IPv4 and IPv6 prefixes a breeze.\n- [VHS](https://github.com/charmbracelet/vhs) - Straightforward and powerful terminal GIF recorder! I love how easy it is to make a [demo tape](https://github.com/cmlccie/awsipranges/blob/main/demo/demo.tape)! 😎\n- Orhun Parmaksız ([@orhun](https://github.com/orhun)) for his excellent blog on [Fully Automated Releases for Rust Projects](https://blog.orhun.dev/automated-rust-releases/).\n\n## Other Works\n\n- [`netrange`](https://crates.io/crates/netrange) - Use LUA scripts to download and filter IP ranges from multiple cloud providers.\n- [`aws-ip-ranges`](https://crates.io/crates/aws-ip-ranges) - Provides the AWS IP range data as a const struct.\n\n## Why did I make this?\n\nI frequently need to get answers from the AWS IP ranges. I published a similar [Python library](https://github.com/aws-samples/awsipranges) while working at AWS. Then, when learning Rust, I needed something to build! 😎 This tool has been helpful to me - perhaps it will be useful to you.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmlccie%2Fawsipranges","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcmlccie%2Fawsipranges","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmlccie%2Fawsipranges/lists"}