Create Application Load Balancer with WAF integration
Using the AWS Management Console, we will create an Application Load Balancer, link it to the AWS WAF
ACL we previously created and test.
3.1 Create Application Load Balancer
- Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.
- From the console dashboard, choose Load Balancers from the Load Balancing section.
- Click Create Load Balancer.
- Click Create under the Application Load Balancer section.
- Enter Name for Application Load Balancer such as
lab-alb. Select all availability zones in your region then click Next. You will need to click Next again to accept your load balancer is using insecure listener.
- Click Create a new security group and enter name and description such as
lab-alb and accept default of open to internet.
- Accept defaults and enter Name such as
lab-alb and click Next.
- From the list of instances click the check box and then Add to registered button. Then click Next.
- Review the details and click Create.
- A successful message should appear, click Close.
- Take note of the DNS name under the Description tab, you will need this for testing.
3.2 Configure Application Load Balancer with WAF
- Open the AWS WAF console at https://console.aws.amazon.com/wafv2/home?region=global#/webacls.
- In the navigation pane, choose Web ACLs.
- Choose the web ACL that you want to associate with the Application Load Balancer.
- On the Rules tab, under AWS resources using this web ACL, choose Add association.
- When prompted, use the Resource list to choose the Application Load Balancer that you want to associate this web ACL such as
lab-alb and click Add.
- The Application Load Balancer should now appear under resources using.
- You can now test access by entering the DNS name of your load balancer in a web browser.