skip to Main Content

I am creating a Cloud Front distribution in AWS. I have a ELB created in Hong Kong region.
When I am selecting Origin Domain, My ELB in Hong Kong region is not coming in drop down. While, I tried with creating ELB in N.Virginia region and it is visible.

Is there any such restrictions imposed by AWS or I am doing something wrong?

2

Answers


  1. I replicated the setup you described in my own AWS account and it happened there as well: The ELB did not show up in the Origin list. While I am not sure why this is the case, an easy workaround for you is to just manually enter the ELB’s DNS name as the Origin. My test ELB had the DNS record test-1224452099.ap-east-1.elb.amazonaws.com, so I put http://test-1224452099.ap-east-1.elb.amazonaws.com as the Origin for my CloudFront Distribution. That worked. For production use, above URL should of course be HTTPS, not HTTP.

    Please note: You might have to edit the rules of the ELB’s security group if the ELB is not reachable from CloudFront. You can use a managed prefix list for this: https://aws.amazon.com/about-aws/whats-new/2022/02/amazon-cloudfront-managed-prefix-list/

    Login or Signup to reply.
  2. Imagine if your CloudFront Origin is on your on-premise data center https://mydatacenter.example.com this should normally will not appear in the CF Origin list but it should work as long as the website is publicly accessible.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search