I'm trying to deploy one particular lambda only to my dev environment.
My serverless.yml looks like this:
plugins:
- serverless-plugin-select
...
dev-only:
stages:
- dev
handler: src/dev-only.handler
events:
- http:
path: /dev-only
method: get
... (and bunch of other functions)
When I do sls deploy --stage dev that dev-only function is deployed and no errors thrown, great!
But when I try to deploy that same serverless project into staging stage the CloudFormation update completes fine but serverless framework artifact modification throws an error:
Serverless: Removing old service artifacts from S3...
Serverless Error ---------------------------------------
Function "dev-only" doesn't exist in this Service
Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Issues: forum.serverless.com
Your Environment Information ---------------------------
Operating System: darwin
Node Version: 12.16.2
Framework Version: 1.62.0
Plugin Version: 3.3.0
SDK Version: 2.3.0
Components Core Version: 1.1.2
Components CLI Version: 1.4.0
I checked the source code which looks like it doesn't handle the situation where I want to skip function deploy in stage where that function hasn't ever been deployed.
Am I missing something here or is this a bug that needs fixing?
I'm trying to deploy one particular lambda only to my dev environment.
My serverless.yml looks like this:
When I do
sls deploy --stage devthat dev-only function is deployed and no errors thrown, great!But when I try to deploy that same serverless project into
stagingstage the CloudFormation update completes fine but serverless framework artifact modification throws an error:I checked the source code which looks like it doesn't handle the situation where I want to skip function deploy in stage where that function hasn't ever been deployed.
Am I missing something here or is this a bug that needs fixing?