jhourback
jhourback

Reputation: 4571

Is it possible to determine the AWS availability zone ID from an IP address?

Amazon publishes tables that map IP addresses to regions. But is there a way to determine the specific canonical availability zone that an IP address resides in?

Upvotes: 1

Views: 979

Answers (1)

Chris Williams
Chris Williams

Reputation: 35188

Unfortunately there is no way to map a specific public address to a specific availability zone as this is not how the mapping works.

The internet gateway (which allows public IPv4 and IPv6 addresses to function) actually performs network address translation to map the public IP to the AWS resource. The internet gateway resource is spread across all availability zones in the region.

To add more context, when you create an elastic IP you can map it to an instance to give it a static IP. However, you can remove from that instance and attach to any other host within the AWS account that shares the same region.

Upvotes: 2

Related Questions