I want route53 to failover from ALB1 to ALB2.
I've set up a DNS hosted zone, using ALB FQDN, set up Alias record for ALB1, set failover routing policy, based on a health check using ALB1 endpoint FQDN, also set up Alias record for ALB2 as secondary.
Each ALB has a target group of two ec2 running simple apache website.
ALB1 has two ec2, I tried shutting them, and/or turning httpd, to simulate failed health check and each time this happens, I get bad gateway error message. It doesn't seem to want to failover to ALB2.
What am I doing wrong/incorrectly or don't understand? My goal is to simulate a failover.
Please advise.
You need to have your own domain. You can't re-define AWS owned domain that is provided to you by your ALB. Then you create the R53 fail-over records for your own domain, e.g. myapp.org
.