HI folks. I’ve added an alb event in my serverless.yml
functions:
events:
- alb:
listenerArn: !Ref ALBListenerId
priority: 1
conditions:
path: /path/url
method:
- POST
resources:
Resources:
SDKALBListener:
Type: AWS::ElasticLoadBalancingV2::Listener
Properties:
DefaultActions:
-
Order: 1
Type: forward
TargetGroupArn: !ImportValue ALBTargetGroupArn
LoadBalancerArn: !ImportValue ALBArn
Port: 80
Protocol: HTTP
With the ALBTargetGroupArn and ALBArn being exported from a different stack. However when I try hit the alb url with matching path I get a 503 error. This generally means the target groups for the load balancer have no registered targets. What could be the cause of this as I’ve clearly added triggers in my serverless.yml? Also noticed that after I deploy the alb trigger is not visible on the lambda dashboard. If I add manually everything works ok