Cloudfront和Alb之间的通信导致502错误
我在与Alb Origin的通信中获得了CloudFront 502 错误,这导致:
CloudFront wasn't able to connect to the origin.
CloudFront Logs向我显示oildinConnectError
。
我来回走了问题,我不确定如何进一步调试。
任何想法都非常感谢!
详细说明
- 我的应用程序使用通配符A-Record来处理所有子域。它可以路由到CloudFront
- CloudFront在US-EAST-1中具有 *.example.com作为域名
- CloudFront指向eu-west-1的Alb,而eu-west-1的证书从EU-West-1中
- 指向Alb,别名记录直接指向ALB的工作,但我希望它指向CloudFront。因此该应用程序正在启动并运行。
I'm getting Cloudfront 502 errors in the communication to the ALB origin, which results in:
CloudFront wasn't able to connect to the origin.
The Cloudfront logs show me OriginConnectError
.
I've gone back and forth regarding what the issue could be, and I'm not sure how to debug this further.
Any ideas greatly appreciated!
Detailed
- My application uses a wildcard A-record to handle all subdomains. It routes to Cloudfront
- Cloudfront has a certificate in us-east-1 with *.example.com as domain name
- Cloudfront points to ALB in eu-west-1 with a different *.example.com certificate from eu-west-1
- Creating an alias record that points directly to ALB works, but I want it to point to Cloudfront. So the App is up and running.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当将CloudFront用作Origin时,我们非常常见的错误是我们忘记设置Origin请求策略,以允许CloudFront将“主机”标题转发到ALB。
希望它有帮助
Very common mistake when use CloudFront with ALB as origin is we forgot to set the Origin request policy to allow Cloudfront to forward Cloudfront "Host" header to ALB.
Hope it helps