Skip to content

A helper to determine if an IP belongs to AWS, and if so to which service and region

License

Notifications You must be signed in to change notification settings

psantus/does-this-ip-belong-to-aws

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Does this IP belong to AWS?

This repository contains helpers to determine whether an IP belongs to AWS, and if it does, which AWS service and region use it.

HTML

This helper relies on JSONata, a powerful query and transformation language for JSON. See https://jsonata.org

You can find the raw script in this repo or visit does-this-ip-belong-to-aws.terracloud.fr to see it in action!

See it in action!

Python script

For use in a shell, a convenient python script using only base libraries.

Example: python3 awsip.py 3.5.140.3 returns:

[
    {
        "ip_prefix": "3.5.140.0/22",
        "region": "ap-northeast-2",
        "service": "AMAZON",
        "network_border_group": "ap-northeast-2"
    },
    {
        "ip_prefix": "3.5.140.0/22",
        "region": "ap-northeast-2",
        "service": "S3",
        "network_border_group": "ap-northeast-2"
    },
    {
        "ip_prefix": "3.5.140.0/22",
        "region": "ap-northeast-2",
        "service": "EC2",
        "network_border_group": "ap-northeast-2"
    }
]

Author

Paul SANTUS, an independant AWS Cloud Consultant

About

A helper to determine if an IP belongs to AWS, and if so to which service and region

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published