# Invoke Lambda Functions Locally

**URL:** <https://discourse.sst.dev/t/invoke-lambda-functions-locally/1325>\
**Category:** Chapter Comments\
**Created:** [October 9, 2019, 1:55am UTC](https://discourse.sst.dev/t/invoke-lambda-functions-locally/1325 "2019-10-09T01:55:24Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![jayair](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/jayair/32/9_2.png) [@jayair](https://discourse.sst.dev/u/jayair)\
**Post date:** [October 9, 2019, 1:55am UTC](https://discourse.sst.dev/t/invoke-lambda-functions-locally/1325/1 "2019-10-09T01:55:24Z")

</div>

Link to chapter - [https://serverless-stack.com/chapters/invoke-lambda-functions-locally.html](https://serverless-stack.com/chapters/invoke-lambda-functions-locally.html)

---

<div class="post-metadata">

**Author:** ![taqtical](https://avatars.discourse-cdn.com/v4/letter/t/65b543/32.png) [@taqtical](https://discourse.sst.dev/u/taqtical)\
**Post date:** [March 1, 2020, 5:31pm UTC](https://discourse.sst.dev/t/invoke-lambda-functions-locally/1325/2 "2020-03-01T17:31:52Z")

</div>

Hi,

Following instructions I’m getting the following message:

Serverless plugin “serverless-bundle” not found. Make sure it’s installed and listed in the “plugins” section of your serverless config file

After installing with “npm i -g serverless-bundle” message is still showing

---

<div class="post-metadata">

**Author:** ![jayair](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/jayair/32/9_2.png) [@jayair](https://discourse.sst.dev/u/jayair)\
**Post date:** [March 8, 2020, 8:33pm UTC](https://discourse.sst.dev/t/invoke-lambda-functions-locally/1325/3 "2020-03-08T20:33:24Z")

</div>

How come you are installing the package globally?

Use this starter [https://github.com/AnomalyInnovations/serverless-nodejs-starter](https://github.com/AnomalyInnovations/serverless-nodejs-starter) and you’ll be fine.

---

<div class="post-metadata">

**Author:** ![owfm](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/owfm/32/806_2.png) [@owfm](https://discourse.sst.dev/u/owfm)\
**Post date:** [April 1, 2020, 7:51am UTC](https://discourse.sst.dev/t/invoke-lambda-functions-locally/1325/4 "2020-04-01T07:51:51Z")

</div>

Isn’t it true that Serverless _automatically_ sets IS\_LOCAL env variable when you run sls invoke local?

---

<div class="post-metadata">

**Author:** ![jayair](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/jayair/32/9_2.png) [@jayair](https://discourse.sst.dev/u/jayair)\
**Post date:** [April 13, 2020, 10:35pm UTC](https://discourse.sst.dev/t/invoke-lambda-functions-locally/1325/5 "2020-04-13T22:35:05Z")

</div>

You are right, it does. We should update the chapter.

---

<div class="post-metadata">

**Author:** ![josefnorlin](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/josefnorlin/32/953_2.png) [@josefnorlin](https://discourse.sst.dev/u/josefnorlin)\
**Post date:** [January 30, 2021, 10:30am UTC](https://discourse.sst.dev/t/invoke-lambda-functions-locally/1325/7 "2021-01-30T10:30:56Z")

</div>

When I do serverless invoke local -f get --path events/get-event.json

I get:

Could not resolve “tableName” environment variable: Could not resolve Fn::ImportValue with name dev-notes-ext-infra-ExtTableName. Are you sure this value is exported ?

Any idea on what to do?

---

<div class="post-metadata">

**Author:** ![jayair](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/jayair/32/9_2.png) [@jayair](https://discourse.sst.dev/u/jayair)\
**Post date:** [May 15, 2021, 10:41pm UTC](https://discourse.sst.dev/t/invoke-lambda-functions-locally/1325/8 "2021-05-15T22:41:31Z")

</div>

It is a part of the infrastructure service that was previously deployed. Just make sure you have that already setup.
