Elastic Load Balancing automatically distributes your incoming traffic across multiple targets, such as EC2 instances, containers, and IP addresses, in one or more Availability Zones.
Elastic Load Balancing supports four types of load balancers:
You can select the type of load balancer that best suits your needs.
Create Load Balancer
EC2 Management Console → Load Balancing → Load Balancers → Create Load Balancer
Select Load Balancer Type
Application Load Balancer: HTTP/HTTPS
Step 1: Configure Load Balancer
Listeners
Load Balancer Protocol: HTTP
Availability Zones
You must specify subnets from at least two Availability Zones to increase the availability of your load balancer.
Step 2: Configure Security Settings
Step 3: Configure Security Groups
Step 4: Configure Routing
Step 5: Register Targets
Select an instance → Add to registered
Step 6: Review
Load Balancer Creation Status
Add listener
EC2 Management Console → Load Balancing → Load Balancers → Listeners → Add listener
Set up action(s) of listeners
- Protocol : port - HTTPS : 443
- Add action → Forward to... → Target group
- Security policy: ELBSecurityPolicy-2016-08
- Default SSL certificate: From ACM
Create Target Group
EC2 Management Console → Load Balancing → Target Groups → Create target group
Specify group details
- Choose a target type: Instances
- Protocol : port - HTTPS : 443
Register targets
Select instances, specify ports, and add the instances to the list of pending targets.
Result
References
- Elastic Load Balancing Documentation
- What is an Application Load Balancer? - Elastic Load Balancing
- Getting started with Application Load Balancers - Elastic Load Balancing
- Create a Classic Load Balancer with an HTTPS listener - Elastic Load Balancing
- AWS Load Balancers: Classic Load Balancer vs Application Load Balancer
- AWS 設定Load Balancer 教學(含SSL憑證) – 梁爸的書坊