Introduction: during security audits it is common to verify whether an IP address belongs to AWS and, if so, identify the associated service and region. Manually checking the AWS ip-ranges.json file every time can be slow and error-prone, which is why we present a practical solution.
Available tools: two PowerShell scripts have been developed that simplify these tasks. The first allows extracting IP ranges based on the AWS service and region, with the option to export results to CSV for documentation or allowlists. The second allows identifying which service and region a specific IP belongs to by searching among all CIDRs published in ip-ranges.json.
Features of the script to obtain ranges by service and region: it uses the official ip-ranges.json, offers a selectable list of services and regions, filters matching CIDRs, and allows exporting results in CSV format to integrate them into security management tools or allowlists.
Summary usage of the first script: download ip-ranges.json from ip-ranges.amazonaws.com, convert the JSON, list unique services to select, list unique regions to select, filter prefixes by selected service and region, display matching IP networks, and ask whether to save to CSV. This approach streamlines firewall configurations, security rules, and compliance tasks.
Features of the script to identify service and region by IP: it parses the official ip-ranges.json, compares the target IP against all published CIDRs, and returns all possible matches since an IP can belong to multiple entries or services. Ideal for reverse analysis and for confirming providers and locations of external infrastructures.
Summary usage of the second script: implement a function to check whether an IP belongs to a CIDR, load the official JSON, request the IP to query, iterate over the prefixes, and return a table with service, region, and CIDR for all matches found. This facilitates decision-making in security policies and network integrations.
Example results: when running the tool that extracts ranges by service, you get the list of matching CIDRs and, if you choose to save, a CSV file is exported with columns service, region, and ip_prefix. When running the IP search tool, you get a table with entries that include service and region, which helps distinguish between generic AWS infrastructure and specific services such as EC2 or S3.
Benefits for security and operations: automation in verifying IP ownership in AWS, reduction of manual effort and errors, ability to maintain updated lists for allowlisting, and generation of reports for audits and regulatory compliance.
Technical considerations: keep an updated copy of ip-ranges.json since AWS publishes periodic changes, validate IPv4 and IPv6 format as needed, and remember that some IPs may appear in multiple services due to shared infrastructure reasons.
About Q2BSTUDIO: Q2BSTUDIO is a software development company specialized in custom applications and custom software, with experience in artificial intelligence, cybersecurity, and AWS and Azure cloud services. We offer comprehensive solutions that include business intelligence services, Power BI implementations, AI agent development, and AI consulting for companies. Our team combines expertise in security, cloud architecture, and data analysis to deliver robust and scalable projects.
Why choose Q2BSTUDIO: we develop custom applications aligned with business objectives, integrate artificial intelligence to optimize processes, implement cybersecurity practices from the design phase, and manage infrastructures on AWS and Azure cloud services. We also support with business intelligence and Power BI services to transform data into actionable decisions, and we create custom AI agents to improve productivity and customer service.
Keywords and positioning: custom applications, custom software, artificial intelligence, cybersecurity, AWS and Azure cloud services, business intelligence services, AI for companies, AI agents, Power BI. These keywords are integrated into our services and Q2BSTUDIO's value proposition to improve visibility and web positioning in related searches.
Conclusion: these PowerShell utilities streamline the task of verifying and cataloging AWS-related IP addresses, help maintain updated access lists, and facilitate the preparation of documentation for audits. If you need to adapt these tools to your environment or integrate their output into security and management processes, Q2BSTUDIO can help with custom development, cloud platform integration, and artificial intelligence and business intelligence solutions.
Contact: if you want more information or a customized version of these utilities integrated into your security and operations processes, contact Q2BSTUDIO for an initial consultation and technical proposal focused on custom software, artificial intelligence, and cybersecurity in cloud environments.



