I have used AWS application load balancer for my domain and it is serving properly. However, I want to add caching layer for my website, but when I try to use Cloudfront for the same it gives me 502 error. I have followed aws blogs but unable to resolve the issue.
please find attached images for my cloudfront distribution.
Asked
Active
Viewed 632 times
4

kru
- 403
- 5
- 18
-
Did you setup ssl on your alb that you use https only? – Marcin Jul 09 '21 at 07:09
-
I have setup ssl from ACM. and that works on both http & https. – kru Jul 09 '21 at 07:10
-
Are you using internal or external ALB? Internal ALBs are not accessible from cloudfront – SmartCoder Jul 09 '21 at 07:11
-
internet facing ALB. – kru Jul 09 '21 at 07:13
-
Does your website work if you use alb url only? – Marcin Jul 09 '21 at 07:14
-
yeah with only ALB it works fine. – kru Jul 09 '21 at 07:47
-
Is your ALB open to the Internet (e.g. port 443 is open to `0.0.0.0/0`)? – Ben Whaley Jul 09 '21 at 18:21