serverless-aws-alias
serverless-aws-alias copied to clipboard
Incompatibility with serverless-domain-manager: Base path already exists for this domain name
I'm having trouble getting this plugin to work alongside the serverless-domain-manager plugin. I saw you added support for serverless-domain-manager in 1.7.0, however I believe my usecase isn't handled.
The error I receive is the classic:
pathmapping - Base path already exists for this domain name
In serverless.yml:
customDomain:
domainName: mydomain.com
stage: ${{self:provider.stage}}
basePath: v1
What I'm attempting to accomplish: 1.
- Create base path mapping called 'v1', pointing to a stage (which is an alias thanks to your plugin)
a) Using the alias plugin:
serverless deploy --stage dev --alias v1b) So far this is working. A new entry in my Custom Domain is created and it points to thedevstage. The basePathv1is created thanks to theserverless-domain-managerplugin. - Deploy a new API version to the 'v1' Custom Domain Name
basePathwith a new alias. a)serverless deploy --stage dev --alias v2b) This is when I get thepathmappingerror. c) Thecloudformation-template-update-alias-stackCloudFormation stack is attempting to create the basePath again.
To recap, I was hoping that the basePath would be set to {function}:{stage} (e.g. myFunction:v2) but I get an error instead.
Additional tests:
I can get this plugin to work successfully if I update the basePath in serverless.yml and create a new alias on every serverless deploy call, but since I'm using the basePath for API versioning, this isn't a solution for me.
Any help or guidance would be greatly appreciated.
I am facing the same issue as well. Any progress???
any ?
Any update ??