aws::load-balancer

Create a Load Balancer.

Example

aws::load-balancer elb
    name: "elb"
    security-groups: [
        $(aws::security-group security-group)
    ]
    subnets: [
        $(aws::subnet subnet-us-east-2a)
    ]
    instances: [
        $(aws::instance instance-us-east-2a),
        $(aws::instance instance-us-east-2b)
    ]

    listener
        instance-port: "443"
        instance-protocol: "HTTP"
        load-balancer-port: "443"
        protocol: "HTTP"
    end

    attributes
        connection-draining
            enabled: false
            timeout: 300
        end
    end
end

Attributes

Attribute Description
health-check subresource

The HealthCheck subresource for this load balancer.

healthy-threshold
The number of health check successes required to move an instance to the ‘Healthy’ state.
interval
The interval, in seconds, between health checks of an instance
target
The instance that is being checked
timeout
The amount of time, in seconds, a lack of response means a failed health check
unhealthy-threshold
The number of health check failures required to move an instance to the ‘Unhealthy’ state.
instances set The instances to associate with this load balancer.
listener set subresource

The listeners to associate with this load balancer. (Required)

instance-port
The port on which the instance is listening.
instance-protocol
The protocol to use for routing traffic to instances. Valid values are HTTP, HTTPS, TCP or SSL.
load-balancer-port
The port on which the load balancer is listening.
protocol
The load balancer transport protocol to use for routing: HTTP, HTTPS, TCP, or SSL. Valid values are HTTP, HTTPS, TCP or SSL.
ssl-certificate-id
The Amazon Resource Name(ARN) of the server certificate.
policy subresource

The policy configuration for the listener.

type
The type of the policy. Cannot be set if predefined-policy is set. Can only be set if enabled-attributes is set.
enabled-attributes set
A set of enabled attributes for the policy. Cannot be set if predefined-policy is set. Can only be set if type is set.
predefined-policy
The name of a predefined policy. Cannot be set if any of type or enabled-attributes is set.
name The load balancer name. (Required)
scheme The scheme - either internal or internet-facing. (Required)
security-groups set The security groups to associate with this load balancer. (Required)
subnets set Subnet IDs to associate with this load balancer. (Required)
tags map List of tags associated with the load balancer.
attribute subresource

The attributes for the Load Balancer.

access-log subresource

The Access Log setting for the Load Balancer.

emit-interval
The interval for publishing the access logs. Required if enabled set to true.
enabled
If set to true, the load balancer captures detailed information of all requests and delivers the information to the Amazon S3 bucket that you specify. Defaults to false.
bucket
The Amazon S3 bucket where the access logs are stored. Required if enabled set to true.
bucket-prefix
The folder path in the bucket where to keep the logs.
connection-draining subresource

Connection Draining setting for Load Balancer.

enabled
If set to true, the load balancer allows existing requests to complete before the load balancer shifts traffic away from a deregistered or unhealthy instance. Defaults to false.
timeout
The maximum time, in seconds, to keep the existing connections open before deregistering the instances. Defaults to 300.
cross-zone-load-balancing subresource

Cross Zone Load Balancing setting for the Load Balancer.

enabled
If enabled, the load balancer routes the request traffic evenly across all instances regardless of the Availability Zones. Defaults to false.
connection-settings subresource

The connection setting for the Load balancer.

idle-timeout
The amount in seconds the load balancer allows the connections to remain idle (no data is sent over the connection) for the specified duration. Defaults to 600.

Outputs

Attribute Description
dns-name The public DNS name of this load balancer.
hosted-zone-id The hosted zone ID for the Load Balancer.