# Unable to invoke local for AW Python Serverless template code

**URL:** <https://forum.serverless.com/t/unable-to-invoke-local-for-aw-python-serverless-template-code/1749>\
**Category:** Serverless Framework\
**Tags:** aws\
**Created:** [April 23, 2017, 5:15am UTC](https://forum.serverless.com/t/unable-to-invoke-local-for-aw-python-serverless-template-code/1749 "2017-04-23T05:15:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hackman](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/hackman/32/1727_2.png) [@hackman](https://forum.serverless.com/u/hackman)\
**Post date:** [April 23, 2017, 5:15am UTC](https://forum.serverless.com/t/unable-to-invoke-local-for-aw-python-serverless-template-code/1749/1 "2017-04-23T05:15:57Z")

</div>

I’m trying to create my 1st Python Lambda function. When I tried to execute the function locally, it errors out using template code from Serverless without me changing anything. See below to reproduce.

What I did was the following:  
I didn’t change any code. I just used the template code that Serverless created  
sls create --template aws-python --path helloworld

Then I deployed the code  
sls deploy

I tried to see if I invoke the function on Lambda:  
$ sls invoke -f hello  
{  
“body”: “{“input”: {}, “message”: “Go Serverless v1.0! Your function executed successfully!”}”,  
“statusCode”: 200  
}

Now I try to execute the same code locally:  
$ sls invoke local -f hello

Error --------------------------------------------------

```
 spawn UNKNOWN

 For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.

```

Stack Trace --------------------------------------------

Error: spawn UNKNOWN  
at exports.\_errnoException (util.js:949:11)  
at ChildProcess.spawn (internal/child\_process.js:302:11)  
at exports.spawn (child\_process.js:367:9)  
at resolve (C:\Users\Cuc0\AppData\Roaming\npm\node\_modules\serverless\lib\plugins\aws\invokeLocal\index.js:136:22)  
at AwsInvokeLocal.invokeLocalPython (C:\Users\Cuc0\AppData\Roaming\npm\node\_modules\serverless\lib\plugins\aws\invokeLocal\index.js:135:12)  
at AwsInvokeLocal.invokeLocal (C:\Users\Cuc0\AppData\Roaming\npm\node\_modules\serverless\lib\plugins\aws\invokeLocal\index.js:121:19)  
From previous event:  
at Object.AwsInvokeLocal.hooks.invoke:local:invoke [as fn] (C:\Users\Cuc0\AppData\Roaming\npm\node\_modules\serverless\lib\plugins\aws\invokeLocal\index.js:24:10)  
at BbPromise.reduce (C:\Users\Cuc0\AppData\Roaming\npm\node\_modules\serverless\lib\classes\PluginManager.js:210:55)  
at tryOnImmediate (timers.js:543:15)  
at processImmediate [as \_immediateCallback] (timers.js:523:5)  
From previous event:  
at PluginManager.invoke (C:\Users\Cuc0\AppData\Roaming\npm\node\_modules\serverless\lib\classes\PluginManager.js:210:22)  
at PluginManager.run (C:\Users\Cuc0\AppData\Roaming\npm\node\_modules\serverless\lib\classes\PluginManager.js:225:17)  
at Serverless.run (C:\Users\Cuc0\AppData\Roaming\npm\node\_modules\serverless\lib\Serverless.js:97:31)  
at serverless.init.then (C:\Users\Cuc0\AppData\Roaming\npm\node\_modules\serverless\bin\serverless:23:50)

Get Support --------------------------------------------  
Docs: [docs.serverless.com](http://docs.serverless.com)  
Bugs: [github.com/serverless/serverless/issues](http://github.com/serverless/serverless/issues)  
Forums: [forum.serverless.com](http://forum.serverless.com)  
Chat: [gitter.im/serverless/serverless](http://gitter.im/serverless/serverless)

Your Environment Information -----------------------------  
OS: win32  
Node Version: 6.1.0  
Serverless Version: 1.11.0
