Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect error: Invalid stage name v4-stg #5693

Closed
ceefour opened this issue Jan 13, 2019 · 5 comments
Closed

Incorrect error: Invalid stage name v4-stg #5693

ceefour opened this issue Jan 13, 2019 · 5 comments
Labels

Comments

@ceefour
Copy link

ceefour commented Jan 13, 2019

Serverless Framework forbids hyphen but API Gateway can contain hyphen

Description

  • What went wrong?

During serverless deploy:

Serverless plugin "/builds/heartenly/heartenly-profile/node_modules/serverless/lib/plugins/aws/provider/awsProvider.js" initialization errored: Invalid stage name v4-stg: it should contains only [a-zA-Z0-9] for AWS provider if http event are present since API Gateway stage name cannot contains hyphens.

  • What did you expect should have happened?

Deploy successful because hyphen is supported. Previously I was using ClaudiaJS with v4-stg stage name without any problem. Here's additional proof:

image

  • What was the config you used?
provider:
  name: aws
  runtime: nodejs8.10
  stage: v4-stg
  region: us-east-1
  • What stacktrace or error message from your provider did you see?

    Invalid stage name v4-stg: it should contains only [a-zA-Z0-9] for AWS provider if http event are present since API Gateway stage name cannot contains hyphens.Invalid stage name v4-stg: it should contains only [a-zA-Z0-9] for AWS provider if http event are present since API Gateway stage name cannot contains hyphens.

Similar or dependent issues:

Additional Data

  • Serverless Framework Version you're using: 1.36.0

  • Operating System: Windows 10 64-bit

  • Stack Trace:

    Invalid stage name v4-stg: it should contains only [a-zA-Z0-9] for AWS provider if http event are present since API Gateway stage name cannot contains hyphens.Invalid stage name v4-stg: it should contains only [a-zA-Z0-9] for AWS provider if http event are present since API Gateway stage name cannot contains hyphens.

  • Provider Error messages:

    Invalid stage name v4-stg: it should contains only [a-zA-Z0-9] for AWS provider if http event are present since API Gateway stage name cannot contains hyphens.Invalid stage name v4-stg: it should contains only [a-zA-Z0-9] for AWS provider if http event are present since API Gateway stage name cannot contains hyphens.

@nx-jackal
Copy link

I didn't use hyphen, even specifying a default stage like this fails as well
stage: ${opt:stage, 'dev'}

@aldarund
Copy link

same issue
stage: ${env:STAGE}

Invalid stage name ${env:STAGE}: it should

It seems like serverless dont interpolate stage at all

@dschep
Copy link
Contributor

dschep commented Jan 14, 2019

closed by #5686

@luanmuniz
Copy link
Contributor

@dschep Shouldn't you close this issue?

@pmuens pmuens changed the title Incorrect error: Invalid stage name v4-stg: it should contains only [a-zA-Z0-9] for AWS provider if http event are present since API Gateway stage name cannot contains hyphens.Invalid stage name v4-stg: it should contains only [a-zA-Z0-9] for AWS provider if http event are present since API Gateway stage name cannot contains hyphens. Incorrect error: Invalid stage name v4-stg Jan 15, 2019
@pmuens
Copy link
Contributor

pmuens commented Jan 15, 2019

Closing since this shoul've been fixed via #5686.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants