Select a Load Balancer type
- Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/
- On the navigation bar, choose a region for your load balancer. Be sure to select the same region that you selected for your EC2 instances.
- On the navigation pane, under LOAD BALANCING, choose Load Balancers.
- Choose Create Load Balancer.
- For Application Load Balancer, choose Create.
Configure Your Load Balancer and Listener
- For Name, type a name for your load balancer
Name must be unique, maximum 32 characters, contain only alphanumeric characters and hyphens, must not begin or end with hyphen, and must not begin with “internal-”
- For Schema and IP address type, keep the default values
- For Listeners, keep the default.
- For Availability Zones, select VPC that you used for your EC2 instances.
- Choose Next: Confgiure Security Settings.
- For this tutorial, you are not creating an HTTPS listener. Choose Next: Configure Security Groups.
Configure a Security Group for Your Load Balancer
The security group for your load balancer must allow it to communicate with registerd targets both the listener port and the health check port.
- Choose Create a new security group or Select an existing security group.
- For Create New type a name for your security group or if you Select an existing make sure that your security group allow traffic to the load balancer listerner port.
- Choose Next: Configure Routing.
Configure Your Target Group
Create a target group, which is used in request routing.
- For Target group, keep te default, New target group.
- For Name, type a name for the the new target group.
- Keep the default target type(Instance), protocol (HTTP), and port (80).
- For Health checks, keep the default settings.
- Choose Next: Register Targets.
Register Targets with Your Target Group
- For Instances, select one or more instances.
- Keep the default port (80) and choose Add to registered.
- When you have finished selecting instances, choose Next: Review.
Create Your Load Balancer
- On the Review page, choose Create.
- After you are notified that your load balancer was created, choose Close.