How to invoke a Serverless function locally using terminal
![Oscar de la Hera Gomez](https://www.delasign.com/CDN/headshots/profile.webp)
![A flower that represents Typescript next to one that represents Serverless, below it sits the text "Invoke Local Function".](https://www.delasign.com/CDN/images/How-to-create-a-Typescript-Serverless-project_2022-09-10-221250_ffvf.webp)
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
![A screenshot of terminal showing you how to set the current directory.](https://www.delasign.com/CDN/images/Set-Current-Directory_2022-09-10-221515_zemp.webp)
Open Terminal and set the current directory.
Step Two: Invoke the function
![A screenshot of terminal showing you how to invoke the hello function created by Serverless in their out of the box project. This out of the box project is our open source project, with a few adaptations that make it work with Typescript.](https://www.delasign.com/CDN/images/Invoke.webp)
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.