‹ Return to How tos

Create a Lightsail load balancer and attach instances to it

Last updated: June 12, 2019

Create a Lightsail load balancer to add redundancy to your application or to handle more web traffic. After the load balancer is created, you can attach the Lightsail instances that you want to balance. To learn more, see Lightsail load balancers

Prerequisite

Before you begin, make sure you've prepared your Lightsail instances for load balancing. For more information, see Configure your Lightsail instances for load balancing.

Create a Lightsail load balancer

  1. Sign in to the Lightsail console.

  2. Choose the Networking tab.

  3. Choose Create load balancer.

  4. Confirm the AWS Region where the load balancer will be created, or choose Change region to select a different region.

    Note

    By default, the load balancer will be created with port 80 open to accept HTTP requests. After the load balancer is created, you can create an SSL/TLS certificate and configure HTTPS. For more information, see Create an SSL/TLS certificate for your Lightsail load balancer

  5. Enter a unique name for your load balancer.

  6. Choose one of the following options to add tags to your load balancer:

    • Add key-only tags or Edit key-only tags (if tags have already been added). Enter your new tag into the tag key text box, and press Enter. Choose Save when you’re done entering your tags to add them, or choose Cancel to not add them.

      Key-only tags in the Lightsail console.
    • Create a key-value tag, then enter a key into the Key text box, and a value into the Value text box. Choose Save when you’re done entering your tags, or choose Cancel to not add them.

      Key-value tags can only be added one at a time before saving. To add more than one key-value tag, repeat the previous steps.

      Key-value tags in the Lightsail console.

    Note

    For more information about key-only and key-value tags, see Tags in Amazon Lightsail.

  7. Choose Create load balancer.

Attach Lightsail instances to your load balancer

After your load balancer is created, Lightsail takes you to the load balancer management page. If you need to find that page again, choose the Networking tab on the Lightsail home page, and then choose the name of your Lightsail load balancer to manage it.

Note

Your Lightsail instance must be running before you can successfully attach it to your load balancer.

  1. On the load balancer management page, choose Target instances.

  2. Choose an instance in the Target instances drop-down menu.

  3. Choose Attach. Attachment can take several minutes.

    Attach another instance to the load balancer by choosing Attach another, and then repeating the preceding steps.

Next steps

After the load balancer is created, and your instances are attached, complete the following next steps to configure your load balancer:

If you experience issues with your load balancer, see Troubleshooting Lightsail load balancer issues