Search code examples
amazon-web-servicesamazon-route53

Routing to AWS ElastickBeanstalk vs. Load Balancer


What is the best practice to forward workload from AWS Route53? Should I send it to the ElasticBeanstalk environment or to the LoadBalancer assigned to that EB? What are the pros and cons of each method?

P.S. REST API, PHP


Solution

  • Since you have ALB in-front of your EB, you should setup alias record in R53 to the EB's url. It will resolve to ALB's address anyway.

    The biggest benefit of doing that is that EB's url gets automatically updated to new EB environment, if you are doing blue/green deployments. This way you don't have to worry about validity of your R53 alias record, as it will always point to the correct ALB.

    In contrast, if you link R53 to ALB directly, you use the above benefit.

    Also, but not fully sure about that, using EB's URL ensure that R53 will use your EB environment health status. If you just use ALB url in R53, any extra health checks that EB provides will not be account for in R53.