Open Abhijith-Nagaraja opened 3 years ago
what is the command you run?
@Enase : sls deploy
@Enase : Update. I ran with SLS_DEBUG on and set the level to verbose.... so here is the updated error report
Serverless Error ---------------------------------------
ServerlessError: Export 'projectName-stageName-ServerlessAliasReference' does not exist.
at /var/jenkins/workspace/projectName/node_modules/serverless/lib/plugins/aws/provider.js:1406:27
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Issues: forum.serverless.com
Unfortunately I cannot help with it.
@Enase: Created a PR for this https://github.com/serverless-heaven/serverless-aws-alias/pull/201 by looking at your serverless-aws-alias-fixed and it works. I am able to create alias successfully. I don't know why your PR is pending in such long time and it is little out of date in terms of dependencies.
So hopefully this can get merged quickly so that we can drop our patch works
@Abhijith-Nagaraja repository owner doesn't replay more then a year. I've created serverless-aws-alias-fixed
by request of community members.
PS: I don't think that it's a good choice to use this plugin if you start a new project. Consider to use stages without aliases.
@Enase Awesome, checking that out now. 👍👍👍
remove - serverless-aws-alias plugin and dont install that plugin.
It looks like the newer versions of serverless don't require you to use that to define stages. I tried it and it fixed the problem.
Those are still struggling to get this working in 2021:
I found alternative solution
I used this plugin: https://github.com/davidgf/serverless-plugin-canary-deployments
and use this in your yml file
plugins:
- serverless-plugin-canary-deployments
functions:
hello:
handler: handler.hello
events:
- http: GET hello
deploymentSettings:
type: AllAtOnce
alias: sampleAlias
I'm also encountering this issue.
- serverless-plugin-canary-deployments
This works but it will throw log group alias already exist error when deploying to existing stage with same alias. Like if you have deployed it on all the following stages: dev, stg, prd and you are again deploying a change on dev.
I am just getting started with serverless-aws-alias. But as soon as I include this plugin my build fails
Version: 1.8.0
Command:
sls deploy
Error Details
Serverless.yaml
This may be related to this issue: https://github.com/serverless-heaven/serverless-aws-alias/issues/181 and https://github.com/serverless-heaven/serverless-aws-alias/pull/186
I also applied the fix provided by @Enase in here https://github.com/serverless-heaven/serverless-aws-alias/pull/186#issuecomment-762337467 but that also did not help.
One of issue tagged here mention here about roles, and also fix provided by @Enase is also for roles. But I am not mentioning role at function level or at provider level. Is that mandatory?