Elastic Load Balancer

Load Balancer

class LoadBalancer
name

The name of your load balancer. This is required.

listeners

A list of Listener resources. Determines what ports the load balancer should listen on and where traffic for those ports should be directed. You can only set a single backend port. All your application servers should be listening on the same port, not on ephemeral ports.

subnets

A list of Subnet resources. These are the subnets that the load balancer can create listeners in.

availability_zones

A list of availability zones this load balancer can listen in. If you set subnets then this option is implied and can be left unset.

scheme

By default this is private. This means the database is created on private ip addresses and cannot be accessed directly from the internet. It can be set to internet-facing if you want it to have a public ip address.

security_groups

A list of SecurityGroup resources. These determine which resources the LoadBalancer can access. For example, you could have a load balancer security group that only allowed access to your application instances, but not your database servers.

health_check

A HealthCheck instance that describes how the load balancer should determine the health of its members.

idle_timeout
connection_draining
cross_zone_load_balacning
access_log

An Bucket for storing access logs in.

Listeners

class Listener
protocol

The protocol to listen for. The choices are HTTP, HTTPS, TCP or TCPS.

port

A tcp/ip port to listen on.

instance_protocol

The protocol that your backend expects.

instance_port

The port that your backend is listening on.

ssl_certificate

This is a ServiceCertificate. This is required if your listener is over SSL.

Health checks

class HealthCheck
interval
check
healthy_threshold
unhealthy_threshold
timeout