AWS resource's region lookup by its public IPv4 or IPv6 address.
The service is using the following AWS API call behind the scenes to retrieve the latest CIDR database of all AWS services.
You just need to pass "ip" parameter of the AWS IP address you are looking for.
In response you will get a set of matches (if it is a valid AWS IP address), including its CIDR group, region, and service associated with it.
Additionally, there is a field called "requested_ip" which is simply echoing the IP address you are trying to look up.
"cache_status" reports its status about cached CIDR datastore. Values can be either "LOCAL" (meaning it is stored in RAM memory), or a value of "cf-cache-status" header (you can read more about Cloudflare's "CF-Cache-Status" mechanics).
Web UI is available here
curl "https://aws-wasm.home-cloud.workers.dev/?ip=52.1.1.1"
{
"requested_ip": "52.1.1.1",
"cache_status": "LOCAL",
"matches": [
{
"ip_prefix": "52.0.0.0/15",
"region": "us-east-1",
"service": "AMAZON",
"network_border_group": "us-east-1"
},
{
"ip_prefix": "52.0.0.0/15",
"region": "us-east-1",
"service": "EC2",
"network_border_group": "us-east-1"
}
]
}
API service was built on Cloudflare Workers serverless platform