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

Deployment with existing stack causes error #8

Open
helveticafire opened this issue May 16, 2017 · 3 comments
Open

Deployment with existing stack causes error #8

helveticafire opened this issue May 16, 2017 · 3 comments

Comments

@helveticafire
Copy link

Thanks for the plugin. I am getting this error when your plugin to my serverless project file:

$ sls deploy
Serverless: Installing required Python packages...
Serverless: Linking required Python packages...
Serverless: Packaging service...
Serverless: Unlinking required Python packages...
Serverless: Deploying additional stacks...
Serverless: Additional stack permanent has not changed.
Serverless: Enabled logging for ApiGateway Stage
Serverless: Uploading CloudFormation file to S3...
Serverless: Uploading service .zip file to S3 (17.21 MB)...
Serverless: Updating Stack...
Serverless: Checking Stack update progress...
..............................................................................................................................................Serverless: Deployment failed!

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

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

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

ServerlessError: An error occurred while provisioning your stack: ApiGatewayStage - foo already exists.
    at provider.request.then (/Users/foo/.nvm/versions/node/v6.10.1/lib/node_modules/serverless/lib/plugins/aws/lib/monitorStack.js:112:33)
From previous event:
    at AwsDeploy.monitorStack (/Users/foo/.nvm/versions/node/v6.10.1/lib/node_modules/serverless/lib/plugins/aws/lib/monitorStack.js:29:12)
    at provider.request.then (/Users/foo/.nvm/versions/node/v6.10.1/lib/node_modules/serverless/lib/plugins/aws/lib/updateStack.js:90:30)
From previous event:
    at AwsDeploy.update (/Users/foo/.nvm/versions/node/v6.10.1/lib/node_modules/serverless/lib/plugins/aws/lib/updateStack.js:90:8)
From previous event:
    at AwsDeploy.BbPromise.bind.then.then (/Users/foo/.nvm/versions/node/v6.10.1/lib/node_modules/serverless/lib/plugins/aws/lib/updateStack.js:111:12)
From previous event:
    at AwsDeploy.updateStack (/Users/foo/.nvm/versions/node/v6.10.1/lib/node_modules/serverless/lib/plugins/aws/lib/updateStack.js:103:8)
From previous event:
    at Object.deploy:deploy [as fn] (/Users/foo/.nvm/versions/node/v6.10.1/lib/node_modules/serverless/lib/plugins/aws/deploy/index.js:55:10)
    at BbPromise.reduce (/Users/foo/.nvm/versions/node/v6.10.1/lib/node_modules/serverless/lib/classes/PluginManager.js:210:55)
    at runCallback (timers.js:666:20)
    at tryOnImmediate (timers.js:639:5)
    at processImmediate [as _immediateCallback] (timers.js:611:5)
From previous event:
    at PluginManager.invoke (/Users/foo/.nvm/versions/node/v6.10.1/lib/node_modules/serverless/lib/classes/PluginManager.js:210:22)
    at PluginManager.run (/Users/foo/.nvm/versions/node/v6.10.1/lib/node_modules/serverless/lib/classes/PluginManager.js:225:17)
    at Serverless.run (/Users/foo/.nvm/versions/node/v6.10.1/lib/node_modules/serverless/lib/Serverless.js:97:31)
    at serverless.init.then (/Users/foo/.nvm/versions/node/v6.10.1/lib/node_modules/serverless/bin/serverless:23:50)

  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:       6.10.1
     Serverless Version: 1.10.1

et me know if you additional details?

@paulSambolin
Copy link
Owner

The plugin is using the stage variable from serverless deployment. You might already have an API Gateway stage resource with the name "foo" deployed in your account. Either delete that resource and re-deploy or deploy with a different stage name. Let me know if this solves the issue

@mattfysh
Copy link

This seems strange not to support the use case of enabling logging on a pre-existing API Gateway resource

@helveticafire
Copy link
Author

I would agree with @mattfysh on this. I think it is reasonable to expect that you would not have to remove any part of a living system i.e. "a production system" so that you would not have any downtime for a service. It is possible to enable this feature on the AWS API Gateway console after a stage variable has been created so it would be great to have this ability in this plugin too. Thank you for the plugin. I will be sure to use it from the start next time.

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

3 participants