Open AnthonyWC opened 6 years ago
Hi @AnthonyWC , regarding the dash I can confirm that it is a bug in the alias plugin, because it does not use the Serverless function name transform. This has to be fixed.
For the step-functions, did you try to reverse the order of the two plugins in serverless.yml?
If you mean the order under plugins in serverless.yml; I wasn't aware that the order makes a difference (is that documented anywhere..) but I did try both as you suggested; it still gave me error though.
Since step-function itself reference lambda arn resource that itself is aliased, in order for the plugin to work it will have to reference the actual arn with alias in the arn:alias format.
Yes, the order is important and defines the order of the hook executions, so the order in which the plugins are called.
Regarding the dashes, there is a workaround: You can define your function (the property) in your serverless.yml without dashes, but add a name
property to the function where you set the name with dashes. Serverless will use that name to create the function and the alias plugin will reference it correctly.
Do you use @horike37 's step function plugin?
ok good to know there is a workaround; although I am no longer using alias. And yes I am using the step-function from horike37.
ok good to know there is a workaround; although I am no longer using alias. And yes I am using the step-function from horike37.
@AnthonyWC, what lib did you decide to use instead?
I was facing the exact same issue and the workaround for me was to disable the events
portion of the Step function.
# events:
# - schedule: rate(2 hours)
# enabled: true
Using a combination of the alias + stepfunction plugin caused the following error:
(I am guessing that alias plugin doesn't understand that stepfunction plugin has changed the resource name, e.g. - to Dash)
Also if step-function itself reference an alias version of the function; then deployment will also fail since the alias function has not been created yet; and one cannot deploy alias version of function without first deploying service. So I had to deploy the service w/o step-function first then add the step-function part also but it still fails w/ above.
Also opened issue here: https://github.com/horike37/serverless-step-functions/issues/127