I set up two identical CloudFront distributions to front my API Gateway endpoints in both production and development environments. They were forwarding headers like CloudFront-Viewer-City, CloudFront-Viewer-Country, CloudFront-Viewer-Region, and geographical coordinates. Everything was running smoothly for over a year, but suddenly, two days ago, both distributions stopped sending most of these headers, only keeping the Country header. When I contacted AWS support, they informed me these headers aren't guaranteed and are provided on a 'best effort' basis, which I get, but it feels sneaky to not publicly communicate about this potential change. Has anyone else experienced this issue?
6 Answers
As far as I know, AWS hasn't removed those headers—doing so would upset a lot of users. There might be something else going on with your setup.
It sounds like there might be a configuration issue on your end. Check your CloudFront distribution settings, as these headers are typically reliable. AWS documentation suggests they should still work, so there could be something config-related that changed without you realizing it.
I’m having the same issue. It’s really puzzling! Glad to know I’m not alone.
Could you share the distribution ID? I work with CloudFront and might help pinpoint the problem.
You should avoid relying on features that depend on vague documentation or specs. The fact that it was working for over a year could have been a bug that was finally caught. If it's not official, it might as well not exist!
Right? It’s frustrating when things break like this.
This doesn’t sound like an AWS issue; it might be something on your end that's changed. Consider using Infrastructure as Code (like Terraform) to prevent unexpected alterations in your AWS configurations. It can be tough figuring out what changed when things stop working.

Maybe review the documentation history to see if there were any updates that could explain this change.