By using AWS re:Post, you agree to the Terms of Use
/CDN for EC2 instance/

CDN for EC2 instance


Without using application load balancer, I would like to bind Cloudfront to EC2 instance. I created a distribution with domain name ec2-***.** with HOST as header but I got

502 ERROR CloudFront wasn't able to connect to the origin. We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner.
If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.

When I click ec2-***.** , no page opens.

1 Answers

Hi, I'm not sure what you mean "When I click ec2-* , no page opens". Is ec2-* running as a publicly-accessible webserver? If so, it should be OK as an origin for CloudFront.

answered a month ago
  • I am not sure about this. When I go public IPv4 address, my website opens

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions