Who owns this AWS IP address?
The network belongs to Amazon. The customer using an address at a given moment is something AWS won't tell you, and no lookup tool can either. Here is what you can find out, how to trace the address if it might be yours, and where to turn if it isn't.
An AWS IP range identifies AWS's use of the range, never the customer. Be wary of any tool or report that names a company from an AWS IP address alone.
Why AWS won't name the customer
AWS's Trust & Safety team shares information about a resource only with the permission of whoever controls it, and AWS's abuse FAQ says it doesn't disclose customer information. There are practical reasons too:
- Addresses are reused all the time. An EC2 instance's automatic public IPv4 address is released when the instance stops, and it gets a new one from the shared pool when it starts again. The address in last month's log may belong to someone else today.
- Many services are shared. A CloudFront edge address or an AWS API endpoint serves many unrelated customers at once.
- Whois shows Amazon. Registry records list Amazon entities (for example Amazon Technologies Inc.) as the holder of AWS space. That tells you who holds the block, not who uses an address in it. The exception is bring-your-own-IP (BYOIP) space, where whois shows the organisation that brought the block to AWS.
What you can learn
| Question | How to find out | How far it gets you |
|---|---|---|
| Does AWS use this address? | Look it up here or search ip-ranges.json | Reliable for published ranges |
| Which service and region? | The same lookup | Often just EC2 address space or service not disclosed |
| Which network announces it? | An ASN lookup | Separates AWS, BYOIP and non-AWS space |
| Does it have a name? | dig +short -x <ip> | Usually a generic ec2-… name or nothing |
| Who runs the website or email involved? | The domain name in the URL or message, not the IP | Points you to the site's operator and registrar |
If the address might be in your own AWS account
If you run workloads on AWS, the "unknown" address may well be yours: a NAT gateway, a load balancer, a Lambda function's network interface. Public IPv4 addresses in a VPC are attached to network interfaces, so start there, in the region this site reports for the address.
IP=3.18.1.10
REGION=us-east-2
# Public IP on a network interface's primary private address
aws ec2 describe-network-interfaces --region "$REGION" \
--filters Name=association.public-ip,Values="$IP" \
--query 'NetworkInterfaces[].[NetworkInterfaceId,InterfaceType,Description,OwnerId]' \
--output table
# Public IP on any of an interface's private addresses, including secondary ones
aws ec2 describe-network-interfaces --region "$REGION" \
--filters Name=addresses.association.public-ip,Values="$IP" \
--query 'NetworkInterfaces[].[NetworkInterfaceId,InterfaceType,Description,OwnerId]' \
--output table
# Elastic IP addresses allocated to this account
aws ec2 describe-addresses --region "$REGION" --public-ips "$IP"
InterfaceType and Description usually name the service behind the interface; types include nat_gateway, load_balancer, network_load_balancer, lambda and vpc_endpoint. describe-addresses returns an error when the Elastic IP isn't in the account, which is itself an answer. Some interfaces that AWS services manage for you can be hidden from the default output; recent CLI versions accept --include-managed-resources to show them.
If the region is GLOBAL or you aren't sure, loop over every Region enabled in the account:
for r in $(aws ec2 describe-regions --query 'Regions[].RegionName' --output text); do
aws ec2 describe-network-interfaces --region "$r" \
--filters Name=association.public-ip,Values="$IP" \
--query 'NetworkInterfaces[].[NetworkInterfaceId,InterfaceType,Description]' \
--output text | sed "s/^/$r /"
done
Across an organization, and over time
- IPAM Public IP insights lists the public IPv4 addresses used in your account or, when IPAM is integrated with AWS Organizations, across the whole organization. That includes addresses managed by services such as RDS or ECS. For each address it shows the owner account, the service and the resource. See View public IP insights.
- IPAM address history answers "what had this address last Tuesday?" for space that IPAM monitors, with
aws ec2 get-ipam-address-history. - VPC Flow Logs with the
pkt-src-aws-serviceandpkt-dst-aws-servicefields show when traffic is going to or coming from an AWS service rather than an arbitrary host.
AWS walks through these options in How do I find the resource that owns an unknown IP address?
If it isn't yours
- It is causing harm (attacks, spam, phishing, malware, copyright infringement): report it to AWS. Trust & Safety investigates, can act on the customer's resources and can mediate between you and the customer without revealing who they are. See how to report abuse from an AWS IP address.
- A government authority needs customer information: follow the Amazon Law Enforcement Guidelines. Private parties generally can't get customer details without the customer's permission; if you think you need them, that is a question for a lawyer, not a lookup tool.
- It's traffic you don't recognise: most of it is harmless. See traffic from AWS IP addresses is hitting my server.
Common mistakes
- Treating the whois organisation as the owner. For AWS space that's Amazon, and it says nothing about the customer.
- Reading an
ec2-…reverse DNS name as "an EC2 instance". It's the default name for all of EC2's address space. - Trusting a city-level geolocation. The most AWS data supports is a Region, Local Zone or Wavelength Zone; the region guide explains why.
- Assuming an address is still used by the same party. Check timestamps: the older the log, the weaker the link.
Sources
- AWS re:Post: How do I report abuse of AWS resources? (information sharing and mediation)
- AWS re:Post: Abuse reporting FAQs
- AWS: Amazon EC2 instance IP addressing (public IPv4 address release)
- AWS CLI: describe-network-interfaces (filters and interface types)
- AWS: Flow log records