serverless-offline icon indicating copy to clipboard operation
serverless-offline copied to clipboard

Extend support for ALB event paths

Open apokryfos opened this issue 2 years ago • 0 comments

Feature Request

Support ? wildcards in ALB event path condition.

Sample Code

The following should work:

functions:
  myFunc:
    handler: alb.handler
    events:
      - alb:
          listenerArn: <arn>
          priority: <priority>
          conditions:
            path: /api/v?/*

The above current does not work. Based on https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-listeners.html#path-conditions the ? should work in order to match exactly 1 character

i.e. /api/v1/anything should match /api/v2/anything should match /api/v123/anything should not match /api/v/anything should not match

apokryfos avatar Sep 18 '23 15:09 apokryfos