I am using serverless to deploy my API on AWS.
In serverless, it allows to deploy a single function:
sls deploy -f <function name>
But it doesn't allow to remove a single function:
sls remove // will remove all functions.
Is there any way to remove single function which won't impact to other functions?
The sls remove command will remove the deployed service, defined in your current working directory, from the provider. It will remove the Fn Function functions from your Fn server.
Invokes a deployed function. You can send event data, read logs and display other important information of the function invocation.
Service. service: app. The service is simply the name of your project. Since Serverless lets us deploy a project in multiple stages (prod, dev, staging…), CloudFormation stacks will contain both the service name and the stage: app-prod , app-dev , etc.
@justin.m.chase suggested:
Simply remove the function in serverless.yml, then run full deploy
sls deploy
the function is removed (Lambda + API Gateway). Perfecto!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With