Deploy fails with "pathmapping - Invalid stage identifier specified"
See original GitHub issueI can’t seem to add serverless-api-stage
to a project which contains the serverless-domain-manager
plugin. Deployment fails with the error:
...
Serverless: Uploading CloudFormation file to S3...
Serverless: Uploading artifacts...
Serverless: Uploading service .zip file to S3 (15.76 MB)...
Serverless: Validating template...
Serverless: Updating Stack...
Serverless: Checking Stack update progress...
..........................................
Serverless: Operation failed!
Serverless Error ---------------------------------------
An error occurred: pathmapping - Invalid stage identifier specified.
Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Forums: forum.serverless.com
Chat: gitter.im/serverless/serverless
Your Environment Information -----------------------------
OS: darwin
Node Version: 9.3.0
Serverless Version: 1.26.1
I’ve narrowed it down to an interaction between the two plugins.
Here’s a repo which demonstrates the issue:
https://github.com/aneilbaboo/serverless-api-stage-issue
Note:
-
This comment hints at a potential solution: https://github.com/serverless/serverless/issues/4029#issuecomment-386045929
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:8 (2 by maintainers)
Top Results From Across the Web
BasePathMapping deployment error: Invalid stage identifier ...
It tries to deploy the BasePathMapping before the ApiGateway Stage, which results in the error: Invalid stage identifier specified.
Read more >AWS CloudFormation: pathmapping - Invalid stage identifier ...
when I ran the stack, I kept my deployed API stageName same as the BasePathMapping stageName and able to successfully create the Mapping....
Read more >Attempting a custom mapping for ApiGateway
I'm attempting to do a base path mapping based on stage. ... provisioning your stack: APIDomainMapping - Invalid stage identifier specified.
Read more >The template had one minor issue i.e Stage resource needs to ...
Invalid stage identifier specified (Service: AmazonApiGateway; Status Code: 400; Error Code: BadRequestException; Request ID: ...
Read more >AWS::ApiGatewayV2::ApiMapping - AWS CloudFormation
The AWS::ApiGatewayV2::ApiMapping resource contains an API mapping. An API mapping relates a path of your custom domain name to a stage of your...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi there! This issue should be fixed in version 3.1.0, since we no longer create the basepath mapping through CloudFormation.
Let us know if you’re still experiencing this problem - the
pathmapping
resource should never exist in CloudFormation once you’ve migrated to 3.1.0.Version 3.1.0 and above fixed the issue related to bathpathmapping.