- Newest
- Most votes
- Most comments
Hello,
To determine the region of a request for each client in CloudFront:
-
Look at the x-edge-location field in CloudFront logs: This field tells you which edge location (a specific server) handled the request. The edge location is represented by a three-letter code (like DFW3), which generally matches an airport code near that location. By knowing the edge location, you can infer the region where the request originated.
-
Map these codes to regions: You can create or use a reference list to map these edge location codes to specific geographic regions. This way, you'll know which region each request came from.
-
Use Athena to analyze logs: Since you're already using Athena to inspect CloudFront logs, you can include the x-edge-location field in your queries to break down usage by region, giving you more granular insights per client.
https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/AccessLogs.html
One of the fields in CloudFront's standard logs (access logs) is the x-edge-location (field #3):
The edge location that served the request. Each edge location is identified by a three-letter code and an arbitrarily assigned number (for example, DFW3). The three-letter code typically corresponds with the International Air Transport Association (IATA) airport code for an airport near the edge location's geographic location. (These abbreviations might change in the future.)
Relevant content
- AWS OFFICIALUpdated 10 months ago
- AWS OFFICIALUpdated 5 months ago

Thank you very much for your answer. Will try