Elastic Load Balancing
Application Load Balancers

Create an HTTP Listener for Your Application Load Balancer

A listener is a process that checks for connection requests. You define a listener when you create your load balancer, and you can add listeners to your load balancer at any time.

The information on this page helps you create an HTTP listener for your load balancer. To add an HTTPS listener to your load balancer, see Create an HTTPS Listener for Your Application Load Balancer.

Prerequisites

  • To add a forward action to the default listener rule, you must specify an available target group. For more information, see Create a Target Group.

Add an HTTP Listener

You configure a listener with a protocol and a port for connections from clients to the load balancer, and a target group for the default listener rule. For more information, see Listener Configuration.

To add an HTTP listener using the console

  1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.

  2. On the navigation pane, under LOAD BALANCING, choose Load Balancers.

  3. Select a load balancer, and choose Listeners, Add listener.

  4. For Protocol : port, choose HTTP and keep the default port or type a different port.

  5. For Default actions, do one of the following:

    • Choose Add action, Forward to and choose a target group.

    • Choose Add action, Redirect to and provide the URL for the redirect. For more information, see Redirect Actions.

    • Choose Add action, Return fixed response and provide a response code and optional response body. For more information, see Fixed-Response Actions.

    To save the action, choose the checkmark icon.

  6. Choose Save.

  7. (Optional) To define additional listener rules that forward requests based on a path pattern or a hostname, see Add a Rule.

To add an HTTP listener using the AWS CLI

Use the create-listener command to create the listener and default rule, and the create-rule command to define additional listener rules.