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
How to deploy a single function without deploying other functions on the api using serverless framework #4269
Comments
@Erandakuruneru That's not possible, as The In general, |
Is there any way we can deploy the single function in service. Because we have special requirement to deploy new function rather than deploying all the functions to the service |
@Erandakuruneru You can perform a |
Thanks for opening @Erandakuruneru and thanks for the comments @HyperBrain and @wenderjean 👍 Yes, that's correct. The Serverless Framework AWS integration is based upon CloudFormation so you need to have a stack with functions in place to update functions via direct code pushes to Lambda (the I hope that helps. Closing this one since using this w/o an initial deploy is currently not possible. |
I have three functions function1, function2 and functionUtil both function1 and 2 invoke funcitonUtil. Is there a way to change functionUtil and the change to take effect on both function1 and 2 without having to deploy function1 and 2 individually? Note: functionUtil is not deployed as a unit it only exists inside so other functions can invoke it. it doesn't get invoked from the outside only internally. |
same issue. How to deploy a single cloud function in GCP without removing other cloud functions?
|
@Erandakuruneru Do you get any solution for this issue? |
Still could not find the solution, |
Facing the same issue. I have 10 lambda functions under serverless. If I update one more lambda function in serverless.yml, all 11 functions are to be deployed. Takes a long time to deploy all. |
Updating single function is already possible if provider is AWS, so this issue had been closed. If you need same feature in other providers, I think opening a separate issue is good since we can track issue for each providers. |
@nikhilbhalwankar You can achieve using this by create separate .yaml file for each function. While deploying specific function, you can pass this respective .yaml file of function to the command "sls deploy function -f <function_name> --config <'.yaml file path'>" |
Thanks for this. Very helpful. However, I have one custom authorizer function for all 10 functions. How can I handle such case? |
@nikhilbhalwankar The custom authorizer is lambda function or normal python function, if it's normal function then you don't require to make it is lambda as well as .yaml file. You can just import this function in your lambda function file for your purpose. |
I can confirm sls deploy -f does not work on 2,8.0, it ends up deploying all functions even when an initial deploy has been done (with aws provider) it also zips them into one zip file so the upload limit is reached before it can deploy |
Maybe I am doing something wrong because while deploying python lambda, it zip all the code and deployed for all the lambdas. |
@Satyam8891 Same here, can't find a way do deploy just one file to one lambda, always the whole code is deployed |
The function "get-relationships" you want to update is not yet deployed. Please run "serverless deploy" to deploy your service. After that you can re
deploy your services functions with the "serverless deploy function" command.
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: win32
Node Version: 8.4.0
Serverless Version: 1.22.0
The text was updated successfully, but these errors were encountered: