serverless-aws-alias icon indicating copy to clipboard operation
serverless-aws-alias copied to clipboard

Remove command completely unfunctional.

Open brettswift opened this issue 5 years ago • 1 comments

TL;DR: there's some counter intuitive things with this plugin. One is that it creates an alias with the same name as the stage. (i see the docs on why this is there, and it's a good idea). But it is counter-intuitive to serverless alias remove and see the entire function be deleted.

I would expect only the alias to be deleted, and then serverless remove would delete the function.

original post

I thought I'd do a quick spike to test this plugin and found disappointing results.. however given the activity here I am wondering if I'm doing something dumb.

This is what I did:

serverless create --template aws-nodejs --path cicdFunction

Add plugin to yaml and npm install it.

serverless deploy

--> this gives me 2 cloudformation stacks.. named:

  1. cicdFunction-dev
  2. cicdFunction-dev-dev

Very strange.

Also, when I try to remove it:

serverless remove

I get this:

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

  Use "serverless alias remove --alias=dev" to remove the service.

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

  Your Environment Information -----------------------------
     OS:                     darwin
     Node Version:           10.1.0
     Serverless Version:     1.30.3

Ok, so I'll run that command to remove it.

That doesn't just remove the alias it removes the entire function. I really need control over each independently.

Is this just a new plugin and this is expected or how can I massage it for now?

brettswift avatar Sep 03 '18 03:09 brettswift

Yes, I faced the same issue while removing the master alias. It removes whole deployment stage and resources

m0hdasif avatar Feb 05 '20 19:02 m0hdasif