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

Incompatibility with serverless-domain-manager: Base path already exists for this domain name

Open odannyboy000 opened this issue 7 years ago • 3 comments
trafficstars

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.

  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 v1 b) So far this is working. A new entry in my Custom Domain is created and it points to the dev stage. The basePath v1 is created thanks to the serverless-domain-manager plugin.
  2. Deploy a new API version to the 'v1' Custom Domain Name basePath with a new alias. a) serverless deploy --stage dev --alias v2 b) This is when I get the pathmapping error. c) The cloudformation-template-update-alias-stack CloudFormation 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.

odannyboy000 avatar Aug 12 '18 22:08 odannyboy000

I am facing the same issue as well. Any progress???

anuragk-sportsbet avatar Dec 10 '18 06:12 anuragk-sportsbet

any ?

ivanzamoraarias avatar Mar 18 '19 20:03 ivanzamoraarias

Any update ??

vcelisBP avatar Oct 09 '20 17:10 vcelisBP