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

Support for multiple API events per function

Open TomiTakussaari opened this issue 7 years ago • 0 comments

So i'm trying to create lambda based webapp, that would need to handle all kinds of URLs, based on serverless-http.

serverless.yml would look like this:

functions:
  myApp:
    handler: lambda.handler
    events:
      - http:
          path: /{any+}
          method: ANY
      - http:
          path: /
          method: ANY

But this fails with error "Resource MyAppLambdaPermission already exists" when using serverless-sam.

I guess it should create permission only once per function in here ?

TomiTakussaari avatar Jan 29 '18 10:01 TomiTakussaari