I have 2 fargate services that need to be register...
# aws
a
I have 2 fargate services that need to be registered with 2 different target groups. The awsx examples use
portMappings: [listener]
, which looks like a bit of magic. It uses listeners default target group. Can I provide a target group directly instead of a listener?
b
@average-kilobyte-47828 I had to use
portMappings: [{containerPort: xxxx}]
in the taskDefinition and in the service definition:
Copy code
loadBalancers: [
          {
            containerName: '<containerName>',
            containerPort: xxx,
            targetGroupArn: <targetGroupArn>
          }
        ]
👍 1
a
Thanks, I'll see if I can get that to work somehow.
Thanks @broad-gold-44713, this works great
👍 1