Search code examples
amazon-web-servicesamazon-elastic-beanstalkamazon-cloudfrontamazon-route53

What should I set for origin domain name when using Cloudfront, EB and Route 53?


I'm trying to set up CloudFront but getting stuck on the first field origin domain name

Currently Im using Elastic Beanstalk to deploy my webservice as an Application, and the EB url is mapped to a Route 53 domain, the customer accesses the webservice via the Route 53 domain.

With EB one Application can have multiple environments, and each environment has a load-balancer. I usually have just one environment but when I want to deploy a new version of the application I create a new environment. Then once that is ready I use Swap URLs so that the new environment is the one pointed to my the Route53 domain, and then I delete the old environment. This approach ensures no down-time.

Now with CloudFront the list of values it provides are my S3 containers (not what I want) and the Load-Balancer for any currently running environments. Bu this is not what I want either because if I point it at a load-balancer when I have a new version the environment that load-balancer works for will be terminated

Is it not possible to set it to the Application/Route 53 Domain name so I can deploy new version of my application without breaking anything on CloudFront.


Solution

  • Turns out that although it is not listed I can indeed just set it the CNAME Ive set in Route53, and it works