Skip to main content

Look up canonical information for AWS IP addresses and networks

Project description

digaws

The digaws lookup tool displays information for a given IP address (both v4 and v6) or a CIDR, sourced from the AWS official IP ranges. In order to save bandwidth and time this tool requests the AWS IP ranges and keeps a cached version until a new version is published.

PyPI version CI

Requirements

Python >= 3.8

Tests are verified on Linux, macos and Windows.

Install

Using pipx (this is the preferred way)

pipx install digaws

Using pip

pip install digaws --user

Usage

usage: digaws [-h] [--output <plain|json>] [--output-fields [{prefix,region,service,network_border_group} ...]] [--debug] [--version] <ip address|cidr> [<ip address|cidr> ...]

Look up canonical information for AWS IP addresses and networks

positional arguments:
  <ip address|cidr>     CIDR or IP (v4 or v6) to look up

optional arguments:
  -h, --help            show this help message and exit
  --output <plain|json>
                        Formatting style for command output, by default plain
  --output-fields [{prefix,region,service,network_border_group} ...]
                        Print only the given fields
  --debug               Enable debug
  --version             show program's version number and exit

Examples

  • look up an IPv4 address
~ » digaws 52.218.97.130

Prefix: 52.218.0.0/17
Region: eu-west-1
Service: AMAZON
Network border group: eu-west-1

Prefix: 52.218.0.0/17
Region: eu-west-1
Service: S3
Network border group: eu-west-1
  • look up an IPv6 address
~ » digaws 2600:1f1e:fff:f810:a29b:cb50:2812:e2dc

IPv6 Prefix: 2600:1f1e::/36
Region: sa-east-1
Service: AMAZON
Network border group: sa-east-1

IPv6 Prefix: 2600:1f1e:fff:f800::/53
Region: sa-east-1
Service: ROUTE53_HEALTHCHECKS
Network border group: sa-east-1

IPv6 Prefix: 2600:1f1e::/36
Region: sa-east-1
Service: EC2
Network border group: sa-east-1
  • look up several addresses and print output as json
~ » digaws 2600:1f14::/36 13.224.119.88 --output json

[
  {
    "ipv6_prefix": "2600:1f14::/35",
    "region": "us-west-2",
    "service": "AMAZON",
    "network_border_group": "us-west-2"
  },
  {
    "ipv6_prefix": "2600:1f14::/35",
    "region": "us-west-2",
    "service": "EC2",
    "network_border_group": "us-west-2"
  },
  {
    "ip_prefix": "13.224.0.0/14",
    "region": "GLOBAL",
    "service": "AMAZON",
    "network_border_group": "GLOBAL"
  },
  {
    "ip_prefix": "13.224.0.0/14",
    "region": "GLOBAL",
    "service": "CLOUDFRONT",
    "network_border_group": "GLOBAL"
  }
]
  • Choose output fields
~ » digaws 34.255.166.63 --output-fields service

Service: AMAZON

Service: EC2

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

digaws-1.0.7.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

digaws-1.0.7-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file digaws-1.0.7.tar.gz.

File metadata

  • Download URL: digaws-1.0.7.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.3

File hashes

Hashes for digaws-1.0.7.tar.gz
Algorithm Hash digest
SHA256 626f2a39ffa6d25590a0fe422e58aaa1e747a6b6b12140045735687655b677e1
MD5 19bb54809e6812e45c88c0773af38526
BLAKE2b-256 875089774287e624c9bd883be932b04e37094c26ef65afa791bf63b9e3cec3eb

See more details on using hashes here.

File details

Details for the file digaws-1.0.7-py3-none-any.whl.

File metadata

  • Download URL: digaws-1.0.7-py3-none-any.whl
  • Upload date:
  • Size: 9.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.3

File hashes

Hashes for digaws-1.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 446010eb3476d62d319ec6534a7f960002907c9e273362c1c0693cc4bf2d9cf1
MD5 9bf8745d21ee4997a7f2f804dd425b0e
BLAKE2b-256 5bf25dfa83c1bd682717f4bd31ab2ab2e5fcd02260474ba5636a540b138ba596

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page