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

Added to existing repo, causes stageName already exists #3

Open
camhart opened this issue Jan 12, 2017 · 2 comments
Open

Added to existing repo, causes stageName already exists #3

camhart opened this issue Jan 12, 2017 · 2 comments

Comments

@camhart
Copy link

camhart commented Jan 12, 2017

 Serverless Error ---------------------------------------

     An error occurred while provisioning your stack: ApiGatewayStage
     - myStageName already exists.

  Stack Trace --------------------------------------------

Not sure if there is anyway to get around this....

I just did sls remove, and then sls deploy and it resolved it. But you can't just do that everytime.

@paulSambolin
Copy link
Owner

My first issue! Thanks for posting, I can't work on a fix until this weekend as I am traveling but could you provide some more info? Serverless version, did you make any changes to the code before re-deploying?, and anything else you think might be relevant.

@camhart
Copy link
Author

camhart commented Jan 12, 2017

Reproduction steps:

  1. mkdir testing
  2. cd testing
  3. sls create -t aws-nodejs
  4. add an http event to the function:
    events:
      - http:
          path: hello
          method: get
  1. sls deploy
  2. npm install serverless-enable-api-logs
  3. make changes to serverless.yml--enable plugin.
plugins:
  - serverless-enable-api-logs
  1. sls deploy

Error:

............Serverless: Deployment failed!

  Serverless Error ---------------------------------------

     An error occurred while provisioning your stack: ApiGatewayStage
     - dev already exists.

  Get Support --------------------------------------------
     Docs:          docs.serverless.com
     Bugs:          github.com/serverless/serverless/issues

  Your Environment Information -----------------------------
     OS:                 win32
     Node Version:       6.9.2
     Serverless Version: 1.5.0

I don't know how easy this will be to fix. From what I can tell, once you deploy using a CloudFormation Deployment using the stageName, you can't deploy using a Stage resource that has the same stageName... This might be something that needs taken up with AWS.

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

No branches or pull requests

2 participants