- Amazon Route 53 — DNS-based failover using health checks and failover record types.
- AWS Global Accelerator — static Anycast IPv4 addresses and global-layer routing to the healthiest regional endpoints.
- PrimaryEC2 — us-east-2 (Ohio)
- SecondaryEC2 — us-east-1 (Northern Virginia)
http://18.117.77.176. Confirm the web page shows the instance hostname produced by the user-data script.


http://<secondary-ip>). Make sure the EC2 security group allows inbound HTTP (port 80) from your test client IPs.
Route 53: hosted zone and health checks
Route 53 provides DNS failover by combining health checks with failover record types. You can use a Route 53-registered domain or proceed with IP addresses for a lab/demo. The Route 53 dashboard and hosted zones appear like this:

/ — e.g., 192.0.2.44:80/:

AWS Global Accelerator: static Anycast IPs and endpoint groups
AWS Global Accelerator provides two static Anycast IPv4 addresses and routes client traffic over the AWS global network to the healthiest regional endpoint. Use cases include improved performance, simplified static IP management, and multi-region high availability. Create an accelerator (choose Standard) and select IPv4 for the IP address type:

/, interval 30s):

- Endpoint Group 1: us-east-2 (Ohio) — add PrimaryEC2 as an EC2 endpoint
- Endpoint Group 2: us-east-1 (N. Virginia) — add SecondaryEC2 as an EC2 endpoint


http://<GlobalAccelerator-IP>.
Global Accelerator routes traffic using its own health checks and routing logic: it prefers healthy endpoints, optimizes user-to-application paths over the AWS global network, and does not strictly follow a primary/secondary priority model like Route 53 failover records.
Demonstrating failover behavior (Global Accelerator)
To simulate a failover, stop the EC2 instance that is currently serving traffic (in the demo this was the secondary instance). After the configured health-check interval and a short propagation time, Global Accelerator will mark the endpoint as Unhealthy and shift traffic to another healthy endpoint (for example, the primary instance in us-east-2). Listener details page:

- From a terminal run:
curl -sS http://<GlobalAccelerator-IP>to see which instance responds. - To test Route 53 failover behavior, use
digornslookupand observe TTL behavior:dig +short @8.8.8.8 example.com(replaceexample.comwith your domain)
Cleanup
When your testing is complete:- Disable and delete the Global Accelerator.
- Terminate any EC2 instances you launched.
- Remove Route 53 health checks and records you created.
Remember to delete resources (Global Accelerator, EC2 instances, Route 53 health checks/records) to avoid ongoing charges. Global Accelerator and EC2 instances can incur costs while they remain active.
Key differences to remember:
- Route 53 failover: DNS-based routing with health checks and failover record types; can enforce primary/secondary priority but is subject to DNS TTL/caching.
- Global Accelerator: Provides two static Anycast IPs and routes traffic at the network layer using the AWS global network; relies on its own health checks and routing logic and provides faster failover behavior independent of DNS TTL.
Comparison at a glance
Links and references
- AWS Route 53 documentation: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/Welcome.html
- AWS Global Accelerator documentation: https://docs.aws.amazon.com/global-accelerator/latest/dg/what-is-global-accelerator.html
- EC2 user data and Amazon Linux 2: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html