AWS Certified Solutions Architect - Professional 2020

Sign Up Free or Log In to participate!

Setting up Amazon cloudfront with EC2 origin with custom domain name hosted on route53

Can you guys help me out in identifying what I am doing wrong in setting up the cloudfront for my ec2 instance (web server) for a custom domain of mine.

I am using my domain name ( as the origin domain name.

I have also supplied a certificate to the cloudfront (* using ACM.

The problem I am facing is, when i point out my custom domain name to the cloud fronts domain name in route53 using an alias record.

My website responds with an error 502. I’ll really appreciate any help. I have explored all the content provided by AWS in respect to this but nothing seems to work till now.

Tom Kringstad

Hi Chetan, you mention you’ve explored all content provided by AWS – does that include the various troubleshooting steps in the following article?

2 Answers

Hi Chetan,

As Tom says, there can be multiple things at play here.   One might even be not giving CloudFront enough time to deploy…this can sometimes take 30 minutes or more.  The troubleshooting tips Tom provides above would be a good first start.


If you are using EC2 as origin, you cannot use certificate provided by AWS Certificate Manager (ACM), you must use a certificate that is signed by a trusted third-party certificate authority (CA)

Please check this link


Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?