I am having a cloud front distribution which is pointing to an origin. the origin is a sub-domain of my apexdomain. I have the domain but with an external vendor and the NS records for the same is configured there. Now I created a cloudfront distribution and added a CNAME(alternative domain name) for the same. I created a A record in route53 for the Apexdomain to point to the IP of the origin server. However, though my origin server is working fine, accessing via cloudfront gives a 502 error.
Removing the A records bring the cloudfront distribution backup. How does Cloudfront DNS resolution work? how does an A record result in a 502 error?
www.example.com
and created an A record forexample.com
pointing to the origin server's IP. In CloudFront, the Origin Domain Name is set toorigin.example.com
... etc. – Michael - sqlbot