Use existing target group for ALB event

Hi folks

I’m trying a deploy a lambda which is to be triggered by an ALB, but I’m getting tripped up by the target group. I can’t find a way to specify an existing one, as providing a name just complains that it already exists, and when creating a new one CloudFormation fails with the following error:
API: elasticloadbalancingv2:RegisterTargets elasticloadbalancing principal does not have permission to invoke from target group

Is it possible for me to use an existing target group? If not, what is this principal I need to fix and how do I do it please? Haven’t really used AWS CLI much before.


Solution was just to add an IAM role statement to the yaml:

    - Effect: Allow
        - elasticloadbalancingv2:RegisterTargets
      Resource: ${env:AWS_ALB_ARN}