Today I learned that it’s possible to get the user’s current location via special headers when calling CloudFront.
All you have to do is:
CloudFront-Viewer-Latitude
and CloudFront-Viewer-Longitude
headersVoilà! Whenever you call that CouldFront distribution, you’ll have the headers with the user’s current location!
Those are the two that I needed for my use case but CloudFront actually exposes a lot more headers that you can use to get details about the user, you can read more about it on this page.