How to invoke a Serverless function locally using terminal
A step by step tutorial on running a Serverless function locally using Terminal.
The following tutorial walks you through how to invoke a Serverless function locally using terminal. The tutorial makes use of our Open Source Typescript & Serverless starter project that is available using the link below.
Step One: Set the current directory
Open Terminal and set the current directory.
Step Two: Invoke the function
Run the following line replacing hello with the name of the local function you intend to call.
serverless invoke local --function hello
Where can I find the name of my function?
In serverless.yml, under functions: you can find the name of your function. Please note that the name is that which is indented by one tab in the yaml file.
Any Questions?
We are actively looking for feedback on how to improve this resource. Please send us a note to inquiries@delasign.com with any thoughts or feedback you may have.