Yesterday I had to debug a problem that seemingly involved a faulty AWS CloudFront POP (point-of-presence or also called edge location). Requests to some objects timed out, but the problem seemed to be limited to a certain geographic region. To debug the problem further, it was crucial to find out which POP was used. In the following example I assume that
example.com is configured with a CloudFront configuration and the requests are made from the client’s location experiencing the problems.
$ nslookup example.com Server: 220.127.116.11 Address: 18.104.22.168#53 Non-authoritative answer: example.com canonical name = d3eju24r3ptc5d.cloudfront.net. Name: d3eju24r3ptc5d.cloudfront.net Address: 22.214.171.124
This gives us the IP address of the CloudFront POP in question. Next we can feed the IP into a reverse dns lookup.
$ dig -x 126.96.36.199 +short server-54-230-201-39.fra50.r.cloudfront.net.
fra50 part is the intersting one. AWS CloudFront follows a convention to name POPs after IATA airport codes. You can now either do a full-text search for the airport code on this Wikipedia page or do a Google search for
<airport-code> airport code. This reveals that the example request from above was full-filled by the POP in Frankfurt, Germany.