serverless-aws-alias icon indicating copy to clipboard operation
serverless-aws-alias copied to clipboard

Is it supported to deploy 2 methods in 2 serverless files, with alias?

Open VivinLancelot opened this issue 7 years ago • 0 comments
trafficstars

For example, this is what I want to do:

folder1\serverless.yml

provider:
  apiGateway:
    restApiId: xxxxxx
functions:
  func1:
    events:
      - http:
        path: /test/func1
        method: get

folder2\serverless.yml

provider:
  apiGateway:
    restApiId: xxxxxx
functions:
  func2:
    events:
      - http:
        path: /test/func2
        method: get

As they are sharing the same restApiId, they will be deployed to a single resource root and a single stage. I deployed under folder1 then under folder2. My test result is that func1 will be invoked by alias, but func2 will not.

I have read #69 and I think if they are deployed to different stages, the plugin would work well. But when they are deployed to a single stage, maybe it would not work?

VivinLancelot avatar Sep 20 '18 10:09 VivinLancelot