sapessi / serverless-sam

Serverless framework plugin to export AWS SAM templates for a service
Apache License 2.0
152 stars 26 forks source link

Support for multiple API events per function #17

Open TomiTakussaari opened 6 years ago

TomiTakussaari commented 6 years ago

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 ?