Menu
AWS CloudFormation
User Guide (API Version 2010-05-15)

Amazon EC2 Container Service Service LoadBalancers

LoadBalancers is a property of the AWS::ECS::Service resource that specifies the load balancer to associate with an Amazon EC2 Container Service (Amazon ECS) service.

Syntax

JSON

Copy
{ "ContainerName" : String, "ContainerPort" : Integer, "LoadBalancerName" : String, "TargetGroupArn" : String }

YAML

Copy
ContainerName: String ContainerPort: Integer LoadBalancerName: String TargetGroupArn: String

Properties

ContainerName

The name of a container to use with the load balancer.

Required: Yes

Type: String

ContainerPort

The port number on the container to direct load balancer traffic to. Your container instances must allow ingress traffic on this port.

Required: Yes

Type: Integer

LoadBalancerName

The name of a Classic Load Balancer to associate with the Amazon ECS service.

Required: No

Type: String

TargetGroupArn

An Application load balancer target group Amazon Resource Name (ARN) to associate with the Amazon ECS service.

Required: No

Type: String

On this page: