question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Deploy fails with "pathmapping - Invalid stage identifier specified"

See original GitHub issue

I 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:

  1. I cross-posted this issue to serverless-api-stage.

  2. This comment hints at a potential solution: https://github.com/serverless/serverless/issues/4029#issuecomment-386045929

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
captainsiddcommented, Mar 1, 2019

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.

1reaction
alemayehutlhncommented, May 7, 2019

Version 3.1.0 and above fixed the issue related to bathpathmapping.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found