flowchart LR
U[Users] --> R[Route 53 alias record]
R --> L[Application Load Balancer<br/>HTTPS 443]
L --> A[EC2 in AZ a]
L --> B[EC2 in AZ b]
- Launch two instances in different Availability Zones.
- Create a target group with a health check path such as
/health, and register both instances. - Create an Application Load Balancer across at least two public subnets, with an HTTPS listener using a free certificate from AWS Certificate Manager.
- Redirect HTTP (80) to HTTPS in the listener rules.
- In Route 53 create an A (alias) record that points to the load balancer. Alias records work at the zone apex and cost nothing for queries to AWS resources.
Tighten security groups: the instances should accept traffic only from the load balancer’s security group, not from the internet.
Watch HTTPCode_Target_5XX_Count and UnHealthyHostCount in CloudWatch. A failing health check removes an instance from rotation, which is why the check path must reflect real readiness.