ELBv1 load balancer cross zone load balancing is not enabled Affecting ELB service in AWS


Severity

0.0
medium
0
10
Severity Framework
Snyk CCSS
Rule category
Availability/ Redundancy

Is your environment affected by this misconfiguration?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
Frameworks
AWS-Well-ArchitectedCSA-CCMGDPRHIPAAISO-27001NIST-800-53SOC-2
  • Snyk IDSNYK-CC-00094
  • creditSnyk Research Team

Description

Having Availability Zones with cross-zone load balancing enabled for the VPC reduces the risk of failure at a single location as the AWS Elastic Load Balancers distribute the traffic to the other locations.

How to fix?

Set the cross_zone_load_balancing attribute to true.

Example Configuration

resource "aws_elb" "elb-cross-zone" {
  name            = "elb-cross-zone"
  security_groups = ["${aws_security_group.elb-cross-zone-group.id}"]
  subnets         = ["${aws_default_subnet.default.id}"]

  listener {
    instance_port     = 80
    instance_protocol = "http"
    lb_port           = 80
    lb_protocol       = "http"
  }

  cross_zone_load_balancing   = true
  idle_timeout                = 400
  connection_draining         = true
  connection_draining_timeout = 400

  tags = {
    Name = "elb-cross-zone"
  }
}