How to setup AWS application load balancer

How to setup AWS application load balancer?

Objective

The objective of this AWS Application Load Balancer lab is to learn how to create and configure an AWS Application Load Balancer to distribute incoming traffic across multiple EC2 instances in different availability zones.

Prerequisites for this lab

  • An AWS account.
  • You need to have basic knowledge of AWS services like EC2 instances, VPC, and Security groups.
  • Setup 2 EC2 instances in different availability zones. For example, here two EC2s are configured, one in availability zones (ap-south-1a) and another one in availability zones (ap-south-1b).
ec2-pre-configuration
  • A target group to register the EC2 instances with.
target-group-configuration

Steps by step guide for creating AWS application load balancer

  1. Log in to your AWS Management Console
  2. Search “Service” and select “EC2”
  3. In the EC2 dashboard, click on the “Load Balancers” option under the “LOAD BALANCING” section
  4. Click on the “Create Load Balancer” button
    balancing_dashboard
  5. Select the “Application Load Balancer” option and click on the “Create” button
    application_load_balancer_create
  6. In the “Configure Load Balancer” page, configure the following settings:
    Basic Configuration: Give a name, Scheme ( “Internet-facing” or “Internal” option depending on your requirements), and IP address type.
    load_balancer_basic_config
  7. Network Mapping: Choose the VPC, and Select the availability zones where you want to distribute traffic.
    load_balancer_network_config
  8. Security Groups: Create and configure a security group for the load balancer and allow inbound traffic for HTTP or HTTPS protocol
    load_balancer_security_group_config
  9. Listener and routing: Configure Listeners and target group, and listener rules.
    load_balancer_target_group_config
  10. Check your configuration summary, and Click “Create load balancer”
    load_balancer_summary_config
  11. Load balancer created! Now, You can test the load balancer by accessing the DNS name in a web browser or using a load testing tool.
    load_balancer_app_001
    load_balancer_app_002

Note: Make sure to terminate the EC2 instances and delete the resources once the lab is completed to avoid unnecessary charges.

How to setup AWS application load balancer
Scroll to top