Fugue.AWS.ECS.LoadBalancer

Module Members

applicationLoadBalancer

(Function)

Configure a Service to use an application load balancer.

Example usage:

lb: ECS.LoadBalancer.applicationLoadBalancer {
  containerName: "nginx",
  containerPort: 80,
  targetGroup: myTargetGroup,
}

Type Signature

 fun { containerName: String,
       containerPort: Int,
       targetGroup: TargetGroup} -> LoadBalancer
Argument: containerName

The name of the container to send traffic to.

Type: String

Argument: containerPort

The container port that will be receiving load balanced traffic.

Type: Int

Argument: targetGroup

The targetGroup to register container instances running this task with.

Type: TargetGroup

Returns:

The Fugue.Core.AWS.ECS.LoadBalancer value.

Type: LoadBalancer

classicLoadBalancer

(Function)

Configure a Service to use a classic load balancer.

Example usage:

lb: ECS.LoadBalancer.classicLoadBalancer {
  containerName: "nginx",
  containerPort: 80,
  loadBalancer: myElb,
}

Type Signature

 fun { containerName: String,
       containerPort: Int,
       loadBalancer: LoadBalancer} -> LoadBalancer
Argument: containerName

The name of the container to send traffic to.

Type: String

Argument: containerPort

The container port that will be receiving load balanced traffic. Must be mapped to a reserved port in the task definition. Ephemeral ports are not supported by classic load balancers.

Type: Int

Argument: loadBalancer

The LoadBalancer to connect container instances running this task to. The LoadBalancer must have a Listener configured pointing to hostPort corresponding to the provided containerPort.

Type: LoadBalancer

Returns:

The Fugue.Core.AWS.ECS.LoadBalancer value.

Type: LoadBalancer