Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

EC2. Load balancer. At least two subnets must be specified

I'm trying to create and configure Load Balancer. The Availability Zones section has only one subnet and one zone for me.

I faced error:

At least two subnets must be specified.

Simple question - what should I do? thanks.

like image 829
Dmitry Grinko Avatar asked Sep 13 '18 20:09

Dmitry Grinko


People also ask

Why does a load balancer need 2 subnets?

ALBs require 2 subnets since so that if 1 availability zone goes down the ALB can still operate on the others.

How many subnets are required for load balancer?

The load balancer must have at least one subnet at all times. You can add at most one subnet per Availability Zone. You cannot add a Local Zone subnet.

How many subnets do you need at a minimum to create an application load balancer ALB on AWS?

Subnets for your load balancer. When you create an Application Load Balancer, you must specify one of the following types of subnets: Availability Zone, Local Zone, or Outpost. You must select at least two Availability Zone subnets.

How many subnets does alb have?

ALB requires at least two subnets across Availability Zones, NLB requires one subnet.


1 Answers

You'll first need to create two or more subnets in your VPC. It's typically good practice to create at least one subnet for each availability zone (AZ) in your region. Be sure to select public/private as is appropriate for your architecture.

There isn't a specific example in the AWS documentation, but be sure to first understand VPC concepts and the creation of subnets. See Scenarios and Examples for the closest example walkthroughs for creating subnets.

Selecting subnets when configuring an ELB should be straightforward now.

like image 59
dmulter Avatar answered Oct 17 '22 22:10

dmulter