Serverless: how to remove one function

11,956

@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!

Share:
11,956
Phong Vu
Author by

Phong Vu

Updated on July 16, 2022

Comments

  • Phong Vu
    Phong Vu almost 2 years

    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?